OpenGL Super Bible! Page 393 glListBase Purpose Specifies

OpenGL Super Bible! Page 393 glListBase Purpose Specifies an offset to be added to the list values specified in a call to glCallLists. Include File Syntax void glListBase(GLuint base ); Description The function glCallLists calls a series of display lists listed in an array. This function sets an offset value that can be added to each display list name for this function. By default this is zero. You can retrieve the current value by calling glGet(GL_LIST_BASE). Parameters base GLuint: Sets an integer offset value that will be added to display list names specified in calls to glCallLists. This value is zero by default. Returns None. Example The following code fragment creates 20 display lists numbered 0 through 19. An array of display list names (listA) is created that contains the numbers 0 through 9. Then glCallLists is used to execute all the display lists named in the listA array. Then, rather than reload the array with the next 10 display lists names, an offset value is specified with a call to glListBase. When glCallLists is called using the listA array, each element in listA will be offset by the value specified (10). int listA[10]; int i; for(i = 0; i < 10; i++) listA[i] = i; // Build display Lists 1 - 20 glNewList(1,GL_COMPILE); glEndList(); // Second list glNewList(2,GL_COMPILE);
If you are looking for affordable and reliable webhost to host and run your business application visit our ftp web hosting services.

Leave a Reply