da Vinci

I initialize textures as following:

texture = new XNA.Texture2D(device, width, height, 0, ResourceUsage.None, SurfaceFormat.Color, ResourceManagementMode.Manual);

This is fine on NVIDIA GF6800 and GF7800, but it doesn't work on GF5600/5900 at all!
AFAIK SurfaceFormat.Color is just ARGB, isn't it

texture = new XNA.Texture2D(device, width, height, 0, ResourceUsage.None, SurfaceFormat.Rgba32, ResourceManagementMode.Manual);

Rgba32 doesn't work anywhere ( )
Help me comprehend how to initialize textures, please.



Re: XNA Framework Texture format (Surface format) incomprehension...

Shawn Hargreaves - MSFT

What width and height are you specifying

What exactly is the error you get





Re: XNA Framework Texture format (Surface format) incomprehension...

da Vinci

> What width and height are you specifying
64 x 64 px

> What exactly is the error you get
In case of SurfaceFormat.Color on NVidia GF5600 and 5900 - "The method call is invalid."; although on GF6800 this works fine;
In case of SurfaceFormat.Rgba32 on NVidia GF6800 and 7800 - "The device does not support creating a texture of the given format with the given ResourceUsage.\r\nParameter name: format";





Re: XNA Framework Texture format (Surface format) incomprehension...

da Vinci

The assemblies can be downloaded here http://www.codeplex.com/heaven/Release/ProjectReleases.aspx ReleaseId=2033 , run Heaven.Xna.exe



Re: XNA Framework Texture format (Surface format) incomprehension...

Shawn Hargreaves - MSFT

The second error probably means exactly what it says - that format must not be supported on those cards.

For the first one, try running with the debug DX runtime and capturing the native output spew. That should tell you why it is failing.

See http://blogs.msdn.com/shawnhar/archive/2007/01/31/debugging-xna-graphics-problems.aspx for how to set that up.





Re: XNA Framework Texture format (Surface format) incomprehension...

da Vinci

"The second error probably means exactly what it says - that format must not be supported on those cards."
Hmm, It doesn't look like that RGBA32 is a peculiar format =) and 7800GT doesn't support it. Actually I think that the trouble may be becouse of ResourceUsage parameter or PresetationParameters..

"For the first one, try running with the debug DX runtime and capturing the native output spew. That should tell you why it is failing."
Ok, I will learn your link and try the debug DirectX runtime, thanks

The question is still open after all :(