a problem with 3d fonts
hi, i have a strange problem with incorporating lesson 14(3d fonts) and lesson 32(the game) im trying to just display the font that is given in lesson 14, (it spins and changes colors) however when i run the program the text doesnt appear, even when ive commented EVERYTHING out in the main draw method its just a black screen with no font :/ , it compiles fine with no errors, any ideas or help would be greatly appreciated, thanks guys void Draw(void) // Draw Our Scene { glClear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); glLoadIdentity(); glTranslatef(1.0f,1.0f,-10.0f); glColor3f(1.0f*float(cos(rot/20.0f)),1.0f*float(sin(rot/25.0f)),1.0f-0.5f*float(cos(rot/17.0f))); glPrint("NeHe - %3.2f",rot/50); rot+=0.5f; glColor3f(1.0f,1.0f,1.0f); glFlush(); }
go hard or go home :)
you mean the BuildFont() method? i put it in here:
BOOL Initialize (GL_Window* window, Keys* keys)
{
g_window = window;
g_keys = keys;
glShadeModel(GL_SMOOTH);
glClearColor(0.0f, 0.0f, 0.0f, 0.5f);
glClearDepth(1.0f); glDepthFunc(GL_LEQUAL); glEnable(GL_DEPTH_TEST);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST);
glAlphaFunc(GL_GREATER,0.1f); glEnable(GL_ALPHA_TEST); glEnable(GL_LIGHT0);
glEnable(GL_LIGHTING);
glEnable(GL_COLOR_MATERIAL);
BuildFont();
return TRUE;
}
is this where you mean to put it? it still doesnt work after this, any ideas??
BOOL Initialize (GL_Window* window, Keys* keys)
{
g_window = window;
g_keys = keys;
glShadeModel(GL_SMOOTH);
glClearColor(0.0f, 0.0f, 0.0f, 0.5f);
glClearDepth(1.0f); glDepthFunc(GL_LEQUAL); glEnable(GL_DEPTH_TEST);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST);
glAlphaFunc(GL_GREATER,0.1f); glEnable(GL_ALPHA_TEST); glEnable(GL_LIGHT0);
glEnable(GL_LIGHTING);
glEnable(GL_COLOR_MATERIAL);
BuildFont();
return TRUE;
}
is this where you mean to put it? it still doesnt work after this, any ideas??
go hard or go home :)
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement