ResidualVM logo ResidualVM website - Forums - Contact us BuildBot - Doxygen - Wiki curved edge

gl.h

Go to the documentation of this file.
00001 /* ResidualVM - A 3D game interpreter
00002  *
00003  * ResidualVM is the legal property of its developers, whose names
00004  * are too numerous to list here. Please refer to the AUTHORS
00005  * file distributed with this source distribution.
00006  *
00007  * This program is free software; you can redistribute it and/or
00008  * modify it under the terms of the GNU General Public License
00009  * as published by the Free Software Foundation; either version 2
00010  * of the License, or (at your option) any later version.
00011  *
00012  * This program is distributed in the hope that it will be useful,
00013  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015  * GNU General Public License for more details.
00016  *
00017  * You should have received a copy of the GNU General Public License
00018  * along with this program; if not, write to the Free Software
00019  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
00020  *
00021  */
00022 
00023 /*
00024  * This file is based on, or a modified version of code from TinyGL (C) 1997-1998 Fabrice Bellard,
00025  * which is licensed under the zlib-license (see LICENSE).
00026  * It also has modifications by the ResidualVM-team, which are covered under the GPLv2 (or later).
00027  */
00028 
00029 // The following constants come from Mesa
00030 
00031 #ifndef GRAPHICS_TGL_H
00032 #define GRAPHICS_TGL_H
00033 
00034 #define TGL_VERSION_1_1 1
00035 
00036 enum {
00037     // Boolean values
00038     TGL_FALSE                       = 0,
00039     TGL_TRUE                        = 1,
00040 
00041     // Data types
00042     TGL_BYTE                        = 0x1400,
00043     TGL_UNSIGNED_BYTE               = 0x1401,
00044     TGL_SHORT                       = 0x1402,
00045     TGL_UNSIGNED_SHORT              = 0x1403,
00046     TGL_INT                         = 0x1404,
00047     TGL_UNSIGNED_INT                = 0x1405,
00048     TGL_FLOAT                       = 0x1406,
00049     TGL_DOUBLE                      = 0x140A,
00050     TGL_2_BYTES                     = 0x1407,
00051     TGL_3_BYTES                     = 0x1408,
00052     TGL_4_BYTES                     = 0x1409,
00053 
00054     // Primitives
00055     TGL_LINES                       = 0x0001,
00056     TGL_POINTS                      = 0x0000,
00057     TGL_LINE_STRIP                  = 0x0003,
00058     TGL_LINE_LOOP                   = 0x0002,
00059     TGL_TRIANGLES                   = 0x0004,
00060     TGL_TRIANGLE_STRIP              = 0x0005,
00061     TGL_TRIANGLE_FAN                = 0x0006,
00062     TGL_QUADS                       = 0x0007,
00063     TGL_QUAD_STRIP                  = 0x0008,
00064     TGL_POLYGON                     = 0x0009,
00065     TGL_EDGE_FLAG                   = 0x0B43,
00066 
00067     // Vertex Arrays
00068     TGL_VERTEX_ARRAY                = 0x8074,
00069     TGL_NORMAL_ARRAY                = 0x8075,
00070     TGL_COLOR_ARRAY                 = 0x8076,
00071     TGL_INDEX_ARRAY                 = 0x8077,
00072     TGL_TEXTURE_COORD_ARRAY         = 0x8078,
00073     TGL_EDGE_FLAG_ARRAY             = 0x8079,
00074     TGL_VERTEX_ARRAY_SIZE           = 0x807A,
00075     TGL_VERTEX_ARRAY_TYPE           = 0x807B,
00076     TGL_VERTEX_ARRAY_STRIDE         = 0x807C,
00077     TGL_VERTEX_ARRAY_COUNT          = 0x807D,
00078     TGL_NORMAL_ARRAY_TYPE           = 0x807E,
00079     TGL_NORMAL_ARRAY_STRIDE         = 0x807F,
00080     TGL_NORMAL_ARRAY_COUNT          = 0x8080,
00081     TGL_COLOR_ARRAY_SIZE            = 0x8081,
00082     TGL_COLOR_ARRAY_TYPE            = 0x8082,
00083     TGL_COLOR_ARRAY_STRIDE          = 0x8083,
00084     TGL_COLOR_ARRAY_COUNT           = 0x8084,
00085     TGL_INDEX_ARRAY_TYPE            = 0x8085,
00086     TGL_INDEX_ARRAY_STRIDE          = 0x8086,
00087     TGL_INDEX_ARRAY_COUNT           = 0x8087,
00088     TGL_TEXTURE_COORD_ARRAY_SIZE    = 0x8088,
00089     TGL_TEXTURE_COORD_ARRAY_TYPE    = 0x8089,
00090     TGL_TEXTURE_COORD_ARRAY_STRIDE  = 0x808A,
00091     TGL_TEXTURE_COORD_ARRAY_COUNT   = 0x808B,
00092     TGL_EDGE_FLAG_ARRAY_STRIDE      = 0x808C,
00093     TGL_EDGE_FLAG_ARRAY_COUNT       = 0x808D,
00094     TGL_VERTEX_ARRAY_POINTER        = 0x808E,
00095     TGL_NORMAL_ARRAY_POINTER        = 0x808F,
00096     TGL_COLOR_ARRAY_POINTER         = 0x8090,
00097     TGL_INDEX_ARRAY_POINTER         = 0x8091,
00098     TGL_TEXTURE_COORD_ARRAY_POINTER = 0x8092,
00099     TGL_EDGE_FLAG_ARRAY_POINTER     = 0x8093,
00100     TGL_V2F                         = 0x2A20,
00101     TGL_V3F                         = 0x2A21,
00102     TGL_C4UB_V2F                    = 0x2A22,
00103     TGL_C4UB_V3F                    = 0x2A23,
00104     TGL_C3F_V3F                     = 0x2A24,
00105     TGL_N3F_V3F                     = 0x2A25,
00106     TGL_C4F_N3F_V3F                 = 0x2A26,
00107     TGL_T2F_V3F                     = 0x2A27,
00108     TGL_T4F_V4F                     = 0x2A28,
00109     TGL_T2F_C4UB_V3F                = 0x2A29,
00110     TGL_T2F_C3F_V3F                 = 0x2A2A,
00111     TGL_T2F_N3F_V3F                 = 0x2A2B,
00112     TGL_T2F_C4F_N3F_V3F             = 0x2A2C,
00113     TGL_T4F_C4F_N3F_V4F             = 0x2A2D,
00114 
00115     // Matrix Mode
00116     TGL_MATRIX_MODE                 = 0x0BA0,
00117     TGL_MODELVIEW                   = 0x1700,
00118     TGL_PROJECTION                  = 0x1701,
00119     TGL_TEXTURE                     = 0x1702,
00120 
00121     // Points
00122     TGL_POINT_SMOOTH                = 0x0B10,
00123     TGL_POINT_SIZE                  = 0x0B11,
00124     TGL_POINT_SIZE_GRANULARITY      = 0x0B13,
00125     TGL_POINT_SIZE_RANGE            = 0x0B12,
00126 
00127     // Lines
00128     TGL_LINE_SMOOTH                 = 0x0B20,
00129     TGL_LINE_STIPPLE                = 0x0B24,
00130     TGL_LINE_STIPPLE_PATTERN        = 0x0B25,
00131     TGL_LINE_STIPPLE_REPEAT         = 0x0B26,
00132     TGL_LINE_WIDTH                  = 0x0B21,
00133     TGL_LINE_WIDTH_GRANULARITY      = 0x0B23,
00134     TGL_LINE_WIDTH_RANGE            = 0x0B22,
00135 
00136     // Polygons
00137     TGL_POINT                       = 0x1B00,
00138     TGL_LINE                        = 0x1B01,
00139     TGL_FILL                        = 0x1B02,
00140     TGL_CCW                         = 0x0901,
00141     TGL_CW                          = 0x0900,
00142     TGL_FRONT                       = 0x0404,
00143     TGL_BACK                        = 0x0405,
00144     TGL_CULL_FACE                   = 0x0B44,
00145     TGL_CULL_FACE_MODE              = 0x0B45,
00146     TGL_POLYGON_SMOOTH              = 0x0B41,
00147     TGL_POLYGON_STIPPLE             = 0x0B42,
00148     TGL_FRONT_FACE                  = 0x0B46,
00149     TGL_POLYGON_MODE                = 0x0B40,
00150     TGL_POLYGON_OFFSET_FACTOR       = 0x3038,
00151     TGL_POLYGON_OFFSET_UNITS        = 0x2A00,
00152     TGL_POLYGON_OFFSET_POINT        = 0x2A01,
00153     TGL_POLYGON_OFFSET_LINE         = 0x2A02,
00154     TGL_POLYGON_OFFSET_FILL         = 0x8037,
00155     TGL_SHADOW_MASK_MODE            = 0x0C40,
00156     TGL_SHADOW_MODE                 = 0x0C41,
00157 
00158     // Display Lists
00159     TGL_COMPILE                     = 0x1300,
00160     TGL_COMPILE_AND_EXECUTE         = 0x1301,
00161     TGL_LIST_BASE                   = 0x0B32,
00162     TGL_LIST_INDEX                  = 0x0B33,
00163     TGL_LIST_MODE                   = 0x0B30,
00164 
00165     // Depth buffer
00166     TGL_NEVER                       = 0x0200,
00167     TGL_LESS                        = 0x0201,
00168     TGL_GEQUAL                      = 0x0206,
00169     TGL_LEQUAL                      = 0x0203,
00170     TGL_GREATER                     = 0x0204,
00171     TGL_NOTEQUAL                    = 0x0205,
00172     TGL_EQUAL                       = 0x0202,
00173     TGL_ALWAYS                      = 0x0207,
00174     TGL_DEPTH_TEST                  = 0x0B71,
00175     TGL_DEPTH_BITS                  = 0x0D56,
00176     TGL_DEPTH_CLEAR_VALUE           = 0x0B73,
00177     TGL_DEPTH_FUNC                  = 0x0B74,
00178     TGL_DEPTH_RANGE                 = 0x0B70,
00179     TGL_DEPTH_WRITEMASK             = 0x0B72,
00180     TGL_DEPTH_COMPONENT             = 0x1902,
00181 
00182     // Lighting
00183     TGL_LIGHTING                    = 0x0B50,
00184     TGL_LIGHT0                      = 0x4000,
00185     TGL_LIGHT1                      = 0x4001,
00186     TGL_LIGHT2                      = 0x4002,
00187     TGL_LIGHT3                      = 0x4003,
00188     TGL_LIGHT4                      = 0x4004,
00189     TGL_LIGHT5                      = 0x4005,
00190     TGL_LIGHT6                      = 0x4006,
00191     TGL_LIGHT7                      = 0x4007,
00192     TGL_SPOT_EXPONENT               = 0x1205,
00193     TGL_SPOT_CUTOFF                 = 0x1206,
00194     TGL_CONSTANT_ATTENUATION        = 0x1207,
00195     TGL_LINEAR_ATTENUATION          = 0x1208,
00196     TGL_QUADRATIC_ATTENUATION       = 0x1209,
00197     TGL_AMBIENT                     = 0x1200,
00198     TGL_DIFFUSE                     = 0x1201,
00199     TGL_SPECULAR                    = 0x1202,
00200     TGL_SHININESS                   = 0x1601,
00201     TGL_EMISSION                    = 0x1600,
00202     TGL_POSITION                    = 0x1203,
00203     TGL_SPOT_DIRECTION              = 0x1204,
00204     TGL_AMBIENT_AND_DIFFUSE         = 0x1602,
00205     TGL_COLOR_INDEXES               = 0x1603,
00206     TGL_LIGHT_MODEL_TWO_SIDE        = 0x0B52,
00207     TGL_LIGHT_MODEL_LOCAL_VIEWER    = 0x0B51,
00208     TGL_LIGHT_MODEL_AMBIENT         = 0x0B53,
00209     TGL_FRONT_AND_BACK              = 0x0408,
00210     TGL_SHADE_MODEL                 = 0x0B54,
00211     TGL_FLAT                        = 0x1D00,
00212     TGL_SMOOTH                      = 0x1D01,
00213     TGL_COLOR_MATERIAL              = 0x0B57,
00214     TGL_COLOR_MATERIAL_FACE         = 0x0B55,
00215     TGL_COLOR_MATERIAL_PARAMETER    = 0x0B56,
00216     TGL_NORMALIZE                   = 0x0BA1,
00217 
00218     // User clipping planes
00219     TGL_CLIP_PLANE0                 = 0x3000,
00220     TGL_CLIP_PLANE1                 = 0x3001,
00221     TGL_CLIP_PLANE2                 = 0x3002,
00222     TGL_CLIP_PLANE3                 = 0x3003,
00223     TGL_CLIP_PLANE4                 = 0x3004,
00224     TGL_CLIP_PLANE5                 = 0x3005,
00225 
00226     // Accumulation buffer
00227     TGL_ACCUM_RED_BITS              = 0x0D58,
00228     TGL_ACCUM_GREEN_BITS            = 0x0D59,
00229     TGL_ACCUM_BLUE_BITS             = 0x0D5A,
00230     TGL_ACCUM_ALPHA_BITS            = 0x0D5B,
00231     TGL_ACCUM_CLEAR_VALUE           = 0x0B80,
00232     TGL_ACCUM                       = 0x0100,
00233     TGL_ADD                         = 0x0104,
00234     TGL_LOAD                        = 0x0101,
00235     TGL_MULT                        = 0x0103,
00236     TGL_RETURN                      = 0x0102,
00237 
00238     // Alpha testing
00239     TGL_ALPHA_TEST                  = 0x0BC0,
00240     TGL_ALPHA_TEST_REF              = 0x0BC2,
00241     TGL_ALPHA_TEST_FUNC             = 0x0BC1,
00242 
00243     // Blending
00244     TGL_BLEND                       = 0x0BE2,
00245     TGL_BLEND_SRC                   = 0x0BE1,
00246     TGL_BLEND_DST                   = 0x0BE0,
00247     TGL_ZERO                        = 0,
00248     TGL_ONE                         = 1,
00249     TGL_SRC_COLOR                   = 0x0300,
00250     TGL_ONE_MINUS_SRC_COLOR         = 0x0301,
00251     TGL_DST_COLOR                   = 0x0306,
00252     TGL_ONE_MINUS_DST_COLOR         = 0x0307,
00253     TGL_SRC_ALPHA                   = 0x0302,
00254     TGL_ONE_MINUS_SRC_ALPHA         = 0x0303,
00255     TGL_DST_ALPHA                   = 0x0304,
00256     TGL_ONE_MINUS_DST_ALPHA         = 0x0305,
00257     TGL_SRC_ALPHA_SATURATE          = 0x0308,
00258     TGL_CONSTANT_COLOR              = 0x8001,
00259     TGL_ONE_MINUS_CONSTANT_COLOR    = 0x8002,
00260     TGL_CONSTANT_ALPHA              = 0x8003,
00261     TGL_ONE_MINUS_CONSTANT_ALPHA    = 0x8004,
00262 
00263     // Render Mode
00264     TGL_FEEDBACK                    = 0x1C01,
00265     TGL_RENDER                      = 0x1C00,
00266     TGL_SELECT                      = 0x1C02,
00267 
00268     // Feedback
00269     TGL_2D                          = 0x0600,
00270     TGL_3D                          = 0x0601,
00271     TGL_3D_COLOR                    = 0x0602,
00272     TGL_3D_COLOR_TEXTURE            = 0x0603,
00273     TGL_4D_COLOR_TEXTURE            = 0x0604,
00274     TGL_POINT_TOKEN                 = 0x0701,
00275     TGL_LINE_TOKEN                  = 0x0702,
00276     TGL_LINE_RESET_TOKEN            = 0x0707,
00277     TGL_POLYGON_TOKEN               = 0x0703,
00278     TGL_BITMAP_TOKEN                = 0x0704,
00279     TGL_DRAW_PIXEL_TOKEN            = 0x0705,
00280     TGL_COPY_PIXEL_TOKEN            = 0x0706,
00281     TGL_PASS_THROUGH_TOKEN          = 0x0700,
00282 
00283     // Fog
00284     TGL_FOG                         = 0x0B60,
00285     TGL_FOG_MODE                    = 0x0B65,
00286     TGL_FOG_DENSITY                 = 0x0B62,
00287     TGL_FOG_COLOR                   = 0x0B66,
00288     TGL_FOG_INDEX                   = 0x0B61,
00289     TGL_FOG_START                   = 0x0B63,
00290     TGL_FOG_END                     = 0x0B64,
00291     TGL_LINEAR                      = 0x2601,
00292     TGL_EXP                         = 0x0800,
00293     TGL_EXP2                        = 0x0801,
00294 
00295     // Logic Ops
00296     TGL_LOGIC_OP                    = 0x0BF1,
00297     TGL_LOGIC_OP_MODE               = 0x0BF0,
00298     TGL_CLEAR                       = 0x1500,
00299     TGL_SET                         = 0x150F,
00300     TGL_COPY                        = 0x1503,
00301     TGL_COPY_INVERTED               = 0x150C,
00302     TGL_NOOP                        = 0x1505,
00303     TGL_INVERT                      = 0x150A,
00304     TGL_AND                         = 0x1501,
00305     TGL_NAND                        = 0x150E,
00306     TGL_OR                          = 0x1507,
00307     TGL_NOR                         = 0x1508,
00308     TGL_XOR                         = 0x1506,
00309     TGL_EQUIV                       = 0x1509,
00310     TGL_AND_REVERSE                 = 0x1502,
00311     TGL_AND_INVERTED                = 0x1504,
00312     TGL_OR_REVERSE                  = 0x150B,
00313     TGL_OR_INVERTED                 = 0x150D,
00314 
00315     // Stencil
00316     TGL_STENCIL_TEST                = 0x0B90,
00317     TGL_STENCIL_WRITEMASK           = 0x0B98,
00318     TGL_STENCIL_BITS                = 0x0D57,
00319     TGL_STENCIL_FUNC                = 0x0B92,
00320     TGL_STENCIL_VALUE_MASK          = 0x0B93,
00321     TGL_STENCIL_REF                 = 0x0B97,
00322     TGL_STENCIL_FAIL                = 0x0B94,
00323     TGL_STENCIL_PASS_DEPTH_PASS     = 0x0B96,
00324     TGL_STENCIL_PASS_DEPTH_FAIL     = 0x0B95,
00325     TGL_STENCIL_CLEAR_VALUE         = 0x0B91,
00326     TGL_STENCIL_INDEX               = 0x1901,
00327     TGL_KEEP                        = 0x1E00,
00328     TGL_REPLACE                     = 0x1E01,
00329     TGL_INCR                        = 0x1E02,
00330     TGL_DECR                        = 0x1E03,
00331 
00332     // Buffers, Pixel Drawing/Reading
00333     TGL_NONE                        = 0,
00334     TGL_LEFT                        = 0x0406,
00335     TGL_RIGHT                       = 0x0407,
00336     //TGL_FRONT                     = 0x0404,
00337     //TGL_BACK                      = 0x0405,
00338     //TGL_FRONT_AND_BACK            = 0x0408,
00339     TGL_FRONT_LEFT                  = 0x0400,
00340     TGL_FRONT_RIGHT                 = 0x0401,
00341     TGL_BACK_LEFT                   = 0x0402,
00342     TGL_BACK_RIGHT                  = 0x0403,
00343     TGL_AUX0                        = 0x0409,
00344     TGL_AUX1                        = 0x040A,
00345     TGL_AUX2                        = 0x040B,
00346     TGL_AUX3                        = 0x040C,
00347     TGL_COLOR_INDEX                 = 0x1900,
00348     TGL_RED                         = 0x1903,
00349     TGL_GREEN                       = 0x1904,
00350     TGL_BLUE                        = 0x1905,
00351     TGL_ALPHA                       = 0x1906,
00352     TGL_LUMINANCE                   = 0x1909,
00353     TGL_LUMINANCE_ALPHA             = 0x190A,
00354     TGL_ALPHA_BITS                  = 0x0D55,
00355     TGL_RED_BITS                    = 0x0D52,
00356     TGL_GREEN_BITS                  = 0x0D53,
00357     TGL_BLUE_BITS                   = 0x0D54,
00358     TGL_INDEX_BITS                  = 0x0D51,
00359     TGL_SUBPIXEL_BITS               = 0x0D50,
00360     TGL_AUX_BUFFERS                 = 0x0C00,
00361     TGL_READ_BUFFER                 = 0x0C02,
00362     TGL_DRAW_BUFFER                 = 0x0C01,
00363     TGL_DOUBLEBUFFER                = 0x0C32,
00364     TGL_STEREO                      = 0x0C33,
00365     TGL_BITMAP                      = 0x1A00,
00366     TGL_COLOR                       = 0x1800,
00367     TGL_DEPTH                       = 0x1801,
00368     TGL_STENCIL                     = 0x1802,
00369     TGL_DITHER                      = 0x0BD0,
00370     TGL_RGB                         = 0x1907,
00371     TGL_RGBA                        = 0x1908,
00372 
00373     // Implementation limits
00374     TGL_MAX_LIST_NESTING            = 0x0B31,
00375     TGL_MAX_ATTRIB_STACK_DEPTH      = 0x0D35,
00376     TGL_MAX_MODELVIEW_STACK_DEPTH   = 0x0D36,
00377     TGL_MAX_NAME_STACK_DEPTH        = 0x0D37,
00378     TGL_MAX_PROJECTION_STACK_DEPTH  = 0x0D38,
00379     TGL_MAX_TEXTURE_STACK_DEPTH     = 0x0D39,
00380     TGL_MAX_EVAL_ORDER              = 0x0D30,
00381     TGL_MAX_LIGHTS                  = 0x0D31,
00382     TGL_MAX_CLIP_PLANES             = 0x0D32,
00383     TGL_MAX_TEXTURE_SIZE            = 0x0D33,
00384     TGL_MAX_PIXEL_MAP_TABLE         = 0x0D34,
00385     TGL_MAX_VIEWPORT_DIMS           = 0x0D3A,
00386     TGL_MAX_CLIENT_ATTRIB_STACK_DEPTH = 0x0D3B,
00387 
00388     // Gets
00389     TGL_ATTRIB_STACK_DEPTH          = 0x0BB0,
00390     TGL_COLOR_CLEAR_VALUE           = 0x0C22,
00391     TGL_COLOR_WRITEMASK             = 0x0C23,
00392     TGL_CURRENT_INDEX               = 0x0B01,
00393     TGL_CURRENT_COLOR               = 0x0B00,
00394     TGL_CURRENT_NORMAL              = 0x0B02,
00395     TGL_CURRENT_RASTER_COLOR        = 0x0B04,
00396     TGL_CURRENT_RASTER_DISTANCE     = 0x0B09,
00397     TGL_CURRENT_RASTER_INDEX        = 0x0B05,
00398     TGL_CURRENT_RASTER_POSITION     = 0x0B07,
00399     TGL_CURRENT_RASTER_TEXTURE_COORDS = 0x0B06,
00400     TGL_CURRENT_RASTER_POSITION_VALID = 0x0B08,
00401     TGL_CURRENT_TEXTURE_COORDS      = 0x0B03,
00402     TGL_INDEX_CLEAR_VALUE           = 0x0C20,
00403     TGL_INDEX_MODE                  = 0x0C30,
00404     TGL_INDEX_WRITEMASK             = 0x0C21,
00405     TGL_MODELVIEW_MATRIX            = 0x0BA6,
00406     TGL_MODELVIEW_STACK_DEPTH       = 0x0BA3,
00407     TGL_NAME_STACK_DEPTH            = 0x0D70,
00408     TGL_PROJECTION_MATRIX           = 0x0BA7,
00409     TGL_PROJECTION_STACK_DEPTH      = 0x0BA4,
00410     TGL_RENDER_MODE                 = 0x0C40,
00411     TGL_RGBA_MODE                   = 0x0C31,
00412     TGL_TEXTURE_MATRIX              = 0x0BA8,
00413     TGL_TEXTURE_STACK_DEPTH         = 0x0BA5,
00414     TGL_VIEWPORT                    = 0x0BA2,
00415 
00416     // Evaluators
00417     TGL_AUTO_NORMAL                 = 0x0D80,
00418     TGL_MAP1_COLOR_4                = 0x0D90,
00419     TGL_MAP1_GRID_DOMAIN            = 0x0DD0,
00420     TGL_MAP1_GRID_SEGMENTS          = 0x0DD1,
00421     TGL_MAP1_INDEX                  = 0x0D91,
00422     TGL_MAP1_NORMAL                 = 0x0D92,
00423     TGL_MAP1_TEXTURE_COORD_1        = 0x0D93,
00424     TGL_MAP1_TEXTURE_COORD_2        = 0x0D94,
00425     TGL_MAP1_TEXTURE_COORD_3        = 0x0D95,
00426     TGL_MAP1_TEXTURE_COORD_4        = 0x0D96,
00427     TGL_MAP1_VERTEX_3               = 0x0D97,
00428     TGL_MAP1_VERTEX_4               = 0x0D98,
00429     TGL_MAP2_COLOR_4                = 0x0DB0,
00430     TGL_MAP2_GRID_DOMAIN            = 0x0DD2,
00431     TGL_MAP2_GRID_SEGMENTS          = 0x0DD3,
00432     TGL_MAP2_INDEX                  = 0x0DB1,
00433     TGL_MAP2_NORMAL                 = 0x0DB2,
00434     TGL_MAP2_TEXTURE_COORD_1        = 0x0DB3,
00435     TGL_MAP2_TEXTURE_COORD_2        = 0x0DB4,
00436     TGL_MAP2_TEXTURE_COORD_3        = 0x0DB5,
00437     TGL_MAP2_TEXTURE_COORD_4        = 0x0DB6,
00438     TGL_MAP2_VERTEX_3               = 0x0DB7,
00439     TGL_MAP2_VERTEX_4               = 0x0DB8,
00440     TGL_COEFF                       = 0x0A00,
00441     TGL_DOMAIN                      = 0x0A02,
00442     TGL_ORDER                       = 0x0A01,
00443 
00444     // Hints
00445     TGL_FOG_HINT                    = 0x0C54,
00446     TGL_LINE_SMOOTH_HINT            = 0x0C52,
00447     TGL_PERSPECTIVE_CORRECTION_HINT = 0x0C50,
00448     TGL_POINT_SMOOTH_HINT           = 0x0C51,
00449     TGL_POLYGON_SMOOTH_HINT         = 0x0C53,
00450     TGL_DONT_CARE                   = 0x1100,
00451     TGL_FASTEST                     = 0x1101,
00452     TGL_NICEST                      = 0x1102,
00453 
00454     // Scissor box
00455     TGL_SCISSOR_TEST                = 0x0C11,
00456     TGL_SCISSOR_BOX                 = 0x0C10,
00457 
00458     // Pixel Mode / Transfer
00459     TGL_MAP_COLOR                   = 0x0D10,
00460     TGL_MAP_STENCIL                 = 0x0D11,
00461     TGL_INDEX_SHIFT                 = 0x0D12,
00462     TGL_INDEX_OFFSET                = 0x0D13,
00463     TGL_RED_SCALE                   = 0x0D14,
00464     TGL_RED_BIAS                    = 0x0D15,
00465     TGL_GREEN_SCALE                 = 0x0D18,
00466     TGL_GREEN_BIAS                  = 0x0D19,
00467     TGL_BLUE_SCALE                  = 0x0D1A,
00468     TGL_BLUE_BIAS                   = 0x0D1B,
00469     TGL_ALPHA_SCALE                 = 0x0D1C,
00470     TGL_ALPHA_BIAS                  = 0x0D1D,
00471     TGL_DEPTH_SCALE                 = 0x0D1E,
00472     TGL_DEPTH_BIAS                  = 0x0D1F,
00473     TGL_PIXEL_MAP_S_TO_S_SIZE       = 0x0CB1,
00474     TGL_PIXEL_MAP_I_TO_I_SIZE       = 0x0CB0,
00475     TGL_PIXEL_MAP_I_TO_R_SIZE       = 0x0CB2,
00476     TGL_PIXEL_MAP_I_TO_G_SIZE       = 0x0CB3,
00477     TGL_PIXEL_MAP_I_TO_B_SIZE       = 0x0CB4,
00478     TGL_PIXEL_MAP_I_TO_A_SIZE       = 0x0CB5,
00479     TGL_PIXEL_MAP_R_TO_R_SIZE       = 0x0CB6,
00480     TGL_PIXEL_MAP_G_TO_G_SIZE       = 0x0CB7,
00481     TGL_PIXEL_MAP_B_TO_B_SIZE       = 0x0CB8,
00482     TGL_PIXEL_MAP_A_TO_A_SIZE       = 0x0CB9,
00483     TGL_PIXEL_MAP_S_TO_S            = 0x0C71,
00484     TGL_PIXEL_MAP_I_TO_I            = 0x0C70,
00485     TGL_PIXEL_MAP_I_TO_R            = 0x0C72,
00486     TGL_PIXEL_MAP_I_TO_G            = 0x0C73,
00487     TGL_PIXEL_MAP_I_TO_B            = 0x0C74,
00488     TGL_PIXEL_MAP_I_TO_A            = 0x0C75,
00489     TGL_PIXEL_MAP_R_TO_R            = 0x0C76,
00490     TGL_PIXEL_MAP_G_TO_G            = 0x0C77,
00491     TGL_PIXEL_MAP_B_TO_B            = 0x0C78,
00492     TGL_PIXEL_MAP_A_TO_A            = 0x0C79,
00493     TGL_PACK_ALIGNMENT              = 0x0D05,
00494     TGL_PACK_LSB_FIRST              = 0x0D01,
00495     TGL_PACK_ROW_LENGTH             = 0x0D02,
00496     TGL_PACK_SKIP_PIXELS            = 0x0D04,
00497     TGL_PACK_SKIP_ROWS              = 0x0D03,
00498     TGL_PACK_SWAP_BYTES             = 0x0D00,
00499     TGL_UNPACK_ALIGNMENT            = 0x0CF5,
00500     TGL_UNPACK_LSB_FIRST            = 0x0CF1,
00501     TGL_UNPACK_ROW_LENGTH           = 0x0CF2,
00502     TGL_UNPACK_SKIP_PIXELS          = 0x0CF4,
00503     TGL_UNPACK_SKIP_ROWS            = 0x0CF3,
00504     TGL_UNPACK_SWAP_BYTES           = 0x0CF0,
00505     TGL_ZOOM_X                      = 0x0D16,
00506     TGL_ZOOM_Y                      = 0x0D17,
00507 
00508     // Texture mapping
00509     TGL_TEXTURE_ENV                 = 0x2300,
00510     TGL_TEXTURE_ENV_MODE            = 0x2200,
00511     TGL_TEXTURE_1D                  = 0x0DE0,
00512     TGL_TEXTURE_2D                  = 0x0DE1,
00513     TGL_TEXTURE_WRAP_S              = 0x2802,
00514     TGL_TEXTURE_WRAP_T              = 0x2803,
00515     TGL_TEXTURE_MAG_FILTER          = 0x2800,
00516     TGL_TEXTURE_MIN_FILTER          = 0x2801,
00517     TGL_TEXTURE_ENV_COLOR           = 0x2201,
00518     TGL_TEXTURE_GEN_S               = 0x0C60,
00519     TGL_TEXTURE_GEN_T               = 0x0C61,
00520     TGL_TEXTURE_GEN_MODE            = 0x2500,
00521     TGL_TEXTURE_BORDER_COLOR        = 0x1004,
00522     TGL_TEXTURE_WIDTH               = 0x1000,
00523     TGL_TEXTURE_HEIGHT              = 0x1001,
00524     TGL_TEXTURE_BORDER              = 0x1005,
00525     TGL_TEXTURE_COMPONENTS          = 0x1003,
00526     TGL_NEAREST_MIPMAP_NEAREST      = 0x2700,
00527     TGL_NEAREST_MIPMAP_LINEAR       = 0x2702,
00528     TGL_LINEAR_MIPMAP_NEAREST       = 0x2701,
00529     TGL_LINEAR_MIPMAP_LINEAR        = 0x2703,
00530     TGL_OBJECT_LINEAR               = 0x2401,
00531     TGL_OBJECT_PLANE                = 0x2501,
00532     TGL_EYE_LINEAR                  = 0x2400,
00533     TGL_EYE_PLANE                   = 0x2502,
00534     TGL_SPHERE_MAP                  = 0x2402,
00535     TGL_DECAL                       = 0x2101,
00536     TGL_MODULATE                    = 0x2100,
00537     TGL_NEAREST                     = 0x2600,
00538     TGL_REPEAT                      = 0x2901,
00539     TGL_CLAMP                       = 0x2900,
00540     TGL_S                           = 0x2000,
00541     TGL_T                           = 0x2001,
00542     TGL_R                           = 0x2002,
00543     TGL_Q                           = 0x2003,
00544     TGL_TEXTURE_GEN_R               = 0x0C62,
00545     TGL_TEXTURE_GEN_Q               = 0x0C63,
00546 
00547     TGL_PROXY_TEXTURE_1D            = 0x8063,
00548     TGL_PROXY_TEXTURE_2D            = 0x8064,
00549     TGL_TEXTURE_PRIORITY            = 0x8066,
00550     TGL_TEXTURE_RESIDENT            = 0x8067,
00551     TGL_TEXTURE_1D_BINDING          = 0x8068,
00552     TGL_TEXTURE_2D_BINDING          = 0x8069,
00553 
00554     // Internal texture formats
00555     TGL_ALPHA4                      = 0x803B,
00556     TGL_ALPHA8                      = 0x803C,
00557     TGL_ALPHA12                     = 0x803D,
00558     TGL_ALPHA16                     = 0x803E,
00559     TGL_LUMINANCE4                  = 0x803F,
00560     TGL_LUMINANCE8                  = 0x8040,
00561     TGL_LUMINANCE12                 = 0x8041,
00562     TGL_LUMINANCE16                 = 0x8042,
00563     TGL_LUMINANCE4_ALPHA4           = 0x8043,
00564     TGL_LUMINANCE6_ALPHA2           = 0x8044,
00565     TGL_LUMINANCE8_ALPHA8           = 0x8045,
00566     TGL_LUMINANCE12_ALPHA4          = 0x8046,
00567     TGL_LUMINANCE12_ALPHA12         = 0x8047,
00568     TGL_LUMINANCE16_ALPHA16         = 0x8048,
00569     TGL_INTENSITY                   = 0x8049,
00570     TGL_INTENSITY4                  = 0x804A,
00571     TGL_INTENSITY8                  = 0x804B,
00572     TGL_INTENSITY12                 = 0x804C,
00573     TGL_INTENSITY16                 = 0x804D,
00574     TGL_R3_G3_B2                    = 0x2A10,
00575     TGL_RGB4                        = 0x804F,
00576     TGL_RGB5                        = 0x8050,
00577     TGL_RGB8                        = 0x8051,
00578     TGL_RGB10                       = 0x8052,
00579     TGL_RGB12                       = 0x8053,
00580     TGL_RGB16                       = 0x8054,
00581     TGL_RGBA2                       = 0x8055,
00582     TGL_RGBA4                       = 0x8056,
00583     TGL_RGB5_A1                     = 0x8057,
00584     TGL_RGBA8                       = 0x8058,
00585     TGL_RGB10_A2                    = 0x8059,
00586     TGL_RGBA12                      = 0x805A,
00587     TGL_RGBA16                      = 0x805B,
00588     TGL_UNSIGNED_SHORT_5_6_5        = 0x8363,
00589     TGL_UNSIGNED_SHORT_5_6_5_REV    = 0x8364,
00590     TGL_UNSIGNED_INT_8_8_8_8        = 0x8035,
00591     TGL_UNSIGNED_INT_8_8_8_8_REV    = 0x8367,
00592 
00593     // Utility
00594     TGL_VENDOR                      = 0x1F00,
00595     TGL_RENDERER                    = 0x1F01,
00596     TGL_VERSION                     = 0x1F02,
00597     TGL_EXTENSIONS                  = 0x1F03,
00598 
00599     // Errors
00600     TGL_INVALID_VALUE               = 0x0501,
00601     TGL_INVALID_ENUM                = 0x0500,
00602     TGL_INVALID_OPERATION           = 0x0502,
00603     TGL_STACK_OVERFLOW              = 0x0503,
00604     TGL_STACK_UNDERFLOW             = 0x0504,
00605     TGL_OUT_OF_MEMORY               = 0x0505,
00606 
00607     // 1.0 Extensions
00608 
00609     // TGL_EXT_blend_minmax and TGL_EXT_blend_color
00610     TGL_CONSTANT_COLOR_EXT          = 0x8001,
00611     TGL_ONE_MINUS_CONSTANT_COLOR_EXT = 0x8002,
00612     TGL_CONSTANT_ALPHA_EXT          = 0x8003,
00613     TGL_ONE_MINUS_CONSTANT_ALPHA_EXT = 0x8004,
00614     TGL_BLEND_EQUATION_EXT          = 0x8009,
00615     TGL_MIN_EXT                     = 0x8007,
00616     TGL_MAX_EXT                     = 0x8008,
00617     TGL_FUNC_ADD_EXT                = 0x8006,
00618     TGL_FUNC_SUBTRACT_EXT           = 0x800A,
00619     TGL_FUNC_REVERSE_SUBTRACT_EXT   = 0x800B,
00620     TGL_BLEND_COLOR_EXT             = 0x8005,
00621 
00622     // TGL_EXT_polygon_offset
00623     TGL_POLYGON_OFFSET_EXT           = 0x8037,
00624     TGL_POLYGON_OFFSET_FACTOR_EXT    = 0x8038,
00625     TGL_POLYGON_OFFSET_BIAS_EXT      = 0x8039,
00626 
00627     // TGL_EXT_vertex_array
00628     TGL_VERTEX_ARRAY_EXT            = 0x8074,
00629     TGL_NORMAL_ARRAY_EXT            = 0x8075,
00630     TGL_COLOR_ARRAY_EXT             = 0x8076,
00631     TGL_INDEX_ARRAY_EXT             = 0x8077,
00632     TGL_TEXTURE_COORD_ARRAY_EXT     = 0x8078,
00633     TGL_EDGE_FLAG_ARRAY_EXT         = 0x8079,
00634     TGL_VERTEX_ARRAY_SIZE_EXT       = 0x807A,
00635     TGL_VERTEX_ARRAY_TYPE_EXT       = 0x807B,
00636     TGL_VERTEX_ARRAY_STRIDE_EXT     = 0x807C,
00637     TGL_VERTEX_ARRAY_COUNT_EXT      = 0x807D,
00638     TGL_NORMAL_ARRAY_TYPE_EXT       = 0x807E,
00639     TGL_NORMAL_ARRAY_STRIDE_EXT     = 0x807F,
00640     TGL_NORMAL_ARRAY_COUNT_EXT      = 0x8080,
00641     TGL_COLOR_ARRAY_SIZE_EXT        = 0x8081,
00642     TGL_COLOR_ARRAY_TYPE_EXT        = 0x8082,
00643     TGL_COLOR_ARRAY_STRIDE_EXT      = 0x8083,
00644     TGL_COLOR_ARRAY_COUNT_EXT       = 0x8084,
00645     TGL_INDEX_ARRAY_TYPE_EXT        = 0x8085,
00646     TGL_INDEX_ARRAY_STRIDE_EXT      = 0x8086,
00647     TGL_INDEX_ARRAY_COUNT_EXT       = 0x8087,
00648     TGL_TEXTURE_COORD_ARRAY_SIZE_EXT = 0x8088,
00649     TGL_TEXTURE_COORD_ARRAY_TYPE_EXT = 0x8089,
00650     TGL_TEXTURE_COORD_ARRAY_STRIDE_EXT = 0x808A,
00651     TGL_TEXTURE_COORD_ARRAY_COUNT_EXT = 0x808B,
00652     TGL_EDGE_FLAG_ARRAY_STRIDE_EXT  = 0x808C,
00653     TGL_EDGE_FLAG_ARRAY_COUNT_EXT   = 0x808D,
00654     TGL_VERTEX_ARRAY_POINTER_EXT    = 0x808E,
00655     TGL_NORMAL_ARRAY_POINTER_EXT    = 0x808F,
00656     TGL_COLOR_ARRAY_POINTER_EXT     = 0x8090,
00657     TGL_INDEX_ARRAY_POINTER_EXT     = 0x8091,
00658     TGL_TEXTURE_COORD_ARRAY_POINTER_EXT = 0x8092,
00659     TGL_EDGE_FLAG_ARRAY_POINTER_EXT = 0x8093,
00660 
00661     // Color-types from 1.2, from SDL_opengl.h
00662     TGL_BGR                         = 0x80E0,
00663     TGL_BGRA                        = 0x80E1
00664 };
00665 
00666 enum {
00667     TGL_CURRENT_BIT         = 0x00000001,
00668     TGL_POINT_BIT           = 0x00000002,
00669     TGL_LINE_BIT            = 0x00000004,
00670     TGL_POLYGON_BIT         = 0x00000008,
00671     TGL_POLYGON_STIPPLE_BIT = 0x00000010,
00672     TGL_PIXEL_MODE_BIT      = 0x00000020,
00673     TGL_LIGHTING_BIT        = 0x00000040,
00674     TGL_FOG_BIT             = 0x00000080,
00675     TGL_DEPTH_BUFFER_BIT    = 0x00000100,
00676     TGL_ACCUM_BUFFER_BIT    = 0x00000200,
00677     TGL_STENCIL_BUFFER_BIT  = 0x00000400,
00678     TGL_VIEWPORT_BIT        = 0x00000800,
00679     TGL_TRANSFORM_BIT       = 0x00001000,
00680     TGL_ENABLE_BIT          = 0x00002000,
00681     TGL_COLOR_BUFFER_BIT    = 0x00004000,
00682     TGL_HINT_BIT            = 0x00008000,
00683     TGL_EVAL_BIT            = 0x00010000,
00684     TGL_LIST_BIT            = 0x00020000,
00685     TGL_TEXTURE_BIT         = 0x00040000,
00686     TGL_SCISSOR_BIT         = 0x00080000,
00687     TGL_ALL_ATTRIB_BITS     = 0x000fffff
00688 };
00689 
00690 // some types
00691 
00692 typedef int             TGLenum;
00693 typedef void            TGLvoid;
00694 typedef unsigned char   TGLboolean;
00695 typedef signed char     TGLbyte;    // 1-byte signed
00696 typedef short           TGLshort;   // 2-byte signed
00697 typedef int             TGLint;     // 4-byte signed
00698 typedef unsigned char   TGLubyte;   // 1-byte unsigned
00699 typedef unsigned short  TGLushort;  // 2-byte unsigned
00700 typedef unsigned int    TGLuint;    // 4-byte unsigned
00701 typedef float           TGLfloat;   // single precision float
00702 typedef double          TGLdouble;  // double precision float
00703 typedef int             TGLsizei;
00704 
00705 // functions
00706 
00707 void tglEnable(int code);
00708 void tglDisable(int code);
00709 
00710 void tglShadeModel(int mode);
00711 void tglCullFace(int mode);
00712 void tglPolygonMode(int face, int mode);
00713 
00714 void tglBegin(int type);
00715 void tglEnd();
00716 
00717 #define PROTO_GL1(name)             \
00718 void tgl ## name ## 1f(float);      \
00719 void tgl ## name ## 1d(double);     \
00720 void tgl ## name ## 1fv(const float *); \
00721 void tgl ## name ## 1dv(const double *);
00722 
00723 #define PROTO_GL2(name)                 \
00724 void tgl ## name ## 2f(float, float);   \
00725 void tgl ## name ## 2d(double, double); \
00726 void tgl ## name ## 2fv(const float *);     \
00727 void tgl ## name ## 2dv(const double *);
00728 
00729 #define PROTO_GL3(name)                         \
00730 void tgl ## name ## 3f(float, float, float);    \
00731 void tgl ## name ## 3d(double, double, double); \
00732 void tgl ## name ## 3fv(const float *);             \
00733 void tgl ## name ## 3dv(const double *);
00734 
00735 #define PROTO_GL4(name)                                 \
00736 void tgl ## name ## 4f(float, float, float, float);     \
00737 void tgl ## name ## 4d(double, double, double, double); \
00738 void tgl ## name ## 4fv(const float *);                     \
00739 void tgl ## name ## 4dv(const double *);
00740 
00741 PROTO_GL2(Vertex)
00742 PROTO_GL3(Vertex)
00743 PROTO_GL4(Vertex)
00744 
00745 PROTO_GL3(Color)
00746 PROTO_GL4(Color)
00747 void tglColor3ub(unsigned char r, unsigned char g, unsigned char b);
00748 void tglColor4ub(unsigned char r, unsigned char g, unsigned char b,
00749                  unsigned char a);
00750 
00751 PROTO_GL3(Normal)
00752 
00753 PROTO_GL1(TexCoord)
00754 PROTO_GL2(TexCoord)
00755 PROTO_GL3(TexCoord)
00756 PROTO_GL4(TexCoord)
00757 
00758 void tglEdgeFlag(int flag);
00759 
00760 // matrix
00761 void tglMatrixMode(int mode);
00762 void tglLoadMatrixf(const float *m);
00763 void tglLoadIdentity();
00764 void tglMultMatrixf(const float *m);
00765 void tglPushMatrix();
00766 void tglPopMatrix();
00767 void tglRotatef(float angle, float x, float y, float z);
00768 void tglTranslatef(float x, float y, float z);
00769 void tglScalef(float x, float y, float z);
00770 
00771 void tglViewport(int x, int y, int width, int height);
00772 void tglFrustum(double left, double right, double bottom, double top,
00773                 double nearv, double farv);
00774 void tglOrtho(double left, double right, double bottom, double top, double zNear, double zFar);
00775 
00776 // lists
00777 unsigned int tglGenLists(int range);
00778 int tglIsList(unsigned int list);
00779 void tglNewList(unsigned int list, int mode);
00780 void tglEndList();
00781 void tglCallList(unsigned int list);
00782 
00783 // clear
00784 void tglClear(int mask);
00785 void tglClearColor(float r, float g, float b, float a);
00786 void tglClearDepth(double depth);
00787 
00788 // selection
00789 int tglRenderMode(int mode);
00790 void tglSelectBuffer(int size, unsigned int *buf);
00791 
00792 void tglInitNames();
00793 void tglPushName(unsigned int name);
00794 void tglPopName();
00795 void tglLoadName(unsigned int name);
00796 
00797 // textures
00798 void tglGenTextures(int n, unsigned int *textures);
00799 void tglDeleteTextures(int n, const unsigned int *textures);
00800 void tglBindTexture(int target, int texture);
00801 void tglTexImage2D(int target, int level, int components,
00802                    int width, int height, int border,
00803                    int format, int type, void *pixels);
00804 void tglTexEnvi(int target, int pname, int param);
00805 void tglTexParameteri(int target, int pname, int param);
00806 void tglPixelStorei(int pname, int param);
00807 
00808 // lighting
00809 
00810 void tglMaterialfv(int mode, int type, const float *v);
00811 void tglMaterialf(int mode, int type, float v);
00812 void tglColorMaterial(int mode, int type);
00813 
00814 void tglLightfv(int light, int type, const float *v);
00815 void tglLightf(int light, int type, const float v);
00816 void tglLightModeli(int pname, int param);
00817 void tglLightModelfv(int pname, const float *param);
00818 
00819 // misc
00820 
00821 void tglFlush();
00822 void tglHint(int target, int mode);
00823 void tglGetIntegerv(int pname, int *params);
00824 void tglGetFloatv(int pname, float *v);
00825 void tglFrontFace(int mode);
00826 void tglColorMask(TGLboolean r, TGLboolean g, TGLboolean b, TGLboolean a);
00827 void tglDepthMask(int enableWrite);
00828 void tglBlendFunc(TGLenum sfactor, TGLenum dfactor);
00829 void tglAlphaFunc(TGLenum func, float ref);
00830 void tglDepthFunc(TGLenum func);
00831 
00832 void tglSetShadowMaskBuf(unsigned char *buf);
00833 void tglSetShadowColor(unsigned char r, unsigned char g, unsigned char b);
00834 
00835 // opengl 1.2 arrays
00836 void tglEnableClientState(TGLenum array);
00837 void tglDisableClientState(TGLenum array);
00838 void tglArrayElement(TGLint i);
00839 void tglDrawArrays(TGLenum mode, TGLint first, TGLsizei count);
00840 void tglVertexPointer(TGLint size, TGLenum type, TGLsizei stride, const TGLvoid *pointer);
00841 void tglColorPointer(TGLint size, TGLenum type, TGLsizei stride, const TGLvoid *pointer);
00842 void tglNormalPointer(TGLenum type, TGLsizei stride, const TGLvoid *pointer);
00843 void tglTexCoordPointer(TGLint size, TGLenum type, TGLsizei stride, const TGLvoid *pointer);
00844 
00845 // opengl 1.2 polygon offset
00846 void tglPolygonOffset(TGLfloat factor, TGLfloat units);
00847 
00848 void tglEnableDirtyRects(bool enable);
00849 
00850 void tglDebug(int mode);
00851 
00852 namespace TinyGL {
00853 
00854 void tglPresentBuffer();
00855 
00856 } // end of namespace TinyGL
00857 
00858 #endif


Generated on Sat Jul 13 2019 05:01:16 for ResidualVM by doxygen 1.7.1
curved edge   curved edge