]> git.jsancho.org Git - lugaru.git/blobdiff - Source/Text.cpp
merge
[lugaru.git] / Source / Text.cpp
index e1c2878b4fc4686c665e9421a4f89422872e6a96..4c22f0fd973e08b0a85e47298fc0ab1bfa47ea95 100644 (file)
@@ -78,8 +78,10 @@ void Text::BuildFont()                                                               // Build Our Font Display List
 
        if (base)
        {
-               LOG("Font already created...");
-               return;
+               glDeleteLists(base, 512);
+               base = 0;
+               //LOG("Font already created...");
+               //return;
        }
 
 //     base=glGenLists(256);                                                           // Creating 256 Display Lists
@@ -116,12 +118,12 @@ void Text::BuildFont()                                                            // Build Our Font Display List
        }                                                                                                       // Loop Until All 256 Are Built
 }
 
-void Text::glPrint(float x, float y, char *string, int set, float size, float width, float height)     // Where The Printing Happens
+void Text::glPrint(float x, float y, const char *string, int set, float size, float width, float height)       // Where The Printing Happens
 {
        glPrint(x, y, string, set, size, width, height, 0, strlen(string));
 }
 
-void Text::_glPrint(float x, float y, char *string, int set, float size, float width, float height,int start,int end, int offset)      // Where The Printing Happens
+void Text::_glPrint(float x, float y, const char *string, int set, float size, float width, float height,int start,int end, int offset)        // Where The Printing Happens
 {
        if (set>1)
        {
@@ -152,26 +154,26 @@ void Text::_glPrint(float x, float y, char *string, int set, float size, float w
        glTexEnvi( GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE );
 }
 
-void Text::glPrint(float x, float y, char *string, int set, float size, float width, float height,int start,int end)   // Where The Printing Happens
+void Text::glPrint(float x, float y, const char *string, int set, float size, float width, float height,int start,int end)     // Where The Printing Happens
 {
        _glPrint(x, y, string, set, size, width, height, start, end, 0);
 }
 
-void Text::glPrintOutline(float x, float y, char *string, int set, float size, float width, float height)      // Where The Printing Happens
+void Text::glPrintOutline(float x, float y, const char *string, int set, float size, float width, float height)        // Where The Printing Happens
 {
        glPrintOutline(x, y, string, set, size, width, height, 0, strlen(string));
 }
 
-void Text::glPrintOutline(float x, float y, char *string, int set, float size, float width, float height,int start,int end)    // Where The Printing Happens
+void Text::glPrintOutline(float x, float y, const char *string, int set, float size, float width, float height,int start,int end)      // Where The Printing Happens
 {
        _glPrint(x, y, string, set, size, width, height, start, end, 256);
 }
-void Text::glPrintOutlined(float x, float y, char *string, int set, float size, float width, float height)     // Where The Printing Happens
+void Text::glPrintOutlined(float x, float y, const char *string, int set, float size, float width, float height)       // Where The Printing Happens
 {
        glPrintOutlined(1, 1, 1, x, y, string, set, size, width, height);
 }
 
-void Text::glPrintOutlined(float r, float g, float b, float x, float y, char *string, int set, float size, float width, float height)  // Where The Printing Happens
+void Text::glPrintOutlined(float r, float g, float b, float x, float y, const char *string, int set, float size, float width, float height)    // Where The Printing Happens
 {
        glColor4f(0,0,0,1);
        glPrintOutline( x-2*size,  y-2*size, string,  set,  size*2.5/2,  width,  height);