digitalmars.D.learn - Handling DirectX 9 texture
Hi. I would like some sample code which demonstrates how can I modify a DirectX 9 texture. (C++ or D, doesn't matter.) I have a texture, like a billboard, and I would like to draw on that. I already looked on google, on different gamedev sites etc. haven't fount a working solution. I try the D forums (besides that my goal is to write my program in D), because a lot of great skulls used to be around here... As a texture quad, here's a sample: http://www.drunkenhyena.com/cgi-bin/view_cpp_article.pl?chapter=2;article=30 If I try to modify the loaded texture, whatever I try (UpdateTexture, UpdateSurface, different D3DUSAGE, D3DPOOL, etc.), it crashes (with the much telling D3DERR_INVALIDCALL error). I need explicitly DirectX 9 (not openGL), and possible without the usage if D3DX (like D3DX sprites). Thanks, ElfQT
Sep 11 2012
On Tuesday, 11 September 2012 at 12:06:29 UTC, ElfQT wrote:Hi. I would like some sample code which demonstrates how can I modify a DirectX 9 texture. (C++ or D, doesn't matter.) I have a texture, like a billboard, and I would like to draw on that. I already looked on google, on different gamedev sites etc. haven't fount a working solution. I try the D forums (besides that my goal is to write my program in D), because a lot of great skulls used to be around here... As a texture quad, here's a sample: http://www.drunkenhyena.com/cgi-bin/view_cpp_article.pl?chapter=2;article=30 If I try to modify the loaded texture, whatever I try (UpdateTexture, UpdateSurface, different D3DUSAGE, D3DPOOL, etc.), it crashes (with the much telling D3DERR_INVALIDCALL error). I need explicitly DirectX 9 (not openGL), and possible without the usage if D3DX (like D3DX sprites). Thanks, ElfQTFor things like that I use gamedev.net. You are more likely to get a better answer there.
Sep 12 2012