FTFont: replace glTexEnvf with glTexEnvi where appropriate. Fix courtesy of Bill Robinson <airbaggins@gmail.com>.
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
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();