• Advertisement

Archived

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

DirectX - 2D Surfaces in D3D

This topic is 6453 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 have been programming a 3D engine with D3D. I''m wanting to put up some 2D surfaces for things like a UI, custom mouse pointer, etc. Can I just do a standard blit on the back surface when I''m using D3D or is there a special technique? Currently if I try to blit the 2D surface the screen goes black and I have to reboot Any info is appreciated. Thanks, Balrin

Share this post


Link to post
Share on other sites
Advertisement
Yep, you can. Just make sure it''s not between the BeginScene and EndScene calls (no 2D drawing is allowed in there afaik).

--TheGoop

Share this post


Link to post
Share on other sites
Oh, I didn''t know that, but I checked and I''m trying to blt after the scene so that isn''t the problem.

Share this post


Link to post
Share on other sites
I dont''t know if any cards support this but there is a flag in the DDCAPS structure that tells if blitting is supported between Beginscene and Endscene

Share this post


Link to post
Share on other sites
I''ve generally found blitting to work fine as long as its not between BeginScene and EndScene. On many cards, it''ll work between those calls - but you take a pretty large performance hit for it, from what I can see.

If you want to avoid a state change (and don''t need really big graphics), you can always TLVERTEX structures and just specify screen coordinates with your DrawPrimitive call.

Share this post


Link to post
Share on other sites

  • Advertisement