Main Page | Namespace List | Class Hierarchy | Compound List | File List | Compound Members | File Members | Related Pages

inittree.h

Go to the documentation of this file.
00001 /*******************************************************************************
00002 *
00003 * Title:     InitTree
00004 * Filename:  src/inittree.h
00005 * Generated: February 26, 2004 @ 21:00:37
00006 *        by: GENTREE - Generates C++ command tree header files for GLITCH.
00007 *
00008 * WARNING! All changes made in this file will be lost!
00009 *
00010 *******************************************************************************/
00011 
00012 #ifndef __INITTREE_H__
00013 #define __INITTREE_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 "enumparam.h"
00027 #include "clampfloatparam.h"
00028 
00029 
00030 
00035 class InitTree : public CmdTreeNode
00036 {
00037 public:
00038     InitTree()
00039         : CmdTreeNode( "Initialization", new QPtrList<CmdTreeNode> )
00040     {
00041 
00042         // Trees
00043 
00044         // Commands
00045         mySubTree->append( new CmdTreeNode( "glAlphaFunc", NULL, cmd_glAlphaFunc, 
00046                             new SuperPtrList<CmdParam>( 2,
00047                                 new EnumParam( "func", "519", 
00048                                     SuperValueList<char*>( 8,
00049                                         "GL_NEVER",
00050                                         "GL_LESS",
00051                                         "GL_EQUAL",
00052                                         "GL_LEQUAL",
00053                                         "GL_GREATER",
00054                                         "GL_NOTEQUAL",
00055                                         "GL_GEQUAL",
00056                                         "GL_ALWAYS" ),
00057                                     SuperValueList<int>( 8,
00058                                         GL_NEVER,
00059                                         GL_LESS,
00060                                         GL_EQUAL,
00061                                         GL_LEQUAL,
00062                                         GL_GREATER,
00063                                         GL_NOTEQUAL,
00064                                         GL_GEQUAL,
00065                                         GL_ALWAYS ),
00066                                     "GLenum" ), 
00067                                 new ClampFloatParam( "ref", "0.0", "GLclampf" ) ) ) );
00068         mySubTree->append( new CmdTreeNode( "glBlendFunc", NULL, cmd_glBlendFunc, 
00069                             new SuperPtrList<CmdParam>( 2,
00070                                 new EnumParam( "sfactor", "770", 
00071                                     SuperValueList<char*>( 9,
00072                                         "GL_ZERO",
00073                                         "GL_ONE",
00074                                         "GL_DST_COLOR",
00075                                         "GL_ONE_MINUS_DST_COLOR",
00076                                         "GL_SRC_ALPHA",
00077                                         "GL_ONE_MINUS_SRC_COLOR",
00078                                         "GL_DST_ALPHA",
00079                                         "GL_ONE_MINUS_DST_ALPHA",
00080                                         "GL_SRC_ALPHA_SATURATE" ),
00081                                     SuperValueList<int>( 9,
00082                                         GL_ZERO,
00083                                         GL_ONE,
00084                                         GL_DST_COLOR,
00085                                         GL_ONE_MINUS_DST_COLOR,
00086                                         GL_SRC_ALPHA,
00087                                         GL_ONE_MINUS_SRC_COLOR,
00088                                         GL_DST_ALPHA,
00089                                         GL_ONE_MINUS_DST_ALPHA,
00090                                         GL_SRC_ALPHA_SATURATE ),
00091                                     "GLenum" ), 
00092                                 new EnumParam( "dfactor", "771", 
00093                                     SuperValueList<char*>( 8,
00094                                         "GL_ZERO",
00095                                         "GL_ONE",
00096                                         "GL_SRC_COLOR",
00097                                         "GL_ONE_MINUS_SRC_COLOR",
00098                                         "GL_SRC_ALPHA",
00099                                         "GL_ONE_MINUS_SRC_COLOR",
00100                                         "GL_DST_ALPHA",
00101                                         "GL_ONE_MINUS_DST_ALPHA" ),
00102                                     SuperValueList<int>( 8,
00103                                         GL_ZERO,
00104                                         GL_ONE,
00105                                         GL_SRC_COLOR,
00106                                         GL_ONE_MINUS_SRC_COLOR,
00107                                         GL_SRC_ALPHA,
00108                                         GL_ONE_MINUS_SRC_COLOR,
00109                                         GL_DST_ALPHA,
00110                                         GL_ONE_MINUS_DST_ALPHA ),
00111                                     "GLenum" ) ) ) );
00112         mySubTree->append( new CmdTreeNode( "glCullFace", NULL, cmd_glCullFace, 
00113                             new SuperPtrList<CmdParam>( 1,
00114                                 new EnumParam( "mode", "1029", 
00115                                     SuperValueList<char*>( 2,
00116                                         "GL_FRONT",
00117                                         "GL_BACK" ),
00118                                     SuperValueList<int>( 2,
00119                                         GL_FRONT,
00120                                         GL_BACK ),
00121                                     "GLenum" ) ) ) );
00122         mySubTree->append( new CmdTreeNode( "glFrontFace", NULL, cmd_glFrontFace, 
00123                             new SuperPtrList<CmdParam>( 1,
00124                                 new EnumParam( "mode", "2305", 
00125                                     SuperValueList<char*>( 2,
00126                                         "GL_CW",
00127                                         "GL_CCW" ),
00128                                     SuperValueList<int>( 2,
00129                                         GL_CW,
00130                                         GL_CCW ),
00131                                     "GLenum" ) ) ) );
00132         mySubTree->append( new CmdTreeNode( "glEnable", NULL, cmd_glEnable, 
00133                             new SuperPtrList<CmdParam>( 1,
00134                                 new EnumParam( "cap", "2929", 
00135                                     SuperValueList<char*>( 23,
00136                                         "GL_ALPHA_TEST",
00137                                         "GL_AUTO_NORMAL",
00138                                         "GL_BLEND",
00139                                         "GL_COLOR_MATERIAL",
00140                                         "GL_CULL_FACE",
00141                                         "GL_DEPTH_TEST",
00142                                         "GL_DITHER",
00143                                         "GL_FOG",
00144                                         "GL_LIGHT0",
00145                                         "GL_LIGHT1",
00146                                         "GL_LIGHT2",
00147                                         "GL_LIGHT3",
00148                                         "GL_LIGHT4",
00149                                         "GL_LIGHT5",
00150                                         "GL_LIGHT6",
00151                                         "GL_LIGHT7",
00152                                         "GL_LIGHTING",
00153                                         "GL_LINE_SMOOTH",
00154                                         "GL_NORMALIZE",
00155                                         "GL_POINT_SMOOTH",
00156                                         "GL_POLYGON_SMOOTH",
00157                                         "GL_POLYGON_STIPPLE",
00158                                         "GL_RESCALE_NORMAL" ),
00159                                     SuperValueList<int>( 23,
00160                                         GL_ALPHA_TEST,
00161                                         GL_AUTO_NORMAL,
00162                                         GL_BLEND,
00163                                         GL_COLOR_MATERIAL,
00164                                         GL_CULL_FACE,
00165                                         GL_DEPTH_TEST,
00166                                         GL_DITHER,
00167                                         GL_FOG,
00168                                         GL_LIGHT0,
00169                                         GL_LIGHT1,
00170                                         GL_LIGHT2,
00171                                         GL_LIGHT3,
00172                                         GL_LIGHT4,
00173                                         GL_LIGHT5,
00174                                         GL_LIGHT6,
00175                                         GL_LIGHT7,
00176                                         GL_LIGHTING,
00177                                         GL_LINE_SMOOTH,
00178                                         GL_NORMALIZE,
00179                                         GL_POINT_SMOOTH,
00180                                         GL_POLYGON_SMOOTH,
00181                                         GL_POLYGON_STIPPLE,
00182                                         GL_RESCALE_NORMAL ),
00183                                     "GLenum" ) ) ) );
00184         mySubTree->append( new CmdTreeNode( "glDisable", NULL, cmd_glDisable, 
00185                             new SuperPtrList<CmdParam>( 1,
00186                                 new EnumParam( "cap", "2929", 
00187                                     SuperValueList<char*>( 23,
00188                                         "GL_ALPHA_TEST",
00189                                         "GL_AUTO_NORMAL",
00190                                         "GL_BLEND",
00191                                         "GL_COLOR_MATERIAL",
00192                                         "GL_CULL_FACE",
00193                                         "GL_DEPTH_TEST",
00194                                         "GL_DITHER",
00195                                         "GL_FOG",
00196                                         "GL_LIGHT0",
00197                                         "GL_LIGHT1",
00198                                         "GL_LIGHT2",
00199                                         "GL_LIGHT3",
00200                                         "GL_LIGHT4",
00201                                         "GL_LIGHT5",
00202                                         "GL_LIGHT6",
00203                                         "GL_LIGHT7",
00204                                         "GL_LIGHTING",
00205                                         "GL_LINE_SMOOTH",
00206                                         "GL_NORMALIZE",
00207                                         "GL_POINT_SMOOTH",
00208                                         "GL_POLYGON_SMOOTH",
00209                                         "GL_POLYGON_STIPPLE",
00210                                         "GL_RESCALE_NORMAL" ),
00211                                     SuperValueList<int>( 23,
00212                                         GL_ALPHA_TEST,
00213                                         GL_AUTO_NORMAL,
00214                                         GL_BLEND,
00215                                         GL_COLOR_MATERIAL,
00216                                         GL_CULL_FACE,
00217                                         GL_DEPTH_TEST,
00218                                         GL_DITHER,
00219                                         GL_FOG,
00220                                         GL_LIGHT0,
00221                                         GL_LIGHT1,
00222                                         GL_LIGHT2,
00223                                         GL_LIGHT3,
00224                                         GL_LIGHT4,
00225                                         GL_LIGHT5,
00226                                         GL_LIGHT6,
00227                                         GL_LIGHT7,
00228                                         GL_LIGHTING,
00229                                         GL_LINE_SMOOTH,
00230                                         GL_NORMALIZE,
00231                                         GL_POINT_SMOOTH,
00232                                         GL_POLYGON_SMOOTH,
00233                                         GL_POLYGON_STIPPLE,
00234                                         GL_RESCALE_NORMAL ),
00235                                     "GLenum" ) ) ) );
00236         mySubTree->append( new CmdTreeNode( "glHint", NULL, cmd_glHint, 
00237                             new SuperPtrList<CmdParam>( 2,
00238                                 new EnumParam( "target", "3154", 
00239                                     SuperValueList<char*>( 5,
00240                                         "GL_FOG_HINT",
00241                                         "GL_PERSPECTIVE_CORRECTION_HINT",
00242                                         "GL_LINE_SMOOTH_HINT",
00243                                         "GL_POINT_SMOOTH_HINT",
00244                                         "GL_POLYGON_SMOOTH_HINT" ),
00245                                     SuperValueList<int>( 5,
00246                                         GL_FOG_HINT,
00247                                         GL_PERSPECTIVE_CORRECTION_HINT,
00248                                         GL_LINE_SMOOTH_HINT,
00249                                         GL_POINT_SMOOTH_HINT,
00250                                         GL_POLYGON_SMOOTH_HINT ),
00251                                     "GLenum" ), 
00252                                 new EnumParam( "mode", "4352", 
00253                                     SuperValueList<char*>( 3,
00254                                         "GL_DONT_CARE",
00255                                         "GL_FASTEST",
00256                                         "GL_NICEST" ),
00257                                     SuperValueList<int>( 3,
00258                                         GL_DONT_CARE,
00259                                         GL_FASTEST,
00260                                         GL_NICEST ),
00261                                     "GLenum" ) ) ) );
00262         mySubTree->append( new CmdTreeNode( "glDepthFunc", NULL, cmd_glDepthFunc, 
00263                             new SuperPtrList<CmdParam>( 1,
00264                                 new EnumParam( "func", "513", 
00265                                     SuperValueList<char*>( 8,
00266                                         "GL_NEVER",
00267                                         "GL_LESS",
00268                                         "GL_EQUAL",
00269                                         "GL_LEQUAL",
00270                                         "GL_GREATER",
00271                                         "GL_NOTEQUAL",
00272                                         "GL_GEQUAL",
00273                                         "GL_ALWAYS" ),
00274                                     SuperValueList<int>( 8,
00275                                         GL_NEVER,
00276                                         GL_LESS,
00277                                         GL_EQUAL,
00278                                         GL_LEQUAL,
00279                                         GL_GREATER,
00280                                         GL_NOTEQUAL,
00281                                         GL_GEQUAL,
00282                                         GL_ALWAYS ),
00283                                     "GLenum" ) ) ) );
00284         mySubTree->append( new CmdTreeNode( "glShadeModel", NULL, cmd_glShadeModel, 
00285                             new SuperPtrList<CmdParam>( 1,
00286                                 new EnumParam( "mode", "7425", 
00287                                     SuperValueList<char*>( 2,
00288                                         "GL_FLAT",
00289                                         "GL_SMOOTH" ),
00290                                     SuperValueList<int>( 2,
00291                                         GL_FLAT,
00292                                         GL_SMOOTH ),
00293                                     "GLenum" ) ) ) );
00294     }
00295 
00296     // Note: In the unlikely (but serious) event that too few elements exist in
00297     //       the list of strings that is passed, the QStringList class will
00298     //       catch and handle the case as appropiate.
00299 
00300     static void cmd_glAlphaFunc( const QStringList& p ) {
00301         glAlphaFunc( p[0].toInt(), p[1].toFloat() );
00302     }
00303     static void cmd_glBlendFunc( const QStringList& p ) {
00304         glBlendFunc( p[0].toInt(), p[1].toInt() );
00305     }
00306     static void cmd_glCullFace( const QStringList& p ) {
00307         glCullFace( p[0].toInt() );
00308     }
00309     static void cmd_glFrontFace( const QStringList& p ) {
00310         glFrontFace( p[0].toInt() );
00311     }
00312     static void cmd_glEnable( const QStringList& p ) {
00313         glEnable( p[0].toInt() );
00314     }
00315     static void cmd_glDisable( const QStringList& p ) {
00316         glDisable( p[0].toInt() );
00317     }
00318     static void cmd_glHint( const QStringList& p ) {
00319         glHint( p[0].toInt(), p[1].toInt() );
00320     }
00321     static void cmd_glDepthFunc( const QStringList& p ) {
00322         glDepthFunc( p[0].toInt() );
00323     }
00324     static void cmd_glShadeModel( const QStringList& p ) {
00325         glShadeModel( p[0].toInt() );
00326     }
00327 
00328 private:
00329 
00330 };
00331 
00332 
00333 #endif // __INITTREE_H__

Generated on Fri Feb 27 12:01:39 2004 for Glitch by doxygen 1.3.2