   BeginScene..EndScene without Present [SOLVED]
  Hi all,I'm trying to do some offline renderization (for radiosity generation using the GPU) and my simplified code looks like this:procedure GenerateRadiosity;begin  // Set up device states  PrepareRenderStates;    // Prepare our sample surface (16x16) as the render target  GPUBuffer.SetRenderTarget;  // Iterate through all luxels  for I:= 0 to LuxelCount - 1 do  begin    // Build the view and projection matrix for this luxel    BuildView(Luxels);    GPUBuffer.Clear;    // Draw the objects for this luxel to sample the emissive light    for I:= 0 to Shader.Run - 1 do    begin Shader.BeginPass(I); DrawObjects;    end;    // Assign the average as the luxel color    Luxel.Color := GetRadiosity(GPUBuffer);  end;  // Restore previous device states  RestoreRenderStates;end;It works just fine if I call GenerateRadiosity from inside a FrameRender event (with the usual BeginScene...EndScene...Present chain):procedure Engine.FrameRender;begin  Renderer.BeginScene;   ...scene stuff...   if GenerateRadiosityNow then GenerateRadiosity;  ...scene stuff...   Renderer.EndScene;  Renderer.Present;end;But then, I wanted to isolate the radiosity generation from the FrameRender event (so I could call it anytime in my loop). So, I added a BeginScene...EndScene pair inside the GenerateRadiosity procedure:procedure GenerateRadiosity;begin  // Begin renderization  Device.BeginScene;   ...previous code...  // End renderization  Device.EndScene;end;But it stopped working. The target is cleared just fine, but nothing is drawn into the texture. All renderization methods returns SUCCEDED results, and the debug runtime doesn't show any warnings.Is it correct to call a BeginScene...EndScene set without calling Present after? Is this the regular way to use the GPU for an offline renderization?Thanks in advance!Juan Pablo.[Edited by - jpventoso on June 17, 2009 5:29:16 PM]
  I figured it out =) I was setting my vertex declaration before on the FrameRender event and it was not set on my GenerateRadiosity procedure... :/Cheers,Juan Pablo   