gl_draw.cxx: removed the suspenders but kept the belt.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7498 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
parent
009ff54aea
commit
7551309325
@ -430,15 +430,14 @@ void gl_texture_fifo::display_texture(int rank)
|
|||||||
GLfloat pos[4];
|
GLfloat pos[4];
|
||||||
glGetFloatv(GL_CURRENT_RASTER_POSITION, pos);
|
glGetFloatv(GL_CURRENT_RASTER_POSITION, pos);
|
||||||
CGRect bounds = CGRectMake (pos[0], pos[1] - fl_descent(), fifo[rank].width, fifo[rank].height);
|
CGRect bounds = CGRectMake (pos[0], pos[1] - fl_descent(), fifo[rank].width, fifo[rank].height);
|
||||||
glPushAttrib(GL_ENABLE_BIT | GL_TEXTURE_BIT | GL_COLOR_BUFFER_BIT); // GL_COLOR_BUFFER_BIT for glBlendFunc, GL_ENABLE_BIT for glEnable / glDisable
|
|
||||||
|
|
||||||
|
// GL_COLOR_BUFFER_BIT for glBlendFunc, GL_ENABLE_BIT for glEnable / glDisable
|
||||||
|
glPushAttrib(GL_ENABLE_BIT | GL_TEXTURE_BIT | GL_COLOR_BUFFER_BIT);
|
||||||
glDisable (GL_DEPTH_TEST); // ensure text is not removed by depth buffer test.
|
glDisable (GL_DEPTH_TEST); // ensure text is not removed by depth buffer test.
|
||||||
glEnable (GL_BLEND); // for text fading
|
glEnable (GL_BLEND); // for text fading
|
||||||
glBlendFunc (GL_ONE, GL_ONE_MINUS_SRC_ALPHA); // ditto
|
glBlendFunc (GL_ONE, GL_ONE_MINUS_SRC_ALPHA); // ditto
|
||||||
glEnable (GL_TEXTURE_RECTANGLE_EXT);
|
glEnable (GL_TEXTURE_RECTANGLE_EXT);
|
||||||
|
glDisable(GL_LIGHTING);
|
||||||
GLboolean lighting = glIsEnabled(GL_LIGHTING);
|
|
||||||
if (lighting) glDisable(GL_LIGHTING);
|
|
||||||
glBindTexture (GL_TEXTURE_RECTANGLE_EXT, fifo[rank].texName);
|
glBindTexture (GL_TEXTURE_RECTANGLE_EXT, fifo[rank].texName);
|
||||||
glBegin (GL_QUADS);
|
glBegin (GL_QUADS);
|
||||||
glTexCoord2f (0.0f, 0.0f); // draw lower left in world coordinates
|
glTexCoord2f (0.0f, 0.0f); // draw lower left in world coordinates
|
||||||
@ -453,9 +452,8 @@ void gl_texture_fifo::display_texture(int rank)
|
|||||||
glTexCoord2f (fifo[rank].width, 0.0f); // draw lower right in world coordinates
|
glTexCoord2f (fifo[rank].width, 0.0f); // draw lower right in world coordinates
|
||||||
glVertex2f (bounds.origin.x + bounds.size.width, bounds.origin.y);
|
glVertex2f (bounds.origin.x + bounds.size.width, bounds.origin.y);
|
||||||
glEnd ();
|
glEnd ();
|
||||||
if (lighting) glEnable(GL_LIGHTING);
|
|
||||||
|
|
||||||
glPopAttrib();
|
glPopAttrib();
|
||||||
|
|
||||||
// reset original matrices
|
// reset original matrices
|
||||||
glPopMatrix(); // GL_MODELVIEW
|
glPopMatrix(); // GL_MODELVIEW
|
||||||
glMatrixMode (GL_PROJECTION);
|
glMatrixMode (GL_PROJECTION);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user