Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Compound Members

gldisplaylist.h

00001 /***************************************************************************
00002                           gldisplaylist.h  -  description
00003                              -------------------
00004     begin                : Sat Oct 4 2003
00005     copyright            : (C) 2003 by Jacques Gasselin de Richebourg
00006     email                : jacquesgasselin"hotmal.com
00007  ***************************************************************************/
00008 
00009 /***************************************************************************
00010  *                                                                         *
00011  *   This program is free software; you can redistribute it and/or modify  *
00012  *   it under the terms of the GNU Lesser General Public License as published by  *
00013  *   the Free Software Foundation; either version 2 of the License, or     *
00014  *   (at your option) any later version.                                   *
00015  *                                                                         *
00016  ***************************************************************************/
00017 
00018 #ifndef GLDISPLAYLIST_H
00019 #define GLDISPLAYLIST_H
00020 
00021 #include <GL/gl.h>
00022 
00028 class GLDisplayList
00029 {
00030    GLuint listId;
00031    bool compiled;
00032    
00033 public: 
00034     GLDisplayList() { compiled = false;}
00035     ~GLDisplayList() {}
00036 
00037    inline bool isCompiled()
00038    {  return compiled; }
00039    
00040    inline void del()
00041    {  glDeleteLists(listId,1); compiled = false;}
00042 
00043    inline void genList()
00044    {  del(); listId = glGenLists(1); compiled = false;}
00045 
00046    inline void compile()
00047    {  compiled = true; glNewList(listId, GL_COMPILE); }
00048 
00049    inline void compileAndExecute()
00050    {  compiled = true; glNewList(listId, GL_COMPILE_AND_EXECUTE); }
00051    
00052    inline void endCompile()
00053    {  glEndList(); }
00054 
00055    inline void execute()
00056    {  glCallList(listId); }
00057 };
00058 
00059 #endif

Generated on Wed Feb 4 23:11:33 2004 by doxygen 1.3.3