Commit 5c9dbfd76d6a7d3b9b24803b1ea94ab71da60635

sammy 2011-05-21T09:51:18

FTFont: replace glTexEnvf with glTexEnvi where appropriate. Fix courtesy of Bill Robinson <airbaggins@gmail.com>.

diff --git a/AUTHORS b/AUTHORS
index dda8ef3..7220b6e 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -35,6 +35,7 @@ Bug fixes:
    Patrick Rogers
    Kai Huettemann
    Tobias Gunkel
+   Bill Robinson
 
 FTGL was inspired by gltt, Copyright (C) 1998-1999 Stephane Rehel
 (http://gltt.sourceforge.net)
diff --git a/src/FTFont/FTBufferFont.cpp b/src/FTFont/FTBufferFont.cpp
index 0f9130f..d8175a3 100644
--- a/src/FTFont/FTBufferFont.cpp
+++ b/src/FTFont/FTBufferFont.cpp
@@ -237,7 +237,7 @@ inline FTPoint FTBufferFontImpl::RenderI(const T* string, const int len,
     glPushClientAttrib(GL_CLIENT_PIXEL_STORE_BIT);
 
     glEnable(GL_TEXTURE_2D);
-    glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
+    glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
 
     // Search whether the string is already in a texture we uploaded
     for(int n = 0; n < BUFFER_CACHE_SIZE; n++)
diff --git a/src/FTFont/FTTextureFont.cpp b/src/FTFont/FTTextureFont.cpp
index 2f7fe32..14fe3ff 100644
--- a/src/FTFont/FTTextureFont.cpp
+++ b/src/FTFont/FTTextureFont.cpp
@@ -243,7 +243,7 @@ inline FTPoint FTTextureFontImpl::RenderI(const T* string, const int len,
     glPushAttrib(GL_ENABLE_BIT | GL_COLOR_BUFFER_BIT | GL_TEXTURE_ENV_MODE);
 
     glEnable(GL_TEXTURE_2D);
-    glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
+    glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
 
     FTTextureGlyphImpl::ResetActiveTexture();