Z-Buffer on OpenGL ES

Hey There,

I want to implement the Hidden Surface Removal (HSR) that use the ZBuffer… but i have a few questions about OpenGL ES.

  • Can i access OpenGL ES’ zbuffer? How may i do that?
  • If i have to create my own zbuffer algorithm, how can i get the pixels of a polygon`s projection? OpenGL ES help me with that?

Any answers, ideas, questions are welcome. I need some help to implement this HSR

thanks

Wendel B Silva

No, you cannot read values from the depth buffer, and the only ways of writing to it are rendering triangles and clear.

  • If i have to create my own zbuffer algorithm, how can i get the pixels of a polygon`s projection? OpenGL ES help me with that?

Not in any efficient way. You’d have to transform vertices, clip triangles and rasterize them yourself.

Any answers, ideas, questions are welcome. I need some help to implement this HSR

Maybe you could explain what’s special about your HSR algorithm.

I want make a occlusion culling method.

I wanna get the depth buffer of the last frame renderized, identify the polygons rendered and use it as occluders. Then i render the occluders to the depth buffer use it to fast identify if the polygon will be seen. The polygons i have stored in an octree, then i can fast discard any octree node that isnt needed to be rendered.

I hope its clear

[]’

Wendel B Silva

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.