render to bitmap 2 (the sequal)

Started by
5 comments, last by ironfroggy 22 years, 9 months ago
OK, thanks everyone! Now.. how can i do this with depth data as well?
(http://www.ironfroggy.com/)(http://www.ironfroggy.com/pinch)
Advertisement
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.
Here''s another idea:

Don''t be an asshole. Not everyone has such a non-existent life that they can read through all those things. Some people have stuff to do.

(http://www.ironfroggy.com/)(http://www.ironfroggy.com/pinch)
do u want to draw to the depth buffer or read from it?

http://members.xoom.com/myBollux
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.

(http://www.ironfroggy.com/)(http://www.ironfroggy.com/pinch)
Is anyone going to help???

// God.c
void main() {
WORLD Earth;
LIFE People = Earth.CreateLife(HUMAN);
GiveHope(&People);
delete Earth;
EvilCackle();
}
(http://www.ironfroggy.com/)(http://www.ironfroggy.com/pinch)
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

This topic is closed to new replies.

Advertisement