Take the 2-minute tour ×
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
1  
Fire31 you really need to give tons and tons more info here :). I haven't encountered a white quad, any idea where the white is coming from, is it the clear color? What exactly is your method and where do you think the problem is. –  Roy T. Nov 9 '12 at 16:59

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.