Device does not support A8R8G8B8 textures
Hi,
I'm a stone cold noob to directX ...so pls bear with me if this is a dumb question...
I'm going through the DX tuts at drunkenhyena and the D3DXFont is giving me troouble.
I think I unnerstand why the app fails but want to know if there is a workaround...
My adapter is a Intel(R) 82810E and seems to only support 24bit colour...no alpha...thus the error "Device does not support A8R8G8B8 textures"...DX seems to want to draw 32bit....can i get this to work on my cruddy intel card or am i fubarred?
Thanks.
Miguel
Hmm... A8R8G8B8 *textures* should be supported on any card. A8R8G8B8 as *backbuffer* format is not supported everywhere. NVidia for example only renders to X8R8G8B8 backbuffers. Are you sure you meant a "texture"? If yes, please post some source. The source portion where you create the texture and the portion where you fill in the data. If you meant the "backbuffer" instead, just exchange the backbuffer format by X8R8G8B8 and things should be moving again.
Bye, Thomas
Bye, Thomas
I am not very experienced with DirectX too, but i think the answer is Reference device. Copy pasted from the DX SDK documentation:
Reference Device
Direct3D supports an additional device type called a reference device or reference rasterizer. Unlike a software device, the reference rasterizer supports every Direct3D feature. Because these features are implemented for accuracy, rather than speed, and are implemented in software, the results are not very fast. The reference rasterizer does make use of special CPU instructions whenever it can, but it is not intended for retail applications. Use the reference rasterizer only for feature testing or demonstration purposes.
To create a reference device from C++, call the IDirect3D9::CreateDevice method, and pass the D3DDEVTYPE_REF constant as the device type.
So if your graphicscard does not support it, use the reference device, but realize it's a lot slower than hardware rendering. Sorry i couldn't find this topic in the online msdn library. Hope this helps and good luck!
Reference Device
Direct3D supports an additional device type called a reference device or reference rasterizer. Unlike a software device, the reference rasterizer supports every Direct3D feature. Because these features are implemented for accuracy, rather than speed, and are implemented in software, the results are not very fast. The reference rasterizer does make use of special CPU instructions whenever it can, but it is not intended for retail applications. Use the reference rasterizer only for feature testing or demonstration purposes.
To create a reference device from C++, call the IDirect3D9::CreateDevice method, and pass the D3DDEVTYPE_REF constant as the device type.
So if your graphicscard does not support it, use the reference device, but realize it's a lot slower than hardware rendering. Sorry i couldn't find this topic in the online msdn library. Hope this helps and good luck!
thanx for the replies...
ok...ive changed the backbuffer format be explicitly X8R8G8B8...
The call to CreateDevice now works for REF but not for HAL...
Failed to create the device : D3DERR_NOTAVAILABLE
any more help?
Tanks
Miguel
ok...ive changed the backbuffer format be explicitly X8R8G8B8...
The call to CreateDevice now works for REF but not for HAL...
Failed to create the device : D3DERR_NOTAVAILABLE
any more help?
Tanks
Miguel
Hi again...
More info on my prob....
this call is the one that is casuing the error:
hr=D3DXCreateFont(g_d3d_device, //D3D Device
22, //Font height
0, //Font width
FW_NORMAL, //Font Weight
1, //MipLevels
false, //Italic
DEFAULT_CHARSET, //CharSet
OUT_DEFAULT_PRECIS, //OutputPrecision
DRAFT_QUALITY, //Quality
DEFAULT_PITCH|FF_DONTCARE,//PitchAndFamily
"Arial", //pFacename,
&g_font); //ppFont
I can draw primitives, points, lines...all kind of things....but this call fails with:
D3DX: Device does not support A8R8G8B8 textures
Error creating D3DXCreateFont : D3DXERR_INVALIDDATA
help?...
Miguel
More info on my prob....
this call is the one that is casuing the error:
hr=D3DXCreateFont(g_d3d_device, //D3D Device
22, //Font height
0, //Font width
FW_NORMAL, //Font Weight
1, //MipLevels
false, //Italic
DEFAULT_CHARSET, //CharSet
OUT_DEFAULT_PRECIS, //OutputPrecision
DRAFT_QUALITY, //Quality
DEFAULT_PITCH|FF_DONTCARE,//PitchAndFamily
"Arial", //pFacename,
&g_font); //ppFont
I can draw primitives, points, lines...all kind of things....but this call fails with:
D3DX: Device does not support A8R8G8B8 textures
Error creating D3DXCreateFont : D3DXERR_INVALIDDATA
help?...
Miguel
Quote:Original post by Schrompf
Hmm... A8R8G8B8 *textures* should be supported on any card. A8R8G8B8 as *backbuffer* format is not supported everywhere. NVidia for example only renders to X8R8G8B8 backbuffers. Are you sure you meant a "texture"? If yes, please post some source. The source portion where you create the texture and the portion where you fill in the data. If you meant the "backbuffer" instead, just exchange the backbuffer format by X8R8G8B8 and things should be moving again.
Bye, Thomas
Hmmmmmmm....
Quote:Original post by charger
Hi again...
More info on my prob....
this call is the one that is casuing the error:
hr=D3DXCreateFont(g_d3d_device, //D3D Device
22, //Font height
0, //Font width
FW_NORMAL, //Font Weight
1, //MipLevels
false, //Italic
DEFAULT_CHARSET, //CharSet
OUT_DEFAULT_PRECIS, //OutputPrecision
DRAFT_QUALITY, //Quality
DEFAULT_PITCH|FF_DONTCARE,//PitchAndFamily
"Arial", //pFacename,
&g_font); //ppFont
I can draw primitives, points, lines...all kind of things....but this call fails with:
D3DX: Device does not support A8R8G8B8 textures
Error creating D3DXCreateFont : D3DXERR_INVALIDDATA
help?...
Miguel
The only texture formats with alpha your video adapter supports are ARGB 1555 and ARGB 4444. Since D3DXCreateFont tries to use A8R8G8B8 textures, you are going to have to make your own font code.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement