diff options
author | Nathan Letwory <nathan@letworyinteractive.com> | 2011-05-08 13:05:52 +0400 |
---|---|---|
committer | Nathan Letwory <nathan@letworyinteractive.com> | 2011-05-08 13:05:52 +0400 |
commit | ed3fd722108ea4d41167c8339a97ecd818e78cdf (patch) | |
tree | 858b8ce14f808667e81bd1b1cab8d02d3415abd9 /source/blender/imbuf/intern/dds/DirectDrawSurface.h | |
parent | aaa93c58b367e65bf4124e4b0d380925b0a6f539 (diff) |
Apply second half of [#21590] .dds textures: fix for DXT1n format + sync with upstream nvtt
submitted by Amorilia
This updates the DDS module with upstearm nvtt (r1042).
Diffstat (limited to 'source/blender/imbuf/intern/dds/DirectDrawSurface.h')
-rw-r--r-- | source/blender/imbuf/intern/dds/DirectDrawSurface.h | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/source/blender/imbuf/intern/dds/DirectDrawSurface.h b/source/blender/imbuf/intern/dds/DirectDrawSurface.h index 4db621be3da..5978e780991 100644 --- a/source/blender/imbuf/intern/dds/DirectDrawSurface.h +++ b/source/blender/imbuf/intern/dds/DirectDrawSurface.h @@ -126,11 +126,25 @@ struct DDSHeader void setLinearSize(uint size); void setPitch(uint pitch); void setFourCC(uint8 c0, uint8 c1, uint8 c2, uint8 c3); + void setFormatCode(uint code); + void setSwizzleCode(uint8 c0, uint8 c1, uint8 c2, uint8 c3); void setPixelFormat(uint bitcount, uint rmask, uint gmask, uint bmask, uint amask); void setDX10Format(uint format); void setNormalFlag(bool b); + void setSrgbFlag(bool b); + void setHasAlphaFlag(bool b); + void setUserVersion(int version); + + /*void swapBytes();*/ bool hasDX10Header() const; + uint signature() const; + uint toolVersion() const; + uint userVersion() const; + bool isNormalMap() const; + bool isSrgb() const; + bool hasAlpha() const; + uint d3d9Format() const; }; /// DirectDraw Surface. (DDS) @@ -142,6 +156,8 @@ public: bool isValid() const; bool isSupported() const; + + bool hasAlpha() const; uint mipmapCount() const; uint width() const; @@ -153,8 +169,8 @@ public: bool isTextureCube() const; void setNormalFlag(bool b); - - bool hasAlpha() const; /* false for DXT1, true for all other DXTs */ + void setHasAlphaFlag(bool b); + void setUserVersion(int version); void mipmap(Image * img, uint f, uint m); // void mipmap(FloatImage * img, uint f, uint m); |