Changed vars to GLunit
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
diff --git a/include/FTGLTextureFont.h b/include/FTGLTextureFont.h
index 69e9e90..3791906 100755
--- a/include/FTGLTextureFont.h
+++ b/include/FTGLTextureFont.h
@@ -90,7 +90,7 @@ class FTGL_EXPORT FTGLTextureFont : public FTFont
* GL_TEXTURE_MIN_FILTER = GL_LINEAR
* Note that mipmapping is NOT used
*/
- inline int CreateTexture();
+ inline GLuint CreateTexture();
/**
* The maximum texture dimension on this OpenGL implemetation
@@ -110,7 +110,7 @@ class FTGL_EXPORT FTGLTextureFont : public FTFont
/**
*An array of texture ids
*/
- unsigned long glTextureID[128];
+ GLuint glTextureID[128];
/**
* The number of textures required to hold the glyphs
diff --git a/src/FTGLTextureFont.cpp b/src/FTGLTextureFont.cpp
index e1eb022..17ff4b4 100755
--- a/src/FTGLTextureFont.cpp
+++ b/src/FTGLTextureFont.cpp
@@ -86,8 +86,8 @@ FTGlyph* FTGLTextureFont::MakeGlyph( unsigned int g)
{
// no - make a new texture
glTextureID[numTextures] = CreateTexture();
- yOffset = padding;
++numTextures;
+ yOffset = padding;
}
}
@@ -132,7 +132,7 @@ void FTGLTextureFont::GetSize()
}
-int FTGLTextureFont::CreateTexture()
+GLuint FTGLTextureFont::CreateTexture()
{
// calc the size
GetSize();
@@ -143,7 +143,7 @@ int FTGLTextureFont::CreateTexture()
memset( textMem, 0, totalMem);
// Create the blank texture
- int textID;
+ GLuint textID;
glGenTextures( 1, (GLuint*)&textID);
glPixelStorei( GL_UNPACK_ALIGNMENT, 1);