Tell me more ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I'm trying to implement Catalin Zima's Deferred Renderer in a very lightweight c++ DirectX 9 app (only renders a skydome and a model), at this moment I'm trying to render the gbuffer, but I'm having a problem, the screen shows only the clear color, no matter how much I move the camera around.

However, removing all the render target operations lets the app render the scene normally, even if the models are being applied the renderGBuffer effect.

Any ideas of what I'm doing wrong?

share|improve this question
It can be that the render target type does not allow it to be drawn as a normal sprite on screen. I had a similar problems, but was while using XNA. Can you show the code where you set up your GBuffer render target? – Roy T. Nov 5 '12 at 16:56
@RoyT. I create the render targets as d3ddev>CreateTexture(width,height,1,D3DUSAGE_RENDERTARGET,D3DFMT_A8R8G8B8,D3DPO‌​OL_DEFAULT,&colorRT,NULL) then I call this function to convert the render target texture to a surface: void SetRenderTargetAux(int index,IDirect3DTexture9* textureRT) { IDirect3DSurface9* surface; textureRT->GetSurfaceLevel(0,&surface); d3ddev->SetRenderTarget(index,surface); surface->Release(); } – Fire31 Nov 5 '12 at 17:39
As a little note, if I try render only the skydome (with and without trying to set the gbuffer), the app will only draw the clear color too, but also VS2010's "results" window will show many continuous exception warnings. – Fire31 Nov 5 '12 at 18:57
What exceptions exactly? We need a lot more information! – Roy T. Nov 6 '12 at 8:52
I got the exceptions sorted out, it was just my machine being really clogged up, so much that VS started acting weird. Now to the important stuff, I wanted to see if there was really anything inside the render targets, so I set up a "control" scene (normally rendered), then I try to render a skydome with the deferred method, and after resolving the render targets I draw a world space quad and apply the color render target's content as it's texture, and here's the result. – Fire31 Nov 6 '12 at 17:18
show 3 more comments

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.