Jump to content
  • Advertisement
Sign in to follow this  
88er

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

This topic is 4421 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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
Advertisement
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
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
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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!