|
@@ -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; }
|