Archived

This topic is now archived and is closed to further replies.

Helicon56

D3D Advice

Recommended Posts

Helicon56    122
Hi all, I was wondering what people's opinions on the best way to do this are: This is a bit hard to explain.... I've got a window, in which Direct3D is being setup fine, and it's drawing to the window correctly, in the correct rect. However, i want to make different parts of this rect draw different things. As in, have the top left quarter of the rect draw one picture, the top right draw another, etc, and they all be completely independent from one another. I'm unsure as to the best way to go about this. I've thought of a few ideas, but none sound very reasonable. What i'd like to do is set up a class of some kind for each of the 4 different parts of the window, but i'm unsure of what data structure to use, and the methods of rendering all parts to the final rect at the right positions to use. By data structure i mean should i use a quad/texture/surface... or whatever ways may be possible. Any advice on this would be much appreciated. --Helicon [edited by - helicon56 on April 29, 2002 2:24:54 PM]

Share this post


Link to post
Share on other sites
jollyjeffers    1570
reconfigure the viewports - it''s worked for me before.

forget the exact code, but use the D3DVIEWPORT8 structure with the SetViewport / GetViewport commands.

you can then set the specific X/Y coords on the render target where it''ll be rendered.

Jack;

Share this post


Link to post
Share on other sites
sigge    122
sounds like what youre searching for d3ddevice->setViewPort(), its designed for exactly this, whether you want to render a simple image or a complex scene in the subset of the window doesnt matter, just render it as if they were individual scenes.

Share this post


Link to post
Share on other sites