Fixed PushAttrib call
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66
diff --git a/src/FTGLOutlineFont.cpp b/src/FTGLOutlineFont.cpp
index bf19881..4db44ba 100755
--- a/src/FTGLOutlineFont.cpp
+++ b/src/FTGLOutlineFont.cpp
@@ -27,7 +27,7 @@ FTGlyph* FTGLOutlineFont::MakeGlyph( unsigned int g)
void FTGLOutlineFont::render( const char* string)
{
- glPushAttrib( GL_ENABLE_BIT | GL_HINT_BIT | GL_LINE_BIT | GL_PIXEL_MODE_BIT);
+ glPushAttrib( GL_ENABLE_BIT | GL_HINT_BIT | GL_LINE_BIT | GL_COLOR_BUFFER_BIT);
glDisable( GL_TEXTURE_2D);
@@ -45,7 +45,7 @@ void FTGLOutlineFont::render( const char* string)
void FTGLOutlineFont::render( const wchar_t* string)
{
- glPushAttrib( GL_ENABLE_BIT | GL_HINT_BIT | GL_LINE_BIT | GL_PIXEL_MODE_BIT);
+ glPushAttrib( GL_ENABLE_BIT | GL_HINT_BIT | GL_LINE_BIT | GL_COLOR_BUFFER_BIT);
glDisable( GL_TEXTURE_2D);
diff --git a/src/FTGLPixmapFont.cpp b/src/FTGLPixmapFont.cpp
index 310075d..071bc48 100755
--- a/src/FTGLPixmapFont.cpp
+++ b/src/FTGLPixmapFont.cpp
@@ -27,7 +27,7 @@ FTGlyph* FTGLPixmapFont::MakeGlyph( unsigned int g)
void FTGLPixmapFont::render( const char* string)
{
- glPushAttrib( GL_ENABLE_BIT | GL_PIXEL_MODE_BIT);
+ glPushAttrib( GL_ENABLE_BIT | GL_PIXEL_MODE_BIT | GL_COLOR_BUFFER_BIT);
glEnable(GL_BLEND);
glBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
@@ -43,7 +43,7 @@ void FTGLPixmapFont::render( const char* string)
void FTGLPixmapFont::render( const wchar_t* string)
{
- glPushAttrib( GL_ENABLE_BIT | GL_PIXEL_MODE_BIT);
+ glPushAttrib( GL_ENABLE_BIT | GL_PIXEL_MODE_BIT | GL_COLOR_BUFFER_BIT);
glPushClientAttrib( GL_CLIENT_PIXEL_STORE_BIT);
glEnable(GL_BLEND);
diff --git a/src/FTGLTextureFont.cpp b/src/FTGLTextureFont.cpp
index 400349f..1a2c223 100755
--- a/src/FTGLTextureFont.cpp
+++ b/src/FTGLTextureFont.cpp
@@ -148,7 +148,7 @@ int FTGLTextureFont::CreateTexture()
void FTGLTextureFont::render( const char* string)
{
- glPushAttrib( GL_ENABLE_BIT | GL_HINT_BIT | GL_LINE_BIT | GL_PIXEL_MODE_BIT);
+ glPushAttrib( GL_ENABLE_BIT | GL_COLOR_BUFFER_BIT);
glEnable(GL_BLEND);
glBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); // GL_ONE
@@ -161,7 +161,7 @@ void FTGLTextureFont::render( const char* string)
void FTGLTextureFont::render( const wchar_t* string)
{
- glPushAttrib( GL_ENABLE_BIT | GL_HINT_BIT | GL_LINE_BIT | GL_PIXEL_MODE_BIT);
+ glPushAttrib( GL_ENABLE_BIT | GL_COLOR_BUFFER_BIT);
glEnable(GL_BLEND);
glBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); // GL_ONE