System: Windows XP, nVidia 6800 SLI
Compiler/IDE: Turbo Delphi
API: DirectX 9
Hi all,
Im rendering onto a render target texture, but nothing happens when the resolution of my screen is lower that the resolution of my render target.
For example: My render target is 512x512 and my screen resolution is 800x600 everything is fine. When I set my screen resolution to anything below 512x512 the render target does not get updated!
The rest of the scene what is NOT rendered to a render target is renderd correctly!
This is how I create my render target:
The begin-scene code: (the beginning when I try to render to my render target):Code:if Succeeded( Device.Screen.device.CreateTexture(FParam.Width, FParam.Height, FParam.MipMapCount, D3DUSAGE_RENDERTARGET, Necro3DFMTToD3DFMT(FParam.Format), D3DPOOL_DEFAULT, Texture, nil) ) then begin Loaded := true; end else Loaded := false;
Comment: FCanRender is always true just for testing...Code:if Texture<>nil then begin FRenderTargetIndex := Index; Device := TNecro3D_Device9( GetDevice ); Device.Screen.Device.GetRenderTarget(Index, FOldRenderTarget); Texture.GetSurfaceLevel(0, FRenderTarget); Device.Screen.Device.SetRenderTarget(Index, FRenderTarget); Device.Screen.Device.BeginScene; FCanRender := true; end;
And this is called whenever I finish rendering to my render target:
Code:if FCanRender then begin Device := TNecro3D_Device9( GetDevice ); Device.Screen.Device.EndScene; Device.Screen.Device.SetRenderTarget(FRenderTargetIndex, FOldRenderTarget); FOldRenderTarget := nil; FRenderTarget := nil; end;



epthStencil Buffer must be at least as big as the RenderTarget. Process Sandbox.exe (3160)
