enum D3DFORMAT problem

Started by
3 comments, last by sasho648 11 years, 5 months ago
So the variable type is D3DFORMAT but in the enumration i can't find thoose two format enumartion members:


MAKEFOURCC('J', 'P', 'G', 'C') //Compressed JPGC
MAKEFOURCC('J', 'P', 'G', 'D') //Compressed JPGD


Please help if you know something about those two formatssmile.png .

EDIT: The SDK of DirectX 9 is about 2000~2002 for ~ VC++ 6.0.
Advertisement
Those formats are not understood by D3D itself, they are driver-specific formats.

If your hardware supports such surface formats, generally you can still lock them and fill them with the appropriate data - but you'll get no help from D3DX with regard to actually loading the data.

Niko Suni

I've never heard of JPGC/JPGD as FourCC codes for D3D9 texture formats... googling for them only returns this thread!

Where did you get those FourCC codes from?
Yea, I couldn't find the format descriptions anywhere either.

Niko Suni

Nothing new... Reversing program from 2003 wasn't good idea. The same happened with EAX 3.0 SDK too sad.png .

Anyway it is from Tomb Raider : The Angel of Darkness Here is a structure and the static object defined as follows:


struct SYS_D3D_FORMAT_DESC
{
bool CanDirectlyMapData(D3DFORMAT);
D3DFORMAT m_0;
unsigned char m_4;
unsigned char m_5;
unsigned char m_6;
unsigned char m_7;
unsigned long m_8;
unsigned char m_12;
unsigned char m_13;
unsigned char m_14;
unsigned char m_15;
unsigned long m_16;
unsigned long m_20;
unsigned long m_24;
unsigned long m_28;
unsigned char m_32;
unsigned char m_33;
unsigned char m_34;
unsigned char m_35;
const char* m_36;
} ; //size of 40
static const SYS_D3D_FORMAT_DESC _v0[] = { {D3DFMT_R8G8B8, 0x3, 0, 0x8080800, 0, 0xff0000, 0xff00, 0xff, 0, "24 bit R8G8B8"},
{D3DFMT_A8R8G8B8, 0x4, 0, 0x8080808, 0xff000000, 0xff0000, 0xff00, 0xff, 0, "32 bit A8R8G8B8"},
{D3DFMT_X8R8G8B8, 0x4, 0, 0x8080800, 0, 0xff0000, 0xff00, 0xff, 0, "32 bit X8R8G8B8"},
{D3DFMT_R5G6B5, 0x2, 0, 0x5060500, 0, 0xf800, 0x7e0, 0x1f, 0, "16 bit R5G6B5"},
{D3DFMT_X1R5G5B5, 0x2, 0, 0x5050500, 0, 0x7c00, 0x3e0, 0x1f, 0, "16 bit X1R5G5B5"},
{D3DFMT_A1R5G5B5, 0x2, 0, 0x5050501, 0x8000, 0x7c00, 0x3e0, 0x1f, 0, "16 bit A1R5G5B5"},
{D3DFMT_A4R4G4B4, 0x2, 0, 0x4040404, 0xf000, 0xf00, 0xf0, 0xf, 0, "16 bit A4R4G4B4"},
{D3DFMT_R3G3B2, 0x1, 0, 0x2030300, 0, 0xe0, 0x1c, 0x3, 0, "8 bit R3G3B2"},
{D3DFMT_A8, 0x1, 0, 0x8, 0xff, 0, 0, 0, 0, "8 bit A8"},
{D3DFMT_A8R3G3B2, 0x2, 0, 0x2030308, 0xff00, 0xe0, 0x1c, 0x3, 0, "16 bit A8R3G3B2"},
{D3DFMT_X4R4G4B4, 0x2, 0, 0x4040400, 0, 0xf00, 0xf0, 0xf, 0, "16 bit X4R4G4B4"},
{D3DFMT_A2B10G10R10, 0x4, 0, 0xa0a0a02, 0xc0000000, 0x3ff, 0xffc00, 0x3ff00000, 0, "32 bit A2B10G10R10"},
{D3DFMT_G16R16, 0x4, 0, 0x101000, 0, 0xffff, 0xffff0000, 0, 0, "32 bit G16R16"},
{D3DFMT_A8P8, 0x2, 0, 0x8, 0xff00, 0, 0, 0, 0, "8 bit Palette A8"},
{D3DFMT_P8, 0x1, 0, 0, 0, 0, 0, 0, 0, "8 bit Palette"},
{D3DFMT_L8, 0x1, 0, 0x8080800, 0, 0xff, 0xff, 0xff, 0, "8 bit Gray L8"},
{D3DFMT_A8L8, 0x2, 0, 0x8080808, 0xff00, 0xff, 0xff, 0xff, 0, "16 bit Gray A8L8"},
{D3DFMT_A4L4, 0x1, 0, 0x4040404, 0xf0, 0xf, 0xf, 0xf, 0, "8 bit Gray A4L4"},
{D3DFMT_V8U8, 0x2, 0, 0, 0, 0, 0, 0, 0, "16 bit Bump V8U8"},
{D3DFMT_L6V5U5, 0x2, 0, 0x600, 0, 0, 0, 0, 0, "16 bit Bump L6V5U5"},
{D3DFMT_X8L8V8U8, 0x4, 0, 0, 0, 0, 0, 0, 0, "32 bit Bump X8L8V8U8"},
{D3DFMT_Q8W8V8U8, 0x4, 0, 0, 0, 0, 0, 0, 0, "32 bit Bump Q8W8V8U8"},
{D3DFMT_V16U16, 0x4, 0, 0, 0, 0, 0, 0, 0, "16 bit Bump V16U16"},
{D3DFMT_A2W10V10U10, 0x4, 0, 0x2, 0, 0, 0, 0, 0, "32 bit Bump A2W10V10U10"},
{D3DFMT_UYVY, 0x2, 0x2, 0, 0, 0, 0, 0, 0, "Compressed UYVY"},
{D3DFMT_YUY2, 0x2, 0x2, 0, 0, 0, 0, 0, 0, "Compressed YUY2"},
{D3DFMT_DXT1, 0x8, 0x2, 0x5060500, 0, 0, 0, 0, 0, "Compressed DXT1"},
{D3DFMT_DXT2, 0x10, 0x2, 0x5060500, 0, 0, 0, 0, 0, "Compressed DXT2"},
{D3DFMT_DXT3, 0x10, 0x2, 0x4040404, 0, 0, 0, 0, 0, "Compressed DXT3"},
{D3DFMT_DXT4, 0x10, 0x2, 0x4040404, 0, 0, 0, 0, 0, "Compressed DXT4"},
{D3DFMT_DXT5, 0x10, 0x2, 0x4040404, 0, 0, 0, 0, 0, "Compressed DXT5"},
{(D3DFORMAT)1128747082, 0x10, 0x2, 0x4040404, 0, 0, 0, 0, 0, "Compressed JPGC"}, //Here!!!!!!!!!!!!!!!???
{(D3DFORMAT)1145524298, 0x10, 0x2, 0x4040404, 0, 0, 0, 0, 0, "Compressed JPGD"}, //Here!!!!!!!!!!!!!!!???
{D3DFMT_D32, 0x4, 0, 0, 0, 0, 0, 0, 0x20, "32 bit Depth D32"},
{D3DFMT_D15S1, 0x2, 0, 0, 0, 0, 0, 0, 0x10f, "16 bit Depth D15S1"},
{D3DFMT_D24S8, 0x4, 0, 0, 0, 0, 0, 0, 0x818, "32 bit Depth D24S8"},
{D3DFMT_D16, 0x2, 0, 0, 0, 0, 0, 0, 0x10, "16 bit Depth D16"},
{D3DFMT_D24X8, 0x4, 0, 0, 0, 0, 0, 0, 0x18, "32 bit Depth D24X8"},
{D3DFMT_D24X4S4, 0x4, 0, 0, 0, 0, 0, 0, 0x418, "32 bit Depth D24X4S4"},
{D3DFMT_A8B8G8R8, 0x4, 0, 0x8080808, 0xff000000, 0xff, 0xff00, 0xff0000, 0, "32 bit A8B8G8R8"},
{D3DFMT_X8B8G8R8, 0x4, 0, 0x8080800, 0, 0xff, 0xff00, 0xff0000, 0, "32 bit X8B8G8R8"},
{D3DFMT_A2R10G10B10, 0x4, 0, 0xa0a0a02, 0xc0000000, 0x3ff00000, 0xffc00, 0x3ff, 0, "32 bit A2R10G10B10"},
{D3DFMT_A16B16G16R16, 0x8, 0, 0x10101010, 0, 0xffff, 0xffff0000, 0, 0, "64 bit A16B16G16R16"},
{D3DFMT_Q16W16V16U16, 0x8, 0, 0x10101010, 0, 0, 0xffff0000, 0xffff, 0, "64 bit Bump Q8W8V8U8"},
{D3DFMT_L16, 0x2, 0, 0x10101000, 0, 0xffff, 0xffff, 0xffff, 0, "16 bit Gray L16"},
{D3DFMT_MULTI2_ARGB8, 0x10, 0, 0x8080808, 0, 0, 0, 0, 0, "MET 2*ARGB8"},
{D3DFMT_R16F, 0x2, 0x1, 0x1000, 0, 0, 0, 0, 0, "16 bit G16F"},
{D3DFMT_G16R16F, 0x4, 0x1, 0x101000, 0, 0, 0, 0, 0, "32 bit G16R16F"},
{D3DFMT_A16B16G16R16F, 0x8, 0x1, 0x10101010, 0, 0, 0, 0, 0, "64 bit A16B16G16R16F"},
{D3DFMT_R32F, 0x4, 0x1, 0x2000, 0, 0, 0, 0, 0, "32 bit G32F"},
{D3DFMT_G32R32F, 0x8, 0x1, 0x202000, 0, 0, 0, 0, 0, "64 bit G32R32F"},
{D3DFMT_A32B32G32R32F, 0x10, 0x1, 0x20202020, 0, 0, 0, 0, 0, "128 bit A32B32G32R32F"},
{D3DFMT_UNKNOWN, 0, 0x3, 0, 0, 0, 0, 0, 0, 0} } ;

This topic is closed to new replies.

Advertisement