Added Texture::GetSize()
Former-commit-id: da4b31cf95f605f83da17f63bc9a6dbd1d8b35c6
This commit is contained in:
parent
f69d2f13e5
commit
866ff64548
|
|
@ -44,6 +44,7 @@ class NAZARA_API NzTexture : public NzResource, NzNonCopyable
|
||||||
unsigned int GetDepth() const;
|
unsigned int GetDepth() const;
|
||||||
nzPixelFormat GetFormat() const;
|
nzPixelFormat GetFormat() const;
|
||||||
unsigned int GetHeight() const;
|
unsigned int GetHeight() const;
|
||||||
|
NzVector2ui GetSize() const;
|
||||||
nzImageType GetType() const;
|
nzImageType GetType() const;
|
||||||
unsigned int GetWidth() const;
|
unsigned int GetWidth() const;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -451,6 +451,19 @@ unsigned int NzTexture::GetHeight() const
|
||||||
return m_impl->height;
|
return m_impl->height;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
NzVector2ui NzTexture::GetSize() const
|
||||||
|
{
|
||||||
|
#if NAZARA_RENDERER_SAFE
|
||||||
|
if (!m_impl)
|
||||||
|
{
|
||||||
|
NazaraError("Texture must be valid");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
return NzVector2ui(m_impl->width, m_impl->height);
|
||||||
|
}
|
||||||
|
|
||||||
nzImageType NzTexture::GetType() const
|
nzImageType NzTexture::GetType() const
|
||||||
{
|
{
|
||||||
#if NAZARA_RENDERER_SAFE
|
#if NAZARA_RENDERER_SAFE
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue