00001 /********************************************************************* 00002 * lescegra * 00003 * * 00004 * http://geeky.kicks-ass.org/projects/lescegra.html * 00005 * * 00006 * Copyright 2003 by Enno Cramer <uebergeek@web.de> * 00007 * * 00008 * This library is free software; you can redistribute it and/or * 00009 * modify it under the terms of the GNU Library General Public * 00010 * License as published by the Free Software Foundation; either * 00011 * version 2 of the License, or (at your option) any later version. * 00012 * * 00013 * This library is distributed in the hope that it will be useful, * 00014 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * 00016 * Library General Public License for more details. * 00017 * * 00018 * You should have received a copy of the GNU Library General Public * 00019 * License along with this library; if not, write to the Free * 00020 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * 00021 *********************************************************************/ 00022 00023 #ifndef LSG_GLLIST_H 00024 #define LSG_GLLIST_H 00025 00026 /** 00027 * \file gllist.h 00028 * \brief OpenGL list node 00029 */ 00030 00031 #include <lescegra/sg/node.h> 00032 00033 /** 00034 * \brief OpenGL list node 00035 * 00036 * Encapsulate an OpenGL list in a scene graph node. 00037 */ 00038 typedef struct { 00039 LsgNode super; 00040 int list; 00041 } LsgGLList; 00042 00043 /** 00044 * Allocate and initialize a LsgGLList. 00045 * @return A new LsgGLList instance 00046 */ 00047 LsgGLList* LsgGLList_create(void); 00048 00049 /** 00050 * Constructor method for LsgGLList. Create a new and initially empty OpenGL list. 00051 * @param self The instance variable 00052 */ 00053 void LsgGLList_init(LsgGLList* self); 00054 00055 /** 00056 * Call the OpenGL list. 00057 * @param self The instance variable 00058 * @param frustum The viewing frustum 00059 */ 00060 void LsgGLList_display(LsgGLList* self, LsgFrustum* frust); 00061 00062 /** 00063 * Destructor method for LsgGLList. Destroy the OpenGL list. 00064 * @param self The instance variable 00065 */ 00066 void LsgGLList_destroy(LsgGLList* self); 00067 00068 /** 00069 * Clean this node. Reuse parent implementation. 00070 */ 00071 #define LsgGLList_clean(self) LsgNode_clean(&(self)->super) 00072 00073 /** 00074 * Update this node. Reuse parent implementation. 00075 */ 00076 #define LsgGLList_update(self, now) LsgNode_update(&(self)->super, now) 00077 00078 #endif