DX9 Render target size

Started by
18 comments, last by Corefanatic 13 years, 4 months ago
Hi all,

I have the following problem:

I'm trying out rendering to texture and then applying the texture to full screen quad.

When I set the render target to 512x512 it renders fine.

When I set it to 1024x1024 or my back buffer size, it renders nothing.
I've checked this using PIX, nothing gets drawn onto the render target.

I set the render target as following:
m_mainD3DDevice->CreateTexture(512,512,1,D3DUSAGE_RENDERTARGET,D3DFMT_X8R8G8B8,D3DPOOL_DEFAULT,&m_RT1,NULL);


however, as I mentioned already, setting any other values for height and width renders nothing.

Any tips where the problem might me?
Advertisement
Does the Debug Runtime tell you anything? Have you checked the return value from CreateTexture to see if it's successful? Is m_RT1 NULL?

Please don't PM me with questions. Post them in the forums for everyone's benefit, and I can embarrass myself publicly.

You don't forget how to play when you grow old; you grow old when you forget how to play.

Are you checking return values? Do any function fail? Do the Debug Runtimes say anything?

EDIT: Bah, Ninja'd
D3DX Debug doesn't give any fault and HRESULT from texture creating is S_OK.

Are you using a z-buffer too? What is the size of the z-buffer? It has to be same size or bigger than the rendertarget.

Cheers!
Zbuffer: AutoDepthStencilFormat = D3DFMT_D16;
Since you're getting a satisfactory HRESULT return, this is probably not the problem, but..
Quote:D3DX Debug doesn't give any fault...

Just to make sure we're talking about the same thing - it's not just defining DEBUG, the D3D runtime debug version of the DLLs needs to be turned on in the DX control panel.

Please don't PM me with questions. Post them in the forums for everyone's benefit, and I can embarrass myself publicly.

You don't forget how to play when you grow old; you grow old when you forget how to play.

Quote:Original post by Buckeye
Since you're getting a satisfactory HRESULT return, this is probably not the problem, but..
Quote:D3DX Debug doesn't give any fault...

Just to make sure we're talking about the same thing - it's not just defining DEBUG, the D3D runtime debug version of the DLLs needs to be turned on in the DX control panel.


Well, I do link against the debug versions and in Visual Studio Debug output I do get messages from D3DX like : D3DX: (INFO) Using SSE2 optimizations.

I have seen error messages before when I had other errors so I am pretty sure I do get debug info. Is there setting to for a level of debug info or is it constant?

Quote:Original post by Corefanatic
Zbuffer: AutoDepthStencilFormat = D3DFMT_D16;


I meant the width*height of the z-buffer, not the bit depth.

You can set the level of debugging messages. That's why we posted the link to the DruinkJournal. Did you check the DX control panel?

EDIT: The messages should come from Direct3D, not D3DX.

Ex:
Direct3D9: (INFO) :Direct3D9 Debug Runtime selected.


( EDIT2: C'mon, Steve. Keep up! [smile])

Please don't PM me with questions. Post them in the forums for everyone's benefit, and I can embarrass myself publicly.

You don't forget how to play when you grow old; you grow old when you forget how to play.

This topic is closed to new replies.

Advertisement