mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-11 22:54:34 +00:00
final rev
add safeties to getters getTextureBitmap/ functions to return member variable that is collected when the image is set
This commit is contained in:
parent
6eac6d767b
commit
b707b2e2b7
2 changed files with 16 additions and 6 deletions
|
|
@ -141,6 +141,7 @@ private:
|
|||
bool mIsNamedTarget;
|
||||
S32 mImageWidth;
|
||||
S32 mImageHeight;
|
||||
S32 mImageDepth;
|
||||
S32 mImageChannels;
|
||||
|
||||
void generateTexture(void);
|
||||
|
|
@ -186,13 +187,13 @@ public:
|
|||
void setImageType(ImageTypes type) { mImageType = type; }
|
||||
ImageTypes getImageType() { return mImageType; }
|
||||
|
||||
inline U32 getTextureWidth(void) const { return mTextureHandle->getWidth(); }
|
||||
inline U32 getTextureHeight(void) const { return mTextureHandle->getHeight(); }
|
||||
inline U32 getTextureDepth(void) const { return mTextureHandle->getDepth(); }
|
||||
inline U32 getTextureWidth(void) const { return isAssetValid() ? mTextureHandle->getWidth() : 0; }
|
||||
inline U32 getTextureHeight(void) const { return isAssetValid() ? mTextureHandle->getHeight() : 0; }
|
||||
inline U32 getTextureDepth(void) const { return isAssetValid() ? mTextureHandle->getDepth() : 0; }
|
||||
|
||||
inline U32 getTextureBitmapWidth(void) const { return mTextureHandle->getBitmapWidth(); }
|
||||
inline U32 getTextureBitmapHeight(void) const { return mTextureHandle->getBitmapHeight(); }
|
||||
inline U32 getTextureBitmapDepth(void) const { return mTextureHandle->getBitmapDepth(); }
|
||||
inline U32 getTextureBitmapWidth(void) const { return mImageWidth; }
|
||||
inline U32 getTextureBitmapHeight(void) const { return mImageHeight; }
|
||||
inline U32 getTextureBitmapDepth(void) const { return mImageDepth; }
|
||||
bool isAssetValid(void) const override { return !mTextureHandle.isNull(); }
|
||||
|
||||
bool isNamedTarget(void) const { return mIsNamedTarget; }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue