mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-03-13 09:20:47 +00:00
Added GFXFormatR8G8B8A8_SRGB format.
This commit is contained in:
parent
bd60f3be1a
commit
12621f876b
4 changed files with 7 additions and 0 deletions
|
|
@ -72,6 +72,7 @@ void GFXD3D11EnumTranslate::init()
|
|||
GFXD3D11TextureFormat[GFXFormatD24S8] = DXGI_FORMAT_D24_UNORM_S8_UINT;
|
||||
GFXD3D11TextureFormat[GFXFormatD24FS8] = DXGI_FORMAT_UNKNOWN;
|
||||
GFXD3D11TextureFormat[GFXFormatD16] = DXGI_FORMAT_D16_UNORM;
|
||||
GFXD3D11TextureFormat[GFXFormatR8G8B8A8_SRGB] = DXGI_FORMAT_B8G8R8A8_UNORM_SRGB;
|
||||
//------------------------------------------------------------------------------
|
||||
//------------------------------------------------------------------------------
|
||||
GFXD3D11TextureFilter[GFXTextureFilterNone] = D3D11_FILTER_MIN_MAG_MIP_POINT;
|
||||
|
|
|
|||
|
|
@ -114,6 +114,7 @@ void GFXD3D9EnumTranslate::init()
|
|||
GFXD3D9TextureFormat[GFXFormatD24S8] = D3DFMT_D24S8;
|
||||
GFXD3D9TextureFormat[GFXFormatD24FS8] = D3DFMT_D24FS8;
|
||||
GFXD3D9TextureFormat[GFXFormatD16] = D3DFMT_D16;
|
||||
GFXD3D9TextureFormat[GFXFormatR8G8B8A8_SRGB] = D3DFMT_UNKNOWN;
|
||||
VALIDATE_LOOKUPTABLE( GFXD3D9TextureFormat, GFXFormat);
|
||||
//------------------------------------------------------------------------------
|
||||
//------------------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -205,6 +205,9 @@ enum GFXFormat
|
|||
GFXFormatDXT4,
|
||||
GFXFormatDXT5,
|
||||
|
||||
// sRGB formats
|
||||
GFXFormatR8G8B8A8_SRGB,
|
||||
|
||||
GFXFormat_COUNT,
|
||||
|
||||
GFXFormat_8BIT = GFXFormatA8,
|
||||
|
|
|
|||
|
|
@ -190,6 +190,8 @@ void GFXGLEnumTranslate::init()
|
|||
GFXGLTextureType[GFXFormatDXT4] = GL_ZERO;
|
||||
GFXGLTextureType[GFXFormatDXT5] = GL_UNSIGNED_BYTE;
|
||||
|
||||
GFXGLTextureType[GFXFormatR8G8B8A8_SRGB] = GL_SRGB8_ALPHA8;
|
||||
|
||||
static GLint Swizzle_GFXFormatA8[] = { GL_NONE, GL_NONE, GL_NONE, GL_RED };
|
||||
static GLint Swizzle_GFXFormatL[] = { GL_RED, GL_RED, GL_RED, GL_ALPHA };
|
||||
GFXGLTextureSwizzle[GFXFormatA8] = Swizzle_GFXFormatA8; // old GL_ALPHA8
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue