Text without Z buffer
- From: Tony O'Bryan <storm_reaver@xxxxxxxxx>
- Date: Wed, 10 Aug 2005 13:55:25 GMT
I want to label my vertices, which I'm rendering as cubes, with red text
overlaying the cube at the cube's location. I am showing text using
glCallLists (wrapped by a class) after the rest of my scene is rendered,
and it works just fine as long as I offset the text to an area of the
display with nothing else drawn.
If I try to display my text at the same point where the cube is rendered,
the text is obscured by the cube. The cube is centered around the point
where it's drawn.
This is the snippet of code I'm using to draw the text:
glDepthMask(GL_FALSE);
glColor3f(1,0,0);
.... text drawn here...
glDepthMask(GL_TRUE);
I thought that glDepthMask(GL_FALSE) disables the depth buffer, and that
disabling the depth buffer before rendering prevents newly drawn pixels
from being obscured.
.
- Follow-Ups:
- Re: Text without Z buffer
- From: Tony O'Bryan
- Re: Text without Z buffer
- From: Tony O'Bryan
- Re: Text without Z buffer
- From: Yann Renard
- Re: Text without Z buffer
- Prev by Date: Re: aux buffers common?
- Next by Date: Re: Text without Z buffer
- Previous by thread: openGL to emulate QuickDraw (i.e. 2D projection)
- Next by thread: Re: Text without Z buffer
- Index(es):
Relevant Pages
|
Loading