Sign in to follow this  
88er

How to render the scene to a given RECT in a simple window?(dx9)

Recommended Posts

88er    135
I mean it like DirectDraw's primarysurface,I want to render something in a part of window use D3DXGraphic.Although SetViewport could render the scene to a given viewport,but it seems that D3ddevice still control all the window,Other object in the window covered by D3dDevice. Is there any way to keep the d3ddevice display in given area.

Share this post


Link to post
Share on other sites
sirob    1181
The best way to limit the rendering to only a portion of the window is to render onto a container. Depending on the language, this would probably just be a Panel. DX then draws only on the panel, and not the entire window. Heres another question on the subject, with some thoughts on how to do that.

Hope this helps.

Share this post


Link to post
Share on other sites
88er    135
thanks in advance.
but I want to create an AvtivexControl use ATL,it's windowless ,i don't know how to add some other contain to it.

[Edited by - 88er on May 17, 2006 5:39:55 AM]

Share this post


Link to post
Share on other sites
88er    135
I got it.
it can be done use by Present(NULL,&ControlRect,NULL,NULL),
ControlRect is the destination rectangle

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this