Commit 883d46073d70c15f0ac03fe0aa0ee70d3e4ffcb5

henry 2001-08-07T01:03:44

Added a render function to set LINE_SMOOTH for anti aliased lines

diff --git a/include/FTGLOutlineFont.h b/include/FTGLOutlineFont.h
index ecb7274..9c77bfc 100755
--- a/include/FTGLOutlineFont.h
+++ b/include/FTGLOutlineFont.h
@@ -15,6 +15,8 @@ class	FTGLOutlineFont : public FTFont
 		FTGLOutlineFont();
 		~FTGLOutlineFont();
 		
+		void render( const char* string);
+
 		// attributes
 		
 	private:
diff --git a/src/FTGLOutlineFont.cpp b/src/FTGLOutlineFont.cpp
index 3a4f327..7a73bf8 100755
--- a/src/FTGLOutlineFont.cpp
+++ b/src/FTGLOutlineFont.cpp
@@ -1,3 +1,5 @@
+#include	"GL/gl.h"
+
 #include	"FTGLOutlineFont.h"
 #include	"FTGlyphContainer.h"
 #include	"FTGL.h"
@@ -39,3 +41,19 @@ bool FTGLOutlineFont::MakeGlyphList()
 		glyphList->Add( tempGlyph);
 	}
 }
+
+
+void FTGLOutlineFont::render( const char* string)
+{	
+	glPushAttrib( GL_ENABLE_BIT | GL_HINT_BIT | GL_LINE_BIT | GL_PIXEL_MODE_BIT);
+	
+	glEnable( GL_LINE_SMOOTH);
+	glHint( GL_LINE_SMOOTH_HINT, GL_DONT_CARE);
+	glEnable(GL_BLEND);
+ 	glBlendFunc( GL_SRC_ALPHA, GL_ONE); // GL_ONE_MINUS_SRC_ALPHA
+
+	FTFont::render( string);
+
+	glPopAttrib();
+
+}