mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-04-21 20:35:35 +00:00
Update GFXTextureManager and GBitmap
GBitmap Changes: Added all other formats to gbitmap that we support gbitmap now supports cubemaps added converters for all these other formats added stb_image_resize for extrudemips so we can extrude mipmaps for all other formats GFXTextureManager Can now directly make cubemaps and texture arrays based on the GFXTextureProfile API implementations for all functions that cubemaps and arrays needed
This commit is contained in:
parent
975fc924cc
commit
3aef90a6bc
66 changed files with 4235 additions and 2590 deletions
|
|
@ -45,6 +45,7 @@ class GFXTextureProfile;
|
|||
class GBitmap;
|
||||
struct DDSFile;
|
||||
class RectI;
|
||||
class GFXTexHandle;
|
||||
|
||||
/// Contains information on a locked region of a texture.
|
||||
///
|
||||
|
|
@ -92,6 +93,8 @@ public:
|
|||
|
||||
bool mDead;
|
||||
|
||||
U32 mArraySize;
|
||||
|
||||
/// The device this texture belongs to.
|
||||
GFXDevice *mDevice;
|
||||
|
||||
|
|
@ -150,10 +153,13 @@ public:
|
|||
U32 getBitmapHeight() const { return mBitmapSize.y; }
|
||||
U32 getBitmapDepth() const { return mBitmapSize.z; }
|
||||
GFXFormat getFormat() const { return mFormat; }
|
||||
U32 getArraySize() const { return mArraySize; }
|
||||
|
||||
/// Returns true if this texture is a render target.
|
||||
bool isRenderTarget() const { return mProfile->isRenderTarget(); }
|
||||
|
||||
bool isCubeMap() const { return mProfile->isCubeMap(); }
|
||||
|
||||
/// Returns the file path to the texture if
|
||||
/// it was loaded from disk.
|
||||
const String& getPath() const { return mPath; }
|
||||
|
|
@ -167,11 +173,11 @@ public:
|
|||
|
||||
/// Acquire a lock on part of the texture. The GFXLockedRect returned
|
||||
/// is managed by the GFXTextureObject and does not need to be freed.
|
||||
virtual GFXLockedRect * lock( U32 mipLevel = 0, RectI *inRect = NULL ) = 0;
|
||||
virtual GFXLockedRect * lock( U32 mipLevel = 0, RectI *inRect = NULL, U32 faceIndex = 0) = 0;
|
||||
|
||||
/// Releases a lock previously acquired. Note that the mipLevel parameter
|
||||
/// must match the corresponding lock!
|
||||
virtual void unlock( U32 mipLevel = 0) = 0;
|
||||
virtual void unlock( U32 mipLevel = 0, U32 faceIndex = 0) = 0;
|
||||
|
||||
// copy the texture data into the specified bitmap.
|
||||
// - this texture object must be a render target. the function will assert if this is not the case.
|
||||
|
|
@ -182,6 +188,10 @@ public:
|
|||
// - this process is not fast.
|
||||
virtual bool copyToBmp(GBitmap* bmp) = 0;
|
||||
|
||||
virtual void updateTextureSlot(const GFXTexHandle& texHandle, const U32 slot, const S32 face = -1) = 0;
|
||||
virtual void copyTo(GFXTextureObject* dstTex) = 0;
|
||||
virtual void generateMipMaps() = 0;
|
||||
|
||||
#ifdef TORQUE_DEBUG
|
||||
|
||||
// It is important for any derived objects to define this method
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue