Jump to content
  • Advertisement


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


Pre-rendered background with 3D objects

This topic is 5764 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''ve decided to try creating my own resident evil style game but have been having some problems getting the 3D objects(players) to interact right with the pre-rendered backgrounds. Basically I start by having a 24 bit pre-rendered image and its 24 bit depth image. When I try and draw the pixels of the depth image (using glDrawPixels with GL_DEPTH_COMPONENT) into the z-buffer, which is set to 24 bits, the 3d objects don''t get covered up when they should and strange occulsion areas and patterns show up. I have tried using the GL_DEPTH_STENCIL_NV,GL_UNSIGNED_INT_24_8_NV extensions to use the 24 bit depth image bitmap but it still doesnt work right. Does anyone know of a conversion method to take the 24 bits per pixel from the depth image and convert them into a format (integer/float?) that could be correctly draw directly into the depth buffer? Thanks

Share this post

Link to post
Share on other sites
check out the buffer_region extension eg
this lets u save a window (with depth) ''offscreen'' this can be redrawn quicvkly at the start of each frame


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!