Advertisement

'strlen' undeclared

Started by February 11, 2003 08:38 PM
0 comments, last by ts0 22 years ago
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
Did you #include <cstring> or #include <string.h> ?

I don''t have a signature
I don't have a signature

This topic is closed to new replies.

Advertisement