D3D Advice

Started by
4 comments, last by Helicon56 21 years, 11 months ago
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]
Advertisement
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;

<hr align="left" width="25%" />
Jack Hoxley <small>[</small><small> Forum FAQ | Revised FAQ | MVP Profile | Developer Journal ]</small>

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.
How does the performance of d3ddevice->setViewPort() compare to rendering to a texture? It should be somewhat faster, right?

Moe''s site
Jack Hoxley!Great to c u man !

~The fastest polygons are those you don''''t draw...~
-Da Mr.RaSt3RiZah-
Thanks guys, it worked perfectly, exactly what i wanted.

Glad to see something''s alot simpler than i was expecting for once.

This topic is closed to new replies.

Advertisement