Jump to content
  • Advertisement

Archived

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

AndyM

3D icons over 3d scene

This topic is 5195 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

After drawing the main view of a game, I then need to draw 3D icons, meshes etc on top of that main view. I need to use Z-buffering for drawing these overlays. I don't think I can just add these to my scene, at least without clearing the z-buffer, as they could intersect with the main scene! I'm not sure I can render to a texture as I need z-buffer support. I can use a 2nd render target, but how to then overlay (with transparent areas around objects) this onto the main view. Anyone done this kind of thing before? thanx Andy [edited by - andym on May 27, 2004 10:44:52 AM]

Share this post


Link to post
Share on other sites
Advertisement
no because I need to read and write z values for the 3D overlay (which includes animated meshes)

[edited by - andym on May 27, 2004 10:44:03 AM]

Share this post


Link to post
Share on other sites
You can set a texture as a render target and attach a depth/stencil surface to it, giving you another z buffer. Render to the texture, then just render the texture as a quad.

digital radiation

Share this post


Link to post
Share on other sites
Just clear the ZBuffer, or Device.Clear(ClearFlags.ZBuffer,0,1,0). That''s C#. C++ can''t be that much different. Just have it draw your background, and then clear the zbuffer and then draw your icons

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!