IDirect3DTexture9* pDiffuseTexture = 0;
IDirect3DTexture9* pNormalMapTexture = 0;
HRESULT hr = 0;
hr = g_pd3d9Device->CreateTexture(256, 256, 1, 0, D3DFMT_A8R8G8B8,
D3DPOOL_DEFAULT, &pDiffuseTexture, 0)));
hr = g_pd3d9Device->CreateTexture(256, 256, 1, 0, D3DFMT_A8R8G8B8,
D3DPOOL_DEFAULT, &pNormalMapTexture, 0)));
on first pass, it returns S_OK. But second pass it returns
D3DERR_INVALIDCALL. The parameter is same.
what is the problem actually?
thanks.
Direct3D Programming Tip #5: Use the Debug Runtime
<http://legalizeadulthood.wordpress.com/2009/06/28/direct3d-programming-tip-5-use-the-debug-runtime/>
--
"The Direct3D Graphics Pipeline" -- DirectX 9 draft available for download
<http://legalizeadulthood.wordpress.com/the-direct3d-graphics-pipeline/>
Legalize Adulthood! <http://legalizeadulthood.wordpress.com>
Direct3D9: (ERROR) :Invalid format specified for texture
Direct3D9: (ERROR) :Failure trying to create a texture
i checked on caps viewier that my graphic card affords uses D3DFMT_A8R8G8B8.
but i didn't understant, on second pass still fails.
"Richard [Microsoft Direct3D MVP]" <legaliz...@mail.xmission.com>
ditulis dalam berita pesan:OFaQSvDb...@TK2MSFTNGP05.phx.gbl...
"gd" <gedebo...@gmail.com> spake the secret code
<F86C2931-2180-4F63...@microsoft.com> thusly:
>thanks, i did. but on output stream shows this message.
>
>Direct3D9: (ERROR) :Invalid format specified for texture
>Direct3D9: (ERROR) :Failure trying to create a texture
>
>i checked on caps viewier that my graphic card affords uses D3DFMT_A8R8G8B8.
>but i didn't understant, on second pass still fails.
Then it seems the process is elsewhere, since I see nothing wrong with
the 5 lines of code you posted. Unless of course that isn't the
*actual* code you're executing, but just your paraphrase of what is
executing. I notice that in the code you posted, you store the
HRESULT from the function, but don't actually check it.
(Richard) legaliz...@mail.xmission.com spake the secret code
<OApKRRIb...@TK2MSFTNGP06.phx.gbl> thusly:
>Then it seems the process is elsewhere, [...]
That should be "it seems the *problem* is elsewhere".