src/FTFont/FTBufferFont.cpp, src/FTFont/FTTextureFont.cpp: GL_TEXTURE_ENV_MODE is not valid mask for glPushAttrib. Use GL_TEXTURE_BIT instead to avoid leaking texture env mode. (reported by Eddie-cz, https://github.com/frankheckenbach/ftgl/issues/3)
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
diff --git a/ChangeLog b/ChangeLog
index 10db810..0bb44b8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2019-05-24 23:57 Frank Heckenbach <f.heckenbach@fh-soft.de>
+
+ * src/FTFont/FTBufferFont.cpp, src/FTFont/FTTextureFont.cpp:
+ GL_TEXTURE_ENV_MODE is not valid mask for glPushAttrib.
+ Use GL_TEXTURE_BIT instead to avoid leaking texture env mode.
+ (reported by Eddie-cz, https://github.com/frankheckenbach/ftgl/issues/3)
+
2019-02-23 16:41 Frank Heckenbach <f.heckenbach@fh-soft.de>
* ftgl-release: new script
diff --git a/src/FTFont/FTBufferFont.cpp b/src/FTFont/FTBufferFont.cpp
index ce04cf5..b330a3b 100644
--- a/src/FTFont/FTBufferFont.cpp
+++ b/src/FTFont/FTBufferFont.cpp
@@ -232,7 +232,7 @@ inline FTPoint FTBufferFontImpl::RenderI(const T* string, const int len,
bool inCache = false;
// Protect blending functions, GL_TEXTURE_2D and optionally GL_BLEND
- glPushAttrib(GL_COLOR_BUFFER_BIT | GL_ENABLE_BIT | GL_TEXTURE_ENV_MODE);
+ glPushAttrib(GL_COLOR_BUFFER_BIT | GL_ENABLE_BIT | GL_TEXTURE_BIT);
// Protect glPixelStorei() calls
glPushClientAttrib(GL_CLIENT_PIXEL_STORE_BIT);
diff --git a/src/FTFont/FTTextureFont.cpp b/src/FTFont/FTTextureFont.cpp
index 97e8768..a5145cf 100644
--- a/src/FTFont/FTTextureFont.cpp
+++ b/src/FTFont/FTTextureFont.cpp
@@ -241,7 +241,7 @@ inline FTPoint FTTextureFontImpl::RenderI(const T* string, const int len,
int renderMode)
{
// Protect GL_TEXTURE_2D and optionally GL_BLEND
- glPushAttrib(GL_ENABLE_BIT | GL_COLOR_BUFFER_BIT | GL_TEXTURE_ENV_MODE);
+ glPushAttrib(GL_ENABLE_BIT | GL_COLOR_BUFFER_BIT | GL_TEXTURE_BIT);
if(FTLibrary::Instance().GetLegacyOpenGLStateSet())
{