Archived

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

ironfroggy

render to bitmap 2 (the sequal)

Recommended Posts

Guest Anonymous Poster
Here''s an idea: read the manual. It''s called glReadPixels. It''s what you would use to read textures, depth or even stencil buffer information.

Share this post


Link to post
Share on other sites
Both. what i wanna be able to do in essence is render a cube, image and depth, to memory and then draw that to another rendered scene, using the depth buffer so that it only draws whats closer than things already there. Of course i want to be able to move it around X,Y, and Z but that shouldnt be too much harder after I figure out all this.

Share this post


Link to post
Share on other sites
fastest w3ay to draw to the depth buffer isd draw the polygons normally with glColorMask(0,0,0,0) ie only the depth info will get written
to read back the depth buffer use glReadPixels( GL_DEPTH_COMPONENT )

BUT from reading this
>>. what i wanna be able to do in essence is render a cube, image and depth, to memory and then draw that to another rendered scene, using the depth buffer so that it only draws whats closer than things already there. Of course i want to be able to move it around X,Y, and Z but that shouldnt be too much harder after I figure out all this. <<

youre prolly best off with the wgl_buffer_region extension , an example is on my site

http://members.xoom.com/myBollux

Share this post


Link to post
Share on other sites