Jump to content
  • Advertisement
Sign in to follow this  
charger

Device does not support A8R8G8B8 textures

This topic is 4240 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
Advertisement
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

Share this post


Link to post
Share on other sites
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!

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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....

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!