mirror of
https://github.com/celisej567/source-engine.git
synced 2025-12-31 21:48:22 +03:00
togles: gamma fix, optimize texture convertation
This commit is contained in:
@@ -312,12 +312,17 @@ ImageFormat D3DFormatToImageFormat( D3DFORMAT format )
|
||||
|
||||
switch ( format )
|
||||
{
|
||||
#if !defined( _X360 )
|
||||
#ifdef TOGLES
|
||||
case D3DFMT_R8G8B8:
|
||||
return IMAGE_FORMAT_RGB888;
|
||||
case D3DFMT_A8R8G8B8:
|
||||
return IMAGE_FORMAT_RGBA8888;
|
||||
#else
|
||||
case D3DFMT_R8G8B8:
|
||||
return IMAGE_FORMAT_BGR888;
|
||||
#endif
|
||||
case D3DFMT_A8R8G8B8:
|
||||
return IMAGE_FORMAT_BGRA8888;
|
||||
#endif
|
||||
case D3DFMT_X8R8G8B8:
|
||||
return IMAGE_FORMAT_BGRX8888;
|
||||
case D3DFMT_R5G6B5:
|
||||
@@ -426,6 +431,10 @@ D3DFORMAT ImageFormatToD3DFormat( ImageFormat format )
|
||||
#endif
|
||||
case IMAGE_FORMAT_BGRA8888:
|
||||
return D3DFMT_A8R8G8B8;
|
||||
case IMAGE_FORMAT_RGB888:
|
||||
return D3DFMT_R8G8B8;
|
||||
case IMAGE_FORMAT_RGBA8888:
|
||||
return D3DFMT_A8R8G8B8;
|
||||
case IMAGE_FORMAT_BGRX8888:
|
||||
return D3DFMT_X8R8G8B8;
|
||||
case IMAGE_FORMAT_BGR565:
|
||||
|
||||
Reference in New Issue
Block a user