Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.

Dov Sherman

CreateRenderTarget error?

This topic is 5588 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

I''m using IDirect3DDevice8::CreateRenderTarget() to create a Direct3D surface. I''m using the SUCCEEDED() macro to test the result from that function like so... IDirect3DSurface8 *pThumbSurf=NULL; HRESULT hResult = m_pDirect3DDevice->CreateRenderTarget(iWidth, iHeight, D3DFMT_X8R8G8B8, D3DMULTISAMPLE_4_SAMPLES, FALSE, &pThumbSurf); if(SUCCEEDED(hResult)) { // do rendering } else { // report error } This works fine on some systems but, for some of my beta-testers, it always fails the SUCCEEDED() macro and the error resulting from CreateRenderTarget() is not D3DERR_INVALIDCALL, D3DERR_OUTOFVIDEOMEMORY, or E_OUTOFMEMORY, the only error codes listed for this function in the documentation. Is SUCCEEDED() not a reliable macro to use for this function? Is there another possible error code which is not listed by the documentation?

Share this post

Link to post
Share on other sites
Original post by Magnuz Guerra
You should test hardware support for multisample and for the texture format before requesting them from CreateRenderTarget.

I''ve tested for the texture format but how do I test for the multisample?

Share this post

Link to post
Share on other sites

  • 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!