* Slightly tune the demo to show the new FTGL::RENDER_FRONT and RENDER_SIDE features.
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
diff --git a/demo/FTGLDemo.cpp b/demo/FTGLDemo.cpp
index f51b896..36f4d01 100644
--- a/demo/FTGLDemo.cpp
+++ b/demo/FTGLDemo.cpp
@@ -103,10 +103,10 @@ static FTGLPixmapFont* infoFont;
static float texture[] =
{
- 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0,
- 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0,
- 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0,
- 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0
+ 0.9, 1.0, 1.0, 1.0, 0.9, 0.9, 0.9, 0.8, 0.7, 0.7, 0.8, 0.9,
+ 0.9, 1.0, 1.0, 1.0, 0.9, 0.9, 0.9, 0.8, 0.7, 0.7, 0.8, 0.9,
+ 0.9, 0.8, 0.7, 0.7, 0.8, 0.9, 0.9, 1.0, 1.0, 1.0, 0.9, 0.9,
+ 0.9, 0.8, 0.7, 0.7, 0.8, 0.9, 0.9, 1.0, 1.0, 1.0, 0.9, 0.9
};
static GLuint textureID;
@@ -178,7 +178,7 @@ void setUpFonts(const char* fontfile)
exit(1);
}
- fonts[x]->Depth(1.);
+ fonts[x]->Depth(2.);
fonts[x]->Outset(0., 1.);
fonts[x]->CharMap(ft_encoding_unicode);
@@ -391,16 +391,21 @@ void do_display (void)
break;
}
- glColor3f(1.0, 1.0, 1.0);
// If you do want to switch the color of bitmaps rendered with glBitmap,
// you will need to explicitly call glRasterPos (or its ilk) to lock
// in a changed current color.
glPushMatrix();
+ glColor3f(1.0, 1.0, 0.5);
+ if(layouts[currentLayout])
+ layouts[currentLayout]->Render(myString, FTGL::RENDER_FRONT);
+ else
+ fonts[current_font]->Render(myString, FTGL::RENDER_FRONT);
+ glColor3f(0.0, 0.0, 0.3);
if(layouts[currentLayout])
- layouts[currentLayout]->Render(myString);
+ layouts[currentLayout]->Render(myString, FTGL::RENDER_SIDE);
else
- fonts[current_font]->Render(myString);
+ fonts[current_font]->Render(myString, FTGL::RENDER_SIDE);
glPopMatrix();
glPushMatrix();