depth-buffer

Can StretchRect be used with DF24 or INTZ surfaces? Can DF24 or INTZ be multisampled?

Can you StretchRect from a DF24 into another DF24 (ATI specific)? Can you StretchRect from a INTZ into another INTZ (nVidia specific)? Can you create DF24 or INTZ as multisampled surfaces? ...

OpenGL ES depth buffer

Hi! I was wondering if I can deallocate the depth buffer in iPhone OpenGL ES to conserve memory? Or it stays until the application finishes? I only need the depth testing in the beginning of the application. ...

iPhone OpenGL ES: Applying a Depth Test on Textures that have transparent pixels for 2D game.

Currently, I have blending and depth testing turn on for a 2D game. When I draw my textures, the "upper" texture remove some portion of the lower textures if they intersect. Clearly, transparent pixels of the textures are taken into account of the depth test, and it clear out all the colors of the drawn lower textures if they intersect. ...

Java OpenGL saving depth buffer

I'm not entirely sure if I can do what I want here, but I have a bunch of objects being rendered in OpenGL (using JOGL). For one group of objects, I want to ensure that certain objects in that group are rendered in front of other objects in that group. I've tried clearing the depth buffer bit and rendering the "front" objects last, and t...

Java OpenGL color material darkens when depth test is disabled

I've been working with the depth buffer in OpenGL (JOGL) to ensure certain items are rendered in front of others by disabling the depth buffer (detailed in my previous question http://stackoverflow.com/questions/2516086/java-opengl-saving-depth-buffer). This works, except when I set the color of an item that is being drawn when the dept...

OpenGL es 2.0 Read depth buffer

Hi! As far as i know, we can't read the Z(depth) value in OpenGL ES 2.0. So I am wondering how we can get the 3D world coordinates from a point on the 2D screen? Actually I have some random thoughts might work. Since we can read the RGBA value by using glReadPixels, how about we duplicate the depth buffer and store it in a color buffer...

Depth buffer only show blue color

I'm trying to implement Light Prepass rendering in RenderMonkey. So far, in Normal+Depth pass, it seems like Normal buffer is getting correct result, but Depth buffer only show one color. How can I check if my Depth buffer is correct or not? Workspace download link: http://www.mediafire.com/?jq3jmantyxw ...

Problems using glDrawTexfOES to render background image with foreground objects

I have a simple iPhone OpenGL ES app, in which I render a full-screen background image using a texture, and then draw 3D polyhedra on top of it using lines. The texture is displayed using glDrawTexfOES. The problem is that I don't seem able to display the polyhedra on top of the background. In the glDrawTexfOES call, if I use a z value ...

How do I Z-sort triangles for a 3D engine?

I'm building a small 3D engine for a game I'm working on. I've got my basics sorted: textured triangles with backface culling. However depth sorting is proving to be a difficult problem. I'm calculating the face Z by averaging out the 3 points that make up the triangular face. The longer faces sometimes overlap the smaller faces since ...

Disabling Depth Buffer checks in XNA 4.0 on Windows Phone 7

I don't see a RenderState as a member in the GraphicsDevice class, which is where the functions for disabling the depth buffer used to be. Anyone know how this is done with this new 4.0 API? It would be great if I could somehow access a full RenderState-like class somewhere.. GraphicsDevice seems to have gotten some of it, but not nea...

Accessing 32-bit Depth Buffer from fragment shader?

Hello, I'm trying to do the following technique for shadowing, I read it on the NVIDIA site and it seemed like a good technique. I would prefer it to calculating shadow volumes on the cpu because it seems more 'true' and I could use this one for soft-shadowing. : 1st pass: Fill depth buffer from perspective of LIGHT0. Copy this depth ...

Android OpenGL ES Framebuffer objects - rendering to texture

I am using an Android device running Froyo supporting OpenGL ES 1.1 and OpenGL ES 2.0 I want to render the depth buffer to a texture. Having seen a number of examples for OpenGL, OpenGL ES on other platforms (including iPhone) I have tried a number of FBO configurations. I seem to be able to get an FBO set-up with a colour texture but ...

Using depth buffer in opengl es 2.0 iphone

Hi I followed a tutorial using depth buffer in opengl es 1.1. But I use opengl es 2.0. The implemented code results in an error: Failed to make complete framebuffer object 8cd6. See implemented code below: (void)createFramebuffer { if (context && !defaultFramebuffer) { [EAGLContext setCurrentContext:context]; //...