Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

closed as off-topic by Josh Petrie Dec 22 '14 at 19:47

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions about debugging a problem in your project must present a concise selection of code and context so as to allow a reader to diagnose the issue without needing to read all of your code or to engage in extensive back-and-forth dialog. For more information, see this meta thread." – Josh Petrie
If this question can be reworded to fit the rules in the help center, please edit the 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
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