# XSI_rtshaders.h

Go to the documentation of this file.

    00001 //***************************************************************************************
    00002 //
    00003 // (c) Copyright 2008 Autodesk, Inc. All rights reserved.
    00004 //
    00005 //***************************************************************************************
    00006
    00007 //***************************************************************************************
    00018 //***************************************************************************************
    00019
    00020 #ifndef XSI_RTSHADERS_H
    00021 #define XSI_RTSHADERS_H
    00022
    00023 #include <GL/gl.h>
    00024 #include <assert.h>
    00025 #ifdef linux
    00026  #undef GL_VERSION_1_2
    00027  #undef GL_VERSION_1_3
    00028  #undef __glext_h_
    00029  #undef GL_ARB_multitexture
    00030  #undef GL_ATI_vertex_array_object
    00031
    00032  #if defined(__x86_64)
    00033   typedef unsigned long ULONG_PTR;
    00034   #ifndef ULONG
    00035    typedef unsigned int ULONG;
    00036   #endif
    00037   #ifndef UINT
    00038    typedef unsigned int UINT;
    00039   #endif
    00040   #ifndef LONG
    00041    typedef int LONG;
    00042   #endif
    00043  #else // defined(__x86_64)
    00044   typedef unsigned long ULONG_PTR;
    00045   #ifndef ULONG
    00046    typedef unsigned long ULONG;
    00047   #endif
    00048   #ifndef LONG
    00049    typedef long LONG;
    00050   #endif
    00051  #endif //__x86_64
    00052  #define _strnicmp strncasecmp
    00053  #define _stricmp  strcasecmp
    00054  #ifdef XSI_USE_INTERNAL_GLEXT
    00055   #include <glh/glext.h>
    00056  #else
    00057   #include <GL/glext.h>
    00058  #endif
    00059  #include <limits.h>
    00060 #else
    00061  #include <glh/glext.h>
    00062 #endif // linux
    00063
    00064 #include <assert.h>
    00065 #include <math.h>
    00066 #include <float.h>
    00067 #include <stdlib.h>
    00068 #include <SIBCArray.h>
    00069 #include <string.h>
    00070
    00071 #ifdef linux
    00072 #define _strnicmp strncasecmp
    00073 #define _stricmp  strcasecmp
    00074 #endif
    00075
    00076 // Extra extensions added for Softimage 6.0
    00077 typedef char GLcharARB;
    00078 typedef unsigned int GLhandleARB;
    00079 typedef void (APIENTRY * PFNGLDELETEFRAMEBUFFERSEXTPROC) (GLsizei n, const GLuint* framebuffers);
    00080 typedef void (APIENTRY * PFNGLDELETERENDERBUFFERSEXTPROC) (GLsizei n, const GLuint* renderbuffers);
    00081 typedef void (APIENTRY * PFNGLGENFRAMEBUFFERSEXTPROC) (GLsizei n, GLuint* framebuffers);
    00082 typedef void (APIENTRY * PFNGLGENRENDERBUFFERSEXTPROC) (GLsizei n, GLuint* renderbuffers);
    00083 typedef void (APIENTRY * PFNGLDELETEBUFFERSARBPROC) (GLsizei n, const GLuint* buffers);
    00084 typedef void (APIENTRY * PFNGLGENBUFFERSARBPROC) (GLsizei n, GLuint* buffers);
    00085 typedef GLuint (APIENTRY * PFNGLCREATEPROGRAMOBJECTARBPROC) (void);
    00086 typedef void (APIENTRY * PFNGLDELETEOBJECTARBPROC) (GLuint obj);
    00087 typedef void (APIENTRY * PFNGLBINDFRAMEBUFFEREXTPROC) (GLenum target, GLuint framebuffer);
    00088 typedef void (APIENTRY * PFNGLBINDBUFFERARBPROC) (GLenum target, GLuint buffer);
    00089 typedef void (APIENTRY * PFNGLBUFFERDATAARBPROC) (GLenum target, GLsizeiptrARB size, const GLvoid* data, GLenum usage);
    00090 typedef GLboolean (APIENTRY * PFNGLISBUFFERARBPROC) (GLuint buffer);
    00091 typedef GLvoid * (APIENTRY * PFNGLMAPBUFFERARBPROC) (GLenum target, GLenum access);
    00092 typedef GLboolean (APIENTRY * PFNGLUNMAPBUFFERARBPROC) (GLenum target);
    00093 typedef void (APIENTRY * PFNGLGETBUFFERPARAMETERIVARBPROC) (GLenum target, GLenum pname, GLint *params);
    00094 typedef void (APIENTRY * PFNGLATTACHOBJECTARBPROC) (GLhandleARB containerObj, GLhandleARB obj);
    00095 typedef void (APIENTRY * PFNGLCOMPILESHADERARBPROC) (GLhandleARB shaderObj);
    00096 typedef GLhandleARB (APIENTRY * PFNGLCREATEPROGRAMOBJECTARBPROC) (void);
    00097 typedef GLhandleARB (APIENTRY * PFNGLCREATESHADEROBJECTARBPROC) (GLenum shaderType);
    00098 typedef void (APIENTRY * PFNGLDELETEOBJECTARBPROC) (GLhandleARB obj);
    00099 typedef void (APIENTRY * PFNGLDETACHOBJECTARBPROC) (GLhandleARB containerObj, GLhandleARB attachedObj);
    00100 typedef void (APIENTRY * PFNGLGETACTIVEUNIFORMARBPROC) (GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei* length, GLint *size, GLenum *type, GLcharARB *name);
    00101 typedef void (APIENTRY * PFNGLGETATTACHEDOBJECTSARBPROC) (GLhandleARB containerObj, GLsizei maxCount, GLsizei* count, GLhandleARB *obj);
    00102 typedef GLhandleARB (APIENTRY * PFNGLGETHANDLEARBPROC) (GLenum pname);
    00103 typedef void (APIENTRY * PFNGLGETINFOLOGARBPROC) (GLhandleARB obj, GLsizei maxLength, GLsizei* length, GLcharARB *infoLog);
    00104 typedef void (APIENTRY * PFNGLGETOBJECTPARAMETERFVARBPROC) (GLhandleARB obj, GLenum pname, GLfloat* params);
    00105 typedef void (APIENTRY * PFNGLGETOBJECTPARAMETERIVARBPROC) (GLhandleARB obj, GLenum pname, GLint* params);
    00106 typedef void (APIENTRY * PFNGLGETSHADERSOURCEARBPROC) (GLhandleARB obj, GLsizei maxLength, GLsizei* length, GLcharARB *source);
    00107 typedef GLint (APIENTRY * PFNGLGETUNIFORMLOCATIONARBPROC) (GLhandleARB programObj, const GLcharARB* name);
    00108 typedef void (APIENTRY * PFNGLGETUNIFORMFVARBPROC) (GLhandleARB programObj, GLint location, GLfloat* params);
    00109 typedef void (APIENTRY * PFNGLGETUNIFORMIVARBPROC) (GLhandleARB programObj, GLint location, GLint* params);
    00110 typedef void (APIENTRY * PFNGLLINKPROGRAMARBPROC) (GLhandleARB programObj);
    00111 typedef void (APIENTRY * PFNGLSHADERSOURCEARBPROC) (GLhandleARB shaderObj, GLsizei count, const GLcharARB ** string, const GLint *length);
    00112 typedef void (APIENTRY * PFNGLUNIFORM1FARBPROC) (GLint location, GLfloat v0);
    00113 typedef void (APIENTRY * PFNGLUNIFORM1FVARBPROC) (GLint location, GLsizei count, const GLfloat* value);
    00114 typedef void (APIENTRY * PFNGLUNIFORM1IARBPROC) (GLint location, GLint v0);
    00115 typedef void (APIENTRY * PFNGLUNIFORM1IVARBPROC) (GLint location, GLsizei count, const GLint* value);
    00116 typedef void (APIENTRY * PFNGLUNIFORM2FARBPROC) (GLint location, GLfloat v0, GLfloat v1);
    00117 typedef void (APIENTRY * PFNGLUNIFORM2FVARBPROC) (GLint location, GLsizei count, const GLfloat* value);
    00118 typedef void (APIENTRY * PFNGLUNIFORM2IARBPROC) (GLint location, GLint v0, GLint v1);
    00119 typedef void (APIENTRY * PFNGLUNIFORM2IVARBPROC) (GLint location, GLsizei count, const GLint* value);
    00120 typedef void (APIENTRY * PFNGLUNIFORM3FARBPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
    00121 typedef void (APIENTRY * PFNGLUNIFORM3FVARBPROC) (GLint location, GLsizei count, const GLfloat* value);
    00122 typedef void (APIENTRY * PFNGLUNIFORM3IARBPROC) (GLint location, GLint v0, GLint v1, GLint v2);
    00123 typedef void (APIENTRY * PFNGLUNIFORM3IVARBPROC) (GLint location, GLsizei count, const GLint* value);
    00124 typedef void (APIENTRY * PFNGLUNIFORM4FARBPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
    00125 typedef void (APIENTRY * PFNGLUNIFORM4FVARBPROC) (GLint location, GLsizei count, const GLfloat* value);
    00126 typedef void (APIENTRY * PFNGLUNIFORM4IARBPROC) (GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
    00127 typedef void (APIENTRY * PFNGLUNIFORM4IVARBPROC) (GLint location, GLsizei count, const GLint* value);
    00128 typedef void (APIENTRY * PFNGLUNIFORMMATRIX2FVARBPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
    00129 typedef void (APIENTRY * PFNGLUNIFORMMATRIX3FVARBPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
    00130 typedef void (APIENTRY * PFNGLUNIFORMMATRIX4FVARBPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
    00131 typedef void (APIENTRY * PFNGLUSEPROGRAMOBJECTARBPROC) (GLhandleARB programObj);
    00132 typedef void (APIENTRY * PFNGLVALIDATEPROGRAMARBPROC) (GLhandleARB programObj);
    00133 typedef GLboolean (APIENTRY * PFNGLISPROGRAMARBPROC) (GLuint program);
    00134 typedef void (APIENTRY * PFNGLGENQUERIESARBPROC) (GLsizei n, GLuint *ids);
    00135 typedef void (APIENTRY * PFNGLDELETEQUERIESARBPROC) (GLsizei n, const GLuint *ids);
    00136 typedef GLboolean (APIENTRY  * PFNGLISQUERYARBPROC) (GLuint id);
    00137 typedef void (APIENTRY * PFNGLBEGINQUERYARBPROC) (GLenum target, GLuint id);
    00138 typedef void (APIENTRY * PFNGLENDQUERYARBPROC) (GLenum target);
    00139 typedef void (APIENTRY * PFNGLGETQUERYIVARBPROC) (GLenum target, GLenum pname, GLint *params);
    00140 typedef void (APIENTRY * PFNGLGETQUERYOBJECTIVARBPROC) (GLuint id, GLenum pname, GLint *params);
    00141 typedef void (APIENTRY * PFNGLGETQUERYOBJECTUIVARBPROC) (GLuint id, GLenum pname, GLuint *params);
    00142
    00143
    00144 #ifdef linux
    00145 #define _strnicmp strncasecmp
    00146 #define _stricmp  strcasecmp
    00147 #endif
    00148
    00149 //***************************************************************************************
    00150 // Versioning
    00151 //***************************************************************************************
    00152
    00158 #define XSI_RTSHADER_VERSION    300
    00159
    00163 //***************************************************************************************
    00164 // Application IDs
    00165 //***************************************************************************************
    00166
    00167 // Application_IDs Application ID Defines (identifies the various Softimage applications.)
    00168 #define APPID_XSI                   0x00000000
    00169 #define APPID_XSI_OGL               0x00000001
    00170 #define APPID_XSIVIEWER             0x00000100
    00171 #define APPID_XSIVIEWER_OGL         0x00000101
    00172 #define APPID_XSIVIEWER_D3D         0x00000102
    00173 #define APPID_XSIVIEWER_XBOX        0x00000103
    00174 #define APPID_XSIVIEWER_PS2GL       0x00000104
    00175
    00176
    00177 //***************************************************************************************
    00178 // Shader flags
    00179 //***************************************************************************************
    00180
    00186 #define RTS_SHADER_FLAG_NONE            0x00000000
    00187 #define RTS_SHADER_FLAG_PARAM_CHANGE    0x00000001
    00188 #define RTS_SHADER_FLAG_FIRST           0x00000002
    00189 #define RTS_SHADER_FLAG_LAST            0x00000004
    00190 #define RTS_SHADER_FLAG_TREE_CHANGE     0x00000008
    00191
    00195 //***************************************************************************************
    00196 // Object flags
    00197 //***************************************************************************************
    00198
    00204 #define RTS_OBJECT_FLAG_NONE            0x00000000
    00205 #define RTS_OBJECT_FLAG_TOPO            0x00000001
    00206 #define RTS_OBJECT_FLAG_DEFORM          0x00000002
    00207
    00212 //***************************************************************************************
    00213 // Lights and camera enums
    00214 //***************************************************************************************
    00215
    00221 enum eXSI_RTS_LightType
    00222 {
    00223     RTS_LIGHT_POINT,
    00224     RTS_LIGHT_INFINITE,
    00225     RTS_LIGHT_SPOT
    00226 };
    00236 enum eXSI_RTS_CameraType
    00237 {
    00238     RTS_ORTHOGRAPHIC,
    00239     RTS_PERSPECTIVE
    00240 };
    00250 enum eXSI_RTS_RequirementType
    00251 {
    00252     RTS_REQUIRE_ZSORT           =   0,
    00253     RTS_REQUIRE_RESERVED            =   1,
    00254     RTS_REQUIRE_OBJECTHANDLE        =   2,
    00255     RTS_REQUIRE_MATERIALHANDLE      =   3,
    00256     RTS_REQUIRE_LIGHTHANDLE         =   4,
    00257     RTS_REQUIRE_PRIMARYINITUIGUID       =   5,
    00258     RTS_REQUIRE_SECONDARYINITUIGUID     =   6,
    00259     RTS_REQUIRE_DYNAMIC_ATTRIBUTE_LIST  =   7,
    00260     RTS_REQUIRE_UNUSED          =   0xffffffff
    00261 };
    00272 enum eXSI_RTS_TriangleListType
    00273 {
    00274     RTS_TL_SINGLE_INDEX_ARRAY,
    00275     RTS_TL_BYREF,
    00276     RTS_TL_BYREF_POSD,
    00277     RTS_TL_PACKED_ARRAY
    00278 };
    00288 enum eXSI_RTS_PrimitiveType
    00289 {
    00290     RTS_PT_PARTICLE_CLOUD,
    00291     RTS_PT_TRIANGLE_MESH
    00292 };
    00297 //***************************************************************************************
    00298 // Dynamic load library stuff
    00299 //***************************************************************************************
    00300
    00301 #if !defined(linux)
    00302
    00303 // The following ifdef block is the standard way of creating macros which make exporting
    00304 // from a DLL simpler. All files within this DLL are compiled with the RTShader_EXPORTS
    00305 // symbol defined on the command line. this symbol should not be defined on any project
    00306 // that uses this DLL. This way any other project whose source files include this file see
    00307 // RTSHADER_API functions as being imported from a DLL, wheras this DLL sees symbols
    00308 // defined with this macro as being exported.
    00309
    00310 #ifdef SHADERS_EXPORTS
    00311     #ifndef _XBOX
    00312         #define RTSHADER_API __declspec(dllexport)
    00313     #else
    00314         #define RTSHADER_API
    00315     #endif
    00316 #else
    00317     #ifdef XSI_STATIC_LINK
    00318         #define RTSHADER_API
    00319     #else
    00320         #define RTSHADER_API __declspec(dllimport)
    00321     #endif
    00322 #endif
    00323
    00324 #else
    00325
    00326 // Although Linux figures the shared library import and exports, it does not define any of the
    00327 // standard windows types, such as LPVOID, BOOL, etc. Since this file uses them, and files that
    00328 // use this file use them aswell, they are defined here.
    00329 #define RTSHADER_API
    00330
    00331 #endif
    00332
    00333 //***************************************************************************************
    00334 // Types
    00335 //***************************************************************************************
    00336
    00341 typedef size_t RTSContext;
    00342
    00343 // All structures that are used to construct a PPG must be compiled without padding
    00344 // between struct fields.  This is because a pointer to the PPG struct will be initialized
    00345 // directly by type casting a void pointer as in the following:
    00346 //
    00347 //   MyPPG * my_ppg = (MyPPG*) in_pVoid;
    00348 //
    00349 #pragma pack(push, 1)
    00350
    00351 typedef char* XSI_RTS_Semantic;
    00352
    00374 typedef struct tagXSI_RTS_Vector2
    00375 {
    00376     float   m_x;
    00377     float   m_y;
    00378 } XSI_RTS_Vector2;
    00379
    00380
    00384 typedef struct tagXSI_RTS_Vector3d
    00385 {
    00386     double  m_x;
    00387     double  m_y;
    00388     double  m_z;
    00389 } XSI_RTS_Vector3d;
    00390
    00394 typedef struct tagXSI_RTS_Vector3
    00395 {
    00396     float   m_x;
    00397     float   m_y;
    00398     float   m_z;
    00399 } XSI_RTS_Vector3;
    00400
    00401
    00405 typedef struct tagXSI_RTS_Vector4
    00406 {
    00407     float   m_x;
    00408     float   m_y;
    00409     float   m_z;
    00410     float   m_w;
    00411 } XSI_RTS_Vector4;
    00412
    00416 typedef struct tagXSI_RTS_ColorRGB
    00417 {
    00418     unsigned char   m_red;
    00419     unsigned char   m_green;
    00420     unsigned char   m_blue;
    00421 } XSI_RTS_ColorRGB;
    00422
    00423
    00427 typedef struct tagXSI_RTS_ColorRGBf
    00428 {
    00429     float           m_red;
    00430     float           m_green;
    00431     float           m_blue;
    00432 } XSI_RTS_ColorRGBf;
    00433
    00437 typedef struct tagXSI_RTS_ColorRGBAf
    00438 {
    00439     float           m_red;
    00440     float           m_green;
    00441     float           m_blue;
    00442     float           m_alpha;
    00443 } XSI_RTS_ColorRGBAf;
    00444
    00448 typedef struct tagXSI_RTS_ColorRGBA
    00449 {
    00450     unsigned char   m_red;
    00451     unsigned char   m_green;
    00452     unsigned char   m_blue;
    00453     unsigned char   m_alpha;
    00454 } XSI_RTS_ColorRGBA;
    00455
    00459 typedef struct tagXSI_RTS_ColorARGB
    00460 {
    00461     unsigned char   m_alpha;
    00462     unsigned char   m_red;
    00463     unsigned char   m_green;
    00464     unsigned char   m_blue;
    00465 } XSI_RTS_ColorARGB;
    00466
    00467 typedef struct tagXSI_RTS_Attribute1D
    00468 {
    00469     XSI_RTS_Semantic    m_semantic;
    00470     float               m_attribute;
    00471 }   XSI_RTS_Attribute1D;
    00472
    00473 typedef struct tagXSI_RTS_Attribute2D
    00474 {
    00475     XSI_RTS_Semantic    m_semantic;
    00476     XSI_RTS_Vector2     m_attribute;
    00477 }   XSI_RTS_Attribute2D;
    00478
    00479 typedef struct tagXSI_RTS_Attribute3D
    00480 {
    00481     XSI_RTS_Semantic    m_semantic;
    00482     XSI_RTS_Vector3     m_attribute;
    00483 }   XSI_RTS_Attribute3D;
    00484
    00485 typedef struct tagXSI_RTS_Attribute4D
    00486 {
    00487     XSI_RTS_Semantic    m_semantic;
    00488     XSI_RTS_Vector4     m_attribute;
    00489 }   XSI_RTS_Attribute4D;
    00490
    00494 typedef struct tagXSI_RTS_Texture
    00495 {
    00496     char                *m_pchPath;
    00497     ULONG               m_lWidth;
    00498     ULONG               m_lHeight;
    00499     ULONG               m_lNbChannels;
    00500     ULONG               m_lPixelType;
    00501     ULONG               m_lBufferSize;
    00502     unsigned char       *m_pBuffer;
    00503     ULONG               m_lDirty;
    00504 } XSI_RTS_Texture;
    00505
    00519 class XSI_RTS_Uniform
    00520 {
    00521 public:
    00525     enum eUniformType
    00526     {
    00527         Float = 0,
    00528         Int,
    00529         Texture
    00530     };
    00531
    00538     XSI_RTS_Uniform( eUniformType in_eType, const char* in_szName, unsigned int in_uiSize, void* in_pData )
    00539     {
    00540         m_eType = in_eType;
    00541         m_szName = strdup ( in_szName );
    00542         m_uiSize = in_uiSize;
    00543         switch ( in_eType )
    00544         {
    00545             case Float: m_pfData = new float [ m_uiSize ]; memcpy ( m_pfData, in_pData, sizeof(float)*in_uiSize); break;
    00546             case Int:   m_piData = new int [ m_uiSize ]; memcpy ( m_piData, in_pData, sizeof(int)*in_uiSize); break;
    00547             case Texture: m_pcTextureData = new char [ m_uiSize ]; memcpy ( m_pcTextureData, in_pData, sizeof(char)*in_uiSize); break;
    00548         }
    00549
    00550     }
    00551
    00554     virtual ~XSI_RTS_Uniform()
    00555     {
    00556         free(m_szName);
    00557         switch ( m_eType )
    00558         {
    00559             case Float: delete [] m_pfData ; break;
    00560             case Int:   delete [] m_piData ; break;
    00561             case Texture: delete [] m_pcTextureData; break;
    00562         }
    00563     }
    00564
    00568     const char*     GetName() { return m_szName; };
    00569
    00573     unsigned int    GetSize() { return m_uiSize; };
    00574
    00578     eUniformType    GetType() { return m_eType; };
    00579
    00583     void*           GetData() { return (void*)m_piData; };
    00584
    00585 private:
    00586
    00587     char*       m_szName;
    00588     unsigned int    m_uiSize;
    00589     eUniformType    m_eType;
    00590
    00591     union
    00592     {
    00593         int*        m_piData;
    00594         float*      m_pfData;
    00595         char*       m_pcTextureData;
    00596     };
    00597 };
    00598
    00599 //***************************************************************************************
    00600 // OpenGL extensions wrappers
    00601 //***************************************************************************************
    00602
    00612 typedef struct tagXGSExtensionsGL
    00613 {
    00614     int  version;
    00615     int  size;
    00617     bool _GL_ARB_multitexture ;
    00618     bool _GL_ARB_transpose_matrix ;
    00619     bool _GL_ARB_multisample ;
    00620     bool _GL_ARB_texture_env_add ;
    00621     bool _GL_ARB_texture_cube_map ;
    00622     bool _GL_ARB_texture_compression ;
    00623     bool _GL_ARB_texture_border_clamp ;
    00624     bool _GL_ARB_point_parameters ;
    00625     bool _GL_ARB_vertex_blend ;
    00626     bool _GL_ARB_matrix_palette ;
    00627     bool _GL_ARB_texture_env_combine ;
    00628     bool _GL_ARB_texture_env_crossbar ;
    00629     bool _GL_ARB_texture_env_dot3 ;
    00630     bool _GL_ARB_texture_mirrored_repeat ;
    00631     bool _GL_ARB_depth_texture ;
    00632     bool _GL_ARB_shadow ;
    00633     bool _GL_ARB_shadow_ambient ;
    00634     bool _GL_ARB_window_pos ;
    00635     bool _GL_ARB_vertex_program ;
    00636     bool _GL_ARB_fragment_program ;
    00637     bool _GL_EXT_abgr ;
    00638     bool _GL_EXT_blend_color ;
    00639     bool _GL_EXT_polygon_offset ;
    00640     bool _GL_EXT_texture ;
    00641     bool _GL_EXT_texture3D ;
    00642     bool _GL_SGIS_texture_filter4 ;
    00643     bool _GL_EXT_subtexture ;
    00644     bool _GL_EXT_copy_texture ;
    00645     bool _GL_EXT_histogram ;
    00646     bool _GL_EXT_convolution ;
    00647     bool _GL_SGI_color_matrix ;
    00648     bool _GL_SGI_color_table ;
    00649     bool _GL_SGIS_pixel_texture ;
    00650     bool _GL_SGIX_pixel_texture ;
    00651     bool _GL_SGIS_texture4D ;
    00652     bool _GL_SGI_texture_color_table ;
    00653     bool _GL_EXT_cmyka ;
    00654     bool _GL_EXT_texture_object ;
    00655     bool _GL_SGIS_detail_texture ;
    00656     bool _GL_SGIS_sharpen_texture ;
    00657     bool _GL_EXT_packed_pixels ;
    00658     bool _GL_SGIS_texture_lod ;
    00659     bool _GL_SGIS_multisample ;
    00660     bool _GL_EXT_rescale_normal ;
    00661     bool _GL_EXT_vertex_array ;
    00662     bool _GL_EXT_misc_attribute ;
    00663     bool _GL_SGIS_generate_mipmap ;
    00664     bool _GL_SGIX_clipmap ;
    00665     bool _GL_SGIX_shadow ;
    00666     bool _GL_SGIS_texture_edge_clamp ;
    00667     bool _GL_SGIS_texture_border_clamp ;
    00668     bool _GL_EXT_blend_minmax ;
    00669     bool _GL_EXT_blend_subtract ;
    00670     bool _GL_EXT_blend_logic_op ;
    00671     bool _GL_SGIX_interlace ;
    00672     bool _GL_SGIS_texture_select ;
    00673     bool _GL_SGIX_sprite ;
    00674     bool _GL_SGIX_texture_multi_buffer ;
    00675     bool _GL_EXT_point_parameters ;
    00676     bool _GL_SGIX_instruments ;
    00677     bool _GL_SGIX_texture_scale_bias ;
    00678     bool _GL_SGIX_framezoom ;
    00679     bool _GL_SGIX_tag_sample_buffer ;
    00680     bool _GL_SGIX_reference_plane ;
    00681     bool _GL_SGIX_flush_raster ;
    00682     bool _GL_SGIX_depth_texture ;
    00683     bool _GL_SGIS_fog_function ;
    00684     bool _GL_SGIX_fog_offset ;
    00685     bool _GL_HP_image_transform ;
    00686     bool _GL_HP_convolution_border_modes ;
    00687     bool _GL_SGIX_texture_add_env ;
    00688     bool _GL_EXT_color_subtable ;
    00689     bool _GL_PGI_vertex_hints ;
    00690     bool _GL_PGI_misc_hints ;
    00691     bool _GL_EXT_paletted_texture ;
    00692     bool _GL_EXT_clip_volume_hint ;
    00693     bool _GL_SGIX_list_priority ;
    00694     bool _GL_SGIX_ir_instrument1 ;
    00695     bool _GL_SGIX_texture_lod_bias ;
    00696     bool _GL_SGIX_shadow_ambient ;
    00697     bool _GL_EXT_index_texture ;
    00698     bool _GL_EXT_index_material ;
    00699     bool _GL_EXT_index_func ;
    00700     bool _GL_EXT_index_array_formats ;
    00701     bool _GL_EXT_compiled_vertex_array ;
    00702     bool _GL_EXT_cull_vertex ;
    00703     bool _GL_SGIX_ycrcb ;
    00704     bool _GL_EXT_fragment_lighting ;
    00705     bool _GL_IBM_rasterpos_clip ;
    00706     bool _GL_HP_texture_lighting ;
    00707     bool _GL_EXT_draw_range_elements ;
    00708     bool _GL_WIN_phong_shading ;
    00709     bool _GL_WIN_specular_fog ;
    00710     bool _GL_EXT_light_texture ;
    00711     bool _GL_SGIX_blend_alpha_minmax ;
    00712     bool _GL_EXT_scene_marker ;
    00713     bool _GL_SGIX_pixel_texture_bits ;
    00714     bool _GL_EXT_bgra ;
    00715     bool _GL_SGIX_async ;
    00716     bool _GL_SGIX_async_pixel ;
    00717     bool _GL_SGIX_async_histogram ;
    00718     bool _GL_INTEL_texture_scissor ;
    00719     bool _GL_INTEL_parallel_arrays ;
    00720     bool _GL_HP_occlusion_test ;
    00721     bool _GL_EXT_pixel_transform ;
    00722     bool _GL_EXT_pixel_transform_color_table ;
    00723     bool _GL_EXT_shared_texture_palette ;
    00724     bool _GL_EXT_separate_specular_color ;
    00725     bool _GL_EXT_secondary_color ;
    00726     bool _GL_EXT_texture_env ;
    00727     bool _GL_EXT_texture_perturb_normal ;
    00728     bool _GL_EXT_multi_draw_arrays ;
    00729     bool _GL_EXT_fog_coord ;
    00730     bool _GL_REND_screen_coordinates ;
    00731     bool _GL_EXT_coordinate_frame ;
    00732     bool _GL_EXT_texture_env_combine ;
    00733     bool _GL_APPLE_specular_vector ;
    00734     bool _GL_APPLE_transform_hint ;
    00735     bool _GL_SUNX_constant_data ;
    00736     bool _GL_SUN_global_alpha ;
    00737     bool _GL_SUN_triangle_list ;
    00738     bool _GL_SUN_vertex ;
    00739     bool _GL_EXT_blend_func_separate ;
    00740     bool _GL_INGR_color_clamp ;
    00741     bool _GL_INGR_interlace_read ;
    00742     bool _GL_EXT_stencil_wrap ;
    00743     bool _GL_EXT_422_pixels ;
    00744     bool _GL_NV_texgen_reflection ;
    00745     bool _GL_SGIX_texture_range ;
    00746     bool _GL_SUN_convolution_border_modes ;
    00747     bool _GL_EXT_texture_env_add ;
    00748     bool _GL_EXT_texture_lod_bias ;
    00749     bool _GL_EXT_texture_filter_anisotropic ;
    00750     bool _GL_EXT_vertex_weighting ;
    00751     bool _GL_NV_light_max_exponent ;
    00752     bool _GL_NV_vertex_array_range ;
    00753     bool _GL_NV_register_combiners ;
    00754     bool _GL_NV_fog_distance ;
    00755     bool _GL_NV_texgen_emboss ;
    00756     bool _GL_NV_blend_square ;
    00757     bool _GL_NV_texture_env_combine4 ;
    00758     bool _GL_MESA_resize_buffers ;
    00759     bool _GL_MESA_window_pos ;
    00760     bool _GL_EXT_texture_compression_s3tc ;
    00761     bool _GL_IBM_cull_vertex ;
    00762     bool _GL_IBM_multimode_draw_arrays ;
    00763     bool _GL_IBM_vertex_array_lists ;
    00764     bool _GL_3DFX_texture_compression_FXT1 ;
    00765     bool _GL_3DFX_multisample ;
    00766     bool _GL_3DFX_tbuffer ;
    00767     bool _GL_SGIX_vertex_preclip ;
    00768     bool _GL_SGIX_resample ;
    00769     bool _GL_SGIS_texture_color_mask ;
    00770     bool _GL_EXT_texture_env_dot3 ;
    00771     bool _GL_ATI_texture_mirror_once ;
    00772     bool _GL_NV_fence ;
    00773     bool _GL_IBM_static_data ;
    00774     bool _GL_IBM_texture_mirrored_repeat ;
    00775     bool _GL_NV_evaluators ;
    00776     bool _GL_NV_packed_depth_stencil ;
    00777     bool _GL_NV_register_combiners2 ;
    00778     bool _GL_NV_texture_compression_vtc ;
    00779     bool _GL_NV_texture_rectangle ;
    00780     bool _GL_NV_texture_shader ;
    00781     bool _GL_NV_texture_shader2 ;
    00782     bool _GL_NV_vertex_array_range2 ;
    00783     bool _GL_NV_vertex_program ;
    00784     bool _GL_SGIX_texture_coordinate_clamp ;
    00785     bool _GL_OML_interlace ;
    00786     bool _GL_OML_subsample ;
    00787     bool _GL_OML_resample ;
    00788     bool _GL_NV_copy_depth_to_color ;
    00789     bool _GL_ATI_envmap_bumpmap ;
    00790     bool _GL_ATI_fragment_shader ;
    00791     bool _GL_ATI_pn_triangles ;
    00792     bool _GL_ATI_vertex_array_object ;
    00793     bool _GL_EXT_vertex_shader ;
    00794     bool _GL_ATI_vertex_streams ;
    00795     bool _GL_ATI_element_array ;
    00796     bool _GL_SUN_mesh_array ;
    00797     bool _GL_SUN_slice_accum ;
    00798     bool _GL_NV_multisample_filter_hint ;
    00799     bool _GL_NV_depth_clamp ;
    00800     bool _GL_NV_occlusion_query ;
    00801     bool _GL_NV_point_sprite ;
    00802     bool _GL_NV_texture_shader3 ;
    00803     bool _GL_NV_vertex_program1_1 ;
    00804     bool _GL_EXT_shadow_funcs ;
    00805     bool _GL_EXT_stencil_two_side ;
    00806     bool _GL_ATI_text_fragment_shader ;
    00807     bool _GL_APPLE_client_storage ;
    00808     bool _GL_APPLE_element_array ;
    00809     bool _GL_APPLE_fence ;
    00810     bool _GL_APPLE_vertex_array_object ;
    00811     bool _GL_APPLE_vertex_array_range ;
    00812     bool _GL_APPLE_ycbcr_422 ;
    00813     bool _GL_ARB_vertex_buffer_object ;
    00814     bool _GL_S3_s3tc ;
    00815     bool _GL_ATI_draw_buffers ;
    00816     bool _GL_ATI_texture_env_combine3 ;
    00817     bool _GL_ATI_texture_float ;
    00818     bool _GL_NV_float_buffer ;
    00819     bool _GL_NV_fragment_program ;
    00820     bool _GL_NV_half_float ;
    00821     bool _GL_NV_pixel_data_range ;
    00822     bool _GL_NV_primitive_restart ;
    00823     bool _GL_NV_texture_expand_normal ;
    00824     bool _GL_NV_vertex_program2 ;
    00825     bool _GL_ATI_map_object_buffer ;
    00826     bool _GL_ATI_separate_stencil ;
    00827     bool _GL_ATI_vertex_attrib_array_object ;
    00828     bool _GL_framebuffer_object;
    00829     bool _GL_ARB_pixel_buffer_object;
    00830
    00831 } XGSExtensionsGL;
    00832
    00841 typedef struct tagXGSGLExtensionsFuncs
    00842 {
    00843     int                                                                 version;
    00844     int                                                                 size;
    00846     PFNGLBLENDCOLORPROC                                                 glBlendColor;
    00847     PFNGLBLENDEQUATIONPROC                                              glBlendEquation;
    00848     PFNGLDRAWRANGEELEMENTSPROC                                          glDrawRangeElements;
    00849     PFNGLCOLORTABLEPROC                                                 glColorTable;
    00850     PFNGLCOLORTABLEPARAMETERFVPROC                                      glColorTableParameterfv;
    00851     PFNGLCOLORTABLEPARAMETERIVPROC                                      glColorTableParameteriv;
    00852     PFNGLCOPYCOLORTABLEPROC                                             glCopyColorTable;
    00853     PFNGLGETCOLORTABLEPROC                                              glGetColorTable;
    00854     PFNGLGETCOLORTABLEPARAMETERFVPROC                                   glGetColorTableParameterfv;
    00855     PFNGLGETCOLORTABLEPARAMETERIVPROC                                   glGetColorTableParameteriv;
    00856     PFNGLCOLORSUBTABLEPROC                                              glColorSubTable;
    00857     PFNGLCOPYCOLORSUBTABLEPROC                                          glCopyColorSubTable;
    00858     PFNGLCONVOLUTIONFILTER1DPROC                                        glConvolutionFilter1D;
    00859     PFNGLCONVOLUTIONFILTER2DPROC                                        glConvolutionFilter2D;
    00860     PFNGLCONVOLUTIONPARAMETERFPROC                                      glConvolutionParameterf;
    00861     PFNGLCONVOLUTIONPARAMETERFVPROC                                     glConvolutionParameterfv;
    00862     PFNGLCONVOLUTIONPARAMETERIPROC                                      glConvolutionParameteri;
    00863     PFNGLCONVOLUTIONPARAMETERIVPROC                                     glConvolutionParameteriv;
    00864     PFNGLCOPYCONVOLUTIONFILTER1DPROC                                    glCopyConvolutionFilter1D;
    00865     PFNGLCOPYCONVOLUTIONFILTER2DPROC                                    glCopyConvolutionFilter2D;
    00866     PFNGLGETCONVOLUTIONFILTERPROC                                       glGetConvolutionFilter;
    00867     PFNGLGETCONVOLUTIONPARAMETERFVPROC                                  glGetConvolutionParameterfv;
    00868     PFNGLGETCONVOLUTIONPARAMETERIVPROC                                  glGetConvolutionParameteriv;
    00869     PFNGLGETSEPARABLEFILTERPROC                                         glGetSeparableFilter;
    00870     PFNGLSEPARABLEFILTER2DPROC                                          glSeparableFilter2D;
    00871     PFNGLGETHISTOGRAMPROC                                               glGetHistogram;
    00872     PFNGLGETHISTOGRAMPARAMETERFVPROC                                    glGetHistogramParameterfv;
    00873     PFNGLGETHISTOGRAMPARAMETERIVPROC                                    glGetHistogramParameteriv;
    00874     PFNGLGETMINMAXPROC                                                  glGetMinmax;
    00875     PFNGLGETMINMAXPARAMETERFVPROC                                       glGetMinmaxParameterfv;
    00876     PFNGLGETMINMAXPARAMETERIVPROC                                       glGetMinmaxParameteriv;
    00877     PFNGLHISTOGRAMPROC                                                  glHistogram;
    00878     PFNGLMINMAXPROC                                                     glMinmax;
    00879     PFNGLRESETHISTOGRAMPROC                                             glResetHistogram;
    00880     PFNGLRESETMINMAXPROC                                                glResetMinmax;
    00881     PFNGLTEXIMAGE3DPROC                                                 glTexImage3D;
    00882     PFNGLTEXSUBIMAGE3DPROC                                              glTexSubImage3D;
    00883     PFNGLCOPYTEXSUBIMAGE3DPROC                                          glCopyTexSubImage3D;
    00885     PFNGLACTIVETEXTUREPROC                                              glActiveTexture;
    00886     PFNGLCLIENTACTIVETEXTUREPROC                                        glClientActiveTexture;
    00887     PFNGLMULTITEXCOORD1DPROC                                            glMultiTexCoord1d;
    00888     PFNGLMULTITEXCOORD1DVPROC                                           glMultiTexCoord1dv;
    00889     PFNGLMULTITEXCOORD1FPROC                                            glMultiTexCoord1f;
    00890     PFNGLMULTITEXCOORD1FVPROC                                           glMultiTexCoord1fv;
    00891     PFNGLMULTITEXCOORD1IPROC                                            glMultiTexCoord1i;
    00892     PFNGLMULTITEXCOORD1IVPROC                                           glMultiTexCoord1iv;
    00893     PFNGLMULTITEXCOORD1SPROC                                            glMultiTexCoord1s;
    00894     PFNGLMULTITEXCOORD1SVPROC                                           glMultiTexCoord1sv;
    00895     PFNGLMULTITEXCOORD2DPROC                                            glMultiTexCoord2d;
    00896     PFNGLMULTITEXCOORD2DVPROC                                           glMultiTexCoord2dv;
    00897     PFNGLMULTITEXCOORD2FPROC                                            glMultiTexCoord2f;
    00898     PFNGLMULTITEXCOORD2FVPROC                                           glMultiTexCoord2fv;
    00899     PFNGLMULTITEXCOORD2IPROC                                            glMultiTexCoord2i;
    00900     PFNGLMULTITEXCOORD2IVPROC                                           glMultiTexCoord2iv;
    00901     PFNGLMULTITEXCOORD2SPROC                                            glMultiTexCoord2s;
    00902     PFNGLMULTITEXCOORD2SVPROC                                           glMultiTexCoord2sv;
    00903     PFNGLMULTITEXCOORD3DPROC                                            glMultiTexCoord3d;
    00904     PFNGLMULTITEXCOORD3DVPROC                                           glMultiTexCoord3dv;
    00905     PFNGLMULTITEXCOORD3FPROC                                            glMultiTexCoord3f;
    00906     PFNGLMULTITEXCOORD3FVPROC                                           glMultiTexCoord3fv;
    00907     PFNGLMULTITEXCOORD3IPROC                                            glMultiTexCoord3i;
    00908     PFNGLMULTITEXCOORD3IVPROC                                           glMultiTexCoord3iv;
    00909     PFNGLMULTITEXCOORD3SPROC                                            glMultiTexCoord3s;
    00910     PFNGLMULTITEXCOORD3SVPROC                                           glMultiTexCoord3sv;
    00911     PFNGLMULTITEXCOORD4DPROC                                            glMultiTexCoord4d;
    00912     PFNGLMULTITEXCOORD4DVPROC                                           glMultiTexCoord4dv;
    00913     PFNGLMULTITEXCOORD4FPROC                                            glMultiTexCoord4f;
    00914     PFNGLMULTITEXCOORD4FVPROC                                           glMultiTexCoord4fv;
    00915     PFNGLMULTITEXCOORD4IPROC                                            glMultiTexCoord4i;
    00916     PFNGLMULTITEXCOORD4IVPROC                                           glMultiTexCoord4iv;
    00917     PFNGLMULTITEXCOORD4SPROC                                            glMultiTexCoord4s;
    00918     PFNGLMULTITEXCOORD4SVPROC                                           glMultiTexCoord4sv;
    00919     PFNGLLOADTRANSPOSEMATRIXFPROC                                       glLoadTransposeMatrixf;
    00920     PFNGLLOADTRANSPOSEMATRIXDPROC                                       glLoadTransposeMatrixd;
    00921     PFNGLMULTTRANSPOSEMATRIXFPROC                                       glMultTransposeMatrixf;
    00922     PFNGLMULTTRANSPOSEMATRIXDPROC                                       glMultTransposeMatrixd;
    00923     PFNGLSAMPLECOVERAGEPROC                                             glSampleCoverage;
    00924     PFNGLCOMPRESSEDTEXIMAGE3DPROC                                       glCompressedTexImage3D;
    00925     PFNGLCOMPRESSEDTEXIMAGE2DPROC                                       glCompressedTexImage2D;
    00926     PFNGLCOMPRESSEDTEXIMAGE1DPROC                                       glCompressedTexImage1D;
    00927     PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC                                    glCompressedTexSubImage3D;
    00928     PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC                                    glCompressedTexSubImage2D;
    00929     PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC                                    glCompressedTexSubImage1D;
    00930     PFNGLGETCOMPRESSEDTEXIMAGEPROC                                      glGetCompressedTexImage;
    00932     PFNGLACTIVETEXTUREPROC                                              glActiveTextureARB;
    00933     PFNGLCLIENTACTIVETEXTUREARBPROC                                     glClientActiveTextureARB;
    00934     PFNGLMULTITEXCOORD1DARBPROC                                         glMultiTexCoord1dARB;
    00935     PFNGLMULTITEXCOORD1DVARBPROC                                        glMultiTexCoord1dvARB;
    00936     PFNGLMULTITEXCOORD1FARBPROC                                         glMultiTexCoord1fARB;
    00937     PFNGLMULTITEXCOORD1FVARBPROC                                        glMultiTexCoord1fvARB;
    00938     PFNGLMULTITEXCOORD1IARBPROC                                         glMultiTexCoord1iARB;
    00939     PFNGLMULTITEXCOORD1IVARBPROC                                        glMultiTexCoord1ivARB;
    00940     PFNGLMULTITEXCOORD1SARBPROC                                         glMultiTexCoord1sARB;
    00941     PFNGLMULTITEXCOORD1SVARBPROC                                        glMultiTexCoord1svARB;
    00942     PFNGLMULTITEXCOORD2DARBPROC                                         glMultiTexCoord2dARB;
    00943     PFNGLMULTITEXCOORD2DVARBPROC                                        glMultiTexCoord2dvARB;
    00944     PFNGLMULTITEXCOORD2FARBPROC                                         glMultiTexCoord2fARB;
    00945     PFNGLMULTITEXCOORD2FVARBPROC                                        glMultiTexCoord2fvARB;
    00946     PFNGLMULTITEXCOORD2IARBPROC                                         glMultiTexCoord2iARB;
    00947     PFNGLMULTITEXCOORD2IVARBPROC                                        glMultiTexCoord2ivARB;
    00948     PFNGLMULTITEXCOORD2SARBPROC                                         glMultiTexCoord2sARB;
    00949     PFNGLMULTITEXCOORD2SVARBPROC                                        glMultiTexCoord2svARB;
    00950     PFNGLMULTITEXCOORD3DARBPROC                                         glMultiTexCoord3dARB;
    00951     PFNGLMULTITEXCOORD3DVARBPROC                                        glMultiTexCoord3dvARB;
    00952     PFNGLMULTITEXCOORD3FARBPROC                                         glMultiTexCoord3fARB;
    00953     PFNGLMULTITEXCOORD3FVARBPROC                                        glMultiTexCoord3fvARB;
    00954     PFNGLMULTITEXCOORD3IARBPROC                                         glMultiTexCoord3iARB;
    00955     PFNGLMULTITEXCOORD3IVARBPROC                                        glMultiTexCoord3ivARB;
    00956     PFNGLMULTITEXCOORD3SARBPROC                                         glMultiTexCoord3sARB;
    00957     PFNGLMULTITEXCOORD3SVARBPROC                                        glMultiTexCoord3svARB;
    00958     PFNGLMULTITEXCOORD4DARBPROC                                         glMultiTexCoord4dARB;
    00959     PFNGLMULTITEXCOORD4DVARBPROC                                        glMultiTexCoord4dvARB;
    00960     PFNGLMULTITEXCOORD4FARBPROC                                         glMultiTexCoord4fARB;
    00961     PFNGLMULTITEXCOORD4FVARBPROC                                        glMultiTexCoord4fvARB;
    00962     PFNGLMULTITEXCOORD4IARBPROC                                         glMultiTexCoord4iARB;
    00963     PFNGLMULTITEXCOORD4IVARBPROC                                        glMultiTexCoord4ivARB;
    00964     PFNGLMULTITEXCOORD4SARBPROC                                         glMultiTexCoord4sARB;
    00965     PFNGLMULTITEXCOORD4SVARBPROC                                        glMultiTexCoord4svARB;
    00967     PFNGLLOADTRANSPOSEMATRIXFARBPROC                                    glLoadTransposeMatrixfARB;
    00968     PFNGLLOADTRANSPOSEMATRIXDARBPROC                                    glLoadTransposeMatrixdARB;
    00969     PFNGLMULTTRANSPOSEMATRIXFARBPROC                                    glMultTransposeMatrixfARB;
    00970     PFNGLMULTTRANSPOSEMATRIXDARBPROC                                    glMultTransposeMatrixdARB;
    00972     PFNGLSAMPLECOVERAGEARBPROC                                          glSampleCoverageARB;
    00974     PFNGLCOMPRESSEDTEXIMAGE3DARBPROC                                    glCompressedTexImage3DARB;
    00975     PFNGLCOMPRESSEDTEXIMAGE2DARBPROC                                    glCompressedTexImage2DARB;
    00976     PFNGLCOMPRESSEDTEXIMAGE1DARBPROC                                    glCompressedTexImage1DARB;
    00977     PFNGLCOMPRESSEDTEXSUBIMAGE3DARBPROC                                 glCompressedTexSubImage3DARB;
    00978     PFNGLCOMPRESSEDTEXSUBIMAGE2DARBPROC                                 glCompressedTexSubImage2DARB;
    00979     PFNGLCOMPRESSEDTEXSUBIMAGE1DARBPROC                                 glCompressedTexSubImage1DARB;
    00980     PFNGLGETCOMPRESSEDTEXIMAGEARBPROC                                   glGetCompressedTexImageARB;
    00982     PFNGLPOINTPARAMETERFARBPROC                                         glPointParameterfARB;
    00983     PFNGLPOINTPARAMETERFVARBPROC                                        glPointParameterfvARB;
    00985     PFNGLWEIGHTBVARBPROC                                                glWeightbvARB;
    00986     PFNGLWEIGHTSVARBPROC                                                glWeightsvARB;
    00987     PFNGLWEIGHTIVARBPROC                                                glWeightivARB;
    00988     PFNGLWEIGHTFVARBPROC                                                glWeightfvARB;
    00989     PFNGLWEIGHTDVARBPROC                                                glWeightdvARB;
    00990     PFNGLWEIGHTUBVARBPROC                                               glWeightubvARB;
    00991     PFNGLWEIGHTUSVARBPROC                                               glWeightusvARB;
    00992     PFNGLWEIGHTUIVARBPROC                                               glWeightuivARB;
    00993     PFNGLWEIGHTPOINTERARBPROC                                           glWeightPointerARB;
    00994     PFNGLVERTEXBLENDARBPROC                                             glVertexBlendARB;
    00995
    00997     PFNGLCURRENTPALETTEMATRIXARBPROC                                    glCurrentPaletteMatrixARB;
    00998     PFNGLMATRIXINDEXUBVARBPROC                                          glMatrixIndexubvARB;
    00999     PFNGLMATRIXINDEXUSVARBPROC                                          glMatrixIndexusvARB;
    01000     PFNGLMATRIXINDEXUIVARBPROC                                          glMatrixIndexuivARB;
    01001     PFNGLMATRIXINDEXPOINTERARBPROC                                      glMatrixIndexPointerARB;
    01003     PFNGLWINDOWPOS2DARBPROC                                             glWindowPos2dARB;
    01004     PFNGLWINDOWPOS2DVARBPROC                                            glWindowPos2dvARB;
    01005     PFNGLWINDOWPOS2FARBPROC                                             glWindowPos2fARB;
    01006     PFNGLWINDOWPOS2FVARBPROC                                            glWindowPos2fvARB;
    01007     PFNGLWINDOWPOS2IARBPROC                                             glWindowPos2iARB;
    01008     PFNGLWINDOWPOS2IVARBPROC                                            glWindowPos2ivARB;
    01009     PFNGLWINDOWPOS2SARBPROC                                             glWindowPos2sARB;
    01010     PFNGLWINDOWPOS2SVARBPROC                                            glWindowPos2svARB;
    01011     PFNGLWINDOWPOS3DARBPROC                                             glWindowPos3dARB;
    01012     PFNGLWINDOWPOS3DVARBPROC                                            glWindowPos3dvARB;
    01013     PFNGLWINDOWPOS3FARBPROC                                             glWindowPos3fARB;
    01014     PFNGLWINDOWPOS3FVARBPROC                                            glWindowPos3fvARB;
    01015     PFNGLWINDOWPOS3IARBPROC                                             glWindowPos3iARB;
    01016     PFNGLWINDOWPOS3IVARBPROC                                            glWindowPos3ivARB;
    01017     PFNGLWINDOWPOS3SARBPROC                                             glWindowPos3sARB;
    01018     PFNGLWINDOWPOS3SVARBPROC                                            glWindowPos3svARB;
    01020     PFNGLBLENDCOLOREXTPROC                                              glBlendColorEXT;
    01022     PFNGLPOLYGONOFFSETEXTPROC                                           glPolygonOffsetEXT;
    01024     PFNGLTEXIMAGE3DEXTPROC                                              glTexImage3DEXT;
    01025     PFNGLTEXSUBIMAGE3DEXTPROC                                           glTexSubImage3DEXT;
    01027     PFNGLGETTEXFILTERFUNCSGISPROC                                       glGetTexFilterFuncSGIS;
    01028     PFNGLTEXFILTERFUNCSGISPROC                                          glTexFilterFuncSGIS;
    01030     PFNGLTEXSUBIMAGE1DEXTPROC                                           glTexSubImage1DEXT;
    01031     PFNGLTEXSUBIMAGE2DEXTPROC                                           glTexSubImage2DEXT;
    01033     PFNGLCOPYTEXIMAGE1DEXTPROC                                          glCopyTexImage1DEXT;
    01034     PFNGLCOPYTEXIMAGE2DEXTPROC                                          glCopyTexImage2DEXT;
    01035     PFNGLCOPYTEXSUBIMAGE1DEXTPROC                                       glCopyTexSubImage1DEXT;
    01036     PFNGLCOPYTEXSUBIMAGE2DEXTPROC                                       glCopyTexSubImage2DEXT;
    01037     PFNGLCOPYTEXSUBIMAGE3DEXTPROC                                       glCopyTexSubImage3DEXT;
    01039     PFNGLGETHISTOGRAMEXTPROC                                            glGetHistogramEXT;
    01040     PFNGLGETHISTOGRAMPARAMETERFVEXTPROC                                 glGetHistogramParameterfvEXT;
    01041     PFNGLGETHISTOGRAMPARAMETERIVEXTPROC                                 glGetHistogramParameterivEXT;
    01042     PFNGLGETMINMAXEXTPROC                                               glGetMinmaxEXT;
    01043     PFNGLGETMINMAXPARAMETERFVEXTPROC                                    glGetMinmaxParameterfvEXT;
    01044     PFNGLGETMINMAXPARAMETERIVEXTPROC                                    glGetMinmaxParameterivEXT;
    01045     PFNGLHISTOGRAMEXTPROC                                               glHistogramEXT;
    01046     PFNGLMINMAXEXTPROC                                                  glMinmaxEXT;
    01047     PFNGLRESETHISTOGRAMEXTPROC                                          glResetHistogramEXT;
    01048     PFNGLRESETMINMAXEXTPROC                                             glResetMinmaxEXT;
    01050     PFNGLCONVOLUTIONFILTER1DEXTPROC                                     glConvolutionFilter1DEXT;
    01051     PFNGLCONVOLUTIONFILTER2DEXTPROC                                     glConvolutionFilter2DEXT;
    01052     PFNGLCONVOLUTIONPARAMETERFEXTPROC                                   glConvolutionParameterfEXT;
    01053     PFNGLCONVOLUTIONPARAMETERFVEXTPROC                                  glConvolutionParameterfvEXT;
    01054     PFNGLCONVOLUTIONPARAMETERIEXTPROC                                   glConvolutionParameteriEXT;
    01055     PFNGLCONVOLUTIONPARAMETERIVEXTPROC                                  glConvolutionParameterivEXT;
    01056     PFNGLCOPYCONVOLUTIONFILTER1DEXTPROC                                 glCopyConvolutionFilter1DEXT;
    01057     PFNGLCOPYCONVOLUTIONFILTER2DEXTPROC                                 glCopyConvolutionFilter2DEXT;
    01058     PFNGLGETCONVOLUTIONFILTEREXTPROC                                    glGetConvolutionFilterEXT;
    01059     PFNGLGETCONVOLUTIONPARAMETERFVEXTPROC                               glGetConvolutionParameterfvEXT;
    01060     PFNGLGETCONVOLUTIONPARAMETERIVEXTPROC                               glGetConvolutionParameterivEXT;
    01061     PFNGLGETSEPARABLEFILTEREXTPROC                                      glGetSeparableFilterEXT;
    01062     PFNGLSEPARABLEFILTER2DEXTPROC                                       glSeparableFilter2DEXT;
    01064     PFNGLCOLORTABLESGIPROC                                              glColorTableSGI;
    01065     PFNGLCOLORTABLEPARAMETERFVSGIPROC                                   glColorTableParameterfvSGI;
    01066     PFNGLCOLORTABLEPARAMETERIVSGIPROC                                   glColorTableParameterivSGI;
    01067     PFNGLCOPYCOLORTABLESGIPROC                                          glCopyColorTableSGI;
    01068     PFNGLGETCOLORTABLESGIPROC                                           glGetColorTableSGI;
    01069     PFNGLGETCOLORTABLEPARAMETERFVSGIPROC                                glGetColorTableParameterfvSGI;
    01070     PFNGLGETCOLORTABLEPARAMETERIVSGIPROC                                glGetColorTableParameterivSGI;
    01072     PFNGLPIXELTEXGENSGIXPROC                                            glPixelTexGenSGIX;
    01074     PFNGLPIXELTEXGENPARAMETERISGISPROC                                  glPixelTexGenParameteriSGIS;
    01075     PFNGLPIXELTEXGENPARAMETERIVSGISPROC                                 glPixelTexGenParameterivSGIS;
    01076     PFNGLPIXELTEXGENPARAMETERFSGISPROC                                  glPixelTexGenParameterfSGIS;
    01077     PFNGLPIXELTEXGENPARAMETERFVSGISPROC                                 glPixelTexGenParameterfvSGIS;
    01078     PFNGLGETPIXELTEXGENPARAMETERIVSGISPROC                              glGetPixelTexGenParameterivSGIS;
    01079     PFNGLGETPIXELTEXGENPARAMETERFVSGISPROC                              glGetPixelTexGenParameterfvSGIS;
    01081     PFNGLTEXIMAGE4DSGISPROC                                             glTexImage4DSGIS;
    01082     PFNGLTEXSUBIMAGE4DSGISPROC                                          glTexSubImage4DSGIS;
    01084     PFNGLARETEXTURESRESIDENTEXTPROC                                     glAreTexturesResidentEXT;
    01085     PFNGLBINDTEXTUREEXTPROC                                             glBindTextureEXT;
    01086     PFNGLDELETETEXTURESEXTPROC                                          glDeleteTexturesEXT;
    01087     PFNGLGENTEXTURESEXTPROC                                             glGenTexturesEXT;
    01088     PFNGLISTEXTUREEXTPROC                                               glIsTextureEXT;
    01089     PFNGLPRIORITIZETEXTURESEXTPROC                                      glPrioritizeTexturesEXT;
    01091     PFNGLDETAILTEXFUNCSGISPROC                                          glDetailTexFuncSGIS;
    01092     PFNGLGETDETAILTEXFUNCSGISPROC                                       glGetDetailTexFuncSGIS;
    01094     PFNGLSHARPENTEXFUNCSGISPROC                                         glSharpenTexFuncSGIS;
    01095     PFNGLGETSHARPENTEXFUNCSGISPROC                                      glGetSharpenTexFuncSGIS;
    01097     PFNGLSAMPLEMASKSGISPROC                                             glSampleMaskSGIS;
    01098     PFNGLSAMPLEPATTERNSGISPROC                                          glSamplePatternSGIS;
    01100     PFNGLARRAYELEMENTEXTPROC                                            glArrayElementEXT;
    01101     PFNGLCOLORPOINTEREXTPROC                                            glColorPointerEXT;
    01102     PFNGLDRAWARRAYSEXTPROC                                              glDrawArraysEXT;
    01103     PFNGLEDGEFLAGPOINTEREXTPROC                                         glEdgeFlagPointerEXT;
    01104     PFNGLGETPOINTERVEXTPROC                                             glGetPointervEXT;
    01105     PFNGLINDEXPOINTEREXTPROC                                            glIndexPointerEXT;
    01106     PFNGLNORMALPOINTEREXTPROC                                           glNormalPointerEXT;
    01107     PFNGLTEXCOORDPOINTEREXTPROC                                         glTexCoordPointerEXT;
    01108     PFNGLVERTEXPOINTEREXTPROC                                           glVertexPointerEXT;
    01110     PFNGLBLENDEQUATIONEXTPROC                                           glBlendEquationEXT;
    01112     PFNGLSPRITEPARAMETERFSGIXPROC                                       glSpriteParameterfSGIX;
    01113     PFNGLSPRITEPARAMETERFVSGIXPROC                                      glSpriteParameterfvSGIX;
    01114     PFNGLSPRITEPARAMETERISGIXPROC                                       glSpriteParameteriSGIX;
    01115     PFNGLSPRITEPARAMETERIVSGIXPROC                                      glSpriteParameterivSGIX;
    01117     PFNGLPOINTPARAMETERFEXTPROC                                         glPointParameterfEXT;
    01118     PFNGLPOINTPARAMETERFVEXTPROC                                        glPointParameterfvEXT;
    01120     PFNGLPOINTPARAMETERFSGISPROC                                        glPointParameterfSGIS;
    01121     PFNGLPOINTPARAMETERFVSGISPROC                                       glPointParameterfvSGIS;
    01123     PFNGLGETINSTRUMENTSSGIXPROC                                         glGetInstrumentsSGIX;
    01124     PFNGLINSTRUMENTSBUFFERSGIXPROC                                      glInstrumentsBufferSGIX;
    01125     PFNGLPOLLINSTRUMENTSSGIXPROC                                        glPollInstrumentsSGIX;
    01126     PFNGLREADINSTRUMENTSSGIXPROC                                        glReadInstrumentsSGIX;
    01127     PFNGLSTARTINSTRUMENTSSGIXPROC                                       glStartInstrumentsSGIX;
    01128     PFNGLSTOPINSTRUMENTSSGIXPROC                                        glStopInstrumentsSGIX;
    01130     PFNGLFRAMEZOOMSGIXPROC                                              glFrameZoomSGIX;
    01132     PFNGLTAGSAMPLEBUFFERSGIXPROC                                        glTagSampleBufferSGIX;
    01134     PFNGLDEFORMATIONMAP3DSGIXPROC                                       glDeformationMap3dSGIX;
    01135     PFNGLDEFORMATIONMAP3FSGIXPROC                                       glDeformationMap3fSGIX;
    01136     PFNGLDEFORMSGIXPROC                                                 glDeformSGIX;
    01137     PFNGLLOADIDENTITYDEFORMATIONMAPSGIXPROC                             glLoadIdentityDeformationMapSGIX;
    01139     PFNGLREFERENCEPLANESGIXPROC                                         glReferencePlaneSGIX;
    01141     PFNGLFLUSHRASTERSGIXPROC                                            glFlushRasterSGIX;
    01143     PFNGLFOGFUNCSGISPROC                                                glFogFuncSGIS;
    01144     PFNGLGETFOGFUNCSGISPROC                                             glGetFogFuncSGIS;
    01146     PFNGLIMAGETRANSFORMPARAMETERIHPPROC                                 glImageTransformParameteriHP;
    01147     PFNGLIMAGETRANSFORMPARAMETERFHPPROC                                 glImageTransformParameterfHP;
    01148     PFNGLIMAGETRANSFORMPARAMETERIVHPPROC                                glImageTransformParameterivHP;
    01149     PFNGLIMAGETRANSFORMPARAMETERFVHPPROC                                glImageTransformParameterfvHP;
    01150     PFNGLGETIMAGETRANSFORMPARAMETERIVHPPROC                             glGetImageTransformParameterivHP;
    01151     PFNGLGETIMAGETRANSFORMPARAMETERFVHPPROC                             glGetImageTransformParameterfvHP;
    01153     PFNGLCOLORSUBTABLEEXTPROC                                           glColorSubTableEXT;
    01154     PFNGLCOPYCOLORSUBTABLEEXTPROC                                       glCopyColorSubTableEXT;
    01156     PFNGLHINTPGIPROC                                                    glHintPGI;
    01158     PFNGLCOLORTABLEEXTPROC                                              glColorTableEXT;
    01159     PFNGLGETCOLORTABLEEXTPROC                                           glGetColorTableEXT;
    01160     PFNGLGETCOLORTABLEPARAMETERIVEXTPROC                                glGetColorTableParameterivEXT;
    01161     PFNGLGETCOLORTABLEPARAMETERFVEXTPROC                                glGetColorTableParameterfvEXT;
    01163     PFNGLGETLISTPARAMETERFVSGIXPROC                                     glGetListParameterfvSGIX;
    01164     PFNGLGETLISTPARAMETERIVSGIXPROC                                     glGetListParameterivSGIX;
    01165     PFNGLLISTPARAMETERFSGIXPROC                                         glListParameterfSGIX;
    01166     PFNGLLISTPARAMETERFVSGIXPROC                                        glListParameterfvSGIX;
    01167     PFNGLLISTPARAMETERISGIXPROC                                         glListParameteriSGIX;
    01168     PFNGLLISTPARAMETERIVSGIXPROC                                        glListParameterivSGIX;
    01170     PFNGLINDEXMATERIALEXTPROC                                           glIndexMaterialEXT;
    01172     PFNGLINDEXFUNCEXTPROC                                               glIndexFuncEXT;
    01174     PFNGLLOCKARRAYSEXTPROC                                              glLockArraysEXT;
    01175     PFNGLUNLOCKARRAYSEXTPROC                                            glUnlockArraysEXT;
    01177     PFNGLCULLPARAMETERDVEXTPROC                                         glCullParameterdvEXT;
    01178     PFNGLCULLPARAMETERFVEXTPROC                                         glCullParameterfvEXT;
    01180     PFNGLFRAGMENTCOLORMATERIALSGIXPROC                                  glFragmentColorMaterialSGIX;
    01181     PFNGLFRAGMENTLIGHTFSGIXPROC                                         glFragmentLightfSGIX;
    01182     PFNGLFRAGMENTLIGHTFVSGIXPROC                                        glFragmentLightfvSGIX;
    01183     PFNGLFRAGMENTLIGHTISGIXPROC                                         glFragmentLightiSGIX;
    01184     PFNGLFRAGMENTLIGHTIVSGIXPROC                                        glFragmentLightivSGIX;
    01185     PFNGLFRAGMENTLIGHTMODELFSGIXPROC                                    glFragmentLightModelfSGIX;
    01186     PFNGLFRAGMENTLIGHTMODELFVSGIXPROC                                   glFragmentLightModelfvSGIX;
    01187     PFNGLFRAGMENTLIGHTMODELISGIXPROC                                    glFragmentLightModeliSGIX;
    01188     PFNGLFRAGMENTLIGHTMODELIVSGIXPROC                                   glFragmentLightModelivSGIX;
    01189     PFNGLFRAGMENTMATERIALFSGIXPROC                                      glFragmentMaterialfSGIX;
    01190     PFNGLFRAGMENTMATERIALFVSGIXPROC                                     glFragmentMaterialfvSGIX;
    01191     PFNGLFRAGMENTMATERIALISGIXPROC                                      glFragmentMaterialiSGIX;
    01192     PFNGLFRAGMENTMATERIALIVSGIXPROC                                     glFragmentMaterialivSGIX;
    01193     PFNGLGETFRAGMENTLIGHTFVSGIXPROC                                     glGetFragmentLightfvSGIX;
    01194     PFNGLGETFRAGMENTLIGHTIVSGIXPROC                                     glGetFragmentLightivSGIX;
    01195     PFNGLGETFRAGMENTMATERIALFVSGIXPROC                                  glGetFragmentMaterialfvSGIX;
    01196     PFNGLGETFRAGMENTMATERIALIVSGIXPROC                                  glGetFragmentMaterialivSGIX;
    01197     PFNGLLIGHTENVISGIXPROC                                              glLightEnviSGIX;
    01199     PFNGLDRAWRANGEELEMENTSEXTPROC                                       glDrawRangeElementsEXT;
    01201     PFNGLAPPLYTEXTUREEXTPROC                                            glApplyTextureEXT;
    01202     PFNGLTEXTURELIGHTEXTPROC                                            glTextureLightEXT;
    01203     PFNGLTEXTUREMATERIALEXTPROC                                         glTextureMaterialEXT;
    01205     PFNGLASYNCMARKERSGIXPROC                                            glAsyncMarkerSGIX;
    01206     PFNGLFINISHASYNCSGIXPROC                                            glFinishAsyncSGIX;
    01207     PFNGLPOLLASYNCSGIXPROC                                              glPollAsyncSGIX;
    01208     PFNGLGENASYNCMARKERSSGIXPROC                                        glGenAsyncMarkersSGIX;
    01209     PFNGLDELETEASYNCMARKERSSGIXPROC                                     glDeleteAsyncMarkersSGIX;
    01210     PFNGLISASYNCMARKERSGIXPROC                                          glIsAsyncMarkerSGIX;
    01212     PFNGLVERTEXPOINTERVINTELPROC                                        glVertexPointervINTEL;
    01213     PFNGLNORMALPOINTERVINTELPROC                                        glNormalPointervINTEL;
    01214     PFNGLCOLORPOINTERVINTELPROC                                         glColorPointervINTEL;
    01215     PFNGLTEXCOORDPOINTERVINTELPROC                                      glTexCoordPointervINTEL;
    01217     PFNGLPIXELTRANSFORMPARAMETERIEXTPROC                                glPixelTransformParameteriEXT;
    01218     PFNGLPIXELTRANSFORMPARAMETERFEXTPROC                                glPixelTransformParameterfEXT;
    01219     PFNGLPIXELTRANSFORMPARAMETERIVEXTPROC                               glPixelTransformParameterivEXT;
    01220     PFNGLPIXELTRANSFORMPARAMETERFVEXTPROC                               glPixelTransformParameterfvEXT;
    01222     PFNGLSECONDARYCOLOR3BEXTPROC                                        glSecondaryColor3bEXT;
    01223     PFNGLSECONDARYCOLOR3BVEXTPROC                                       glSecondaryColor3bvEXT;
    01224     PFNGLSECONDARYCOLOR3DEXTPROC                                        glSecondaryColor3dEXT;
    01225     PFNGLSECONDARYCOLOR3DVEXTPROC                                       glSecondaryColor3dvEXT;
    01226     PFNGLSECONDARYCOLOR3FEXTPROC                                        glSecondaryColor3fEXT;
    01227     PFNGLSECONDARYCOLOR3FVEXTPROC                                       glSecondaryColor3fvEXT;
    01228     PFNGLSECONDARYCOLOR3IEXTPROC                                        glSecondaryColor3iEXT;
    01229     PFNGLSECONDARYCOLOR3IVEXTPROC                                       glSecondaryColor3ivEXT;
    01230     PFNGLSECONDARYCOLOR3SEXTPROC                                        glSecondaryColor3sEXT;
    01231     PFNGLSECONDARYCOLOR3SVEXTPROC                                       glSecondaryColor3svEXT;
    01232     PFNGLSECONDARYCOLOR3UBEXTPROC                                       glSecondaryColor3ubEXT;
    01233     PFNGLSECONDARYCOLOR3UBVEXTPROC                                      glSecondaryColor3ubvEXT;
    01234     PFNGLSECONDARYCOLOR3UIEXTPROC                                       glSecondaryColor3uiEXT;
    01235     PFNGLSECONDARYCOLOR3UIVEXTPROC                                      glSecondaryColor3uivEXT;
    01236     PFNGLSECONDARYCOLOR3USEXTPROC                                       glSecondaryColor3usEXT;
    01237     PFNGLSECONDARYCOLOR3USVEXTPROC                                      glSecondaryColor3usvEXT;
    01238     PFNGLSECONDARYCOLORPOINTEREXTPROC                                   glSecondaryColorPointerEXT;
    01240     PFNGLTEXTURENORMALEXTPROC                                           glTextureNormalEXT;
    01242     PFNGLMULTIDRAWARRAYSEXTPROC                                         glMultiDrawArraysEXT;
    01243     PFNGLMULTIDRAWELEMENTSEXTPROC                                       glMultiDrawElementsEXT;
    01245     PFNGLFOGCOORDFEXTPROC                                               glFogCoordfEXT;
    01246     PFNGLFOGCOORDFVEXTPROC                                              glFogCoordfvEXT;
    01247     PFNGLFOGCOORDDEXTPROC                                               glFogCoorddEXT;
    01248     PFNGLFOGCOORDDVEXTPROC                                              glFogCoorddvEXT;
    01249     PFNGLFOGCOORDPOINTEREXTPROC                                         glFogCoordPointerEXT;
    01251     PFNGLTANGENT3BEXTPROC                                               glTangent3bEXT;
    01252     PFNGLTANGENT3BVEXTPROC                                              glTangent3bvEXT;
    01253     PFNGLTANGENT3DEXTPROC                                               glTangent3dEXT;
    01254     PFNGLTANGENT3DVEXTPROC                                              glTangent3dvEXT;
    01255     PFNGLTANGENT3FEXTPROC                                               glTangent3fEXT;
    01256     PFNGLTANGENT3FVEXTPROC                                              glTangent3fvEXT;
    01257     PFNGLTANGENT3IEXTPROC                                               glTangent3iEXT;
    01258     PFNGLTANGENT3IVEXTPROC                                              glTangent3ivEXT;
    01259     PFNGLTANGENT3SEXTPROC                                               glTangent3sEXT;
    01260     PFNGLTANGENT3SVEXTPROC                                              glTangent3svEXT;
    01261     PFNGLBINORMAL3BEXTPROC                                              glBinormal3bEXT;
    01262     PFNGLBINORMAL3BVEXTPROC                                             glBinormal3bvEXT;
    01263     PFNGLBINORMAL3DEXTPROC                                              glBinormal3dEXT;
    01264     PFNGLBINORMAL3DVEXTPROC                                             glBinormal3dvEXT;
    01265     PFNGLBINORMAL3FEXTPROC                                              glBinormal3fEXT;
    01266     PFNGLBINORMAL3FVEXTPROC                                             glBinormal3fvEXT;
    01267     PFNGLBINORMAL3IEXTPROC                                              glBinormal3iEXT;
    01268     PFNGLBINORMAL3IVEXTPROC                                             glBinormal3ivEXT;
    01269     PFNGLBINORMAL3SEXTPROC                                              glBinormal3sEXT;
    01270     PFNGLBINORMAL3SVEXTPROC                                             glBinormal3svEXT;
    01271     PFNGLTANGENTPOINTEREXTPROC                                          glTangentPointerEXT;
    01272     PFNGLBINORMALPOINTEREXTPROC                                         glBinormalPointerEXT;
    01274     PFNGLFINISHTEXTURESUNXPROC                                          glFinishTextureSUNX;
    01276     PFNGLGLOBALALPHAFACTORBSUNPROC                                      glGlobalAlphaFactorbSUN;
    01277     PFNGLGLOBALALPHAFACTORSSUNPROC                                      glGlobalAlphaFactorsSUN;
    01278     PFNGLGLOBALALPHAFACTORISUNPROC                                      glGlobalAlphaFactoriSUN;
    01279     PFNGLGLOBALALPHAFACTORFSUNPROC                                      glGlobalAlphaFactorfSUN;
    01280     PFNGLGLOBALALPHAFACTORDSUNPROC                                      glGlobalAlphaFactordSUN;
    01281     PFNGLGLOBALALPHAFACTORUBSUNPROC                                     glGlobalAlphaFactorubSUN;
    01282     PFNGLGLOBALALPHAFACTORUSSUNPROC                                     glGlobalAlphaFactorusSUN;
    01283     PFNGLGLOBALALPHAFACTORUISUNPROC                                     glGlobalAlphaFactoruiSUN;
    01285     PFNGLREPLACEMENTCODEUISUNPROC                                       glReplacementCodeuiSUN;
    01286     PFNGLREPLACEMENTCODEUSSUNPROC                                       glReplacementCodeusSUN;
    01287     PFNGLREPLACEMENTCODEUBSUNPROC                                       glReplacementCodeubSUN;
    01288     PFNGLREPLACEMENTCODEUIVSUNPROC                                      glReplacementCodeuivSUN;
    01289     PFNGLREPLACEMENTCODEUSVSUNPROC                                      glReplacementCodeusvSUN;
    01290     PFNGLREPLACEMENTCODEUBVSUNPROC                                      glReplacementCodeubvSUN;
    01291     PFNGLREPLACEMENTCODEPOINTERSUNPROC                                  glReplacementCodePointerSUN;
    01293     PFNGLCOLOR4UBVERTEX2FSUNPROC                                        glColor4ubVertex2fSUN;
    01294     PFNGLCOLOR4UBVERTEX2FVSUNPROC                                       glColor4ubVertex2fvSUN;
    01295     PFNGLCOLOR4UBVERTEX3FSUNPROC                                        glColor4ubVertex3fSUN;
    01296     PFNGLCOLOR4UBVERTEX3FVSUNPROC                                       glColor4ubVertex3fvSUN;
    01297     PFNGLCOLOR3FVERTEX3FSUNPROC                                         glColor3fVertex3fSUN;
    01298     PFNGLCOLOR3FVERTEX3FVSUNPROC                                        glColor3fVertex3fvSUN;
    01299     PFNGLNORMAL3FVERTEX3FSUNPROC                                        glNormal3fVertex3fSUN;
    01300     PFNGLNORMAL3FVERTEX3FVSUNPROC                                       glNormal3fVertex3fvSUN;
    01301     PFNGLCOLOR4FNORMAL3FVERTEX3FSUNPROC                                 glColor4fNormal3fVertex3fSUN;
    01302     PFNGLCOLOR4FNORMAL3FVERTEX3FVSUNPROC                                glColor4fNormal3fVertex3fvSUN;
    01303     PFNGLTEXCOORD2FVERTEX3FSUNPROC                                      glTexCoord2fVertex3fSUN;
    01304     PFNGLTEXCOORD2FVERTEX3FVSUNPROC                                     glTexCoord2fVertex3fvSUN;
    01305     PFNGLTEXCOORD4FVERTEX4FSUNPROC                                      glTexCoord4fVertex4fSUN;
    01306     PFNGLTEXCOORD4FVERTEX4FVSUNPROC                                     glTexCoord4fVertex4fvSUN;
    01307     PFNGLTEXCOORD2FCOLOR4UBVERTEX3FSUNPROC                              glTexCoord2fColor4ubVertex3fSUN;
    01308     PFNGLTEXCOORD2FCOLOR4UBVERTEX3FVSUNPROC                             glTexCoord2fColor4ubVertex3fvSUN;
    01309     PFNGLTEXCOORD2FCOLOR3FVERTEX3FSUNPROC                               glTexCoord2fColor3fVertex3fSUN;
    01310     PFNGLTEXCOORD2FCOLOR3FVERTEX3FVSUNPROC                              glTexCoord2fColor3fVertex3fvSUN;
    01311     PFNGLTEXCOORD2FNORMAL3FVERTEX3FSUNPROC                              glTexCoord2fNormal3fVertex3fSUN;
    01312     PFNGLTEXCOORD2FNORMAL3FVERTEX3FVSUNPROC                             glTexCoord2fNormal3fVertex3fvSUN;
    01313     PFNGLTEXCOORD2FCOLOR4FNORMAL3FVERTEX3FSUNPROC                       glTexCoord2fColor4fNormal3fVertex3fSUN;
    01314     PFNGLTEXCOORD2FCOLOR4FNORMAL3FVERTEX3FVSUNPROC                      glTexCoord2fColor4fNormal3fVertex3fvSUN;
    01315     PFNGLTEXCOORD4FCOLOR4FNORMAL3FVERTEX4FSUNPROC                       glTexCoord4fColor4fNormal3fVertex4fSUN;
    01316     PFNGLTEXCOORD4FCOLOR4FNORMAL3FVERTEX4FVSUNPROC                      glTexCoord4fColor4fNormal3fVertex4fvSUN;
    01317     PFNGLREPLACEMENTCODEUIVERTEX3FSUNPROC                               glReplacementCodeuiVertex3fSUN;
    01318     PFNGLREPLACEMENTCODEUIVERTEX3FVSUNPROC                              glReplacementCodeuiVertex3fvSUN;
    01319     PFNGLREPLACEMENTCODEUICOLOR4UBVERTEX3FSUNPROC                       glReplacementCodeuiColor4ubVertex3fSUN;
    01320     PFNGLREPLACEMENTCODEUICOLOR4UBVERTEX3FVSUNPROC                      glReplacementCodeuiColor4ubVertex3fvSUN;
    01321     PFNGLREPLACEMENTCODEUICOLOR3FVERTEX3FSUNPROC                        glReplacementCodeuiColor3fVertex3fSUN;
    01322     PFNGLREPLACEMENTCODEUICOLOR3FVERTEX3FVSUNPROC                       glReplacementCodeuiColor3fVertex3fvSUN;
    01323     PFNGLREPLACEMENTCODEUINORMAL3FVERTEX3FSUNPROC                       glReplacementCodeuiNormal3fVertex3fSUN;
    01324     PFNGLREPLACEMENTCODEUINORMAL3FVERTEX3FVSUNPROC                      glReplacementCodeuiNormal3fVertex3fvSUN;
    01325     PFNGLREPLACEMENTCODEUICOLOR4FNORMAL3FVERTEX3FSUNPROC                glReplacementCodeuiColor4fNormal3fVertex3fSUN;
    01326     PFNGLREPLACEMENTCODEUICOLOR4FNORMAL3FVERTEX3FVSUNPROC               glReplacementCodeuiColor4fNormal3fVertex3fvSUN;
    01327     PFNGLREPLACEMENTCODEUITEXCOORD2FVERTEX3FSUNPROC                     glReplacementCodeuiTexCoord2fVertex3fSUN;
    01328     PFNGLREPLACEMENTCODEUITEXCOORD2FVERTEX3FVSUNPROC                    glReplacementCodeuiTexCoord2fVertex3fvSUN;
    01329     PFNGLREPLACEMENTCODEUITEXCOORD2FNORMAL3FVERTEX3FSUNPROC             glReplacementCodeuiTexCoord2fNormal3fVertex3fSUN;
    01330     PFNGLREPLACEMENTCODEUITEXCOORD2FNORMAL3FVERTEX3FVSUNPROC            glReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN;
    01331     PFNGLREPLACEMENTCODEUITEXCOORD2FCOLOR4FNORMAL3FVERTEX3FSUNPROC      glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN;
    01332     PFNGLREPLACEMENTCODEUITEXCOORD2FCOLOR4FNORMAL3FVERTEX3FVSUNPROC     glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN;
    01334     PFNGLBLENDFUNCSEPARATEEXTPROC                                       glBlendFuncSeparateEXT;
    01335     PFNGLBLENDFUNCSEPARATEINGRPROC                                      glBlendFuncSeparateINGR;
    01337     PFNGLVERTEXWEIGHTFEXTPROC                                           glVertexWeightfEXT;
    01338     PFNGLVERTEXWEIGHTFVEXTPROC                                          glVertexWeightfvEXT;
    01339     PFNGLVERTEXWEIGHTPOINTEREXTPROC                                     glVertexWeightPointerEXT;
    01341     PFNGLFLUSHVERTEXARRAYRANGENVPROC                                    glFlushVertexArrayRangeNV;
    01342     PFNGLVERTEXARRAYRANGENVPROC                                         glVertexArrayRangeNV;
    01344     PFNGLCOMBINERPARAMETERFVNVPROC                                      glCombinerParameterfvNV;
    01345     PFNGLCOMBINERPARAMETERFNVPROC                                       glCombinerParameterfNV;
    01346     PFNGLCOMBINERPARAMETERIVNVPROC                                      glCombinerParameterivNV;
    01347     PFNGLCOMBINERPARAMETERINVPROC                                       glCombinerParameteriNV;
    01348     PFNGLCOMBINERINPUTNVPROC                                            glCombinerInputNV;
    01349     PFNGLCOMBINEROUTPUTNVPROC                                           glCombinerOutputNV;
    01350     PFNGLFINALCOMBINERINPUTNVPROC                                       glFinalCombinerInputNV;
    01351     PFNGLGETCOMBINERINPUTPARAMETERFVNVPROC                              glGetCombinerInputParameterfvNV;
    01352     PFNGLGETCOMBINERINPUTPARAMETERIVNVPROC                              glGetCombinerInputParameterivNV;
    01353     PFNGLGETCOMBINEROUTPUTPARAMETERFVNVPROC                             glGetCombinerOutputParameterfvNV;
    01354     PFNGLGETCOMBINEROUTPUTPARAMETERIVNVPROC                             glGetCombinerOutputParameterivNV;
    01355     PFNGLGETFINALCOMBINERINPUTPARAMETERFVNVPROC                         glGetFinalCombinerInputParameterfvNV;
    01356     PFNGLGETFINALCOMBINERINPUTPARAMETERIVNVPROC                         glGetFinalCombinerInputParameterivNV;
    01358     PFNGLRESIZEBUFFERSMESAPROC                                          glResizeBuffersMESA;
    01360     PFNGLWINDOWPOS2DMESAPROC                                            glWindowPos2dMESA;
    01361     PFNGLWINDOWPOS2DVMESAPROC                                           glWindowPos2dvMESA;
    01362     PFNGLWINDOWPOS2FMESAPROC                                            glWindowPos2fMESA;
    01363     PFNGLWINDOWPOS2FVMESAPROC                                           glWindowPos2fvMESA;
    01364     PFNGLWINDOWPOS2IMESAPROC                                            glWindowPos2iMESA;
    01365     PFNGLWINDOWPOS2IVMESAPROC                                           glWindowPos2ivMESA;
    01366     PFNGLWINDOWPOS2SMESAPROC                                            glWindowPos2sMESA;
    01367     PFNGLWINDOWPOS2SVMESAPROC                                           glWindowPos2svMESA;
    01368     PFNGLWINDOWPOS3DMESAPROC                                            glWindowPos3dMESA;
    01369     PFNGLWINDOWPOS3DVMESAPROC                                           glWindowPos3dvMESA;
    01370     PFNGLWINDOWPOS3FMESAPROC                                            glWindowPos3fMESA;
    01371     PFNGLWINDOWPOS3FVMESAPROC                                           glWindowPos3fvMESA;
    01372     PFNGLWINDOWPOS3IMESAPROC                                            glWindowPos3iMESA;
    01373     PFNGLWINDOWPOS3IVMESAPROC                                           glWindowPos3ivMESA;
    01374     PFNGLWINDOWPOS3SMESAPROC                                            glWindowPos3sMESA;
    01375     PFNGLWINDOWPOS3SVMESAPROC                                           glWindowPos3svMESA;
    01376     PFNGLWINDOWPOS4DMESAPROC                                            glWindowPos4dMESA;
    01377     PFNGLWINDOWPOS4DVMESAPROC                                           glWindowPos4dvMESA;
    01378     PFNGLWINDOWPOS4FMESAPROC                                            glWindowPos4fMESA;
    01379     PFNGLWINDOWPOS4FVMESAPROC                                           glWindowPos4fvMESA;
    01380     PFNGLWINDOWPOS4IMESAPROC                                            glWindowPos4iMESA;
    01381     PFNGLWINDOWPOS4IVMESAPROC                                           glWindowPos4ivMESA;
    01382     PFNGLWINDOWPOS4SMESAPROC                                            glWindowPos4sMESA;
    01383     PFNGLWINDOWPOS4SVMESAPROC                                           glWindowPos4svMESA;
    01385     PFNGLMULTIMODEDRAWARRAYSIBMPROC                                     glMultiModeDrawArraysIBM;
    01386     PFNGLMULTIMODEDRAWELEMENTSIBMPROC                                   glMultiModeDrawElementsIBM;
    01388     PFNGLCOLORPOINTERLISTIBMPROC                                        glColorPointerListIBM;
    01389     PFNGLSECONDARYCOLORPOINTERLISTIBMPROC                                   glSecondaryColorPointerListIBM;
    01390     PFNGLEDGEFLAGPOINTERLISTIBMPROC                                     glEdgeFlagPointerListIBM;
    01391     PFNGLFOGCOORDPOINTERLISTIBMPROC                                     glFogCoordPointerListIBM;
    01392     PFNGLINDEXPOINTERLISTIBMPROC                                        glIndexPointerListIBM;
    01393     PFNGLNORMALPOINTERLISTIBMPROC                                       glNormalPointerListIBM;
    01394     PFNGLTEXCOORDPOINTERLISTIBMPROC                                     glTexCoordPointerListIBM;
    01395     PFNGLVERTEXPOINTERLISTIBMPROC                                       glVertexPointerListIBM;
    01397     PFNGLTBUFFERMASK3DFXPROC                                            glTbufferMask3DFX;
    01399     PFNGLSAMPLEMASKEXTPROC                                              glSampleMaskEXT;
    01400     PFNGLSAMPLEPATTERNEXTPROC                                           glSamplePatternEXT;
    01402     PFNGLTEXTURECOLORMASKSGISPROC                                       glTextureColorMaskSGIS;
    01404     PFNGLIGLOOINTERFACESGIXPROC                                         glIglooInterfaceSGIX;
    01406     PFNGLDELETEFENCESNVPROC                                             glDeleteFencesNV;
    01407     PFNGLGENFENCESNVPROC                                                glGenFencesNV;
    01408     PFNGLISFENCENVPROC                                                  glIsFenceNV;
    01409     PFNGLTESTFENCENVPROC                                                glTestFenceNV;
    01410     PFNGLGETFENCEIVNVPROC                                               glGetFenceivNV;
    01411     PFNGLFINISHFENCENVPROC                                              glFinishFenceNV;
    01412     PFNGLSETFENCENVPROC                                                 glSetFenceNV;
    01414     PFNGLMAPCONTROLPOINTSNVPROC                                         glMapControlPointsNV;
    01415     PFNGLMAPPARAMETERIVNVPROC                                           glMapParameterivNV;
    01416     PFNGLMAPPARAMETERFVNVPROC                                           glMapParameterfvNV;
    01417     PFNGLGETMAPCONTROLPOINTSNVPROC                                      glGetMapControlPointsNV;
    01418     PFNGLGETMAPPARAMETERIVNVPROC                                        glGetMapParameterivNV;
    01419     PFNGLGETMAPPARAMETERFVNVPROC                                        glGetMapParameterfvNV;
    01420     PFNGLGETMAPATTRIBPARAMETERIVNVPROC                                  glGetMapAttribParameterivNV;
    01421     PFNGLGETMAPATTRIBPARAMETERFVNVPROC                                  glGetMapAttribParameterfvNV;
    01422     PFNGLEVALMAPSNVPROC                                                 glEvalMapsNV;
    01424     PFNGLCOMBINERSTAGEPARAMETERFVNVPROC                                 glCombinerStageParameterfvNV;
    01425     PFNGLGETCOMBINERSTAGEPARAMETERFVNVPROC                              glGetCombinerStageParameterfvNV;
    01427     PFNGLAREPROGRAMSRESIDENTNVPROC                                      glAreProgramsResidentNV;
    01428     PFNGLBINDPROGRAMNVPROC                                              glBindProgramNV;
    01429     PFNGLDELETEPROGRAMSNVPROC                                           glDeleteProgramsNV;
    01430     PFNGLEXECUTEPROGRAMNVPROC                                           glExecuteProgramNV;
    01431     PFNGLGENPROGRAMSNVPROC                                              glGenProgramsNV;
    01432     PFNGLGETPROGRAMPARAMETERDVNVPROC                                    glGetProgramParameterdvNV;
    01433     PFNGLGETPROGRAMPARAMETERFVNVPROC                                    glGetProgramParameterfvNV;
    01434     PFNGLGETPROGRAMIVNVPROC                                             glGetProgramivNV;
    01435     PFNGLGETPROGRAMSTRINGNVPROC                                         glGetProgramStringNV;
    01436     PFNGLGETTRACKMATRIXIVNVPROC                                         glGetTrackMatrixivNV;
    01437     PFNGLGETVERTEXATTRIBDVNVPROC                                        glGetVertexAttribdvNV;
    01438     PFNGLGETVERTEXATTRIBFVNVPROC                                        glGetVertexAttribfvNV;
    01439     PFNGLGETVERTEXATTRIBIVNVPROC                                        glGetVertexAttribivNV;
    01440     PFNGLGETVERTEXATTRIBPOINTERVNVPROC                                  glGetVertexAttribPointervNV;
    01441     PFNGLISPROGRAMNVPROC                                                glIsProgramNV;
    01442     PFNGLLOADPROGRAMNVPROC                                              glLoadProgramNV;
    01443     PFNGLPROGRAMPARAMETER4DNVPROC                                       glProgramParameter4dNV;
    01444     PFNGLPROGRAMPARAMETER4DVNVPROC                                      glProgramParameter4dvNV;
    01445     PFNGLPROGRAMPARAMETER4FNVPROC                                       glProgramParameter4fNV;
    01446     PFNGLPROGRAMPARAMETER4FVNVPROC                                      glProgramParameter4fvNV;
    01447     PFNGLPROGRAMPARAMETERS4DVNVPROC                                     glProgramParameters4dvNV;
    01448     PFNGLPROGRAMPARAMETERS4FVNVPROC                                     glProgramParameters4fvNV;
    01449     PFNGLREQUESTRESIDENTPROGRAMSNVPROC                                  glRequestResidentProgramsNV;
    01450     PFNGLTRACKMATRIXNVPROC                                              glTrackMatrixNV;
    01451     PFNGLVERTEXATTRIBPOINTERNVPROC                                      glVertexAttribPointerNV;
    01452     PFNGLVERTEXATTRIB1DNVPROC                                           glVertexAttrib1dNV;
    01453     PFNGLVERTEXATTRIB1DVNVPROC                                          glVertexAttrib1dvNV;
    01454     PFNGLVERTEXATTRIB1FNVPROC                                           glVertexAttrib1fNV;
    01455     PFNGLVERTEXATTRIB1FVNVPROC                                          glVertexAttrib1fvNV;
    01456     PFNGLVERTEXATTRIB1SNVPROC                                           glVertexAttrib1sNV;
    01457     PFNGLVERTEXATTRIB1SVNVPROC                                          glVertexAttrib1svNV;
    01458     PFNGLVERTEXATTRIB2DNVPROC                                           glVertexAttrib2dNV;
    01459     PFNGLVERTEXATTRIB2DVNVPROC                                          glVertexAttrib2dvNV;
    01460     PFNGLVERTEXATTRIB2FNVPROC                                           glVertexAttrib2fNV;
    01461     PFNGLVERTEXATTRIB2FVNVPROC                                          glVertexAttrib2fvNV;
    01462     PFNGLVERTEXATTRIB2SNVPROC                                           glVertexAttrib2sNV;
    01463     PFNGLVERTEXATTRIB2SVNVPROC                                          glVertexAttrib2svNV;
    01464     PFNGLVERTEXATTRIB3DNVPROC                                           glVertexAttrib3dNV;
    01465     PFNGLVERTEXATTRIB3DVNVPROC                                          glVertexAttrib3dvNV;
    01466     PFNGLVERTEXATTRIB3FNVPROC                                           glVertexAttrib3fNV;
    01467     PFNGLVERTEXATTRIB3FVNVPROC                                          glVertexAttrib3fvNV;
    01468     PFNGLVERTEXATTRIB3SNVPROC                                           glVertexAttrib3sNV;
    01469     PFNGLVERTEXATTRIB3SVNVPROC                                          glVertexAttrib3svNV;
    01470     PFNGLVERTEXATTRIB4DNVPROC                                           glVertexAttrib4dNV;
    01471     PFNGLVERTEXATTRIB4DVNVPROC                                          glVertexAttrib4dvNV;
    01472     PFNGLVERTEXATTRIB4FNVPROC                                           glVertexAttrib4fNV;
    01473     PFNGLVERTEXATTRIB4FVNVPROC                                          glVertexAttrib4fvNV;
    01474     PFNGLVERTEXATTRIB4SNVPROC                                           glVertexAttrib4sNV;
    01475     PFNGLVERTEXATTRIB4SVNVPROC                                          glVertexAttrib4svNV;
    01476     PFNGLVERTEXATTRIB4UBNVPROC                                          glVertexAttrib4ubNV;
    01477     PFNGLVERTEXATTRIB4UBVNVPROC                                         glVertexAttrib4ubvNV;
    01478     PFNGLVERTEXATTRIBS1DVNVPROC                                         glVertexAttribs1dvNV;
    01479     PFNGLVERTEXATTRIBS1FVNVPROC                                         glVertexAttribs1fvNV;
    01480     PFNGLVERTEXATTRIBS1SVNVPROC                                         glVertexAttribs1svNV;
    01481     PFNGLVERTEXATTRIBS2DVNVPROC                                         glVertexAttribs2dvNV;
    01482     PFNGLVERTEXATTRIBS2FVNVPROC                                         glVertexAttribs2fvNV;
    01483     PFNGLVERTEXATTRIBS2SVNVPROC                                         glVertexAttribs2svNV;
    01484     PFNGLVERTEXATTRIBS3DVNVPROC                                         glVertexAttribs3dvNV;
    01485     PFNGLVERTEXATTRIBS3FVNVPROC                                         glVertexAttribs3fvNV;
    01486     PFNGLVERTEXATTRIBS3SVNVPROC                                         glVertexAttribs3svNV;
    01487     PFNGLVERTEXATTRIBS4DVNVPROC                                         glVertexAttribs4dvNV;
    01488     PFNGLVERTEXATTRIBS4FVNVPROC                                         glVertexAttribs4fvNV;
    01489     PFNGLVERTEXATTRIBS4SVNVPROC                                         glVertexAttribs4svNV;
    01490     PFNGLVERTEXATTRIBS4UBVNVPROC                                        glVertexAttribs4ubvNV;
    01492     PFNGLTEXBUMPPARAMETERIVATIPROC                                      glTexBumpParameterivATI;
    01493     PFNGLTEXBUMPPARAMETERFVATIPROC                                      glTexBumpParameterfvATI;
    01494     PFNGLGETTEXBUMPPARAMETERIVATIPROC                                   glGetTexBumpParameterivATI;
    01495     PFNGLGETTEXBUMPPARAMETERFVATIPROC                                   glGetTexBumpParameterfvATI;
    01497     PFNGLGENFRAGMENTSHADERSATIPROC                                      glGenFragmentShadersATI;
    01498     PFNGLBINDFRAGMENTSHADERATIPROC                                      glBindFragmentShaderATI;
    01499     PFNGLDELETEFRAGMENTSHADERATIPROC                                    glDeleteFragmentShaderATI;
    01500     PFNGLBEGINFRAGMENTSHADERATIPROC                                     glBeginFragmentShaderATI;
    01501     PFNGLENDFRAGMENTSHADERATIPROC                                       glEndFragmentShaderATI;
    01502     PFNGLPASSTEXCOORDATIPROC                                            glPassTexCoordATI;
    01503     PFNGLSAMPLEMAPATIPROC                                               glSampleMapATI;
    01504     PFNGLCOLORFRAGMENTOP1ATIPROC                                        glColorFragmentOp1ATI;
    01505     PFNGLCOLORFRAGMENTOP2ATIPROC                                        glColorFragmentOp2ATI;
    01506     PFNGLCOLORFRAGMENTOP3ATIPROC                                        glColorFragmentOp3ATI;
    01507     PFNGLALPHAFRAGMENTOP1ATIPROC                                        glAlphaFragmentOp1ATI;
    01508     PFNGLALPHAFRAGMENTOP2ATIPROC                                        glAlphaFragmentOp2ATI;
    01509     PFNGLALPHAFRAGMENTOP3ATIPROC                                        glAlphaFragmentOp3ATI;
    01510     PFNGLSETFRAGMENTSHADERCONSTANTATIPROC                               glSetFragmentShaderConstantATI;
    01512     PFNGLPNTRIANGLESIATIPROC                                            glPNTrianglesiATI;
    01513     PFNGLPNTRIANGLESFATIPROC                                            glPNTrianglesfATI;
    01515     PFNGLNEWOBJECTBUFFERATIPROC                                         glNewObjectBufferATI;
    01516     PFNGLISOBJECTBUFFERATIPROC                                          glIsObjectBufferATI;
    01517     PFNGLUPDATEOBJECTBUFFERATIPROC                                      glUpdateObjectBufferATI;
    01518     PFNGLGETOBJECTBUFFERFVATIPROC                                       glGetObjectBufferfvATI;
    01519     PFNGLGETOBJECTBUFFERIVATIPROC                                       glGetObjectBufferivATI;
    01520     PFNGLFREEOBJECTBUFFERATIPROC                                        glFreeObjectBufferATI;
    01521     PFNGLARRAYOBJECTATIPROC                                             glArrayObjectATI;
    01522     PFNGLGETARRAYOBJECTFVATIPROC                                        glGetArrayObjectfvATI;
    01523     PFNGLGETARRAYOBJECTIVATIPROC                                        glGetArrayObjectivATI;
    01524     PFNGLVARIANTARRAYOBJECTATIPROC                                      glVariantArrayObjectATI;
    01525     PFNGLGETVARIANTARRAYOBJECTFVATIPROC                                 glGetVariantArrayObjectfvATI;
    01526     PFNGLGETVARIANTARRAYOBJECTIVATIPROC                                 glGetVariantArrayObjectivATI;
    01528     PFNGLBEGINVERTEXSHADEREXTPROC                                       glBeginVertexShaderEXT;
    01529     PFNGLENDVERTEXSHADEREXTPROC                                         glEndVertexShaderEXT;
    01530     PFNGLBINDVERTEXSHADEREXTPROC                                        glBindVertexShaderEXT;
    01531     PFNGLGENVERTEXSHADERSEXTPROC                                        glGenVertexShadersEXT;
    01532     PFNGLDELETEVERTEXSHADEREXTPROC                                      glDeleteVertexShaderEXT;
    01533     PFNGLSHADEROP1EXTPROC                                               glShaderOp1EXT;
    01534     PFNGLSHADEROP2EXTPROC                                               glShaderOp2EXT;
    01535     PFNGLSHADEROP3EXTPROC                                               glShaderOp3EXT;
    01536     PFNGLSWIZZLEEXTPROC                                                 glSwizzleEXT;
    01537     PFNGLWRITEMASKEXTPROC                                               glWriteMaskEXT;
    01538     PFNGLINSERTCOMPONENTEXTPROC                                         glInsertComponentEXT;
    01539     PFNGLEXTRACTCOMPONENTEXTPROC                                        glExtractComponentEXT;
    01540     PFNGLGENSYMBOLSEXTPROC                                              glGenSymbolsEXT;
    01541     PFNGLSETINVARIANTEXTPROC                                            glSetInvariantEXT;
    01542     PFNGLSETLOCALCONSTANTEXTPROC                                        glSetLocalConstantEXT;
    01543     PFNGLVARIANTBVEXTPROC                                               glVariantbvEXT;
    01544     PFNGLVARIANTSVEXTPROC                                               glVariantsvEXT;
    01545     PFNGLVARIANTIVEXTPROC                                               glVariantivEXT;
    01546     PFNGLVARIANTFVEXTPROC                                               glVariantfvEXT;
    01547     PFNGLVARIANTDVEXTPROC                                               glVariantdvEXT;
    01548     PFNGLVARIANTUBVEXTPROC                                              glVariantubvEXT;
    01549     PFNGLVARIANTUSVEXTPROC                                              glVariantusvEXT;
    01550     PFNGLVARIANTUIVEXTPROC                                              glVariantuivEXT;
    01551     PFNGLVARIANTPOINTEREXTPROC                                          glVariantPointerEXT;
    01552     PFNGLENABLEVARIANTCLIENTSTATEEXTPROC                                glEnableVariantClientStateEXT;
    01553     PFNGLDISABLEVARIANTCLIENTSTATEEXTPROC                               glDisableVariantClientStateEXT;
    01554     PFNGLBINDLIGHTPARAMETEREXTPROC                                      glBindLightParameterEXT;
    01555     PFNGLBINDMATERIALPARAMETEREXTPROC                                   glBindMaterialParameterEXT;
    01556     PFNGLBINDTEXGENPARAMETEREXTPROC                                     glBindTexGenParameterEXT;
    01557     PFNGLBINDTEXTUREUNITPARAMETEREXTPROC                                glBindTextureUnitParameterEXT;
    01558     PFNGLBINDPARAMETEREXTPROC                                           glBindParameterEXT;
    01559     PFNGLISVARIANTENABLEDEXTPROC                                        glIsVariantEnabledEXT;
    01560     PFNGLGETVARIANTBOOLEANVEXTPROC                                      glGetVariantBooleanvEXT;
    01561     PFNGLGETVARIANTINTEGERVEXTPROC                                      glGetVariantIntegervEXT;
    01562     PFNGLGETVARIANTFLOATVEXTPROC                                        glGetVariantFloatvEXT;
    01563     PFNGLGETVARIANTPOINTERVEXTPROC                                      glGetVariantPointervEXT;
    01564     PFNGLGETINVARIANTBOOLEANVEXTPROC                                    glGetInvariantBooleanvEXT;
    01565     PFNGLGETINVARIANTINTEGERVEXTPROC                                    glGetInvariantIntegervEXT;
    01566     PFNGLGETINVARIANTFLOATVEXTPROC                                      glGetInvariantFloatvEXT;
    01567     PFNGLGETLOCALCONSTANTBOOLEANVEXTPROC                                glGetLocalConstantBooleanvEXT;
    01568     PFNGLGETLOCALCONSTANTINTEGERVEXTPROC                                glGetLocalConstantIntegervEXT;
    01569     PFNGLGETLOCALCONSTANTFLOATVEXTPROC                                  glGetLocalConstantFloatvEXT;
    01571     PFNGLVERTEXSTREAM1SATIPROC                                          glVertexStream1sATI;
    01572     PFNGLVERTEXSTREAM1SVATIPROC                                         glVertexStream1svATI;
    01573     PFNGLVERTEXSTREAM1IATIPROC                                          glVertexStream1iATI;
    01574     PFNGLVERTEXSTREAM1IVATIPROC                                         glVertexStream1ivATI;
    01575     PFNGLVERTEXSTREAM1FATIPROC                                          glVertexStream1fATI;
    01576     PFNGLVERTEXSTREAM1FVATIPROC                                         glVertexStream1fvATI;
    01577     PFNGLVERTEXSTREAM1DATIPROC                                          glVertexStream1dATI;
    01578     PFNGLVERTEXSTREAM1DVATIPROC                                         glVertexStream1dvATI;
    01579     PFNGLVERTEXSTREAM2SATIPROC                                          glVertexStream2sATI;
    01580     PFNGLVERTEXSTREAM2SVATIPROC                                         glVertexStream2svATI;
    01581     PFNGLVERTEXSTREAM2IATIPROC                                          glVertexStream2iATI;
    01582     PFNGLVERTEXSTREAM2IVATIPROC                                         glVertexStream2ivATI;
    01583     PFNGLVERTEXSTREAM2FATIPROC                                          glVertexStream2fATI;
    01584     PFNGLVERTEXSTREAM2FVATIPROC                                         glVertexStream2fvATI;
    01585     PFNGLVERTEXSTREAM2DATIPROC                                          glVertexStream2dATI;
    01586     PFNGLVERTEXSTREAM2DVATIPROC                                         glVertexStream2dvATI;
    01587     PFNGLVERTEXSTREAM3SATIPROC                                          glVertexStream3sATI;
    01588     PFNGLVERTEXSTREAM3SVATIPROC                                         glVertexStream3svATI;
    01589     PFNGLVERTEXSTREAM3IATIPROC                                          glVertexStream3iATI;
    01590     PFNGLVERTEXSTREAM3IVATIPROC                                         glVertexStream3ivATI;
    01591     PFNGLVERTEXSTREAM3FATIPROC                                          glVertexStream3fATI;
    01592     PFNGLVERTEXSTREAM3FVATIPROC                                         glVertexStream3fvATI;
    01593     PFNGLVERTEXSTREAM3DATIPROC                                          glVertexStream3dATI;
    01594     PFNGLVERTEXSTREAM3DVATIPROC                                         glVertexStream3dvATI;
    01595     PFNGLVERTEXSTREAM4SATIPROC                                          glVertexStream4sATI;
    01596     PFNGLVERTEXSTREAM4SVATIPROC                                         glVertexStream4svATI;
    01597     PFNGLVERTEXSTREAM4IATIPROC                                          glVertexStream4iATI;
    01598     PFNGLVERTEXSTREAM4IVATIPROC                                         glVertexStream4ivATI;
    01599     PFNGLVERTEXSTREAM4FATIPROC                                          glVertexStream4fATI;
    01600     PFNGLVERTEXSTREAM4FVATIPROC                                         glVertexStream4fvATI;
    01601     PFNGLVERTEXSTREAM4DATIPROC                                          glVertexStream4dATI;
    01602     PFNGLVERTEXSTREAM4DVATIPROC                                         glVertexStream4dvATI;
    01603     PFNGLNORMALSTREAM3BATIPROC                                          glNormalStream3bATI;
    01604     PFNGLNORMALSTREAM3BVATIPROC                                         glNormalStream3bvATI;
    01605     PFNGLNORMALSTREAM3SATIPROC                                          glNormalStream3sATI;
    01606     PFNGLNORMALSTREAM3SVATIPROC                                         glNormalStream3svATI;
    01607     PFNGLNORMALSTREAM3IATIPROC                                          glNormalStream3iATI;
    01608     PFNGLNORMALSTREAM3IVATIPROC                                         glNormalStream3ivATI;
    01609     PFNGLNORMALSTREAM3FATIPROC                                          glNormalStream3fATI;
    01610     PFNGLNORMALSTREAM3FVATIPROC                                         glNormalStream3fvATI;
    01611     PFNGLNORMALSTREAM3DATIPROC                                          glNormalStream3dATI;
    01612     PFNGLNORMALSTREAM3DVATIPROC                                         glNormalStream3dvATI;
    01613     PFNGLCLIENTACTIVEVERTEXSTREAMATIPROC                                glClientActiveVertexStreamATI;
    01614     PFNGLVERTEXBLENDENVIATIPROC                                         glVertexBlendEnviATI;
    01615     PFNGLVERTEXBLENDENVFATIPROC                                         glVertexBlendEnvfATI;
    01617     PFNGLELEMENTPOINTERATIPROC                                          glElementPointerATI;
    01618     PFNGLDRAWELEMENTARRAYATIPROC                                        glDrawElementArrayATI;
    01619     PFNGLDRAWRANGEELEMENTARRAYATIPROC                                   glDrawRangeElementArrayATI;
    01621     PFNGLDRAWMESHARRAYSSUNPROC                                          glDrawMeshArraysSUN;
    01623     PFNGLGENOCCLUSIONQUERIESNVPROC                                      glGenOcclusionQueriesNV;
    01624     PFNGLDELETEOCCLUSIONQUERIESNVPROC                                   glDeleteOcclusionQueriesNV;
    01625     PFNGLISOCCLUSIONQUERYNVPROC                                         glIsOcclusionQueryNV;
    01626     PFNGLBEGINOCCLUSIONQUERYNVPROC                                      glBeginOcclusionQueryNV;
    01627     PFNGLENDOCCLUSIONQUERYNVPROC                                        glEndOcclusionQueryNV;
    01628     PFNGLGETOCCLUSIONQUERYIVNVPROC                                      glGetOcclusionQueryivNV;
    01629     PFNGLGETOCCLUSIONQUERYUIVNVPROC                                     glGetOcclusionQueryuivNV;
    01631     PFNGLPOINTPARAMETERINVPROC                                          glPointParameteriNV;
    01632     PFNGLPOINTPARAMETERIVNVPROC                                         glPointParameterivNV;
    01634     PFNGLACTIVESTENCILFACEEXTPROC                                       glActiveStencilFaceEXT;
    01636     PFNGLDRAWBUFFERSATIPROC                                             glDrawBuffersATI;
    01638     PFNGLPROGRAMNAMEDPARAMETER4FNVPROC                                  glProgramNamedParameter4fNV;
    01639     PFNGLPROGRAMNAMEDPARAMETER4DNVPROC                                  glProgramNamedParameter4dNV;
    01640     PFNGLPROGRAMNAMEDPARAMETER4FVNVPROC                                 glProgramNamedParameter4fvNV;
    01641     PFNGLPROGRAMNAMEDPARAMETER4DVNVPROC                                 glProgramNamedParameter4dvNV;
    01642     PFNGLGETPROGRAMNAMEDPARAMETERFVNVPROC                               glGetProgramNamedParameterfvNV;
    01643     PFNGLGETPROGRAMNAMEDPARAMETERDVNVPROC                               glGetProgramNamedParameterdvNV;
    01645     PFNGLVERTEX2HNVPROC                                                 glVertex2hNV;
    01646     PFNGLVERTEX2HVNVPROC                                                glVertex2hvNV;
    01647     PFNGLVERTEX3HNVPROC                                                 glVertex3hNV;
    01648     PFNGLVERTEX3HVNVPROC                                                glVertex3hvNV;
    01649     PFNGLVERTEX4HNVPROC                                                 glVertex4hNV;
    01650     PFNGLVERTEX4HVNVPROC                                                glVertex4hvNV;
    01651     PFNGLNORMAL3HNVPROC                                                 glNormal3hNV;
    01652     PFNGLNORMAL3HVNVPROC                                                glNormal3hvNV;
    01653     PFNGLCOLOR3HNVPROC                                                  glColor3hNV;
    01654     PFNGLCOLOR3HVNVPROC                                                 glColor3hvNV;
    01655     PFNGLCOLOR4HNVPROC                                                  glColor4hNV;
    01656     PFNGLCOLOR4HVNVPROC                                                 glColor4hvNV;
    01657     PFNGLTEXCOORD1HNVPROC                                               glTexCoord1hNV;
    01658     PFNGLTEXCOORD1HVNVPROC                                              glTexCoord1hvNV;
    01659     PFNGLTEXCOORD2HNVPROC                                               glTexCoord2hNV;
    01660     PFNGLTEXCOORD2HVNVPROC                                              glTexCoord2hvNV;
    01661     PFNGLTEXCOORD3HNVPROC                                               glTexCoord3hNV;
    01662     PFNGLTEXCOORD3HVNVPROC                                              glTexCoord3hvNV;
    01663     PFNGLTEXCOORD4HNVPROC                                               glTexCoord4hNV;
    01664     PFNGLTEXCOORD4HVNVPROC                                              glTexCoord4hvNV;
    01665     PFNGLMULTITEXCOORD1HNVPROC                                          glMultiTexCoord1hNV;
    01666     PFNGLMULTITEXCOORD1HVNVPROC                                         glMultiTexCoord1hvNV;
    01667     PFNGLMULTITEXCOORD2HNVPROC                                          glMultiTexCoord2hNV;
    01668     PFNGLMULTITEXCOORD2HVNVPROC                                         glMultiTexCoord2hvNV;
    01669     PFNGLMULTITEXCOORD3HNVPROC                                          glMultiTexCoord3hNV;
    01670     PFNGLMULTITEXCOORD3HVNVPROC                                         glMultiTexCoord3hvNV;
    01671     PFNGLMULTITEXCOORD4HNVPROC                                          glMultiTexCoord4hNV;
    01672     PFNGLMULTITEXCOORD4HVNVPROC                                         glMultiTexCoord4hvNV;
    01673     PFNGLFOGCOORDHNVPROC                                                glFogCoordhNV;
    01674     PFNGLFOGCOORDHVNVPROC                                               glFogCoordhvNV;
    01675     PFNGLSECONDARYCOLOR3HNVPROC                                         glSecondaryColor3hNV;
    01676     PFNGLSECONDARYCOLOR3HVNVPROC                                        glSecondaryColor3hvNV;
    01677     PFNGLVERTEXWEIGHTHNVPROC                                            glVertexWeighthNV;
    01678     PFNGLVERTEXWEIGHTHVNVPROC                                           glVertexWeighthvNV;
    01679     PFNGLVERTEXATTRIB1HNVPROC                                           glVertexAttrib1hNV;
    01680     PFNGLVERTEXATTRIB1HVNVPROC                                          glVertexAttrib1hvNV;
    01681     PFNGLVERTEXATTRIB2HNVPROC                                           glVertexAttrib2hNV;
    01682     PFNGLVERTEXATTRIB2HVNVPROC                                          glVertexAttrib2hvNV;
    01683     PFNGLVERTEXATTRIB3HNVPROC                                           glVertexAttrib3hNV;
    01684     PFNGLVERTEXATTRIB3HVNVPROC                                          glVertexAttrib3hvNV;
    01685     PFNGLVERTEXATTRIB4HNVPROC                                           glVertexAttrib4hNV;
    01686     PFNGLVERTEXATTRIB4HVNVPROC                                          glVertexAttrib4hvNV;
    01687     PFNGLVERTEXATTRIBS1HVNVPROC                                         glVertexAttribs1hvNV;
    01688     PFNGLVERTEXATTRIBS2HVNVPROC                                         glVertexAttribs2hvNV;
    01689     PFNGLVERTEXATTRIBS3HVNVPROC                                         glVertexAttribs3hvNV;
    01690     PFNGLVERTEXATTRIBS4HVNVPROC                                         glVertexAttribs4hvNV;
    01692     PFNGLPIXELDATARANGENVPROC                                           glPixelDataRangeNV;
    01693     PFNGLFLUSHPIXELDATARANGENVPROC                                      glFlushPixelDataRangeNV;
    01695     PFNGLPRIMITIVERESTARTNVPROC                                         glPrimitiveRestartNV;
    01696     PFNGLPRIMITIVERESTARTINDEXNVPROC                                    glPrimitiveRestartIndexNV;
    01698     PFNGLMAPOBJECTBUFFERATIPROC                                         glMapObjectBufferATI;
    01699     PFNGLUNMAPOBJECTBUFFERATIPROC                                       glUnmapObjectBufferATI;
    01701     PFNGLSTENCILOPSEPARATEATIPROC                                       glStencilOpSeparateATI;
    01702     PFNGLSTENCILFUNCSEPARATEATIPROC                                     glStencilFuncSeparateATI;
    01704     PFNGLVERTEXATTRIBARRAYOBJECTATIPROC                                 glVertexAttribArrayObjectATI;
    01705     PFNGLGETVERTEXATTRIBARRAYOBJECTFVATIPROC                            glGetVertexAttribArrayObjectfvATI;
    01706     PFNGLGETVERTEXATTRIBARRAYOBJECTIVATIPROC                            glGetVertexAttribArrayObjectivATI;
    01707
    01708     // FBO                                                                                                                          /*! BindFramebufferEXT OGL function */
    01709     PFNGLBINDFRAMEBUFFEREXTPROC                                         glBindFramebufferEXT;
    01710     PFNGLDELETEFRAMEBUFFERSEXTPROC                                      glDeleteFramebuffersEXT;
    01711     PFNGLDELETERENDERBUFFERSEXTPROC                                     glDeleteRenderbuffersEXT;
    01712     PFNGLGENFRAMEBUFFERSEXTPROC                                         glGenFramebuffersEXT;
    01713     PFNGLGENRENDERBUFFERSEXTPROC                                        glGenRenderbuffersEXT;
    01714
    01715     // VBO / PBO                                                                                                                    /*! GetBufferPointervARB OGL function   */
    01716     PFNGLGETBUFFERPOINTERVARBPROC                                       glGetBufferPointervARB;
    01717     PFNGLBINDBUFFERARBPROC                                              glBindBufferARB;
    01718     PFNGLBUFFERDATAARBPROC                                              glBufferDataARB;
    01719     PFNGLDELETEBUFFERSARBPROC                                           glDeleteBuffersARB;
    01720     PFNGLGENBUFFERSARBPROC                                              glGenBuffersARB;
    01721     PFNGLISBUFFERARBPROC                                                glIsBufferARB;
    01722     PFNGLMAPBUFFERARBPROC                                               glMapBufferARB;
    01723     PFNGLUNMAPBUFFERARBPROC                                             glUnmapBufferARB;
    01724     PFNGLGETBUFFERPARAMETERIVARBPROC                                    glGetBufferParameterivARB;
    01725
    01726     // GLSL                                                                                                                         /*! AttachObjectARB OGL function    */
    01727     PFNGLATTACHOBJECTARBPROC                                            glAttachObjectARB;
    01728     PFNGLCOMPILESHADERARBPROC                                           glCompileShaderARB;
    01729     PFNGLCREATEPROGRAMOBJECTARBPROC                                     glCreateProgramObjectARB;
    01730     PFNGLCREATESHADEROBJECTARBPROC                                      glCreateShaderObjectARB;
    01731     PFNGLDELETEOBJECTARBPROC                                            glDeleteObjectARB;
    01732     PFNGLDETACHOBJECTARBPROC                                            glDetachObjectARB;
    01733     PFNGLGETACTIVEUNIFORMARBPROC                                        glGetActiveUniformARB;
    01734     PFNGLGETATTACHEDOBJECTSARBPROC                                      glGetAttachedObjectsARB;
    01735     PFNGLGETHANDLEARBPROC                                               glGetHandleARB;
    01736     PFNGLGETINFOLOGARBPROC                                              glGetInfoLogARB;
    01737     PFNGLGETOBJECTPARAMETERFVARBPROC                                    glGetObjectParameterfvARB;
    01738     PFNGLGETOBJECTPARAMETERIVARBPROC                                    glGetObjectParameterivARB;
    01739     PFNGLGETSHADERSOURCEARBPROC                                         glGetShaderSourceARB;
    01740     PFNGLGETUNIFORMLOCATIONARBPROC                                      glGetUniformLocationARB;
    01741     PFNGLGETUNIFORMFVARBPROC                                            glGetUniformfvARB;
    01742     PFNGLGETUNIFORMIVARBPROC                                            glGetUniformivARB;
    01743     PFNGLLINKPROGRAMARBPROC                                             glLinkProgramARB;
    01744     PFNGLSHADERSOURCEARBPROC                                            glShaderSourceARB;
    01745     PFNGLUNIFORM1FARBPROC                                               glUniform1fARB;
    01746     PFNGLUNIFORM1FVARBPROC                                              glUniform1fvARB;
    01747     PFNGLUNIFORM1IARBPROC                                               glUniform1iARB;
    01748     PFNGLUNIFORM1IVARBPROC                                              glUniform1ivARB;
    01749     PFNGLUNIFORM2FARBPROC                                               glUniform2fARB;
    01750     PFNGLUNIFORM2FVARBPROC                                              glUniform2fvARB;
    01751     PFNGLUNIFORM2IARBPROC                                               glUniform2iARB;
    01752     PFNGLUNIFORM2IVARBPROC                                              glUniform2ivARB;
    01753     PFNGLUNIFORM3FARBPROC                                               glUniform3fARB;
    01754     PFNGLUNIFORM3FVARBPROC                                              glUniform3fvARB;
    01755     PFNGLUNIFORM3IARBPROC                                               glUniform3iARB;
    01756     PFNGLUNIFORM3IVARBPROC                                              glUniform3ivARB;
    01757     PFNGLUNIFORM4FARBPROC                                               glUniform4fARB;
    01758     PFNGLUNIFORM4FVARBPROC                                              glUniform4fvARB;
    01759     PFNGLUNIFORM4IARBPROC                                               glUniform4iARB;
    01760     PFNGLUNIFORM4IVARBPROC                                              glUniform4ivARB;
    01761     PFNGLUNIFORMMATRIX2FVARBPROC                                        glUniformMatrix2fvARB;
    01762     PFNGLUNIFORMMATRIX3FVARBPROC                                        glUniformMatrix3fvARB;
    01763     PFNGLUNIFORMMATRIX4FVARBPROC                                        glUniformMatrix4fvARB;
    01764     PFNGLUSEPROGRAMOBJECTARBPROC                                        glUseProgramObjectARB;
    01765     PFNGLVALIDATEPROGRAMARBPROC                                         glValidateProgramARB;
    01766     PFNGLISPROGRAMARBPROC                                               glIsProgramARB;
    01768     PFNGLGENQUERIESARBPROC                                              glGenQueriesARB;
    01769     PFNGLDELETEQUERIESARBPROC                                           glDeleteQueriesARB;
    01770     PFNGLISQUERYARBPROC                                                 glIsQueryARB;
    01771     PFNGLBEGINQUERYARBPROC                                              glBeginQueryARB;
    01772     PFNGLENDQUERYARBPROC                                                glEndQueryARB;
    01773     PFNGLGETQUERYIVARBPROC                                              glGetQueryivARB;
    01774     PFNGLGETQUERYOBJECTIVARBPROC                                        glGetQueryObjectivARB;
    01775     PFNGLGETQUERYOBJECTUIVARBPROC                                       glGetQueryObjectuivARB;
    01776
    01777
    01778 } XGSGLExtensionsFuncs;
    01779
    01780 //***************************************************************************************
    01781 // Forward decls
    01782 //***************************************************************************************
    01783 class IRTSExecutionState ;
    01784
    01785 //***************************************************************************************
    01786 // Structures
    01787 //***************************************************************************************
    01788
    01796 typedef struct tagXSI_RTS_Light
    01797 {
    01798     float                   m_fRed;
    01799     float                   m_fGreen;
    01800     float                   m_fBlue;
    01801     float                   m_fAlpha;
    01803     float                   m_fPosX;
    01804     float                   m_fPosY;
    01805     float                   m_fPosZ;
    01806     float                   m_fPosW;
    01808     float                   m_fDirX;
    01809     float                   m_fDirY;
    01810     float                   m_fDirZ;
    01812     float                   m_fConeAngle;
    01814     int                     m_iID;
    01815     char*                   m_pchID;
    01817     eXSI_RTS_LightType      m_eType;
    01819     bool                    m_bCastsShadows;
    01821     bool                    m_bVisible;
    01822
    01823 } XSI_RTS_Light;
    01824
    01832 typedef struct tagXSI_RTS_Camera
    01833 {
    01834     float                   m_mMatrix[16];
    01835     eXSI_RTS_CameraType     m_eCameraType;
    01837     float                   m_fRight;
    01838     float                   m_fLeft;
    01839     float                   m_fTop;
    01840     float                   m_fBottom;
    01842     float                   m_fNear;
    01843     float                   m_fFar;
    01845     float                   m_fFOV;
    01847     float                   m_fAspect;
    01848 } XSI_RTS_Camera;
    01849
    01850
    01859 typedef struct tagXSI_RTS_SceneData
    01860 {
    01861     int                         m_iNbLights;
    01862     XSI_RTS_Light*              m_pLights;
    01864     XSI_RTS_Camera              m_sCamera;
    01866     double                      m_fCurrentTime;
    01867 } XSI_RTS_SceneData;
    01868
    01900 typedef struct tagXSI_RTS_SystemParams
    01901 {
    01902     ULONG                       m_lNbParams;
    01904     ULONG                       m_lAppID;
    01905     ULONG                       m_lRTSVersion;
    01906     RTSContext                  m_lContext;
    01908     void                        *m_pShaderHandle;
    01909     void                        *m_pObjectHandle;
    01910     void                        *m_pMaterialHandle;
    01912     void                        *m_pGS;
    01913     XGSExtensionsGL             *m_pGLExt;
    01914     XGSGLExtensionsFuncs        *m_pGLExtFuncs;
    01916     ULONG                       m_lShaderFlags;
    01917     ULONG                       m_lObjectFlags;
    01919     float                       m_m4x4ObjectPose[16];
    01921     XSI_RTS_SceneData           *m_SceneData;
    01922 } XSI_RTS_SystemParams;
    01923
    01941 typedef struct tagXSI_RTS_TriangleList
    01942 {
    01943     ULONG           m_lOffset;
    01944     ULONG           m_lNbVertices;
    01945     ULONG           m_lType;
    01946     ULONG           m_lMinIndex;
    01947     ULONG           m_lMaxIndex;
    01948
    01949     // The following fields are added in order for the XSI_RTS_TriangleList to
    01950     // use the same amound of memory as a C3DStrip<TvCoord, TNormal, TColor, TTCCord>
    01951     // object.  This enables to cast a array of one type into a array of the other
    01952     // type without problems.  This is used in C3DDrawObject<TVcoord, TNormal, TColor, TTcoord>::RealtimeShaderDraw
    01953     // for example.
    01955     void *          m_pReserved0;
    01956     void *          m_pReserved1;
    01957     void *          m_pReserved2;
    01958     ULONG           m_lReserved3;
    01959 } XSI_RTS_TriangleList;
    01960
    01969 typedef struct tagXSI_RTS_Primitive
    01970 {
    01971     eXSI_RTS_PrimitiveType  m_Type;
    01972     void*                   m_pIndices;
    01973     int                     m_iIndicesWidth;
    01974     ULONG                   m_ulNbIndices;
    01975     ULONG                   m_ulBaseOffset;
    01976     ULONG                   m_NbVertices;
    01977 } XSI_RTS_Primitive;
    01978
    01979 typedef struct tagXSI_RTS_SasCamera
    01980 {
    01981     float m_WorldToView[4][4];
    01982     float m_Projection[4][4];
    01983     float m_NearFarClipping[2];
    01984     float m_Position[3];
    01985 } XSI_RTS_SasCamera;
    01986
    01987 typedef struct tagXSI_RTS_SasAmbientLight
    01988 {
    01989     float m_Color[3];         // default: {0, 0, 0}
    01990 } XSI_RTS_SasAmbientLight;
    01991
    01992 typedef struct tagXSI_RTS_SasDirectionalLight
    01993 {
    01994     float m_Color[3];         // default: {0, 0, 0}
    01995     float m_Direction[3];     // default: {0, 0, 0}
    01996 } XSI_RTS_SasDirectionalLight;
    01997
    01998 typedef struct tagXSI_RTS_SasPointLight
    01999 {
    02000     float m_Color[3];         // default: {0, 0, 0}
    02001     float m_Position[3];      // default: {0, 0, 0}
    02002     float m_Range;            // default: 0
    02003 } XSI_RTS_SasPointLight;
    02004
    02005 typedef struct tagXSI_RTS_SasSpotLight
    02006 {
    02007     float m_Color[3];         // default: {0, 0, 0}
    02008     float m_Position[3];      // default: {0, 0, 0}
    02009     float m_Direction[3];     // default: {0, 0, 0}
    02010     float m_Range;            // default: 0
    02011     float m_Theta;            // default: 0
    02012     float m_Phi;              // default: 0
    02013 } XSI_RTS_SasSpotLight;
    02014
    02015 #define MAX_SAS_LIGHTS  256
    02016
    02017 typedef struct tagXSI_RTS_FXSemantics
    02018 {
    02019     // the matrices
    02020     float   m_World[4][4];
    02021     float   m_WorldI[4][4];
    02022     float   m_WorldT[4][4];
    02023     float   m_WorldIT[4][4];
    02024
    02025     float   m_WorldView[4][4];
    02026     float   m_WorldViewI[4][4];
    02027     float   m_WorldViewT[4][4];
    02028     float   m_WorldViewIT[4][4];
    02029
    02030     float   m_WorldViewProj[4][4];
    02031     float   m_WorldViewProjI[4][4];
    02032     float   m_WorldViewProjT[4][4];
    02033     float   m_WorldViewProjIT[4][4];
    02034
    02035     float   m_View[4][4];
    02036     float   m_ViewI[4][4];
    02037     float   m_ViewT[4][4];
    02038     float   m_ViewIT[4][4];
    02039
    02040     float   m_Proj[4][4];
    02041     float   m_ProjI[4][4];
    02042     float   m_ProjT[4][4];
    02043     float   m_ProjIT[4][4];
    02044
    02045     // vectors
    02046     float   m_CameraPos[4];
    02047     float   m_CameraNearFar[4];
    02048
    02049     // scalars
    02050     float   m_TimeNow[1];
    02051     float   m_TimeLast[1];
    02052     float   m_TimeFrameNumber[1];
    02053     float   m_NumAmbientLights[1];
    02054     float   m_NumDirectionalLights[1];
    02055     float   m_NumPointLights[1];
    02056     float   m_NumSpotLights[1];
    02057
    02058     // structures
    02059     XSI_RTS_SasCamera               m_SasCamera[1];
    02060     XSI_RTS_SasAmbientLight         m_AmbientLights[MAX_SAS_LIGHTS];
    02061     XSI_RTS_SasDirectionalLight     m_DirectionalLights[MAX_SAS_LIGHTS];
    02062     XSI_RTS_SasPointLight           m_PointLights[MAX_SAS_LIGHTS];
    02063     XSI_RTS_SasSpotLight            m_SpotLights[MAX_SAS_LIGHTS];
    02064 /*
    02065     int     m_MaxAmbientLights;
    02066     int     m_MaxDirectionalLights;
    02067     int     m_MaxPointLights;
    02068     int     m_MaxSpotLights;
    02069 */
    02070 } XSI_RTS_FXSemantics;
    02071
    02072 typedef struct tagXSI_RTS_FXSemantics_Param
    02073 {
    02074     void*   m_pSourceParam;
    02075     void*   m_pDestParam;
    02076 } XSI_RTS_FXSemantics_Param;
    02077
    02078 typedef struct tagXSI_RTS_FXSemantics_inuse
    02079 {
    02080     // the matrices
    02081     bool    m_World;
    02082     bool    m_WorldI;
    02083     bool    m_WorldT;
    02084     bool    m_WorldIT;
    02085
    02086     bool    m_WorldView;
    02087     bool    m_WorldViewI;
    02088     bool    m_WorldViewT;
    02089     bool    m_WorldViewIT;
    02090
    02091     bool    m_WorldViewProj;
    02092     bool    m_WorldViewProjI;
    02093     bool    m_WorldViewProjT;
    02094     bool    m_WorldViewProjIT;
    02095
    02096     bool    m_View;
    02097     bool    m_ViewI;
    02098     bool    m_ViewT;
    02099     bool    m_ViewIT;
    02100
    02101     bool    m_Proj;
    02102     bool    m_ProjI;
    02103     bool    m_ProjT;
    02104     bool    m_ProjIT;
    02105
    02106     // vectors
    02107     bool    m_CameraPos;
    02108     bool    m_CameraNearFar;
    02109
    02110     // scalars
    02111     bool    m_TimeNow;
    02112     bool    m_TimeLast;
    02113     bool    m_TimeFrameNumber;
    02114     bool    m_NumAmbientLights;
    02115     bool    m_NumDirectionalLights;
    02116     bool    m_NumPointLights;
    02117     bool    m_NumSpotLights;
    02118
    02119     // structures
    02120     bool    m_SasCamera;
    02121     bool    m_AmbientLights;
    02122     bool    m_DirectionalLights;
    02123     bool    m_PointLights;
    02124     bool    m_SpotLights;
    02125
    02126     // last time
    02127     float   m_LastTime;
    02128
    02129     // table of parameters to bind
    02130     CSIBCArray<XSI_RTS_FXSemantics_Param>   m_Params;
    02131
    02132 } XSI_RTS_FXSemantics_inuse;
    02133
    02140 enum eErrorType
    02141 {
    02142     Info = 0,
    02143     Warning,
    02144     Error
    02145 };
    02150 //***************************************************************************************
    02151 // Entry points
    02152 //***************************************************************************************
    02153
    02154 //***************************************************************************************
    02155 //  PostFix     : _Init
    02156 //  Called      : when the shader is created
    02157 //  Mandatory   : No
    02158 //
    02159 //***************************************************************************************
    02160 typedef     RTSHADER_API bool (*RTS_Shader2_Init)
    02161 (
    02162     XSI_RTS_SystemParams            *in_pSysParams,
    02163     void                            *in_pParams,
    02164     void                            **io_pShaderInstanceData
    02165 );
    02166
    02167 //***************************************************************************************
    02168 //  PostFix     : _Term
    02169 //  Called      : when the shader is deleted
    02170 //  Mandatory   : No
    02171 //
    02172 //***************************************************************************************
    02173 typedef     RTSHADER_API bool (*RTS_Shader2_Term)
    02174 (
    02175     XSI_RTS_SystemParams            *in_pSysParams,
    02176     void                            *in_pParams,
    02177     void                            **io_pShaderInstanceData
    02178 );
    02179
    02180 //***************************************************************************************
    02181 //  PostFix     : _GetRequirements
    02182 //  Called      : At various places
    02183 //  Mandatory   : No
    02184 //
    02185 //***************************************************************************************
    02186 typedef     RTSHADER_API bool (*RTS_Shader2_GetRequirements)
    02187 (
    02188     XSI_RTS_SystemParams            *in_pSysParams,
    02189     void                            *in_pParams,
    02190     XSI_RTS_Primitive               *in_pGeom,
    02191     void                            **io_pShaderInstanceData,
    02192     ULONG                   in_lRequirement,
    02193     ULONG                   *out_pRequirementValue
    02194 );
    02195
    02196 //***************************************************************************************
    02197 //  PostFix     : _Execute
    02198 //  Called      : on every refresh for every object that own the shader
    02199 //  Mandatory   : Yes
    02200 //
    02201 //***************************************************************************************
    02202 typedef     RTSHADER_API bool (*RTS_Shader2_Execute)
    02203 (
    02204     XSI_RTS_SystemParams            *in_pSysParams,
    02205     void                            *in_pParams,
    02206     void                            *in_pBackcomp,
    02207     void                            **io_pShaderInstanceData
    02208 );
    02209
    02210 //***************************************************************************************
    02211 //  Called      : one per DLL
    02212 //  Mandatory   : Yes
    02213 //
    02214 //***************************************************************************************
    02228 typedef     RTSHADER_API ULONG (*RTS_Shader2_GetVersion)();
    02229
    02230 enum XSI_RTS_PPG_TYPES
    02231 {
    02232     XSI_RTS_SCALAR,
    02233     XSI_RTS_STRING,
    02234     XSI_RTS_IMAGE,
    02235     XSI_RTS_TSPACE,
    02236     XSI_RTS_CSPACE,
    02237 };
    02238
    02239 typedef struct
    02240 {
    02241     char                *m_pName;
    02242     XSI_RTS_PPG_TYPES   m_type;
    02243 } ShaderParamDefinition;
    02244
    02245 typedef struct
    02246 {
    02247     char                    *m_pProgID;
    02248     char                    *m_pModule;
    02249     char                    *m_pPrefix;
    02250     int                     m_pNbParams;
    02251     ShaderParamDefinition   *m_ShaderParams;
    02252 } ShaderDefinition;
    02253
    02254 typedef     RTSHADER_API int (*RTS2_GetNumberOfShadersFunc)();
    02255 typedef     RTSHADER_API ShaderDefinition * (*RTS2_GetShaderDefinitionFunc)(int in_nIndex);
    02256
    02257
    02258 //***************************************************************************************
    02259 // Inlined functionality
    02260 //***************************************************************************************
    02261
    02262 #define XSI_RTS_EPS     1.0e-3
    02263
    02264 inline void   XSI_RTS_MatrixTranspose(float in_pSrcM4x4[4][4], float in_pDstM4x4[4][4])
    02265 {
    02266     float   tmpMatrix[4][4];
    02267
    02268     memcpy(tmpMatrix, in_pSrcM4x4, sizeof(float) * 16);
    02269     in_pDstM4x4[0][0] = tmpMatrix[0][0];
    02270     in_pDstM4x4[0][1] = tmpMatrix[1][0];
    02271     in_pDstM4x4[0][2] = tmpMatrix[2][0];
    02272     in_pDstM4x4[0][3] = tmpMatrix[3][0];
    02273
    02274     in_pDstM4x4[1][0] = tmpMatrix[0][1];
    02275     in_pDstM4x4[1][1] = tmpMatrix[1][1];
    02276     in_pDstM4x4[1][2] = tmpMatrix[2][1];
    02277     in_pDstM4x4[1][3] = tmpMatrix[3][1];
    02278
    02279     in_pDstM4x4[2][0] = tmpMatrix[0][2];
    02280     in_pDstM4x4[2][1] = tmpMatrix[1][2];
    02281     in_pDstM4x4[2][2] = tmpMatrix[2][2];
    02282     in_pDstM4x4[2][3] = tmpMatrix[3][2];
    02283
    02284     in_pDstM4x4[3][0] = tmpMatrix[0][3];
    02285     in_pDstM4x4[3][1] = tmpMatrix[1][3];
    02286     in_pDstM4x4[3][2] = tmpMatrix[2][3];
    02287     in_pDstM4x4[3][3] = tmpMatrix[3][3];
    02288 }
    02289
    02290 inline bool   XSI_RTS_MatrixInvert(float in_pSrcM4x4[4][4], float in_pDstM4x4[4][4])
    02291 {
    02292
    02293     float   sys[ 4 ][ 8 ] =
    02294     {
    02295         1,0,0,0,1,0,0,0,
    02296         0,1,0,0,0,1,0,0,
    02297         0,0,1,0,0,0,1,0,
    02298         0,0,0,1,0,0,0,1
    02299     };
    02300
    02301     int     i,  j,  k;
    02302     float   temp;
    02303
    02304
    02305     memcpy(sys[0], in_pSrcM4x4[0], sizeof(float) * 4);
    02306     memcpy(sys[1], in_pSrcM4x4[1], sizeof(float) * 4);
    02307     memcpy(sys[2], in_pSrcM4x4[2], sizeof(float) * 4);
    02308     memcpy(sys[3], in_pSrcM4x4[3], sizeof(float) * 4);
    02309
    02310     for( j = 0; j < 4; j++ )
    02311     {
    02312         if( fabs( sys[ j ][ j ] ) < XSI_RTS_EPS )
    02313         {
    02314             for( i = j + 1; ( i < 4 ) && ( fabs ( sys[ i ][ j ] ) < XSI_RTS_EPS ); i++ );
    02315
    02316             if( i == 4 )
    02317                 return( false );
    02318             else
    02319                 for( k = 0; k < 8; k++ )
    02320                 {
    02321                     temp = sys[ i ][ k ];
    02322                     sys[ i ][ k ] = sys[ j ][ k ];
    02323                     sys[ j ][ k ] = temp;
    02324                 }
    02325         }
    02326
    02327         temp = 1.0f / sys[ j ][ j ];
    02328
    02329         for( i = 0; i < 8; i++ )
    02330             sys[ j ][ i ] *= temp;
    02331
    02332         for( i = 0; i < 4; i++ )
    02333         {
    02334             if( i != j )
    02335             {
    02336                 temp = - sys[ i ][ j ];
    02337                 for( k = 0; k < 8; k++ )
    02338                 {
    02339                     sys[ i ][ k ] += sys[ j ][ k ] * temp;
    02340                 }
    02341             }
    02342         }
    02343     }
    02344
    02345     memcpy(in_pDstM4x4[0], &(sys[0][4]), sizeof(float) * 4);
    02346     memcpy(in_pDstM4x4[1], &(sys[1][4]), sizeof(float) * 4);
    02347     memcpy(in_pDstM4x4[2], &(sys[2][4]), sizeof(float) * 4);
    02348     memcpy(in_pDstM4x4[3], &(sys[3][4]), sizeof(float) * 4);
    02349
    02350     return true;
    02351 }
    02352
    02353 inline void XSI_RTS_MatrixMultiply(float in_pSrc1M4x4[4][4], float in_pSrc2M4x4[4][4], float in_pDstM4x4[4][4])
    02354 {
    02355     float *a = (float*)in_pSrc2M4x4,*b = (float*)in_pSrc1M4x4,*c = (float*)in_pDstM4x4;
    02356
    02357     *c = b[0]*a[0] + b[1]*a[4] + b[2]*a[8] + b[3]*a[12];   c++;
    02358     *c = b[0]*a[1] + b[1]*a[5] + b[2]*a[9] + b[3]*a[13];   c++;
    02359     *c = b[0]*a[2] + b[1]*a[6] + b[2]*a[10] + b[3]*a[14];   c++;
    02360     *c = b[0]*a[3] + b[1]*a[7] + b[2]*a[11] + b[3]*a[15];   c++;
    02361
    02362     *c = b[4]*a[0] + b[5]*a[4] + b[6]*a[8] + b[7]*a[12];   c++;
    02363     *c = b[4]*a[1] + b[5]*a[5] + b[6]*a[9] + b[7]*a[13];   c++;
    02364     *c = b[4]*a[2] + b[5]*a[6] + b[6]*a[10] + b[7]*a[14];   c++;
    02365     *c = b[4]*a[3] + b[5]*a[7] + b[6]*a[11] + b[7]*a[15];   c++;
    02366
    02367     *c = b[8]*a[0] + b[9]*a[4] + b[10]*a[8] + b[11]*a[12];   c++;
    02368     *c = b[8]*a[1] + b[9]*a[5] + b[10]*a[9] + b[11]*a[13];   c++;
    02369     *c = b[8]*a[2] + b[9]*a[6] + b[10]*a[10] + b[11]*a[14];   c++;
    02370     *c = b[8]*a[3] + b[9]*a[7] + b[10]*a[11] + b[11]*a[15];   c++;
    02371
    02372     *c = b[12]*a[0] + b[13]*a[4] + b[14]*a[8] + b[15]*a[12];   c++;
    02373     *c = b[12]*a[1] + b[13]*a[5] + b[14]*a[9] + b[15]*a[13];   c++;
    02374     *c = b[12]*a[2] + b[13]*a[6] + b[14]*a[10] + b[15]*a[14];   c++;
    02375     *c = b[12]*a[3] + b[13]*a[7] + b[14]*a[11] + b[15]*a[15];
    02376 }
    02377
    02378 inline void XSI_RTS_InitializeSemantics_inuse(XSI_RTS_FXSemantics_inuse& in_Data)
    02379 {
    02380     memset(&in_Data, 0, sizeof(XSI_RTS_FXSemantics_inuse) - sizeof(in_Data.m_Params));
    02381     in_Data.m_Params.DisposeData();
    02382 }
    02383
    02384 inline void XSI_RTS_InitializeSemantics(XSI_RTS_FXSemantics& in_Data)
    02385 {
    02386     memset(&in_Data, 0, sizeof(XSI_RTS_FXSemantics));
    02387 }
    02388
    02389
    02390 inline bool XSI_RTS_RegisterSemanticParam
    02391 (
    02392     XSI_RTS_FXSemantics_inuse&  in_SemanticInUse,
    02393     void*                       in_pSrcParam,
    02394     void*                       in_pDstParam,
    02395     bool&                       in_pComputeFlag
    02396 )
    02397 {
    02398     LONG index;
    02399
    02400     in_SemanticInUse.m_Params.Extend(1);
    02401     index = in_SemanticInUse.m_Params.GetUsed()-1;
    02402     in_SemanticInUse.m_Params[index].m_pSourceParam = in_pSrcParam;
    02403     in_SemanticInUse.m_Params[index].m_pDestParam = in_pDstParam;
    02404     in_pComputeFlag = true;
    02405     return true;
    02406 }
    02407
    02408 inline bool XSI_RTS_RegisterSemantics
    02409 (
    02410     XSI_RTS_FXSemantics&        in_SemanticData,
    02411     XSI_RTS_FXSemantics_inuse&  in_SemanticInUse,
    02412     char*                       in_pSemanticName,
    02413     void*                       in_pParameterHandle
    02414 )
    02415 {
    02416     bool l_bRetValue = true;
    02417 /*
    02418     in_SemanticData.m_MaxAmbientLights = 0;
    02419     in_SemanticData.m_MaxDirectionalLights = 0;
    02420     in_SemanticData.m_MaxPointLights = 0;
    02421     in_SemanticData.m_MaxSpotLights = 0;
    02422 */
    02423
    02424     // big if cascade, should be easy to add stuff in there
    02425
    02426     if(_strnicmp(in_pSemanticName, "Sas.Skeleton.MeshToJointToWorld", strlen("Sas.Skeleton.MeshToJointToWorld")) == 0)
    02427     {
    02428         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_World, in_pParameterHandle, in_SemanticInUse.m_World);
    02429     }
    02430     else if(_stricmp(in_pSemanticName, "world") == 0)
    02431     {
    02432         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_World, in_pParameterHandle, in_SemanticInUse.m_World);
    02433     }
    02434     else if(_stricmp(in_pSemanticName, "worldi") == 0)
    02435     {
    02436         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_WorldI, in_pParameterHandle, in_SemanticInUse.m_WorldI);
    02437     }
    02438     else if(_stricmp(in_pSemanticName, "worldt") == 0)
    02439     {
    02440         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_WorldT, in_pParameterHandle, in_SemanticInUse.m_WorldT);
    02441     }
    02442     else if(_stricmp(in_pSemanticName, "worldit") == 0)
    02443     {
    02444         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_WorldIT, in_pParameterHandle, in_SemanticInUse.m_WorldIT);
    02445     }
    02446     else if(_stricmp(in_pSemanticName, "worldinverse") == 0)
    02447     {
    02448         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_WorldI, in_pParameterHandle, in_SemanticInUse.m_WorldI);
    02449     }
    02450     else if(_stricmp(in_pSemanticName, "worldtranspose") == 0)
    02451     {
    02452         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_WorldT, in_pParameterHandle, in_SemanticInUse.m_WorldT);
    02453     }
    02454     else if(_stricmp(in_pSemanticName, "worldinversetranspose") == 0)
    02455     {
    02456         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_WorldIT, in_pParameterHandle, in_SemanticInUse.m_WorldIT);
    02457     }
    02458     else if(_stricmp(in_pSemanticName, "model") == 0)
    02459     {
    02460         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_World, in_pParameterHandle, in_SemanticInUse.m_World);
    02461     }
    02462     else if(_stricmp(in_pSemanticName, "modeli") == 0)
    02463     {
    02464         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_WorldI, in_pParameterHandle, in_SemanticInUse.m_WorldI);
    02465     }
    02466     else if(_stricmp(in_pSemanticName, "modelt") == 0)
    02467     {
    02468         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_WorldT, in_pParameterHandle, in_SemanticInUse.m_WorldT);
    02469     }
    02470     else if(_stricmp(in_pSemanticName, "modelit") == 0)
    02471     {
    02472         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_WorldIT, in_pParameterHandle, in_SemanticInUse.m_WorldIT);
    02473     }
    02474     else if(_stricmp(in_pSemanticName, "modelinverse") == 0)
    02475     {
    02476         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_WorldI, in_pParameterHandle, in_SemanticInUse.m_WorldI);
    02477     }
    02478     else if(_stricmp(in_pSemanticName, "modeltranspose") == 0)
    02479     {
    02480         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_WorldT, in_pParameterHandle, in_SemanticInUse.m_WorldT);
    02481     }
    02482     else if(_stricmp(in_pSemanticName, "modelinversetranspose") == 0)
    02483     {
    02484         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_WorldIT, in_pParameterHandle, in_SemanticInUse.m_WorldIT);
    02485     }
    02486     else if(_stricmp(in_pSemanticName, "simodel") == 0)
    02487     {
    02488         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_World, in_pParameterHandle, in_SemanticInUse.m_World);
    02489     }
    02490     else if(_stricmp(in_pSemanticName, "simodeli") == 0)
    02491     {
    02492         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_WorldI, in_pParameterHandle, in_SemanticInUse.m_WorldI);
    02493     }
    02494     else if(_stricmp(in_pSemanticName, "simodelt") == 0)
    02495     {
    02496         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_WorldT, in_pParameterHandle, in_SemanticInUse.m_WorldT);
    02497     }
    02498     else if(_stricmp(in_pSemanticName, "simodelit") == 0)
    02499     {
    02500         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_WorldIT, in_pParameterHandle, in_SemanticInUse.m_WorldIT);
    02501     }
    02502     else if(_stricmp(in_pSemanticName, "view") == 0)
    02503     {
    02504         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_View, in_pParameterHandle, in_SemanticInUse.m_View);
    02505     }
    02506     else if(_stricmp(in_pSemanticName, "viewi") == 0)
    02507     {
    02508         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_ViewI, in_pParameterHandle, in_SemanticInUse.m_ViewI);
    02509     }
    02510     else if(_stricmp(in_pSemanticName, "viewt") == 0)
    02511     {
    02512         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_ViewT, in_pParameterHandle, in_SemanticInUse.m_ViewT);
    02513     }
    02514     else if(_stricmp(in_pSemanticName, "viewit") == 0)
    02515     {
    02516         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_ViewIT, in_pParameterHandle, in_SemanticInUse.m_ViewIT);
    02517     }
    02518     else if(_stricmp(in_pSemanticName, "viewinverse") == 0)
    02519     {
    02520         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_ViewI, in_pParameterHandle, in_SemanticInUse.m_ViewI);
    02521     }
    02522     else if(_stricmp(in_pSemanticName, "viewtranspose") == 0)
    02523     {
    02524         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_ViewT, in_pParameterHandle, in_SemanticInUse.m_ViewT);
    02525     }
    02526     else if(_stricmp(in_pSemanticName, "viewinversetranspose") == 0)
    02527     {
    02528         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_ViewIT, in_pParameterHandle, in_SemanticInUse.m_ViewIT);
    02529     }
    02530     else if(_stricmp(in_pSemanticName, "siview") == 0)
    02531     {
    02532         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_View, in_pParameterHandle, in_SemanticInUse.m_View);
    02533     }
    02534     else if(_stricmp(in_pSemanticName, "siviewi") == 0)
    02535     {
    02536         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_ViewI, in_pParameterHandle, in_SemanticInUse.m_ViewI);
    02537     }
    02538     else if(_stricmp(in_pSemanticName, "siviewt") == 0)
    02539     {
    02540         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_ViewT, in_pParameterHandle, in_SemanticInUse.m_ViewT);
    02541     }
    02542     else if(_stricmp(in_pSemanticName, "siviewit") == 0)
    02543     {
    02544         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_ViewIT, in_pParameterHandle, in_SemanticInUse.m_ViewIT);
    02545     }
    02546     else if(_stricmp(in_pSemanticName, "Sas.Camera.Projection") == 0)
    02547     {
    02548         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_Proj, in_pParameterHandle, in_SemanticInUse.m_Proj);
    02549     }
    02550     else if(_stricmp(in_pSemanticName, "projection") == 0)
    02551     {
    02552         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_Proj, in_pParameterHandle, in_SemanticInUse.m_Proj);
    02553     }
    02554     else if(_stricmp(in_pSemanticName, "projectioni") == 0)
    02555     {
    02556         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_ProjI, in_pParameterHandle, in_SemanticInUse.m_ProjI);
    02557     }
    02558     else if(_stricmp(in_pSemanticName, "projectiont") == 0)
    02559     {
    02560         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_ProjT, in_pParameterHandle, in_SemanticInUse.m_ProjT);
    02561     }
    02562     else if(_stricmp(in_pSemanticName, "projectionit") == 0)
    02563     {
    02564         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_ProjIT, in_pParameterHandle, in_SemanticInUse.m_ProjIT);
    02565     }
    02566     else if(_stricmp(in_pSemanticName, "projectioninverse") == 0)
    02567     {
    02568         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_ProjI, in_pParameterHandle, in_SemanticInUse.m_ProjI);
    02569     }
    02570     else if(_stricmp(in_pSemanticName, "projectiontranspose") == 0)
    02571     {
    02572         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_ProjT, in_pParameterHandle, in_SemanticInUse.m_ProjT);
    02573     }
    02574     else if(_stricmp(in_pSemanticName, "projectioninversetranspose") == 0)
    02575     {
    02576         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_ProjIT, in_pParameterHandle, in_SemanticInUse.m_ProjIT);
    02577     }
    02578     else if(_stricmp(in_pSemanticName, "siproj") == 0)
    02579     {
    02580         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_Proj, in_pParameterHandle, in_SemanticInUse.m_Proj);
    02581     }
    02582     else if(_stricmp(in_pSemanticName, "siproji") == 0)
    02583     {
    02584         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_ProjI, in_pParameterHandle, in_SemanticInUse.m_ProjI);
    02585     }
    02586     else if(_stricmp(in_pSemanticName, "siprojt") == 0)
    02587     {
    02588         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_ProjT, in_pParameterHandle, in_SemanticInUse.m_ProjT);
    02589     }
    02590     else if(_stricmp(in_pSemanticName, "siprojit") == 0)
    02591     {
    02592         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_ProjIT, in_pParameterHandle, in_SemanticInUse.m_ProjIT);
    02593     }
    02594     else if(_stricmp(in_pSemanticName, "Sas.Camera.WorldToView") == 0)
    02595     {
    02596         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_WorldView, in_pParameterHandle, in_SemanticInUse.m_WorldView);
    02597     }
    02598     else if(_stricmp(in_pSemanticName, "worldview") == 0)
    02599     {
    02600         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_WorldView, in_pParameterHandle, in_SemanticInUse.m_WorldView);
    02601     }
    02602     else if(_stricmp(in_pSemanticName, "worldviewi") == 0)
    02603     {
    02604         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_WorldViewI, in_pParameterHandle, in_SemanticInUse.m_WorldViewI);
    02605     }
    02606     else if(_stricmp(in_pSemanticName, "worldviewt") == 0)
    02607     {
    02608         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_WorldViewT, in_pParameterHandle, in_SemanticInUse.m_WorldViewT);
    02609     }
    02610     else if(_stricmp(in_pSemanticName, "worldviewit") == 0)
    02611     {
    02612         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_WorldViewIT, in_pParameterHandle, in_SemanticInUse.m_WorldViewIT);
    02613     }
    02614     else if(_stricmp(in_pSemanticName, "worldviewinverse") == 0)
    02615     {
    02616         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_WorldViewI, in_pParameterHandle, in_SemanticInUse.m_WorldViewI);
    02617     }
    02618     else if(_stricmp(in_pSemanticName, "worldviewtranspose") == 0)
    02619     {
    02620         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_WorldViewT, in_pParameterHandle, in_SemanticInUse.m_WorldViewT);
    02621     }
    02622     else if(_stricmp(in_pSemanticName, "worldviewinversetranspose") == 0)
    02623     {
    02624         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_WorldViewIT, in_pParameterHandle, in_SemanticInUse.m_WorldViewIT);
    02625     }
    02626     else if(_stricmp(in_pSemanticName, "modelview") == 0)
    02627     {
    02628         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_WorldView, in_pParameterHandle, in_SemanticInUse.m_WorldView);
    02629     }
    02630     else if(_stricmp(in_pSemanticName, "modelviewi") == 0)
    02631     {
    02632         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_WorldViewI, in_pParameterHandle, in_SemanticInUse.m_WorldViewI);
    02633     }
    02634     else if(_stricmp(in_pSemanticName, "modelviewt") == 0)
    02635     {
    02636         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_WorldViewT, in_pParameterHandle, in_SemanticInUse.m_WorldViewT);
    02637     }
    02638     else if(_stricmp(in_pSemanticName, "modelviewit") == 0)
    02639     {
    02640         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_WorldViewIT, in_pParameterHandle, in_SemanticInUse.m_WorldViewIT);
    02641     }
    02642     else if(_stricmp(in_pSemanticName, "modelviewinverse") == 0)
    02643     {
    02644         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_WorldViewI, in_pParameterHandle, in_SemanticInUse.m_WorldViewI);
    02645     }
    02646     else if(_stricmp(in_pSemanticName, "modelviewtranspose") == 0)
    02647     {
    02648         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_WorldViewT, in_pParameterHandle, in_SemanticInUse.m_WorldViewT);
    02649     }
    02650     else if(_stricmp(in_pSemanticName, "modelviewinversetranspose") == 0)
    02651     {
    02652         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_WorldViewIT, in_pParameterHandle, in_SemanticInUse.m_WorldViewIT);
    02653     }
    02654     else if(_stricmp(in_pSemanticName, "simodelview") == 0)
    02655     {
    02656         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_WorldView, in_pParameterHandle, in_SemanticInUse.m_WorldView);
    02657     }
    02658     else if(_stricmp(in_pSemanticName, "simodelviewi") == 0)
    02659     {
    02660         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_WorldViewI, in_pParameterHandle, in_SemanticInUse.m_WorldViewI);
    02661     }
    02662     else if(_stricmp(in_pSemanticName, "simodelviewt") == 0)
    02663     {
    02664         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_WorldViewT, in_pParameterHandle, in_SemanticInUse.m_WorldViewT);
    02665     }
    02666     else if(_stricmp(in_pSemanticName, "simodelviewit") == 0)
    02667     {
    02668         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_WorldViewIT, in_pParameterHandle, in_SemanticInUse.m_WorldViewIT);
    02669     }
    02670     else if(_stricmp(in_pSemanticName, "worldviewprojection") == 0)
    02671     {
    02672         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_WorldViewProj, in_pParameterHandle, in_SemanticInUse.m_WorldViewProj);
    02673     }
    02674     else if(_stricmp(in_pSemanticName, "worldviewprojectioni") == 0)
    02675     {
    02676         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_WorldViewProjI, in_pParameterHandle, in_SemanticInUse.m_WorldViewProjI);
    02677     }
    02678     else if(_stricmp(in_pSemanticName, "worldviewprojectiont") == 0)
    02679     {
    02680         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_WorldViewProjT, in_pParameterHandle, in_SemanticInUse.m_WorldViewProjT);
    02681     }
    02682     else if(_stricmp(in_pSemanticName, "worldviewprojectionit") == 0)
    02683     {
    02684         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_WorldViewProjIT, in_pParameterHandle, in_SemanticInUse.m_WorldViewProjIT);
    02685     }
    02686     else if(_stricmp(in_pSemanticName, "worldviewprojectioninverse") == 0)
    02687     {
    02688         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_WorldViewProjI, in_pParameterHandle, in_SemanticInUse.m_WorldViewProjI);
    02689     }
    02690     else if(_stricmp(in_pSemanticName, "worldviewprojectiontranspose") == 0)
    02691     {
    02692         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_WorldViewProjT, in_pParameterHandle, in_SemanticInUse.m_WorldViewProjT);
    02693     }
    02694     else if(_stricmp(in_pSemanticName, "worldviewprojectioninversetranspose") == 0)
    02695     {
    02696         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_WorldViewProjIT, in_pParameterHandle, in_SemanticInUse.m_WorldViewProjIT);
    02697     }
    02698     else if(_stricmp(in_pSemanticName, "modelviewprojection") == 0)
    02699     {
    02700         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_WorldViewProj, in_pParameterHandle, in_SemanticInUse.m_WorldViewProj);
    02701     }
    02702     else if(_stricmp(in_pSemanticName, "modelviewprojectioni") == 0)
    02703     {
    02704         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_WorldViewProjI, in_pParameterHandle, in_SemanticInUse.m_WorldViewProjI);
    02705     }
    02706     else if(_stricmp(in_pSemanticName, "modelviewprojectiont") == 0)
    02707     {
    02708         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_WorldViewProjT, in_pParameterHandle, in_SemanticInUse.m_WorldViewProjT);
    02709     }
    02710     else if(_stricmp(in_pSemanticName, "modelviewprojectionit") == 0)
    02711     {
    02712         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_WorldViewProjIT, in_pParameterHandle, in_SemanticInUse.m_WorldViewProjIT);
    02713     }
    02714     else if(_stricmp(in_pSemanticName, "modelviewprojectioninverse") == 0)
    02715     {
    02716         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_WorldViewProjI, in_pParameterHandle, in_SemanticInUse.m_WorldViewProjI);
    02717     }
    02718     else if(_stricmp(in_pSemanticName, "modelviewprojectiontranspose") == 0)
    02719     {
    02720         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_WorldViewProjT, in_pParameterHandle, in_SemanticInUse.m_WorldViewProjT);
    02721     }
    02722     else if(_stricmp(in_pSemanticName, "modelviewprojectioninversetranspose") == 0)
    02723     {
    02724         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_WorldViewProjIT, in_pParameterHandle, in_SemanticInUse.m_WorldViewProjIT);
    02725     }
    02726     else if(_stricmp(in_pSemanticName, "simodelviewproj") == 0)
    02727     {
    02728         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_WorldViewProj, in_pParameterHandle, in_SemanticInUse.m_WorldViewProj);
    02729     }
    02730     else if(_stricmp(in_pSemanticName, "simodelviewproji") == 0)
    02731     {
    02732         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_WorldViewProjI, in_pParameterHandle, in_SemanticInUse.m_WorldViewProjI);
    02733     }
    02734     else if(_stricmp(in_pSemanticName, "simodelviewprojt") == 0)
    02735     {
    02736         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_WorldViewProjT, in_pParameterHandle, in_SemanticInUse.m_WorldViewProjT);
    02737     }
    02738     else if(_stricmp(in_pSemanticName, "simodelviewprojit") == 0)
    02739     {
    02740         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_WorldViewProjIT, in_pParameterHandle, in_SemanticInUse.m_WorldViewProjIT);
    02741     }
    02742     else if(_stricmp(in_pSemanticName, "cameraposition") == 0)
    02743     {
    02744         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_CameraPos, in_pParameterHandle, in_SemanticInUse.m_CameraPos);
    02745     }
    02746     else if(_stricmp(in_pSemanticName, "sieyepos") == 0)
    02747     {
    02748         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_CameraPos, in_pParameterHandle, in_SemanticInUse.m_CameraPos);
    02749     }
    02750     else if(_stricmp(in_pSemanticName, "sas.camera.position") == 0)
    02751     {
    02752         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_CameraPos, in_pParameterHandle, in_SemanticInUse.m_CameraPos);
    02753     }
    02754     else if(_stricmp(in_pSemanticName, "sas.camera.nearfarclipping") == 0)
    02755     {
    02756         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_CameraNearFar, in_pParameterHandle, in_SemanticInUse.m_CameraNearFar);
    02757     }
    02758     else if(_stricmp(in_pSemanticName, "sas.time.now") == 0)
    02759     {
    02760         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_TimeNow, in_pParameterHandle, in_SemanticInUse.m_TimeNow);
    02761     }
    02762     else if(_stricmp(in_pSemanticName, "sas.time.last") == 0)
    02763     {
    02764         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_TimeLast, in_pParameterHandle, in_SemanticInUse.m_TimeLast);
    02765     }
    02766     else if(_stricmp(in_pSemanticName, "sas.time.framenumber") == 0)
    02767     {
    02768         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_TimeFrameNumber, in_pParameterHandle, in_SemanticInUse.m_TimeFrameNumber);
    02769     }
    02770     else if(_stricmp(in_pSemanticName, "sas.numambientlights") == 0)
    02771     {
    02772         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_NumAmbientLights, in_pParameterHandle, in_SemanticInUse.m_NumAmbientLights);
    02773     }
    02774     else if(_stricmp(in_pSemanticName, "sas.numdirectionallights") == 0)
    02775     {
    02776         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_NumDirectionalLights, in_pParameterHandle, in_SemanticInUse.m_NumDirectionalLights);
    02777     }
    02778     else if(_stricmp(in_pSemanticName, "sas.numpointlights") == 0)
    02779     {
    02780         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_NumPointLights, in_pParameterHandle, in_SemanticInUse.m_NumPointLights);
    02781     }
    02782     else if(_stricmp(in_pSemanticName, "sas.numspotlights") == 0)
    02783     {
    02784         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_NumSpotLights, in_pParameterHandle, in_SemanticInUse.m_NumSpotLights);
    02785     }
    02786     else if(_stricmp(in_pSemanticName, "sas.camera") == 0)
    02787     {
    02788         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_SasCamera, in_pParameterHandle, in_SemanticInUse.m_SasCamera);
    02789     }
    02790     else if(_stricmp(in_pSemanticName, "sas.ambientlight") == 0)
    02791     {
    02792         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_AmbientLights, in_pParameterHandle, in_SemanticInUse.m_AmbientLights);
    02793     }
    02794     else if(_strnicmp(in_pSemanticName, "sas.ambientlight", strlen("sas.ambientlight")) == 0)
    02795     {
    02796         char l_IndexText[256];
    02797         char *l_pAddress = NULL;
    02798
    02799         l_pAddress = strchr(in_pSemanticName, '[');
    02800         if(l_pAddress)
    02801         {
    02802             int l_Index, l_DstIndex = 0;
    02803
    02804             l_pAddress ++;
    02805             while((*l_pAddress != 0) && (*l_pAddress >= '0') && (*l_pAddress <= '9'))
    02806             {
    02807                 l_IndexText[l_DstIndex ++] = *l_pAddress;
    02808                 l_pAddress++;
    02809             }
    02810             l_IndexText[l_DstIndex ++] = 0;
    02811
    02812             l_pAddress = strchr(l_pAddress, '.');
    02813             if(l_pAddress)
    02814                 l_pAddress++;
    02815
    02816             l_Index = atol(l_IndexText);
    02817 //          in_SemanticData.m_MaxAmbientLights = max(in_SemanticData.m_MaxAmbientLights, l_Index);
    02818
    02819             if(l_pAddress == NULL)
    02820             {
    02821                 XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_AmbientLights, in_pParameterHandle, in_SemanticInUse.m_AmbientLights);
    02822             }
    02823             else if(_stricmp(l_pAddress, "color") == 0)
    02824             {
    02825                 XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_AmbientLights[l_Index].m_Color, in_pParameterHandle, in_SemanticInUse.m_AmbientLights);
    02826             }
    02827         }
    02828     }
    02829     else if(_stricmp(in_pSemanticName, "sas.directionallight") == 0)
    02830     {
    02831         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_DirectionalLights, in_pParameterHandle, in_SemanticInUse.m_DirectionalLights);
    02832     }
    02833     else if(_strnicmp(in_pSemanticName, "sas.directionallight", strlen("sas.directionallight")) == 0)
    02834     {
    02835         char l_IndexText[256];
    02836         char *l_pAddress = NULL;
    02837
    02838         l_pAddress = strchr(in_pSemanticName, '[');
    02839         if(l_pAddress)
    02840         {
    02841             int l_Index, l_DstIndex = 0;
    02842
    02843             l_pAddress ++;
    02844             while((*l_pAddress != 0) && (*l_pAddress >= '0') && (*l_pAddress <= '9'))
    02845             {
    02846                 l_IndexText[l_DstIndex ++] = *l_pAddress;
    02847                 l_pAddress++;
    02848             }
    02849             l_IndexText[l_DstIndex ++] = 0;
    02850
    02851             l_pAddress = strchr(l_pAddress, '.');
    02852             if(l_pAddress)
    02853                 l_pAddress++;
    02854
    02855             l_Index = atol(l_IndexText);
    02856 //          in_SemanticData.m_MaxDirectionalLights = max(in_SemanticData.m_MaxDirectionalLights, l_Index);
    02857
    02858
    02859             if(l_pAddress == NULL)
    02860             {
    02861                 XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_DirectionalLights[l_Index], in_pParameterHandle, in_SemanticInUse.m_DirectionalLights);
    02862             }
    02863             else if(_stricmp(l_pAddress, "color") == 0)
    02864             {
    02865                 XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_DirectionalLights[l_Index].m_Color, in_pParameterHandle, in_SemanticInUse.m_DirectionalLights);
    02866             }
    02867             else if(_stricmp(l_pAddress, "direction") == 0)
    02868             {
    02869                 XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_DirectionalLights[l_Index].m_Direction, in_pParameterHandle, in_SemanticInUse.m_DirectionalLights);
    02870             }
    02871         }
    02872     }
    02873     else if(_stricmp(in_pSemanticName, "sas.pointlight") == 0)
    02874     {
    02875         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_PointLights, in_pParameterHandle, in_SemanticInUse.m_PointLights);
    02876     }
    02877     else if(_strnicmp(in_pSemanticName, "sas.pointlight", strlen("sas.pointlight")) == 0)
    02878     {
    02879         char l_IndexText[256];
    02880         char *l_pAddress = NULL;
    02881
    02882         l_pAddress = strchr(in_pSemanticName, '[');
    02883         if(l_pAddress)
    02884         {
    02885             int l_Index, l_DstIndex = 0;
    02886
    02887             l_pAddress ++;
    02888             while((*l_pAddress != 0) && (*l_pAddress >= '0') && (*l_pAddress <= '9'))
    02889             {
    02890                 l_IndexText[l_DstIndex ++] = *l_pAddress;
    02891                 l_pAddress++;
    02892             }
    02893             l_IndexText[l_DstIndex ++] = 0;
    02894
    02895             l_pAddress = strchr(l_pAddress, '.');
    02896             if(l_pAddress)
    02897                 l_pAddress++;
    02898
    02899             l_Index = atol(l_IndexText);
    02900 //          in_SemanticData.m_MaxPointLights = max(in_SemanticData.m_MaxPointLights, l_Index);
    02901
    02902
    02903             if(l_pAddress == NULL)
    02904             {
    02905                 XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_PointLights[l_Index], in_pParameterHandle, in_SemanticInUse.m_PointLights);
    02906             }
    02907             else if(_stricmp(l_pAddress, "color") == 0)
    02908             {
    02909                 XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_PointLights[l_Index].m_Color, in_pParameterHandle, in_SemanticInUse.m_PointLights);
    02910             }
    02911             else if(_stricmp(l_pAddress, "position") == 0)
    02912             {
    02913                 XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_PointLights[l_Index].m_Position, in_pParameterHandle, in_SemanticInUse.m_PointLights);
    02914             }
    02915             else if(_stricmp(l_pAddress, "range") == 0)
    02916             {
    02917                 XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_PointLights[l_Index].m_Range, in_pParameterHandle, in_SemanticInUse.m_PointLights);
    02918             }
    02919         }
    02920     }
    02921     else if(_stricmp(in_pSemanticName, "sas.spotlight") == 0)
    02922     {
    02923         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_SpotLights, in_pParameterHandle, in_SemanticInUse.m_SpotLights);
    02924     }
    02925     else if(_strnicmp(in_pSemanticName, "sas.spotlight", strlen("sas.spotlight")) == 0)
    02926     {
    02927         char l_IndexText[256];
    02928         char *l_pAddress = NULL;
    02929
    02930         l_pAddress = strchr(in_pSemanticName, '[');
    02931         if(l_pAddress)
    02932         {
    02933             int l_Index, l_DstIndex = 0;
    02934
    02935             l_pAddress ++;
    02936             while((*l_pAddress != 0) && (*l_pAddress >= '0') && (*l_pAddress <= '9'))
    02937             {
    02938                 l_IndexText[l_DstIndex ++] = *l_pAddress;
    02939                 l_pAddress++;
    02940             }
    02941             l_IndexText[l_DstIndex ++] = 0;
    02942
    02943             l_pAddress = strchr(l_pAddress, '.');
    02944             if(l_pAddress)
    02945                 l_pAddress++;
    02946
    02947             l_Index = atol(l_IndexText);
    02948 //          in_SemanticData.m_MaxSpotLights = max(in_SemanticData.m_MaxSpotLights, l_Index);
    02949
    02950
    02951             if(l_pAddress == NULL)
    02952             {
    02953                 XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_SpotLights[l_Index], in_pParameterHandle, in_SemanticInUse.m_SpotLights);
    02954             }
    02955             else if(_stricmp(l_pAddress, "color") == 0)
    02956             {
    02957                 XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_SpotLights[l_Index].m_Color, in_pParameterHandle, in_SemanticInUse.m_SpotLights);
    02958             }
    02959             else if(_stricmp(l_pAddress, "position") == 0)
    02960             {
    02961                 XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_SpotLights[l_Index].m_Position, in_pParameterHandle, in_SemanticInUse.m_SpotLights);
    02962             }
    02963             else if(_stricmp(l_pAddress, "direction") == 0)
    02964             {
    02965                 XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_SpotLights[l_Index].m_Direction, in_pParameterHandle, in_SemanticInUse.m_SpotLights);
    02966             }
    02967             else if(_stricmp(l_pAddress, "range") == 0)
    02968             {
    02969                 XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_SpotLights[l_Index].m_Range, in_pParameterHandle, in_SemanticInUse.m_SpotLights);
    02970             }
    02971             else if(_stricmp(l_pAddress, "phi") == 0)
    02972             {
    02973                 XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_SpotLights[l_Index].m_Phi, in_pParameterHandle, in_SemanticInUse.m_SpotLights);
    02974             }
    02975             else if(_stricmp(l_pAddress, "theta") == 0)
    02976             {
    02977                 XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_SpotLights[l_Index].m_Theta, in_pParameterHandle, in_SemanticInUse.m_SpotLights);
    02978             }
    02979         }
    02980     }
    02981     else if(_strnicmp(in_pSemanticName, "sasglobal", strlen("sasglobal")) == 0)
    02982     {
    02983
    02984     }
    02985     else
    02986     {
    02987         l_bRetValue = false;
    02988     }
    02989
    02990     return l_bRetValue;
    02991 }
    02992
    02993 typedef     void (*RTS_BindSemanticCallback)
    02994 (
    02995     void*       in_pContext,
    02996     void*       in_pParameterHandle,
    02997     void*       in_pValue
    02998 );
    02999
    03000 inline void XSI_RTS_BindCommonSemantics
    03001 (
    03002     XSI_RTS_FXSemantics&        in_SemanticData,
    03003     XSI_RTS_FXSemantics_inuse&  in_SemanticInUse,
    03004     XSI_RTS_SystemParams*       in_pSysParams,
    03005     void*                       in_pContext,
    03006     RTS_BindSemanticCallback    fnBind
    03007 )
    03008 {
    03009
    03010     memcpy(in_SemanticData.m_ViewI, in_pSysParams->m_SceneData->m_sCamera.m_mMatrix, sizeof(in_SemanticData.m_ViewI));
    03011     XSI_RTS_MatrixInvert(in_SemanticData.m_ViewI, in_SemanticData.m_View);
    03012
    03013     memcpy(in_SemanticData.m_World, in_pSysParams->m_m4x4ObjectPose, sizeof(in_SemanticData.m_World));
    03014
    03015     // compute these matrices
    03016     XSI_RTS_MatrixMultiply(in_SemanticData.m_World, in_SemanticData.m_View, in_SemanticData.m_WorldView);
    03017     XSI_RTS_MatrixMultiply(in_SemanticData.m_WorldView, in_SemanticData.m_Proj, in_SemanticData.m_WorldViewProj);
    03018
    03019     if(in_SemanticInUse.m_WorldI)
    03020     {
    03021         XSI_RTS_MatrixInvert(in_SemanticData.m_World, in_SemanticData.m_WorldI);
    03022     }
    03023
    03024     if(in_SemanticInUse.m_WorldT)
    03025     {
    03026         XSI_RTS_MatrixTranspose(in_SemanticData.m_World, in_SemanticData.m_WorldT);
    03027     }
    03028
    03029     if(in_SemanticInUse.m_WorldIT)
    03030     {
    03031         XSI_RTS_MatrixInvert(in_SemanticData.m_World, in_SemanticData.m_WorldI);
    03032         XSI_RTS_MatrixTranspose(in_SemanticData.m_WorldI, in_SemanticData.m_WorldIT);
    03033     }
    03034
    03035     if(in_SemanticInUse.m_ViewT)
    03036     {
    03037         XSI_RTS_MatrixTranspose(in_SemanticData.m_View, in_SemanticData.m_ViewT);
    03038     }
    03039
    03040     if(in_SemanticInUse.m_ViewIT)
    03041     {
    03042         XSI_RTS_MatrixTranspose(in_SemanticData.m_ViewI, in_SemanticData.m_ViewIT);
    03043     }
    03044
    03045     if(in_SemanticInUse.m_ProjI)
    03046     {
    03047         XSI_RTS_MatrixInvert(in_SemanticData.m_Proj, in_SemanticData.m_ProjI);
    03048     }
    03049
    03050     if(in_SemanticInUse.m_ProjT)
    03051     {
    03052         XSI_RTS_MatrixTranspose(in_SemanticData.m_Proj, in_SemanticData.m_ProjT);
    03053     }
    03054
    03055     if(in_SemanticInUse.m_ProjIT)
    03056     {
    03057         XSI_RTS_MatrixInvert(in_SemanticData.m_Proj, in_SemanticData.m_ProjI);
    03058         XSI_RTS_MatrixTranspose(in_SemanticData.m_ProjI, in_SemanticData.m_ProjIT);
    03059     }
    03060
    03061
    03062     if(in_SemanticInUse.m_WorldViewI)
    03063     {
    03064         XSI_RTS_MatrixInvert(in_SemanticData.m_WorldView, in_SemanticData.m_WorldViewI);
    03065     }
    03066
    03067     if(in_SemanticInUse.m_WorldViewT)
    03068     {
    03069         XSI_RTS_MatrixTranspose(in_SemanticData.m_WorldView, in_SemanticData.m_WorldViewT);
    03070     }
    03071
    03072     if(in_SemanticInUse.m_WorldViewIT)
    03073     {
    03074         XSI_RTS_MatrixInvert(in_SemanticData.m_WorldView, in_SemanticData.m_WorldViewI);
    03075         XSI_RTS_MatrixTranspose(in_SemanticData.m_WorldViewI, in_SemanticData.m_WorldViewIT);
    03076     }
    03077
    03078     if(in_SemanticInUse.m_WorldViewProjI)
    03079     {
    03080         XSI_RTS_MatrixInvert(in_SemanticData.m_WorldViewProj, in_SemanticData.m_WorldViewProjI);
    03081     }
    03082
    03083     if(in_SemanticInUse.m_WorldViewProjT)
    03084     {
    03085         XSI_RTS_MatrixTranspose(in_SemanticData.m_WorldViewProj, in_SemanticData.m_WorldViewProjT);
    03086     }
    03087
    03088     if(in_SemanticInUse.m_WorldViewProjIT)
    03089     {
    03090         XSI_RTS_MatrixInvert(in_SemanticData.m_WorldViewProj, in_SemanticData.m_WorldViewProjI);
    03091         XSI_RTS_MatrixTranspose(in_SemanticData.m_WorldViewProjI, in_SemanticData.m_WorldViewProjIT);
    03092     }
    03093
    03094     if( in_SemanticInUse.m_CameraPos )
    03095     {
    03096         if(!in_SemanticInUse.m_ViewI)
    03097         {
    03098             XSI_RTS_MatrixInvert(in_SemanticData.m_View, in_SemanticData.m_ViewI);
    03099         }
    03100
    03101         memcpy(in_SemanticData.m_CameraPos, in_SemanticData.m_ViewI[3], sizeof(in_SemanticData.m_CameraPos));
    03102     }
    03103
    03104     if( in_SemanticInUse.m_CameraNearFar )
    03105     {
    03106         in_SemanticData.m_CameraNearFar[0] = in_pSysParams->m_SceneData->m_sCamera.m_fNear;
    03107         in_SemanticData.m_CameraNearFar[1] = in_pSysParams->m_SceneData->m_sCamera.m_fFar;
    03108     }
    03109
    03110     if( in_SemanticInUse.m_TimeNow )
    03111     {
    03112         in_SemanticData.m_TimeNow[0] = (float) in_pSysParams->m_SceneData->m_fCurrentTime;
    03113     }
    03114
    03115     if( in_SemanticInUse.m_TimeLast )
    03116     {
    03117         in_SemanticData.m_TimeLast[0] = in_SemanticInUse.m_LastTime;
    03118     }
    03119
    03120     if( in_SemanticInUse.m_TimeFrameNumber )
    03121     {
    03122         in_SemanticData.m_TimeFrameNumber[0] = (float)in_pSysParams->m_SceneData->m_fCurrentTime * 30.0f; // hard coded for 30 fps
    03123     }
    03124
    03125     if( in_SemanticInUse.m_NumAmbientLights )
    03126     {
    03127         in_SemanticData.m_NumAmbientLights[0] = 1;
    03128     }
    03129
    03130     if( in_SemanticInUse.m_NumDirectionalLights || in_SemanticInUse.m_NumPointLights || in_SemanticInUse.m_NumSpotLights )
    03131     {
    03132         int loop;
    03133
    03134         in_SemanticData.m_NumDirectionalLights[0] = 0;
    03135         in_SemanticData.m_NumPointLights[0] = 0;
    03136         in_SemanticData.m_NumSpotLights[0] = 0;
    03137
    03138         for(loop = 0; loop < in_pSysParams->m_SceneData->m_iNbLights; loop++)
    03139         {
    03140             if(in_pSysParams->m_SceneData->m_pLights[loop].m_eType == RTS_LIGHT_POINT)
    03141             {
    03142                 in_SemanticData.m_NumPointLights[0]++;
    03143             }
    03144             else if(in_pSysParams->m_SceneData->m_pLights[loop].m_eType == RTS_LIGHT_INFINITE)
    03145             {
    03146                 in_SemanticData.m_NumDirectionalLights[0]++;
    03147             }
    03148             else if(in_pSysParams->m_SceneData->m_pLights[loop].m_eType == RTS_LIGHT_SPOT)
    03149             {
    03150                 in_SemanticData.m_NumSpotLights[0]++;
    03151             }
    03152         }
    03153     }
    03154
    03155     if( in_SemanticInUse.m_SasCamera )
    03156     {
    03157         if(!in_SemanticInUse.m_ViewI)
    03158         {
    03159             XSI_RTS_MatrixInvert(in_SemanticData.m_View, in_SemanticData.m_ViewI);
    03160         }
    03161
    03162         in_SemanticData.m_SasCamera[0].m_NearFarClipping[0] = in_pSysParams->m_SceneData->m_sCamera.m_fNear;
    03163         in_SemanticData.m_SasCamera[0].m_NearFarClipping[1] = in_pSysParams->m_SceneData->m_sCamera.m_fFar;
    03164         memcpy(in_SemanticData.m_SasCamera[0].m_Position, in_SemanticData.m_ViewI[3], sizeof(in_SemanticData.m_SasCamera[0].m_Position));
    03165         memcpy(in_SemanticData.m_SasCamera[0].m_Projection, in_SemanticData.m_Proj,  sizeof(in_SemanticData.m_SasCamera[0].m_Projection));
    03166         memcpy(in_SemanticData.m_SasCamera[0].m_WorldToView, in_SemanticData.m_WorldView,  sizeof(in_SemanticData.m_SasCamera[0].m_WorldToView));
    03167     }
    03168
    03169     if( in_SemanticInUse.m_AmbientLights )
    03170     {
    03171         in_SemanticData.m_AmbientLights[0].m_Color[0] = 0.3f;
    03172         in_SemanticData.m_AmbientLights[0].m_Color[1] = 0.3f;
    03173         in_SemanticData.m_AmbientLights[0].m_Color[2] = 0.3f;
    03174         in_SemanticData.m_AmbientLights[0].m_Color[3] = 1.0f;
    03175     }
    03176
    03177     int loop;
    03178
    03179     int l_NumDirectionalLights = 0;
    03180     int l_NumPointLights = 0;
    03181     int l_NumSpotLights = 0;
    03182
    03183     if( (in_SemanticInUse.m_PointLights) || (in_SemanticInUse.m_DirectionalLights) || (in_SemanticInUse.m_SpotLights))
    03184     {
    03185         for(loop = 0; loop < in_pSysParams->m_SceneData->m_iNbLights; loop++)
    03186         {
    03187             if(in_pSysParams->m_SceneData->m_pLights[loop].m_eType == RTS_LIGHT_POINT)
    03188             {
    03189                 in_SemanticData.m_PointLights[l_NumPointLights].m_Color[0] = in_pSysParams->m_SceneData->m_pLights[loop].m_fRed;
    03190                 in_SemanticData.m_PointLights[l_NumPointLights].m_Color[1] = in_pSysParams->m_SceneData->m_pLights[loop].m_fGreen;
    03191                 in_SemanticData.m_PointLights[l_NumPointLights].m_Color[2] = in_pSysParams->m_SceneData->m_pLights[loop].m_fBlue;
    03192                 in_SemanticData.m_PointLights[l_NumPointLights].m_Color[3] = in_pSysParams->m_SceneData->m_pLights[loop].m_fAlpha;
    03193
    03194                 in_SemanticData.m_PointLights[l_NumPointLights].m_Position[0] = in_pSysParams->m_SceneData->m_pLights[loop].m_fPosX;
    03195                 in_SemanticData.m_PointLights[l_NumPointLights].m_Position[1] = in_pSysParams->m_SceneData->m_pLights[loop].m_fPosY;
    03196                 in_SemanticData.m_PointLights[l_NumPointLights].m_Position[2] = in_pSysParams->m_SceneData->m_pLights[loop].m_fPosZ;
    03197                 in_SemanticData.m_PointLights[l_NumPointLights].m_Position[3] = in_pSysParams->m_SceneData->m_pLights[loop].m_fPosW;
    03198
    03199                 in_SemanticData.m_PointLights[l_NumPointLights].m_Range = FLT_MAX;
    03200
    03201                 l_NumPointLights++;
    03202             }
    03203             else if(in_pSysParams->m_SceneData->m_pLights[loop].m_eType == RTS_LIGHT_INFINITE)
    03204             {
    03205                 in_SemanticData.m_DirectionalLights[l_NumDirectionalLights].m_Color[0] = in_pSysParams->m_SceneData->m_pLights[loop].m_fRed;
    03206                 in_SemanticData.m_DirectionalLights[l_NumDirectionalLights].m_Color[1] = in_pSysParams->m_SceneData->m_pLights[loop].m_fGreen;
    03207                 in_SemanticData.m_DirectionalLights[l_NumDirectionalLights].m_Color[2] = in_pSysParams->m_SceneData->m_pLights[loop].m_fBlue;
    03208                 in_SemanticData.m_DirectionalLights[l_NumDirectionalLights].m_Color[3] = in_pSysParams->m_SceneData->m_pLights[loop].m_fAlpha;
    03209
    03210                 in_SemanticData.m_DirectionalLights[l_NumDirectionalLights].m_Direction[0] = -in_pSysParams->m_SceneData->m_pLights[loop].m_fPosX;
    03211                 in_SemanticData.m_DirectionalLights[l_NumDirectionalLights].m_Direction[1] = -in_pSysParams->m_SceneData->m_pLights[loop].m_fPosY;
    03212                 in_SemanticData.m_DirectionalLights[l_NumDirectionalLights].m_Direction[2] = -in_pSysParams->m_SceneData->m_pLights[loop].m_fPosZ;
    03213                 in_SemanticData.m_DirectionalLights[l_NumDirectionalLights].m_Direction[3] = in_pSysParams->m_SceneData->m_pLights[loop].m_fPosW;
    03214
    03215                 l_NumDirectionalLights++;
    03216             }
    03217             else if(in_pSysParams->m_SceneData->m_pLights[loop].m_eType == RTS_LIGHT_SPOT)
    03218             {
    03219                 in_SemanticData.m_SpotLights[l_NumSpotLights].m_Color[0] = in_pSysParams->m_SceneData->m_pLights[loop].m_fRed;
    03220                 in_SemanticData.m_SpotLights[l_NumSpotLights].m_Color[1] = in_pSysParams->m_SceneData->m_pLights[loop].m_fGreen;
    03221                 in_SemanticData.m_SpotLights[l_NumSpotLights].m_Color[2] = in_pSysParams->m_SceneData->m_pLights[loop].m_fBlue;
    03222                 in_SemanticData.m_SpotLights[l_NumSpotLights].m_Color[3] = in_pSysParams->m_SceneData->m_pLights[loop].m_fAlpha;
    03223
    03224                 in_SemanticData.m_SpotLights[l_NumSpotLights].m_Position[0] = in_pSysParams->m_SceneData->m_pLights[loop].m_fPosX;
    03225                 in_SemanticData.m_SpotLights[l_NumSpotLights].m_Position[1] = in_pSysParams->m_SceneData->m_pLights[loop].m_fPosY;
    03226                 in_SemanticData.m_SpotLights[l_NumSpotLights].m_Position[2] = in_pSysParams->m_SceneData->m_pLights[loop].m_fPosZ;
    03227                 in_SemanticData.m_SpotLights[l_NumSpotLights].m_Position[3] = in_pSysParams->m_SceneData->m_pLights[loop].m_fPosW;
    03228
    03229                 in_SemanticData.m_SpotLights[l_NumSpotLights].m_Direction[0] = in_pSysParams->m_SceneData->m_pLights[loop].m_fDirX;
    03230                 in_SemanticData.m_SpotLights[l_NumSpotLights].m_Direction[1] = in_pSysParams->m_SceneData->m_pLights[loop].m_fDirY;
    03231                 in_SemanticData.m_SpotLights[l_NumSpotLights].m_Direction[2] = in_pSysParams->m_SceneData->m_pLights[loop].m_fDirZ;
    03232                 in_SemanticData.m_SpotLights[l_NumSpotLights].m_Direction[3] = 1.0f;
    03233
    03234
    03235                 in_SemanticData.m_SpotLights[l_NumSpotLights].m_Range = FLT_MAX;
    03236                 in_SemanticData.m_SpotLights[l_NumSpotLights].m_Phi = in_pSysParams->m_SceneData->m_pLights[loop].m_fConeAngle;
    03237                 in_SemanticData.m_SpotLights[l_NumSpotLights].m_Theta = in_pSysParams->m_SceneData->m_pLights[loop].m_fConeAngle;
    03238
    03239                 l_NumSpotLights++;
    03240             }
    03241         }
    03242 /*
    03243         for(loop = l_NumPointLights; loop < in_SemanticData.m_MaxPointLights; loop++)
    03244         {
    03245             memset(&in_SemanticData.m_PointLights[loop], 0, sizeof(XSI_RTS_SasPointLight));
    03246         }
    03247         for(loop = l_NumDirectionalLights; loop < in_SemanticData.m_MaxDirectionalLights; loop++)
    03248         {
    03249             memset(&in_SemanticData.m_DirectionalLights[loop], 0, sizeof(XSI_RTS_SasDirectionalLight));
    03250         }
    03251         for(loop = l_NumSpotLights; loop < in_SemanticData.m_MaxSpotLights; loop++)
    03252         {
    03253             memset(&in_SemanticData.m_SpotLights[loop], 0, sizeof(XSI_RTS_SasSpotLight));
    03254         }
    03255 */
    03256     }
    03257
    03258     // now bind everything
    03259     for(loop = 0; loop < in_SemanticInUse.m_Params.GetUsed(); loop++)
    03260     {
    03261         fnBind(in_pContext, in_SemanticInUse.m_Params[loop].m_pDestParam, in_SemanticInUse.m_Params[loop].m_pSourceParam);
    03262     }
    03263
    03264 }
    03265
    03267 //
    03268 // RTS 3.0
    03269 //
    03271
    03278 enum eRenderMode {
    03279         RenderMode_Render = 0,
    03280         RenderMode_Picking
    03281 };
    03282
    03293 enum eGraphicsAPI {
    03294         OpenGL_20   = 1 << 0,
    03295         OpenGL_30   = 1 << 1,
    03296         DirectX_9   = 1 << 2,
    03297         DirectX_10  = 1 << 3,
    03298         OpenGL      = OpenGL_20 | OpenGL_30,
    03299         DirectX     = DirectX_9 | DirectX_10,
    03300         Any     = OpenGL | DirectX,
    03301         Undefined   = UINT_MAX
    03302 };
    03313 enum eChannel {
    03314     Channel_None = 0,
    03315     Composite,
    03316     Albedo,
    03317     Normal,
    03318     Specular,
    03319     Reflection,
    03320     AmbientOcclusion,
    03321     EyePosition,
    03322     Custom
    03323 };
    03335 enum eStandardVertexAttribute
    03336 {
    03337     ePOSITION=0,
    03338     eNORMAL,
    03339     eCOLOR0,
    03340     eCOLOR1,
    03341     eTEXCOORD0,
    03342     eTEXCOORD1,
    03343     eTEXCOORD2,
    03344     eTEXCOORD3,
    03345     eTEXCOORD4,
    03346     eTEXCOORD5,
    03347     eTEXCOORD6,
    03348     eTEXCOORD7,
    03349     eTEXCOORD8,
    03350     eTEXCOORD9,
    03351     eTEXCOORD10,
    03352     eTEXCOORD11,
    03353     eTEXCOORD12,
    03354     eTEXCOORD13,
    03355     eTEXCOORD14,
    03356     eTEXCOORD15,
    03357     eATTR0,
    03358     eATTR1,
    03359     eATTR2,
    03360     eATTR3,
    03361     eATTR4,
    03362     eATTR5,
    03363     eATTR6,
    03364     eATTR7,
    03365     eATTR8,
    03366     eATTR9,
    03367     eATTR10,
    03368     eATTR11,
    03369     eATTR12,
    03370     eATTR13,
    03371     eATTR14,
    03372     eATTR15,
    03373     eFOGCOORD,
    03374     ePSIZE,
    03375     eTANGENT,
    03376     eBINORMAL,
    03377     eWEIGHT,
    03378         eINDICE,
    03379     eTESSFACTOR,
    03380     eDEPTH,
    03381         eSAMPLE,
    03382     eMAX_STANDARD_VERTEX_ATTRIBUTE      // must always remain last enum
    03383 };
    03421 inline const char* GetStandardVertexAttributeName ( eStandardVertexAttribute in_eAttribute )
    03422 {
    03423     switch ( in_eAttribute )
    03424     {
    03425     case ePOSITION: return "position"; break;
    03426     case eNORMAL: return "normal"; break;
    03427     case eCOLOR0: return "color0"; break;
    03428     case eCOLOR1: return "color1"; break;
    03429     case eTEXCOORD0: return "texcoord0"; break;
    03430     case eTEXCOORD1: return "texcoord1"; break;
    03431     case eTEXCOORD2: return "texcoord2"; break;
    03432     case eTEXCOORD3: return "texcoord3"; break;
    03433     case eTEXCOORD4: return "texcoord4"; break;
    03434     case eTEXCOORD5: return "texcoord5"; break;
    03435     case eTEXCOORD6: return "texcoord6"; break;
    03436     case eTEXCOORD7: return "texcoord7"; break;
    03437     case eTEXCOORD8: return "texcoord8"; break;
    03438     case eTEXCOORD9: return "texcoord9"; break;
    03439     case eTEXCOORD10: return "texcoord10"; break;
    03440     case eTEXCOORD11: return "texcoord11"; break;
    03441     case eTEXCOORD12: return "texcoord12"; break;
    03442     case eTEXCOORD13: return "texcoord13"; break;
    03443     case eTEXCOORD14: return "texcoord14"; break;
    03444     case eTEXCOORD15: return "texcoord15"; break;
    03445     case eATTR0: return "attr0"; break;
    03446     case eATTR1: return "attr1"; break;
    03447     case eATTR2: return "attr2"; break;
    03448     case eATTR3: return "attr3"; break;
    03449     case eATTR4: return "attr4"; break;
    03450     case eATTR5: return "attr5"; break;
    03451     case eATTR6: return "attr6"; break;
    03452     case eATTR7: return "attr7"; break;
    03453     case eATTR8: return "attr8"; break;
    03454     case eATTR9: return "attr9"; break;
    03455     case eATTR10: return "attr10"; break;
    03456     case eATTR11: return "attr11"; break;
    03457     case eATTR12: return "attr12"; break;
    03458     case eATTR13: return "attr13"; break;
    03459     case eATTR14: return "attr14"; break;
    03460     case eATTR15: return "attr15"; break;
    03461     case eFOGCOORD: return "fogcoord"; break;
    03462     case ePSIZE: return "psize"; break;
    03463     case eTANGENT: return "tangent"; break;
    03464     case eBINORMAL: return "binormal"; break;
    03465     case eWEIGHT: return "weight"; break;
    03466     case eINDICE: return "indice"; break;
    03467     case eTESSFACTOR: return "tessfactor"; break;
    03468     case eDEPTH: return "depth"; break;
    03469     case eSAMPLE: return "sample"; break;
    03470     case eMAX_STANDARD_VERTEX_ATTRIBUTE: return "undefined"; break;
    03471     default: assert(0);
    03472     }
    03473     return NULL;
    03474 };
    03475
    03485 inline const char* GetStandardVertexAttributeComponents ( eStandardVertexAttribute in_eAttribute )
    03486 {
    03487     switch ( in_eAttribute )
    03488     {
    03489     case ePOSITION: return "xyz"; break;
    03490     case eNORMAL: return "xyz"; break;
    03491     case eCOLOR0: return "rgba"; break;
    03492     case eCOLOR1: return "rgba"; break;
    03493     case eTEXCOORD0: return "xyzw"; break;
    03494     case eTEXCOORD1: return "xyzw"; break;
    03495     case eTEXCOORD2: return "xyzw"; break;
    03496     case eTEXCOORD3: return "xyzw"; break;
    03497     case eTEXCOORD4: return "xyzw"; break;
    03498     case eTEXCOORD5: return "xyzw"; break;
    03499     case eTEXCOORD6: return "xyzw"; break;
    03500     case eTEXCOORD7: return "xyzw"; break;
    03501     case eTEXCOORD8: return "xyzw"; break;
    03502     case eTEXCOORD9: return "xyzw"; break;
    03503     case eTEXCOORD10: return "xyzw"; break;
    03504     case eTEXCOORD11: return "xyzw"; break;
    03505     case eTEXCOORD12: return "xyzw"; break;
    03506     case eTEXCOORD13: return "xyzw"; break;
    03507     case eTEXCOORD14: return "xyzw"; break;
    03508     case eTEXCOORD15: return "xyzw"; break;
    03509     case eATTR0: return "xyzw"; break;
    03510     case eATTR1: return "xyzw"; break;
    03511     case eATTR2: return "xyzw"; break;
    03512     case eATTR3: return "xyzw"; break;
    03513     case eATTR4: return "xyzw"; break;
    03514     case eATTR5: return "xyzw"; break;
    03515     case eATTR6: return "xyzw"; break;
    03516     case eATTR7: return "xyzw"; break;
    03517     case eATTR8: return "xyzw"; break;
    03518     case eATTR9: return "xyzw"; break;
    03519     case eATTR10: return "xyzw"; break;
    03520     case eATTR11: return "xyzw"; break;
    03521     case eATTR12: return "xyzw"; break;
    03522     case eATTR13: return "xyzw"; break;
    03523     case eATTR14: return "xyzw"; break;
    03524     case eATTR15: return "xyzw"; break;
    03525     case eFOGCOORD: return "x"; break;
    03526     case ePSIZE: return "x"; break;
    03527     case eTANGENT: return "xyzw"; break;    // Softimage encode tangents into a 4-float RGBA vertex color
    03528     case eBINORMAL: return "xyzw"; break;
    03529     case eWEIGHT: return "xyzw"; break;
    03530     case eINDICE: return "xyzw"; break;
    03531     case eTESSFACTOR: return "x"; break;
    03532     case eDEPTH: return "x"; break;
    03533     case eSAMPLE: return "xyzw"; break;
    03534     case eMAX_STANDARD_VERTEX_ATTRIBUTE: return "xyz"; break;
    03535     default: assert(0);
    03536     }
    03537     return NULL;
    03538 };
    03539
    03546 #define XSI_RTS_ATTRIBUTE_POSITION      "PointPosition"
    03547 #define XSI_RTS_ATTRIBUTE_NORMAL        "PointNormal"
    03548 #define XSI_RTS_ATTRIBUTE_COLOR         "Vertex_Color"
    03549 #define XSI_RTS_ATTRIBUTE_TANGENT       "Tangent"
    03550 #define XSI_RTS_ATTRIBUTE_BINORMAL      "Binormal"
    03551 #define XSI_RTS_ATTRIBUTE_TEXUVW        "Texture_Projection"
    03552 #define XSI_RTS_ATTRIBUTE_WEIGHTMAP     "weightmap"
    03553 #define XSI_RTS_ATTRIBUTE_VELOCITY      "PointVelocity"
    03554 #define XSI_RTS_ATTRIBUTE_ORIENTATION       "Orientation"
    03555 #define XSI_RTS_ATTRIBUTE_AGE           "Age"
    03556 #define XSI_RTS_ATTRIBUTE_SIZE          "radius"
    03557 #define XSI_RTS_ATTRIBUTE_ID            "ID"
    03558 #define XSI_RTS_ATTRIBUTE_FOG           "Fog"
    03559 #define XSI_RTS_ATTRIBUTE_WEIGHT        "Weight"
    03560 #define XSI_RTS_ATTRIBUTE_INDICE        "Indice"
    03561 #define XSI_RTS_ATTRIBUTE_TESSFACTOR        "Tessfactor"
    03562 #define XSI_RTS_ATTRIBUTE_DEPTH         "Depth"
    03563 #define XSI_RTS_ATTRIBUTE_SAMPLE        "Sample"
    03564
    03573 inline const char* GetStandardVertexAttributeDefaultXSIName ( eStandardVertexAttribute in_eAttribute )
    03574 {
    03575     switch ( in_eAttribute )
    03576     {
    03577     case ePOSITION: return XSI_RTS_ATTRIBUTE_POSITION; break;
    03578     case eNORMAL: return XSI_RTS_ATTRIBUTE_NORMAL; break;
    03579     case eCOLOR0: return XSI_RTS_ATTRIBUTE_COLOR; break;
    03580     case eCOLOR1: return XSI_RTS_ATTRIBUTE_COLOR; break;
    03581     case eTEXCOORD0: return XSI_RTS_ATTRIBUTE_TEXUVW; break;
    03582     case eTEXCOORD1: return XSI_RTS_ATTRIBUTE_TEXUVW; break;
    03583     case eTEXCOORD2: return XSI_RTS_ATTRIBUTE_TEXUVW; break;
    03584     case eTEXCOORD3: return XSI_RTS_ATTRIBUTE_TEXUVW; break;
    03585     case eTEXCOORD4: return XSI_RTS_ATTRIBUTE_TEXUVW; break;
    03586     case eTEXCOORD5: return XSI_RTS_ATTRIBUTE_TEXUVW; break;
    03587     case eTEXCOORD6: return XSI_RTS_ATTRIBUTE_TEXUVW; break;
    03588     case eTEXCOORD7: return XSI_RTS_ATTRIBUTE_TEXUVW; break;
    03589     case eTEXCOORD8: return XSI_RTS_ATTRIBUTE_TEXUVW; break;
    03590     case eTEXCOORD9: return XSI_RTS_ATTRIBUTE_TEXUVW; break;
    03591     case eTEXCOORD10: return XSI_RTS_ATTRIBUTE_TEXUVW; break;
    03592     case eTEXCOORD11: return XSI_RTS_ATTRIBUTE_TEXUVW; break;
    03593     case eTEXCOORD12: return XSI_RTS_ATTRIBUTE_TEXUVW; break;
    03594     case eTEXCOORD13: return XSI_RTS_ATTRIBUTE_TEXUVW; break;
    03595     case eTEXCOORD14: return XSI_RTS_ATTRIBUTE_TEXUVW; break;
    03596     case eTEXCOORD15: return XSI_RTS_ATTRIBUTE_TEXUVW; break;
    03597     case eATTR0: return XSI_RTS_ATTRIBUTE_TEXUVW; break;
    03598     case eATTR1: return XSI_RTS_ATTRIBUTE_TEXUVW; break;
    03599     case eATTR2: return XSI_RTS_ATTRIBUTE_TEXUVW; break;
    03600     case eATTR3: return XSI_RTS_ATTRIBUTE_TEXUVW; break;
    03601     case eATTR4: return XSI_RTS_ATTRIBUTE_TEXUVW; break;
    03602     case eATTR5: return XSI_RTS_ATTRIBUTE_TEXUVW; break;
    03603     case eATTR6: return XSI_RTS_ATTRIBUTE_TEXUVW; break;
    03604     case eATTR7: return XSI_RTS_ATTRIBUTE_TEXUVW; break;
    03605     case eATTR8: return XSI_RTS_ATTRIBUTE_TEXUVW; break;
    03606     case eATTR9: return XSI_RTS_ATTRIBUTE_TEXUVW; break;
    03607     case eATTR10: return XSI_RTS_ATTRIBUTE_TEXUVW; break;
    03608     case eATTR11: return XSI_RTS_ATTRIBUTE_TEXUVW; break;
    03609     case eATTR12: return XSI_RTS_ATTRIBUTE_TEXUVW; break;
    03610     case eATTR13: return XSI_RTS_ATTRIBUTE_TEXUVW; break;
    03611     case eATTR14: return XSI_RTS_ATTRIBUTE_TEXUVW; break;
    03612     case eATTR15: return XSI_RTS_ATTRIBUTE_TEXUVW; break;
    03613     case ePSIZE: return XSI_RTS_ATTRIBUTE_SIZE; break;
    03614     case eFOGCOORD: return XSI_RTS_ATTRIBUTE_FOG; break;
    03615     case eTANGENT: return XSI_RTS_ATTRIBUTE_TANGENT; break;
    03616     case eBINORMAL: return XSI_RTS_ATTRIBUTE_BINORMAL; break;
    03617     case eWEIGHT: return XSI_RTS_ATTRIBUTE_WEIGHT; break;
    03618     case eINDICE: return XSI_RTS_ATTRIBUTE_INDICE; break;
    03619     case eTESSFACTOR: return XSI_RTS_ATTRIBUTE_TESSFACTOR; break;
    03620     case eDEPTH: return XSI_RTS_ATTRIBUTE_DEPTH; break;
    03621     case eSAMPLE: return XSI_RTS_ATTRIBUTE_SAMPLE; break;
    03622     }
    03623     return "undefined";
    03624 };
    03625
    03631 inline eStandardVertexAttribute GetStandardVertexAttributeFromXSIName ( const char* in_szName )
    03632 {
    03633     if ( !strcmp ( in_szName, XSI_RTS_ATTRIBUTE_POSITION ) )
    03634         return ePOSITION;
    03635     if ( !strcmp ( in_szName, XSI_RTS_ATTRIBUTE_NORMAL ) )
    03636         return eNORMAL;
    03637     if ( !strcmp ( in_szName, XSI_RTS_ATTRIBUTE_COLOR ) )
    03638         return eCOLOR0;
    03639     if ( !strcmp ( in_szName, XSI_RTS_ATTRIBUTE_TEXUVW ) )
    03640         return eTEXCOORD0;
    03641     if ( !strcmp ( in_szName, XSI_RTS_ATTRIBUTE_FOG ) )
    03642         return eFOGCOORD;
    03643     if ( !strcmp ( in_szName, XSI_RTS_ATTRIBUTE_SIZE ) )
    03644         return ePSIZE;
    03645     if ( !strcmp ( in_szName, XSI_RTS_ATTRIBUTE_WEIGHT ) )
    03646         return eWEIGHT;
    03647     if ( !strcmp ( in_szName, XSI_RTS_ATTRIBUTE_INDICE ) )
    03648         return eINDICE;
    03649     if ( !strcmp ( in_szName, XSI_RTS_ATTRIBUTE_TESSFACTOR ) )
    03650         return eTESSFACTOR;
    03651     if ( !strcmp ( in_szName, XSI_RTS_ATTRIBUTE_DEPTH ) )
    03652         return eDEPTH;
    03653     if ( !strcmp ( in_szName, XSI_RTS_ATTRIBUTE_SAMPLE ) )
    03654         return eSAMPLE;
    03655
    03656     if ( strlen(in_szName) >= 7 )
    03657     {
    03658         if ( !strncmp ( in_szName, "TANGENT",7 ) )
    03659             return eTANGENT;
    03660     }
    03661     if ( strlen(in_szName) >= 8 )
    03662     {
    03663         if ( !strncmp ( in_szName, "BINORMAL",8 ) )
    03664             return eBINORMAL;
    03665     }
    03666
    03667     return eMAX_STANDARD_VERTEX_ATTRIBUTE;
    03668 };
    03669
    03676 enum eXSI_Attribute_Size
    03677 {
    03678     XSI_RTS_ZERO = 0,
    03679     XSI_RTS_LONG,
    03680     XSI_RTS_LONG_2,
    03681     XSI_RTS_LONG_3,
    03682     XSI_RTS_LONG_4,
    03683     XSI_RTS_FLOAT,
    03684     XSI_RTS_FLOAT_2,
    03685     XSI_RTS_FLOAT_3,
    03686     XSI_RTS_FLOAT_4,
    03687     XSI_RTS_FLOAT_QUATERNION_WXYZ,
    03688     XSI_RTS_DOUBLE,
    03689     XSI_RTS_DOUBLE_2,
    03690     XSI_RTS_DOUBLE_3,
    03691     XSI_RTS_DOUBLE_4,
    03692     XSI_RTS_DOUBLE_QUATERNION_WXYZ,
    03693     XSI_RTS_MATRIX_3x3,
    03694     XSI_RTS_MATRIX_3x4,
    03695     XSI_RTS_MATRIX_4x4
    03696 };
    03709 typedef struct _tXSI_RTS_Attribute_Size
    03710 {
    03711     eXSI_Attribute_Size     m_eSize;
    03712     ULONG                   m_iArrayCount;
    03713 } XSI_RTS_Attribute_Size;
    03714
    03715
    03716
    03722 inline size_t GetSizeOfAttribute ( eXSI_Attribute_Size in_eAttrib )
    03723 {
    03724     size_t retval = 0;
    03725
    03726     switch ( in_eAttrib )
    03727     {
    03728         case XSI_RTS_ZERO: retval=0; break;
    03729         case XSI_RTS_LONG: retval=sizeof(LONG); break;
    03730         case XSI_RTS_LONG_2: retval=sizeof(LONG)*2; break;
    03731         case XSI_RTS_LONG_3: retval=sizeof(LONG)*3; break;
    03732         case XSI_RTS_LONG_4: retval=sizeof(LONG)*4; break;
    03733         case XSI_RTS_FLOAT: retval=sizeof(float); break;
    03734         case XSI_RTS_FLOAT_2: retval=sizeof(float)*2; break;
    03735         case XSI_RTS_FLOAT_3: retval=sizeof(float)*3; break;
    03736         case XSI_RTS_FLOAT_4: retval=sizeof(float)*4; break;
    03737         case XSI_RTS_FLOAT_QUATERNION_WXYZ: retval=sizeof(float)*4; break;
    03738         case XSI_RTS_DOUBLE: retval=sizeof(double); break;
    03739         case XSI_RTS_DOUBLE_2: retval=sizeof(double)*2; break;
    03740         case XSI_RTS_DOUBLE_3: retval=sizeof(double)*3; break;
    03741         case XSI_RTS_DOUBLE_4: retval=sizeof(double)*4; break;
    03742         case XSI_RTS_DOUBLE_QUATERNION_WXYZ: retval=sizeof(double)*4; break;
    03743         case XSI_RTS_MATRIX_3x3: sizeof(float)*9; break;
    03744         case XSI_RTS_MATRIX_3x4: sizeof(float)*12; break;
    03745         case XSI_RTS_MATRIX_4x4: sizeof(float)*16; break;
    03746     }
    03747     return retval;
    03748 }
    03749
    03762 typedef struct _XSI_RTS_Attribute
    03763 {
    03764     char*                           m_szName;
    03765     eStandardVertexAttribute        m_eVertexAttrib;
    03766 } XSI_RTS_Attribute;
    03767
    03769 // RTS 3.0 Entry points
    03771
    03828 typedef     RTSHADER_API bool (*RTS_Shader3_Init)
    03829 (
    03830     IRTSExecutionState  *in_pExecState,
    03831     void                *in_pParams,
    03832     void                **io_pShaderInstanceData
    03833 );
    03834
    03858 typedef     RTSHADER_API bool (*RTS_Shader3_InitUI)
    03859 (
    03860     IRTSExecutionState  *in_pExecState,
    03861     void                *in_pParams,
    03862     void                **io_pShaderInstanceData
    03863 );
    03864
    03881 typedef     RTSHADER_API bool (*RTS_Shader3_Term)
    03882 (
    03883     IRTSExecutionState  *in_pExecState,
    03884     void            *in_pParams,
    03885     void            **io_pShaderInstanceData
    03886 );
    03887
    03911 typedef     RTSHADER_API bool (*RTS_Shader3_GetRequirements)
    03912 (
    03913     IRTSExecutionState  *in_pExecState,
    03914     void            *in_pParams,
    03915     XSI_RTS_Primitive   *in_pGeom,
    03916     void            **io_pShaderInstanceData,
    03917     ULONG           in_lRequirement,
    03918     ULONG           *out_pRequirementValue
    03919 );
    03920
    03990 typedef     RTSHADER_API XSI_RTS_Attribute* (*RTS_Shader3_GetAttributeList)
    03991 (
    03992     IRTSExecutionState  *in_pExecState,
    03993     void                *in_pParams,
    03994     void                **io_pShaderInstanceData
    03995 );
    03996
    04057 typedef     RTSHADER_API bool (*RTS_Shader3_Execute)
    04058 (
    04059     IRTSExecutionState      *in_pExecState,
    04060     void                    *in_pParams,
    04061     XSI_RTS_Primitive       *in_pPrimitive,
    04062     void                    *in_pAttributes,
    04063     XSI_RTS_Attribute_Size  *in_pAttributesSize,
    04064     void                    **io_pShaderInstanceData
    04065 );
    04066
    04078 class CRTSState
    04079 {
    04080 public:
    04087     CRTSState(const char* in_szName, void* in_pData, unsigned long in_ID =0)
    04088     {
    04089         assert ( in_szName != NULL );
    04090         m_szName = strdup ( in_szName );
    04091         m_pData = in_pData ;
    04092         m_bIsValid = true;
    04093         m_ID = in_ID;
    04094     }
    04095
    04096     ~CRTSState()
    04097     {
    04098         if ( m_szName )
    04099         {
    04100             free(m_szName);
    04101             m_szName = NULL;
    04102         }
    04103     }
    04104
    04109     bool    IsValid () { return m_bIsValid; };
    04110
    04114     void    Validate() { m_bIsValid = true;};
    04115
    04119     void    Invalidate() { m_bIsValid = false;};
    04120
    04125     const char*     GetName() { return m_szName; };
    04126
    04130     void*           GetData() { return m_pData; };
    04131
    04136     unsigned long   GetID() { return m_ID; };
    04137
    04138 private:
    04139     unsigned long   m_ID;
    04140     char*           m_szName;
    04141     void*           m_pData;
    04142     bool            m_bIsValid;
    04143 };
    04144
    04145
    04153 class CRTSStateList
    04154 {
    04155 public:
    04156     CRTSStateList() {};
    04157     ~CRTSStateList()
    04158     {
    04159         for (int a=0;a<m_Array.GetUsed();a++)
    04160         {
    04161             delete m_Array[a];
    04162         }
    04163
    04164         m_Array.DisposeData();
    04165     }
    04166
    04170     int     GetNbStates ()
    04171     {
    04172         return m_Array.GetUsed();
    04173     }
    04174
    04180     CRTSState*  GetState ( unsigned int in_Idx )
    04181     {
    04182         assert ( (int)in_Idx < m_Array.GetUsed() );
    04183         return m_Array[in_Idx];
    04184     }
    04185
    04191     CRTSState* GetStateByName( const char* in_szName )
    04192     {
    04193         for (int a=0;a<m_Array.GetUsed();a++)
    04194         {
    04195             if ( !strcmp ( in_szName, m_Array[a]->GetName()) )
    04196                 return m_Array[a];
    04197         }
    04198
    04199         return NULL;
    04200     }
    04201
    04207     CRTSState* GetStateByID( unsigned long  in_ID )
    04208     {
    04209         for (int a=0;a<m_Array.GetUsed();a++)
    04210         {
    04211             if ( in_ID == m_Array[a]->GetID() )
    04212                 return m_Array[a];
    04213         }
    04214
    04215         return NULL;
    04216     }
    04217
    04225     CRTSState* AddState( const char* in_szName, void* in_pData, unsigned long in_ID = 0 )
    04226     {
    04227         assert ( in_szName != NULL );
    04228         CRTSState* l_pNewState = new CRTSState(in_szName,in_pData, in_ID);
    04229         m_Array.Add ( l_pNewState );
    04230         return l_pNewState;
    04231     }
    04232
    04237     void RemoveState ( CRTSState* in_pState )
    04238     {
    04239         assert ( in_pState != NULL );
    04240         for (int a=0;a<m_Array.GetUsed();a++)
    04241         {
    04242             if ( m_Array[a] == in_pState )
    04243             {
    04244                 delete m_Array[a];
    04245                 m_Array.DeleteAt ( a ,1);
    04246                 m_Array.Pack();
    04247                 break;
    04248             }
    04249         }
    04250     }
    04251
    04252 private:
    04253     CSIBCArray<CRTSState*>  m_Array;
    04254 };
    04255
    04256 //*****************************************************************************
    04281 //*****************************************************************************
    04282 class IRTSExecutionState
    04283 {
    04284 public:
    04285
    04289     virtual XSI_RTS_SystemParams*   GetSystemParams() = 0;
    04290
    04295     virtual CRTSStateList*          GetStateList() = 0 ;
    04296
    04301     virtual void*                   GetShader()                             = 0;
    04302
    04307     virtual void*                   GetShaderInstanceData()                 = 0;
    04308
    04313     virtual void                    SetShaderInstanceData( void* in_pData ) = 0;
    04314
    04319     virtual void*                   GetShaderParameters()                   = 0;
    04320
    04324     virtual long                    GetShaderUniqueID()                     = 0;
    04325
    04330     virtual eChannel                GetChannel(int in_iBuffer) = 0 ;
    04331
    04335     virtual void*                   GetMaterial()   = 0;
    04336
    04340     virtual void*                   GetPrimitive()  = 0;
    04341
    04345     virtual void*                   GetCamera()     = 0;
    04346
    04355     virtual bool                    DefineUniform (  XSI_RTS_Uniform::eUniformType in_eType, const char* in_szName, unsigned int in_uiSize, void* in_pData ) = 0;
    04356
    04357
    04362     virtual bool                    ClearUniforms () = 0;
    04363
    04368     virtual unsigned long           GetNbUniforms () = 0;
    04369
    04374     virtual XSI_RTS_Uniform**       GetUniformList () = 0;
    04375
    04392     virtual bool DrawGeometry ( eGraphicsAPI        in_eAPI,
    04393                     XSI_RTS_Primitive       *in_pGeometry,
    04394                     XSI_RTS_Attribute       *in_pAttributes,
    04395                     void*           in_pAttribData,
    04396                     XSI_RTS_Attribute_Size  *in_pAttributesSize) = 0;
    04397
    04411     virtual bool DrawGeometry ( eGraphicsAPI        in_eAPI,
    04412                     XSI_RTS_Primitive       *in_pGeometry,
    04413                     const char*         in_szMapping,
    04414                     void*           in_pAttribData,
    04415                     XSI_RTS_Attribute_Size  *in_pAttributesSize) = 0;
    04416
    04422     virtual XSI_RTS_Attribute* GetAttributeDescriptorFromMapping( const char* in_szMapping ) = 0;
    04423
    04429     virtual void RaiseError( const char* in_szError, eErrorType in_eErrorType) = 0;
    04430
    04438     virtual void RaiseError( const char* in_szError, eErrorType in_eErrorType, int in_Parameter, ULONG_PTR in_lData ) = 0;
    04439
    04443     virtual void PushExecutionState() = 0;
    04444
    04448     virtual void PopExecutionState  () = 0;
    04449
    04457     virtual void* GetGraphicsAPI(eGraphicsAPI in_eAPI) = 0;
    04458
    04459
    04465     virtual eRenderMode GetRenderMode() = 0;
    04466 };
    04467
    04468 #pragma pack(pop)
    04469
    04470 #endif // XSI_RTSHADERS_H