Advertisement

Displaying CallLists

Started by September 04, 2004 04:44 PM
-1 comments, last by mccloed 20 years, 2 months ago
I have a number of CallLists that I used to display text and a few primitives. I'm using NeHe Lesson 35 as a baseline. I use keys to switch between different sets of CallLists like switching pages. It all works well except for one CallList and here it is: void DrawDataEntry() { glLoadIdentity(); glColor3fv(yellow); glLineWidth(5.0); glEnable(GL_LINE); glBegin(GL_LINES); // Row One glVertex2s(170, 25); glVertex2s(170, 425); // Row Two glVertex2s(270, 25); glVertex2s(270, 425); // Row Three glVertex2s(370, 25); glVertex2s(370, 425); // Row Four glVertex2s(470, 25); glVertex2s(470, 425); // Column One glVertex2s(168, 425); glVertex2s(473, 425); // Column Two glVertex2s(170, 325); glVertex2s(470, 325); // Column Three glVertex2s(170, 225); glVertex2s(470, 225); // Column Four glVertex2s(170, 125); glVertex2s(470, 125); // Column Five glVertex2s(168, 25); glVertex2s(473, 25); glEnd(); // Brackets freetype::print(arial_bold, 250, 440, "["); freetype::print(arial_bold, 390, 440, "]"); // Numbers freetype::print(arial_bold, 215, 370, "1"); freetype::print(arial_bold, 315, 370, "2"); freetype::print(arial_bold, 415, 370, "3"); freetype::print(arial_bold, 215, 270, "4"); freetype::print(arial_bold, 315, 270, "5"); freetype::print(arial_bold, 415, 270, "6"); freetype::print(arial_bold, 215, 170, "7"); freetype::print(arial_bold, 315, 170, "8"); freetype::print(arial_bold, 415, 170, "9"); freetype::print(arial_bold, 200, 70, "CLR"); freetype::print(arial_bold, 315, 70, "0"); freetype::print(arial_bold, 400, 70, "ENT"); glLineWidth(1.0); } // Create the CallList DATA_ENTRY = glGenLists(1); glNewList(DATA_ENTRY, GL_COMPILE); DrawDataEntry(); glEndList(); // Call the CallList glCallList(DATA_ENTRY); It appears when I press the appropriate button, but I doesn't stay. It flickers on and off. I don't understand why this is happening when none of the other call lists work just fine. Do I make any sense?

This topic is closed to new replies.

Advertisement