'strlen' undeclared
GLvoid glPrint(char *text) // custom gl print routine.
{
if (text == NULL) { // if there''s no text, do nothing.
return;
}
glPushAttrib(GL_LIST_BIT); // alert that we''re about to offset the display lists with glListBase
glListBase(base - 32); // sets the base character to 32.
glCallLists(strlen(text), GL_UNSIGNED_BYTE, text); // draws the display list text.
glPopAttrib(); // undoes the glPushAttrib(GL_LIST_BIT);
}
------------------------------
int drawGLScene(GLvoid)
{
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glLoadIdentity();
begin(); // the intro
if(intro == true) {
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glLoadIdentity();
mainframe();
}
// Position The Text On The Screen
glRasterPos2f(-0.2f+0.35f*((float)(cos(cnt1))), 0.35f*((float)(sin(cnt2))));
glPrint("OpenGL With NeHe"); // print gl text to the screen.
cnt1 += 0.01f;
cnt2 += 0.0081f;
// since this is double buffered, swap the buffers to display what just got drawn.
glutSwapBuffers();
// glXSwapBuffers(GLWin.dpy, GLWin.win);
return True;
}
----------
plz help me!
thx
--------
ts0
--------ts0
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement