00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #ifndef __DISPLISTTREE_H__
00013 #define __DISPLISTTREE_H__
00014
00015
00016 #include <qgl.h>
00017 #include <qptrlist.h>
00018 #include <qstring.h>
00019 #include <qstringlist.h>
00020
00021 #include "cmdtreenode.h"
00022 #include "cmdparam.h"
00023 #include "superptrlist.h"
00024 #include "supervaluelist.h"
00025
00026 #include "intparam.h"
00027 #include "unsignedintparam.h"
00028 #include "enumparam.h"
00029
00030
00031
00036 class DispListTree : public CmdTreeNode
00037 {
00038 public:
00039 DispListTree()
00040 : CmdTreeNode( "Display List", new QPtrList<CmdTreeNode> )
00041 {
00042
00043
00044
00045
00046 mySubTree->append( new CmdTreeNode( "glDeleteLists", NULL, cmd_glDeleteLists,
00047 new SuperPtrList<CmdParam>( 2,
00048 new UnsignedIntParam( "list", "1", "GLuint" ),
00049 new IntParam( "range", "1", "GLsizei" ) ) ) );
00050 mySubTree->append( new CmdTreeNode( "glNewList", NULL, cmd_glNewList,
00051 new SuperPtrList<CmdParam>( 2,
00052 new UnsignedIntParam( "list", "1", "GLuint" ),
00053 new EnumParam( "mode", "4864",
00054 SuperValueList<char*>( 2,
00055 "GL_COMPILE",
00056 "GL_COMPILE_AND_EXECUTE" ),
00057 SuperValueList<int>( 2,
00058 GL_COMPILE,
00059 GL_COMPILE_AND_EXECUTE ),
00060 "GLenum" ) ) ) );
00061 mySubTree->append( new CmdTreeNode( "glEndList", NULL, cmd_glEndList, NULL ) );
00062 mySubTree->append( new CmdTreeNode( "glCallList", NULL, cmd_glCallList,
00063 new SuperPtrList<CmdParam>( 1,
00064 new UnsignedIntParam( "list", "1", "GLuint" ) ) ) );
00065 }
00066
00067
00068
00069
00070
00071 static void cmd_glDeleteLists( const QStringList& p ) {
00072 glDeleteLists( p[0].toInt(), p[1].toInt() );
00073 }
00074 static void cmd_glNewList( const QStringList& p ) {
00075 glNewList( p[0].toInt(), p[1].toInt() );
00076 } static void cmd_glEndList( const QStringList& ) {
00077 glEndList();
00078 }
00079
00080 static void cmd_glCallList( const QStringList& p ) {
00081 glCallList( p[0].toInt() );
00082 }
00083
00084 private:
00085
00086 };
00087
00088
00089 #endif // __DISPLISTTREE_H__