SetRenderTarget & Scene...

Started by
3 comments, last by Alex Red 18 years, 1 month ago
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
Advertisement
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.
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
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.
he..he.. it is tnx...
I have created a Vertex Buffer manager, working like an HD FAT, being this game something with a Objects DB of about 7000 items, and loaded on the fly while playing in different areas...

It was not present before, and this is already DX9 compliant...he..he..


tnx

[R]ed

This topic is closed to new replies.

Advertisement