Direct Draw blits with Direct3D
Ok, I''m sure this one has been asked before, I searched around, and couldn''t find anything, and I''m stumped.
I have Direct3D setup and what I want to do, is blit a basic ''interface'' graphic over the whole thing. But as far as I can tell, directdraw blits don''t work. Of course, they don''t return a single error which makes me upset. If they aren''t going to work, it could at least tell me, but regardless. I have no idea how to make it work.
I experimented with where I called the blit, before, during ,and after rendering a Direct3D scene, but it just didn''t work. I''d rather not create a polygon that it rests on as a texture, though if this is the best way, I''ll do it, I just think that''s retarded.
The only other ideas I have are
a) create a seperate device for rendering 3D to and try to blit it to the backbuffer, which is a normal 2D surface. (Don''t know if that would work, and it seems like it would be slow)
b) Lock the back buffer surface, and do custom blitting to the surface.
Any other ideas?
Even though you think drawing the interface with Direct3D is retarded it is still a good way to go. Because if you want to do blitting, the program must wait for the card to finish rendering its queue of 3D primitives before the blitting can continue. You could try lessen this wait by putting non rendering code between 3D rendering and interface drawing (e.g. AI, collision detection etc), but there is no guarantee that your program won''t be waiting for the card when it could use the time for something else.
Please excuse me for sticking my nose into things I really don''t know about, I''m new to to DirectDraw let alone Direct 3D
, but isn''t that what Overlay surfaces are for?

[email=wytraven@kik.net]wytraven@kik.net[/email]There is nothing real outside our perception of reality. Is there?
I suppose you can use Overlay surfaces to display interfaces. Overlay surfaces are however not supported in software so with graphics cards that don''t support overlay surfaces you still need to draw the interfaces.
Because overlays are separate from the primary buffer, they can have completely different pixelcomposition and are updated independently of the refreshrate. This makes it ideal for video output as you can have a thread that renders to the overlay surface, while another renders to the primary buffer.
Because overlays are separate from the primary buffer, they can have completely different pixelcomposition and are updated independently of the refreshrate. This makes it ideal for video output as you can have a thread that renders to the overlay surface, while another renders to the primary buffer.
Ok, well lets assume I''m going to draw the interface with Direct3D.
Now, as far as I can tell, textures are pretty limited (at least on my video card) as to their relative dimensions (width vs height) and size. Let''s say we are trying to draw an interface kind of like Age of Empires. Now, does this mean the ideal way to draw everything is to break it down in to chunks and render a piece at a time?
Or, should I create the interface background as large as I can get a texture to support, and draw it on a single quad.
The other thing is I could break it down into a few major chunks, so stretching doesn''t make it look to ugly. Such as, here is where the action buttons are, here''s where your overhead map are, etc... Actually, makes sense to do it like that from the interface standpoint anyway... Hmm...
Thanks for the replies.
Now, as far as I can tell, textures are pretty limited (at least on my video card) as to their relative dimensions (width vs height) and size. Let''s say we are trying to draw an interface kind of like Age of Empires. Now, does this mean the ideal way to draw everything is to break it down in to chunks and render a piece at a time?
Or, should I create the interface background as large as I can get a texture to support, and draw it on a single quad.
The other thing is I could break it down into a few major chunks, so stretching doesn''t make it look to ugly. Such as, here is where the action buttons are, here''s where your overhead map are, etc... Actually, makes sense to do it like that from the interface standpoint anyway... Hmm...
Thanks for the replies.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement