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

Started by
2 comments, last by 88er 17 years, 11 months ago
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.
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.
Sirob Yes.» - status: Work-O-Rama.
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]
I got it.
it can be done use by Present(NULL,&ControlRect,NULL,NULL),
ControlRect is the destination rectangle

This topic is closed to new replies.

Advertisement