Made return type of render() void. Initialisation list. TextureSize() complete
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
diff --git a/include/FTGLTextureFont.h b/include/FTGLTextureFont.h
index 1081bc6..fd06af6 100755
--- a/include/FTGLTextureFont.h
+++ b/include/FTGLTextureFont.h
@@ -13,9 +13,9 @@ class FTGLTextureFont : public FTFont
FTGLTextureFont();
~FTGLTextureFont();
- bool TextureSize(){};
+ bool TextureSize() const { return textureSize;}
- bool render( const char* string);
+ void render( const char* string);
private:
diff --git a/src/FTGLTextureFont.cpp b/src/FTGLTextureFont.cpp
index 00bc564..33322e0 100755
--- a/src/FTGLTextureFont.cpp
+++ b/src/FTGLTextureFont.cpp
@@ -26,7 +26,15 @@ inline UInt32 NextPowerOf2( UInt32 in)
FTGLTextureFont::FTGLTextureFont()
: glTextureID(0),
textMem(0),
- padding(15)
+ padding(15),
+ tempGlyph(0),
+ maxTextSize(0),
+ textureSize(0),
+ glyphHeight(0),
+ glyphWidth(0),
+ horizGlyphs(0),
+ vertGlyphs(0)
+
{}
@@ -130,7 +138,7 @@ bool FTGLTextureFont::CreateTexture()
}
-bool FTGLTextureFont::render( const char* string)
+void FTGLTextureFont::render( const char* string)
{
glBindTexture( GL_TEXTURE_2D, glTextureID);