SetRenderTarget & Scene...
Hi guys...
a Curiosity...
I wanna to render on a texture to be used on another render surface ( the main one e.g. the Display )...
I wonder, if the SetRenderTarget(s)can be used the following
BeginScene()
SetRenderTarget(MainSurface)
Draw()
SetRenderTarget(Texture)
Draw()
SetRenderTarget(MainSurface)
Draw(texture)
EndScene()
Basically, I'd like to know if it is possible to change a render target in the middle of a scene, or have I to close the previous scene, and open another one...?
tnx
[R]ed
You need to call BeginScene and EndScene only once per frame. You can change the render target anytime. Inside or Outside the BeginScene/EndScene pair makes no difference.
Most cards ignore these two calls anyway I have seen commercial games that don’t even use them. But you should NOT do this as is against the rules and the debug runtime would not render anything if you use draw methods outside the BeginScene/EndScene pair.
Most cards ignore these two calls anyway I have seen commercial games that don’t even use them. But you should NOT do this as is against the rules and the debug runtime would not render anything if you use draw methods outside the BeginScene/EndScene pair.
Tnx Demirug...
I forgot one particular, I am updating from a DX7 engine, but for now have to fix this still in DX7...
I suppoose this is still valid for old DX7 times...
tnx
[R]ed
I forgot one particular, I am updating from a DX7 engine, but for now have to fix this still in DX7...
I suppoose this is still valid for old DX7 times...
tnx
[R]ed
Yes, this had never changed as today’s D3D9 driver are only extended D3D7 driver.
I hope your D3D7 engine already use VertexBuffer. During a project I have learned that rendering without vertex buffers is much faster in D3D7 as in D3D9.
I hope your D3D7 engine already use VertexBuffer. During a project I have learned that rendering without vertex buffers is much faster in D3D7 as in D3D9.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement