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 #include <xsi_decl.h>
    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     //!< XSI_RTSHADER_VERSION Realtime shader protocol version 3.00
    00159
    00163 //***************************************************************************************
    00164 // Application IDs
    00165 //***************************************************************************************
    00166
    00167 // Application_IDs Application ID Defines (identifies the various Softimage applications.)
    00168 #define APPID_XSI                   0x00000000  //! The host application is Softimage
    00169 #define APPID_XSI_OGL               0x00000001  //! The host application is Softimage and is running in OpenGL mode (Always)
    00170 #define APPID_XSIVIEWER             0x00000100  //! The host application is the XSI Viewer
    00171 #define APPID_XSIVIEWER_OGL         0x00000101  //! The host application is the XSI Viewer and is running with the OpenGL driver
    00172 #define APPID_XSIVIEWER_D3D         0x00000102  //! The host application is the XSI Viewer and is running with the DirectX driver
    00173 #define APPID_XSIVIEWER_XBOX        0x00000103  //! The host application is the XSI Viewer and is running on the XBOX
    00174 #define APPID_XSIVIEWER_PS2GL       0x00000104  //! The host application is the XSI Viewer and is running on the PS2
    00175
    00176
    00177 //***************************************************************************************
    00178 // Shader flags
    00179 //***************************************************************************************
    00180
    00186 #define RTS_SHADER_FLAG_NONE            0x00000000  //!< Nothing interesting happened since the last refresh.
    00187 #define RTS_SHADER_FLAG_PARAM_CHANGE    0x00000001  //!< A parameter of the shader has changed.
    00188 #define RTS_SHADER_FLAG_FIRST           0x00000002  //!< Not implemented. The shader is the first node in the shader tree (the first node executed).
    00189 #define RTS_SHADER_FLAG_LAST            0x00000004  //!< Not implemented. The shader is the last node in the shader tree (the last shader executed).
    00190 #define RTS_SHADER_FLAG_TREE_CHANGE     0x00000008  //!< The topology of the shader tree on the owner material has changed since the last refresh. For example, a node was connected or disconnected.
    00191
    00195 //***************************************************************************************
    00196 // Object flags
    00197 //***************************************************************************************
    00198
    00204 #define RTS_OBJECT_FLAG_NONE            0x00000000  //!< Nothing interesting happened since the last refresh.
    00205 #define RTS_OBJECT_FLAG_TOPO            0x00000001  //!< The object's topology has changed since the last refresh.
    00206 #define RTS_OBJECT_FLAG_DEFORM          0x00000002  //!< The object was deformed but it�s topology is the same since the last refresh.
    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     size_t          GetDynamicMemSize() const
    00586     {
    00587         size_t l_lSize = (m_szName?strlen(m_szName)+1:0);
    00588         switch ( m_eType )
    00589         {
    00590             case Float: l_lSize += m_uiSize*sizeof(float); break;
    00591             case Int:   l_lSize += m_uiSize*sizeof(int); break;
    00592             case Texture: l_lSize += m_uiSize*sizeof(char); break;
    00593         }
    00594         return l_lSize;
    00595     }
    00596
    00597 private:
    00598
    00599     char*       m_szName;
    00600     unsigned int    m_uiSize;
    00601     eUniformType    m_eType;
    00602
    00603     union
    00604     {
    00605         int*        m_piData;
    00606         float*      m_pfData;
    00607         char*       m_pcTextureData;
    00608     };
    00609 };
    00610
    00611 //***************************************************************************************
    00612 // OpenGL extensions wrappers
    00613 //***************************************************************************************
    00614
    00624 typedef struct tagXGSExtensionsGL
    00625 {
    00626     int  version;
    00627     int  size;
    00629     bool _GL_ARB_multitexture ;
    00630     bool _GL_ARB_transpose_matrix ;
    00631     bool _GL_ARB_multisample ;
    00632     bool _GL_ARB_texture_env_add ;
    00633     bool _GL_ARB_texture_cube_map ;
    00634     bool _GL_ARB_texture_compression ;
    00635     bool _GL_ARB_texture_border_clamp ;
    00636     bool _GL_ARB_point_parameters ;
    00637     bool _GL_ARB_vertex_blend ;
    00638     bool _GL_ARB_matrix_palette ;
    00639     bool _GL_ARB_texture_env_combine ;
    00640     bool _GL_ARB_texture_env_crossbar ;
    00641     bool _GL_ARB_texture_env_dot3 ;
    00642     bool _GL_ARB_texture_mirrored_repeat ;
    00643     bool _GL_ARB_depth_texture ;
    00644     bool _GL_ARB_shadow ;
    00645     bool _GL_ARB_shadow_ambient ;
    00646     bool _GL_ARB_window_pos ;
    00647     bool _GL_ARB_vertex_program ;
    00648     bool _GL_ARB_fragment_program ;
    00649     bool _GL_EXT_abgr ;
    00650     bool _GL_EXT_blend_color ;
    00651     bool _GL_EXT_polygon_offset ;
    00652     bool _GL_EXT_texture ;
    00653     bool _GL_EXT_texture3D ;
    00654     bool _GL_SGIS_texture_filter4 ;
    00655     bool _GL_EXT_subtexture ;
    00656     bool _GL_EXT_copy_texture ;
    00657     bool _GL_EXT_histogram ;
    00658     bool _GL_EXT_convolution ;
    00659     bool _GL_SGI_color_matrix ;
    00660     bool _GL_SGI_color_table ;
    00661     bool _GL_SGIS_pixel_texture ;
    00662     bool _GL_SGIX_pixel_texture ;
    00663     bool _GL_SGIS_texture4D ;
    00664     bool _GL_SGI_texture_color_table ;
    00665     bool _GL_EXT_cmyka ;
    00666     bool _GL_EXT_texture_object ;
    00667     bool _GL_SGIS_detail_texture ;
    00668     bool _GL_SGIS_sharpen_texture ;
    00669     bool _GL_EXT_packed_pixels ;
    00670     bool _GL_SGIS_texture_lod ;
    00671     bool _GL_SGIS_multisample ;
    00672     bool _GL_EXT_rescale_normal ;
    00673     bool _GL_EXT_vertex_array ;
    00674     bool _GL_EXT_misc_attribute ;
    00675     bool _GL_SGIS_generate_mipmap ;
    00676     bool _GL_SGIX_clipmap ;
    00677     bool _GL_SGIX_shadow ;
    00678     bool _GL_SGIS_texture_edge_clamp ;
    00679     bool _GL_SGIS_texture_border_clamp ;
    00680     bool _GL_EXT_blend_minmax ;
    00681     bool _GL_EXT_blend_subtract ;
    00682     bool _GL_EXT_blend_logic_op ;
    00683     bool _GL_SGIX_interlace ;
    00684     bool _GL_SGIS_texture_select ;
    00685     bool _GL_SGIX_sprite ;
    00686     bool _GL_SGIX_texture_multi_buffer ;
    00687     bool _GL_EXT_point_parameters ;
    00688     bool _GL_SGIX_instruments ;
    00689     bool _GL_SGIX_texture_scale_bias ;
    00690     bool _GL_SGIX_framezoom ;
    00691     bool _GL_SGIX_tag_sample_buffer ;
    00692     bool _GL_SGIX_reference_plane ;
    00693     bool _GL_SGIX_flush_raster ;
    00694     bool _GL_SGIX_depth_texture ;
    00695     bool _GL_SGIS_fog_function ;
    00696     bool _GL_SGIX_fog_offset ;
    00697     bool _GL_HP_image_transform ;
    00698     bool _GL_HP_convolution_border_modes ;
    00699     bool _GL_SGIX_texture_add_env ;
    00700     bool _GL_EXT_color_subtable ;
    00701     bool _GL_PGI_vertex_hints ;
    00702     bool _GL_PGI_misc_hints ;
    00703     bool _GL_EXT_paletted_texture ;
    00704     bool _GL_EXT_clip_volume_hint ;
    00705     bool _GL_SGIX_list_priority ;
    00706     bool _GL_SGIX_ir_instrument1 ;
    00707     bool _GL_SGIX_texture_lod_bias ;
    00708     bool _GL_SGIX_shadow_ambient ;
    00709     bool _GL_EXT_index_texture ;
    00710     bool _GL_EXT_index_material ;
    00711     bool _GL_EXT_index_func ;
    00712     bool _GL_EXT_index_array_formats ;
    00713     bool _GL_EXT_compiled_vertex_array ;
    00714     bool _GL_EXT_cull_vertex ;
    00715     bool _GL_SGIX_ycrcb ;
    00716     bool _GL_EXT_fragment_lighting ;
    00717     bool _GL_IBM_rasterpos_clip ;
    00718     bool _GL_HP_texture_lighting ;
    00719     bool _GL_EXT_draw_range_elements ;
    00720     bool _GL_WIN_phong_shading ;
    00721     bool _GL_WIN_specular_fog ;
    00722     bool _GL_EXT_light_texture ;
    00723     bool _GL_SGIX_blend_alpha_minmax ;
    00724     bool _GL_EXT_scene_marker ;
    00725     bool _GL_SGIX_pixel_texture_bits ;
    00726     bool _GL_EXT_bgra ;
    00727     bool _GL_SGIX_async ;
    00728     bool _GL_SGIX_async_pixel ;
    00729     bool _GL_SGIX_async_histogram ;
    00730     bool _GL_INTEL_texture_scissor ;
    00731     bool _GL_INTEL_parallel_arrays ;
    00732     bool _GL_HP_occlusion_test ;
    00733     bool _GL_EXT_pixel_transform ;
    00734     bool _GL_EXT_pixel_transform_color_table ;
    00735     bool _GL_EXT_shared_texture_palette ;
    00736     bool _GL_EXT_separate_specular_color ;
    00737     bool _GL_EXT_secondary_color ;
    00738     bool _GL_EXT_texture_env ;
    00739     bool _GL_EXT_texture_perturb_normal ;
    00740     bool _GL_EXT_multi_draw_arrays ;
    00741     bool _GL_EXT_fog_coord ;
    00742     bool _GL_REND_screen_coordinates ;
    00743     bool _GL_EXT_coordinate_frame ;
    00744     bool _GL_EXT_texture_env_combine ;
    00745     bool _GL_APPLE_specular_vector ;
    00746     bool _GL_APPLE_transform_hint ;
    00747     bool _GL_SUNX_constant_data ;
    00748     bool _GL_SUN_global_alpha ;
    00749     bool _GL_SUN_triangle_list ;
    00750     bool _GL_SUN_vertex ;
    00751     bool _GL_EXT_blend_func_separate ;
    00752     bool _GL_INGR_color_clamp ;
    00753     bool _GL_INGR_interlace_read ;
    00754     bool _GL_EXT_stencil_wrap ;
    00755     bool _GL_EXT_422_pixels ;
    00756     bool _GL_NV_texgen_reflection ;
    00757     bool _GL_SGIX_texture_range ;
    00758     bool _GL_SUN_convolution_border_modes ;
    00759     bool _GL_EXT_texture_env_add ;
    00760     bool _GL_EXT_texture_lod_bias ;
    00761     bool _GL_EXT_texture_filter_anisotropic ;
    00762     bool _GL_EXT_vertex_weighting ;
    00763     bool _GL_NV_light_max_exponent ;
    00764     bool _GL_NV_vertex_array_range ;
    00765     bool _GL_NV_register_combiners ;
    00766     bool _GL_NV_fog_distance ;
    00767     bool _GL_NV_texgen_emboss ;
    00768     bool _GL_NV_blend_square ;
    00769     bool _GL_NV_texture_env_combine4 ;
    00770     bool _GL_MESA_resize_buffers ;
    00771     bool _GL_MESA_window_pos ;
    00772     bool _GL_EXT_texture_compression_s3tc ;
    00773     bool _GL_IBM_cull_vertex ;
    00774     bool _GL_IBM_multimode_draw_arrays ;
    00775     bool _GL_IBM_vertex_array_lists ;
    00776     bool _GL_3DFX_texture_compression_FXT1 ;
    00777     bool _GL_3DFX_multisample ;
    00778     bool _GL_3DFX_tbuffer ;
    00779     bool _GL_SGIX_vertex_preclip ;
    00780     bool _GL_SGIX_resample ;
    00781     bool _GL_SGIS_texture_color_mask ;
    00782     bool _GL_EXT_texture_env_dot3 ;
    00783     bool _GL_ATI_texture_mirror_once ;
    00784     bool _GL_NV_fence ;
    00785     bool _GL_IBM_static_data ;
    00786     bool _GL_IBM_texture_mirrored_repeat ;
    00787     bool _GL_NV_evaluators ;
    00788     bool _GL_NV_packed_depth_stencil ;
    00789     bool _GL_NV_register_combiners2 ;
    00790     bool _GL_NV_texture_compression_vtc ;
    00791     bool _GL_NV_texture_rectangle ;
    00792     bool _GL_NV_texture_shader ;
    00793     bool _GL_NV_texture_shader2 ;
    00794     bool _GL_NV_vertex_array_range2 ;
    00795     bool _GL_NV_vertex_program ;
    00796     bool _GL_SGIX_texture_coordinate_clamp ;
    00797     bool _GL_OML_interlace ;
    00798     bool _GL_OML_subsample ;
    00799     bool _GL_OML_resample ;
    00800     bool _GL_NV_copy_depth_to_color ;
    00801     bool _GL_ATI_envmap_bumpmap ;
    00802     bool _GL_ATI_fragment_shader ;
    00803     bool _GL_ATI_pn_triangles ;
    00804     bool _GL_ATI_vertex_array_object ;
    00805     bool _GL_EXT_vertex_shader ;
    00806     bool _GL_ATI_vertex_streams ;
    00807     bool _GL_ATI_element_array ;
    00808     bool _GL_SUN_mesh_array ;
    00809     bool _GL_SUN_slice_accum ;
    00810     bool _GL_NV_multisample_filter_hint ;
    00811     bool _GL_NV_depth_clamp ;
    00812     bool _GL_NV_occlusion_query ;
    00813     bool _GL_NV_point_sprite ;
    00814     bool _GL_NV_texture_shader3 ;
    00815     bool _GL_NV_vertex_program1_1 ;
    00816     bool _GL_EXT_shadow_funcs ;
    00817     bool _GL_EXT_stencil_two_side ;
    00818     bool _GL_ATI_text_fragment_shader ;
    00819     bool _GL_APPLE_client_storage ;
    00820     bool _GL_APPLE_element_array ;
    00821     bool _GL_APPLE_fence ;
    00822     bool _GL_APPLE_vertex_array_object ;
    00823     bool _GL_APPLE_vertex_array_range ;
    00824     bool _GL_APPLE_ycbcr_422 ;
    00825     bool _GL_ARB_vertex_buffer_object ;
    00826     bool _GL_S3_s3tc ;
    00827     bool _GL_ATI_draw_buffers ;
    00828     bool _GL_ATI_texture_env_combine3 ;
    00829     bool _GL_ATI_texture_float ;
    00830     bool _GL_NV_float_buffer ;
    00831     bool _GL_NV_fragment_program ;
    00832     bool _GL_NV_half_float ;
    00833     bool _GL_NV_pixel_data_range ;
    00834     bool _GL_NV_primitive_restart ;
    00835     bool _GL_NV_texture_expand_normal ;
    00836     bool _GL_NV_vertex_program2 ;
    00837     bool _GL_ATI_map_object_buffer ;
    00838     bool _GL_ATI_separate_stencil ;
    00839     bool _GL_ATI_vertex_attrib_array_object ;
    00840     bool _GL_framebuffer_object;
    00841     bool _GL_ARB_pixel_buffer_object;
    00842
    00843 } XGSExtensionsGL;
    00844
    00853 typedef struct tagXGSGLExtensionsFuncs
    00854 {
    00855     int                                                                 version;
    00856     int                                                                 size;
    00858     PFNGLBLENDCOLORPROC                                                 glBlendColor;
    00859     PFNGLBLENDEQUATIONPROC                                              glBlendEquation;
    00860     PFNGLDRAWRANGEELEMENTSPROC                                          glDrawRangeElements;
    00861     PFNGLCOLORTABLEPROC                                                 glColorTable;
    00862     PFNGLCOLORTABLEPARAMETERFVPROC                                      glColorTableParameterfv;
    00863     PFNGLCOLORTABLEPARAMETERIVPROC                                      glColorTableParameteriv;
    00864     PFNGLCOPYCOLORTABLEPROC                                             glCopyColorTable;
    00865     PFNGLGETCOLORTABLEPROC                                              glGetColorTable;
    00866     PFNGLGETCOLORTABLEPARAMETERFVPROC                                   glGetColorTableParameterfv;
    00867     PFNGLGETCOLORTABLEPARAMETERIVPROC                                   glGetColorTableParameteriv;
    00868     PFNGLCOLORSUBTABLEPROC                                              glColorSubTable;
    00869     PFNGLCOPYCOLORSUBTABLEPROC                                          glCopyColorSubTable;
    00870     PFNGLCONVOLUTIONFILTER1DPROC                                        glConvolutionFilter1D;
    00871     PFNGLCONVOLUTIONFILTER2DPROC                                        glConvolutionFilter2D;
    00872     PFNGLCONVOLUTIONPARAMETERFPROC                                      glConvolutionParameterf;
    00873     PFNGLCONVOLUTIONPARAMETERFVPROC                                     glConvolutionParameterfv;
    00874     PFNGLCONVOLUTIONPARAMETERIPROC                                      glConvolutionParameteri;
    00875     PFNGLCONVOLUTIONPARAMETERIVPROC                                     glConvolutionParameteriv;
    00876     PFNGLCOPYCONVOLUTIONFILTER1DPROC                                    glCopyConvolutionFilter1D;
    00877     PFNGLCOPYCONVOLUTIONFILTER2DPROC                                    glCopyConvolutionFilter2D;
    00878     PFNGLGETCONVOLUTIONFILTERPROC                                       glGetConvolutionFilter;
    00879     PFNGLGETCONVOLUTIONPARAMETERFVPROC                                  glGetConvolutionParameterfv;
    00880     PFNGLGETCONVOLUTIONPARAMETERIVPROC                                  glGetConvolutionParameteriv;
    00881     PFNGLGETSEPARABLEFILTERPROC                                         glGetSeparableFilter;
    00882     PFNGLSEPARABLEFILTER2DPROC                                          glSeparableFilter2D;
    00883     PFNGLGETHISTOGRAMPROC                                               glGetHistogram;
    00884     PFNGLGETHISTOGRAMPARAMETERFVPROC                                    glGetHistogramParameterfv;
    00885     PFNGLGETHISTOGRAMPARAMETERIVPROC                                    glGetHistogramParameteriv;
    00886     PFNGLGETMINMAXPROC                                                  glGetMinmax;
    00887     PFNGLGETMINMAXPARAMETERFVPROC                                       glGetMinmaxParameterfv;
    00888     PFNGLGETMINMAXPARAMETERIVPROC                                       glGetMinmaxParameteriv;
    00889     PFNGLHISTOGRAMPROC                                                  glHistogram;
    00890     PFNGLMINMAXPROC                                                     glMinmax;
    00891     PFNGLRESETHISTOGRAMPROC                                             glResetHistogram;
    00892     PFNGLRESETMINMAXPROC                                                glResetMinmax;
    00893     PFNGLTEXIMAGE3DPROC                                                 glTexImage3D;
    00894     PFNGLTEXSUBIMAGE3DPROC                                              glTexSubImage3D;
    00895     PFNGLCOPYTEXSUBIMAGE3DPROC                                          glCopyTexSubImage3D;
    00897     PFNGLACTIVETEXTUREPROC                                              glActiveTexture;
    00898     PFNGLCLIENTACTIVETEXTUREPROC                                        glClientActiveTexture;
    00899     PFNGLMULTITEXCOORD1DPROC                                            glMultiTexCoord1d;
    00900     PFNGLMULTITEXCOORD1DVPROC                                           glMultiTexCoord1dv;
    00901     PFNGLMULTITEXCOORD1FPROC                                            glMultiTexCoord1f;
    00902     PFNGLMULTITEXCOORD1FVPROC                                           glMultiTexCoord1fv;
    00903     PFNGLMULTITEXCOORD1IPROC                                            glMultiTexCoord1i;
    00904     PFNGLMULTITEXCOORD1IVPROC                                           glMultiTexCoord1iv;
    00905     PFNGLMULTITEXCOORD1SPROC                                            glMultiTexCoord1s;
    00906     PFNGLMULTITEXCOORD1SVPROC                                           glMultiTexCoord1sv;
    00907     PFNGLMULTITEXCOORD2DPROC                                            glMultiTexCoord2d;
    00908     PFNGLMULTITEXCOORD2DVPROC                                           glMultiTexCoord2dv;
    00909     PFNGLMULTITEXCOORD2FPROC                                            glMultiTexCoord2f;
    00910     PFNGLMULTITEXCOORD2FVPROC                                           glMultiTexCoord2fv;
    00911     PFNGLMULTITEXCOORD2IPROC                                            glMultiTexCoord2i;
    00912     PFNGLMULTITEXCOORD2IVPROC                                           glMultiTexCoord2iv;
    00913     PFNGLMULTITEXCOORD2SPROC                                            glMultiTexCoord2s;
    00914     PFNGLMULTITEXCOORD2SVPROC                                           glMultiTexCoord2sv;
    00915     PFNGLMULTITEXCOORD3DPROC                                            glMultiTexCoord3d;
    00916     PFNGLMULTITEXCOORD3DVPROC                                           glMultiTexCoord3dv;
    00917     PFNGLMULTITEXCOORD3FPROC                                            glMultiTexCoord3f;
    00918     PFNGLMULTITEXCOORD3FVPROC                                           glMultiTexCoord3fv;
    00919     PFNGLMULTITEXCOORD3IPROC                                            glMultiTexCoord3i;
    00920     PFNGLMULTITEXCOORD3IVPROC                                           glMultiTexCoord3iv;
    00921     PFNGLMULTITEXCOORD3SPROC                                            glMultiTexCoord3s;
    00922     PFNGLMULTITEXCOORD3SVPROC                                           glMultiTexCoord3sv;
    00923     PFNGLMULTITEXCOORD4DPROC                                            glMultiTexCoord4d;
    00924     PFNGLMULTITEXCOORD4DVPROC                                           glMultiTexCoord4dv;
    00925     PFNGLMULTITEXCOORD4FPROC                                            glMultiTexCoord4f;
    00926     PFNGLMULTITEXCOORD4FVPROC                                           glMultiTexCoord4fv;
    00927     PFNGLMULTITEXCOORD4IPROC                                            glMultiTexCoord4i;
    00928     PFNGLMULTITEXCOORD4IVPROC                                           glMultiTexCoord4iv;
    00929     PFNGLMULTITEXCOORD4SPROC                                            glMultiTexCoord4s;
    00930     PFNGLMULTITEXCOORD4SVPROC                                           glMultiTexCoord4sv;
    00931     PFNGLLOADTRANSPOSEMATRIXFPROC                                       glLoadTransposeMatrixf;
    00932     PFNGLLOADTRANSPOSEMATRIXDPROC                                       glLoadTransposeMatrixd;
    00933     PFNGLMULTTRANSPOSEMATRIXFPROC                                       glMultTransposeMatrixf;
    00934     PFNGLMULTTRANSPOSEMATRIXDPROC                                       glMultTransposeMatrixd;
    00935     PFNGLSAMPLECOVERAGEPROC                                             glSampleCoverage;
    00936     PFNGLCOMPRESSEDTEXIMAGE3DPROC                                       glCompressedTexImage3D;
    00937     PFNGLCOMPRESSEDTEXIMAGE2DPROC                                       glCompressedTexImage2D;
    00938     PFNGLCOMPRESSEDTEXIMAGE1DPROC                                       glCompressedTexImage1D;
    00939     PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC                                    glCompressedTexSubImage3D;
    00940     PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC                                    glCompressedTexSubImage2D;
    00941     PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC                                    glCompressedTexSubImage1D;
    00942     PFNGLGETCOMPRESSEDTEXIMAGEPROC                                      glGetCompressedTexImage;
    00944     PFNGLACTIVETEXTUREPROC                                              glActiveTextureARB;
    00945     PFNGLCLIENTACTIVETEXTUREARBPROC                                     glClientActiveTextureARB;
    00946     PFNGLMULTITEXCOORD1DARBPROC                                         glMultiTexCoord1dARB;
    00947     PFNGLMULTITEXCOORD1DVARBPROC                                        glMultiTexCoord1dvARB;
    00948     PFNGLMULTITEXCOORD1FARBPROC                                         glMultiTexCoord1fARB;
    00949     PFNGLMULTITEXCOORD1FVARBPROC                                        glMultiTexCoord1fvARB;
    00950     PFNGLMULTITEXCOORD1IARBPROC                                         glMultiTexCoord1iARB;
    00951     PFNGLMULTITEXCOORD1IVARBPROC                                        glMultiTexCoord1ivARB;
    00952     PFNGLMULTITEXCOORD1SARBPROC                                         glMultiTexCoord1sARB;
    00953     PFNGLMULTITEXCOORD1SVARBPROC                                        glMultiTexCoord1svARB;
    00954     PFNGLMULTITEXCOORD2DARBPROC                                         glMultiTexCoord2dARB;
    00955     PFNGLMULTITEXCOORD2DVARBPROC                                        glMultiTexCoord2dvARB;
    00956     PFNGLMULTITEXCOORD2FARBPROC                                         glMultiTexCoord2fARB;
    00957     PFNGLMULTITEXCOORD2FVARBPROC                                        glMultiTexCoord2fvARB;
    00958     PFNGLMULTITEXCOORD2IARBPROC                                         glMultiTexCoord2iARB;
    00959     PFNGLMULTITEXCOORD2IVARBPROC                                        glMultiTexCoord2ivARB;
    00960     PFNGLMULTITEXCOORD2SARBPROC                                         glMultiTexCoord2sARB;
    00961     PFNGLMULTITEXCOORD2SVARBPROC                                        glMultiTexCoord2svARB;
    00962     PFNGLMULTITEXCOORD3DARBPROC                                         glMultiTexCoord3dARB;
    00963     PFNGLMULTITEXCOORD3DVARBPROC                                        glMultiTexCoord3dvARB;
    00964     PFNGLMULTITEXCOORD3FARBPROC                                         glMultiTexCoord3fARB;
    00965     PFNGLMULTITEXCOORD3FVARBPROC                                        glMultiTexCoord3fvARB;
    00966     PFNGLMULTITEXCOORD3IARBPROC                                         glMultiTexCoord3iARB;
    00967     PFNGLMULTITEXCOORD3IVARBPROC                                        glMultiTexCoord3ivARB;
    00968     PFNGLMULTITEXCOORD3SARBPROC                                         glMultiTexCoord3sARB;
    00969     PFNGLMULTITEXCOORD3SVARBPROC                                        glMultiTexCoord3svARB;
    00970     PFNGLMULTITEXCOORD4DARBPROC                                         glMultiTexCoord4dARB;
    00971     PFNGLMULTITEXCOORD4DVARBPROC                                        glMultiTexCoord4dvARB;
    00972     PFNGLMULTITEXCOORD4FARBPROC                                         glMultiTexCoord4fARB;
    00973     PFNGLMULTITEXCOORD4FVARBPROC                                        glMultiTexCoord4fvARB;
    00974     PFNGLMULTITEXCOORD4IARBPROC                                         glMultiTexCoord4iARB;
    00975     PFNGLMULTITEXCOORD4IVARBPROC                                        glMultiTexCoord4ivARB;
    00976     PFNGLMULTITEXCOORD4SARBPROC                                         glMultiTexCoord4sARB;
    00977     PFNGLMULTITEXCOORD4SVARBPROC                                        glMultiTexCoord4svARB;
    00979     PFNGLLOADTRANSPOSEMATRIXFARBPROC                                    glLoadTransposeMatrixfARB;
    00980     PFNGLLOADTRANSPOSEMATRIXDARBPROC                                    glLoadTransposeMatrixdARB;
    00981     PFNGLMULTTRANSPOSEMATRIXFARBPROC                                    glMultTransposeMatrixfARB;
    00982     PFNGLMULTTRANSPOSEMATRIXDARBPROC                                    glMultTransposeMatrixdARB;
    00984     PFNGLSAMPLECOVERAGEARBPROC                                          glSampleCoverageARB;
    00986     PFNGLCOMPRESSEDTEXIMAGE3DARBPROC                                    glCompressedTexImage3DARB;
    00987     PFNGLCOMPRESSEDTEXIMAGE2DARBPROC                                    glCompressedTexImage2DARB;
    00988     PFNGLCOMPRESSEDTEXIMAGE1DARBPROC                                    glCompressedTexImage1DARB;
    00989     PFNGLCOMPRESSEDTEXSUBIMAGE3DARBPROC                                 glCompressedTexSubImage3DARB;
    00990     PFNGLCOMPRESSEDTEXSUBIMAGE2DARBPROC                                 glCompressedTexSubImage2DARB;
    00991     PFNGLCOMPRESSEDTEXSUBIMAGE1DARBPROC                                 glCompressedTexSubImage1DARB;
    00992     PFNGLGETCOMPRESSEDTEXIMAGEARBPROC                                   glGetCompressedTexImageARB;
    00994     PFNGLPOINTPARAMETERFARBPROC                                         glPointParameterfARB;
    00995     PFNGLPOINTPARAMETERFVARBPROC                                        glPointParameterfvARB;
    00997     PFNGLWEIGHTBVARBPROC                                                glWeightbvARB;
    00998     PFNGLWEIGHTSVARBPROC                                                glWeightsvARB;
    00999     PFNGLWEIGHTIVARBPROC                                                glWeightivARB;
    01000     PFNGLWEIGHTFVARBPROC                                                glWeightfvARB;
    01001     PFNGLWEIGHTDVARBPROC                                                glWeightdvARB;
    01002     PFNGLWEIGHTUBVARBPROC                                               glWeightubvARB;
    01003     PFNGLWEIGHTUSVARBPROC                                               glWeightusvARB;
    01004     PFNGLWEIGHTUIVARBPROC                                               glWeightuivARB;
    01005     PFNGLWEIGHTPOINTERARBPROC                                           glWeightPointerARB;
    01006     PFNGLVERTEXBLENDARBPROC                                             glVertexBlendARB;
    01007
    01009     PFNGLCURRENTPALETTEMATRIXARBPROC                                    glCurrentPaletteMatrixARB;
    01010     PFNGLMATRIXINDEXUBVARBPROC                                          glMatrixIndexubvARB;
    01011     PFNGLMATRIXINDEXUSVARBPROC                                          glMatrixIndexusvARB;
    01012     PFNGLMATRIXINDEXUIVARBPROC                                          glMatrixIndexuivARB;
    01013     PFNGLMATRIXINDEXPOINTERARBPROC                                      glMatrixIndexPointerARB;
    01015     PFNGLWINDOWPOS2DARBPROC                                             glWindowPos2dARB;
    01016     PFNGLWINDOWPOS2DVARBPROC                                            glWindowPos2dvARB;
    01017     PFNGLWINDOWPOS2FARBPROC                                             glWindowPos2fARB;
    01018     PFNGLWINDOWPOS2FVARBPROC                                            glWindowPos2fvARB;
    01019     PFNGLWINDOWPOS2IARBPROC                                             glWindowPos2iARB;
    01020     PFNGLWINDOWPOS2IVARBPROC                                            glWindowPos2ivARB;
    01021     PFNGLWINDOWPOS2SARBPROC                                             glWindowPos2sARB;
    01022     PFNGLWINDOWPOS2SVARBPROC                                            glWindowPos2svARB;
    01023     PFNGLWINDOWPOS3DARBPROC                                             glWindowPos3dARB;
    01024     PFNGLWINDOWPOS3DVARBPROC                                            glWindowPos3dvARB;
    01025     PFNGLWINDOWPOS3FARBPROC                                             glWindowPos3fARB;
    01026     PFNGLWINDOWPOS3FVARBPROC                                            glWindowPos3fvARB;
    01027     PFNGLWINDOWPOS3IARBPROC                                             glWindowPos3iARB;
    01028     PFNGLWINDOWPOS3IVARBPROC                                            glWindowPos3ivARB;
    01029     PFNGLWINDOWPOS3SARBPROC                                             glWindowPos3sARB;
    01030     PFNGLWINDOWPOS3SVARBPROC                                            glWindowPos3svARB;
    01032     PFNGLBLENDCOLOREXTPROC                                              glBlendColorEXT;
    01034     PFNGLPOLYGONOFFSETEXTPROC                                           glPolygonOffsetEXT;
    01036     PFNGLTEXIMAGE3DEXTPROC                                              glTexImage3DEXT;
    01037     PFNGLTEXSUBIMAGE3DEXTPROC                                           glTexSubImage3DEXT;
    01039     PFNGLGETTEXFILTERFUNCSGISPROC                                       glGetTexFilterFuncSGIS;
    01040     PFNGLTEXFILTERFUNCSGISPROC                                          glTexFilterFuncSGIS;
    01042     PFNGLTEXSUBIMAGE1DEXTPROC                                           glTexSubImage1DEXT;
    01043     PFNGLTEXSUBIMAGE2DEXTPROC                                           glTexSubImage2DEXT;
    01045     PFNGLCOPYTEXIMAGE1DEXTPROC                                          glCopyTexImage1DEXT;
    01046     PFNGLCOPYTEXIMAGE2DEXTPROC                                          glCopyTexImage2DEXT;
    01047     PFNGLCOPYTEXSUBIMAGE1DEXTPROC                                       glCopyTexSubImage1DEXT;
    01048     PFNGLCOPYTEXSUBIMAGE2DEXTPROC                                       glCopyTexSubImage2DEXT;
    01049     PFNGLCOPYTEXSUBIMAGE3DEXTPROC                                       glCopyTexSubImage3DEXT;
    01051     PFNGLGETHISTOGRAMEXTPROC                                            glGetHistogramEXT;
    01052     PFNGLGETHISTOGRAMPARAMETERFVEXTPROC                                 glGetHistogramParameterfvEXT;
    01053     PFNGLGETHISTOGRAMPARAMETERIVEXTPROC                                 glGetHistogramParameterivEXT;
    01054     PFNGLGETMINMAXEXTPROC                                               glGetMinmaxEXT;
    01055     PFNGLGETMINMAXPARAMETERFVEXTPROC                                    glGetMinmaxParameterfvEXT;
    01056     PFNGLGETMINMAXPARAMETERIVEXTPROC                                    glGetMinmaxParameterivEXT;
    01057     PFNGLHISTOGRAMEXTPROC                                               glHistogramEXT;
    01058     PFNGLMINMAXEXTPROC                                                  glMinmaxEXT;
    01059     PFNGLRESETHISTOGRAMEXTPROC                                          glResetHistogramEXT;
    01060     PFNGLRESETMINMAXEXTPROC                                             glResetMinmaxEXT;
    01062     PFNGLCONVOLUTIONFILTER1DEXTPROC                                     glConvolutionFilter1DEXT;
    01063     PFNGLCONVOLUTIONFILTER2DEXTPROC                                     glConvolutionFilter2DEXT;
    01064     PFNGLCONVOLUTIONPARAMETERFEXTPROC                                   glConvolutionParameterfEXT;
    01065     PFNGLCONVOLUTIONPARAMETERFVEXTPROC                                  glConvolutionParameterfvEXT;
    01066     PFNGLCONVOLUTIONPARAMETERIEXTPROC                                   glConvolutionParameteriEXT;
    01067     PFNGLCONVOLUTIONPARAMETERIVEXTPROC                                  glConvolutionParameterivEXT;
    01068     PFNGLCOPYCONVOLUTIONFILTER1DEXTPROC                                 glCopyConvolutionFilter1DEXT;
    01069     PFNGLCOPYCONVOLUTIONFILTER2DEXTPROC                                 glCopyConvolutionFilter2DEXT;
    01070     PFNGLGETCONVOLUTIONFILTEREXTPROC                                    glGetConvolutionFilterEXT;
    01071     PFNGLGETCONVOLUTIONPARAMETERFVEXTPROC                               glGetConvolutionParameterfvEXT;
    01072     PFNGLGETCONVOLUTIONPARAMETERIVEXTPROC                               glGetConvolutionParameterivEXT;
    01073     PFNGLGETSEPARABLEFILTEREXTPROC                                      glGetSeparableFilterEXT;
    01074     PFNGLSEPARABLEFILTER2DEXTPROC                                       glSeparableFilter2DEXT;
    01076     PFNGLCOLORTABLESGIPROC                                              glColorTableSGI;
    01077     PFNGLCOLORTABLEPARAMETERFVSGIPROC                                   glColorTableParameterfvSGI;
    01078     PFNGLCOLORTABLEPARAMETERIVSGIPROC                                   glColorTableParameterivSGI;
    01079     PFNGLCOPYCOLORTABLESGIPROC                                          glCopyColorTableSGI;
    01080     PFNGLGETCOLORTABLESGIPROC                                           glGetColorTableSGI;
    01081     PFNGLGETCOLORTABLEPARAMETERFVSGIPROC                                glGetColorTableParameterfvSGI;
    01082     PFNGLGETCOLORTABLEPARAMETERIVSGIPROC                                glGetColorTableParameterivSGI;
    01084     PFNGLPIXELTEXGENSGIXPROC                                            glPixelTexGenSGIX;
    01086     PFNGLPIXELTEXGENPARAMETERISGISPROC                                  glPixelTexGenParameteriSGIS;
    01087     PFNGLPIXELTEXGENPARAMETERIVSGISPROC                                 glPixelTexGenParameterivSGIS;
    01088     PFNGLPIXELTEXGENPARAMETERFSGISPROC                                  glPixelTexGenParameterfSGIS;
    01089     PFNGLPIXELTEXGENPARAMETERFVSGISPROC                                 glPixelTexGenParameterfvSGIS;
    01090     PFNGLGETPIXELTEXGENPARAMETERIVSGISPROC                              glGetPixelTexGenParameterivSGIS;
    01091     PFNGLGETPIXELTEXGENPARAMETERFVSGISPROC                              glGetPixelTexGenParameterfvSGIS;
    01093     PFNGLTEXIMAGE4DSGISPROC                                             glTexImage4DSGIS;
    01094     PFNGLTEXSUBIMAGE4DSGISPROC                                          glTexSubImage4DSGIS;
    01096     PFNGLARETEXTURESRESIDENTEXTPROC                                     glAreTexturesResidentEXT;
    01097     PFNGLBINDTEXTUREEXTPROC                                             glBindTextureEXT;
    01098     PFNGLDELETETEXTURESEXTPROC                                          glDeleteTexturesEXT;
    01099     PFNGLGENTEXTURESEXTPROC                                             glGenTexturesEXT;
    01100     PFNGLISTEXTUREEXTPROC                                               glIsTextureEXT;
    01101     PFNGLPRIORITIZETEXTURESEXTPROC                                      glPrioritizeTexturesEXT;
    01103     PFNGLDETAILTEXFUNCSGISPROC                                          glDetailTexFuncSGIS;
    01104     PFNGLGETDETAILTEXFUNCSGISPROC                                       glGetDetailTexFuncSGIS;
    01106     PFNGLSHARPENTEXFUNCSGISPROC                                         glSharpenTexFuncSGIS;
    01107     PFNGLGETSHARPENTEXFUNCSGISPROC                                      glGetSharpenTexFuncSGIS;
    01109     PFNGLSAMPLEMASKSGISPROC                                             glSampleMaskSGIS;
    01110     PFNGLSAMPLEPATTERNSGISPROC                                          glSamplePatternSGIS;
    01112     PFNGLARRAYELEMENTEXTPROC                                            glArrayElementEXT;
    01113     PFNGLCOLORPOINTEREXTPROC                                            glColorPointerEXT;
    01114     PFNGLDRAWARRAYSEXTPROC                                              glDrawArraysEXT;
    01115     PFNGLEDGEFLAGPOINTEREXTPROC                                         glEdgeFlagPointerEXT;
    01116     PFNGLGETPOINTERVEXTPROC                                             glGetPointervEXT;
    01117     PFNGLINDEXPOINTEREXTPROC                                            glIndexPointerEXT;
    01118     PFNGLNORMALPOINTEREXTPROC                                           glNormalPointerEXT;
    01119     PFNGLTEXCOORDPOINTEREXTPROC                                         glTexCoordPointerEXT;
    01120     PFNGLVERTEXPOINTEREXTPROC                                           glVertexPointerEXT;
    01122     PFNGLBLENDEQUATIONEXTPROC                                           glBlendEquationEXT;
    01124     PFNGLSPRITEPARAMETERFSGIXPROC                                       glSpriteParameterfSGIX;
    01125     PFNGLSPRITEPARAMETERFVSGIXPROC                                      glSpriteParameterfvSGIX;
    01126     PFNGLSPRITEPARAMETERISGIXPROC                                       glSpriteParameteriSGIX;
    01127     PFNGLSPRITEPARAMETERIVSGIXPROC                                      glSpriteParameterivSGIX;
    01129     PFNGLPOINTPARAMETERFEXTPROC                                         glPointParameterfEXT;
    01130     PFNGLPOINTPARAMETERFVEXTPROC                                        glPointParameterfvEXT;
    01132     PFNGLPOINTPARAMETERFSGISPROC                                        glPointParameterfSGIS;
    01133     PFNGLPOINTPARAMETERFVSGISPROC                                       glPointParameterfvSGIS;
    01135     PFNGLGETINSTRUMENTSSGIXPROC                                         glGetInstrumentsSGIX;
    01136     PFNGLINSTRUMENTSBUFFERSGIXPROC                                      glInstrumentsBufferSGIX;
    01137     PFNGLPOLLINSTRUMENTSSGIXPROC                                        glPollInstrumentsSGIX;
    01138     PFNGLREADINSTRUMENTSSGIXPROC                                        glReadInstrumentsSGIX;
    01139     PFNGLSTARTINSTRUMENTSSGIXPROC                                       glStartInstrumentsSGIX;
    01140     PFNGLSTOPINSTRUMENTSSGIXPROC                                        glStopInstrumentsSGIX;
    01142     PFNGLFRAMEZOOMSGIXPROC                                              glFrameZoomSGIX;
    01144     PFNGLTAGSAMPLEBUFFERSGIXPROC                                        glTagSampleBufferSGIX;
    01146     PFNGLDEFORMATIONMAP3DSGIXPROC                                       glDeformationMap3dSGIX;
    01147     PFNGLDEFORMATIONMAP3FSGIXPROC                                       glDeformationMap3fSGIX;
    01148     PFNGLDEFORMSGIXPROC                                                 glDeformSGIX;
    01149     PFNGLLOADIDENTITYDEFORMATIONMAPSGIXPROC                             glLoadIdentityDeformationMapSGIX;
    01151     PFNGLREFERENCEPLANESGIXPROC                                         glReferencePlaneSGIX;
    01153     PFNGLFLUSHRASTERSGIXPROC                                            glFlushRasterSGIX;
    01155     PFNGLFOGFUNCSGISPROC                                                glFogFuncSGIS;
    01156     PFNGLGETFOGFUNCSGISPROC                                             glGetFogFuncSGIS;
    01158     PFNGLIMAGETRANSFORMPARAMETERIHPPROC                                 glImageTransformParameteriHP;
    01159     PFNGLIMAGETRANSFORMPARAMETERFHPPROC                                 glImageTransformParameterfHP;
    01160     PFNGLIMAGETRANSFORMPARAMETERIVHPPROC                                glImageTransformParameterivHP;
    01161     PFNGLIMAGETRANSFORMPARAMETERFVHPPROC                                glImageTransformParameterfvHP;
    01162     PFNGLGETIMAGETRANSFORMPARAMETERIVHPPROC                             glGetImageTransformParameterivHP;
    01163     PFNGLGETIMAGETRANSFORMPARAMETERFVHPPROC                             glGetImageTransformParameterfvHP;
    01165     PFNGLCOLORSUBTABLEEXTPROC                                           glColorSubTableEXT;
    01166     PFNGLCOPYCOLORSUBTABLEEXTPROC                                       glCopyColorSubTableEXT;
    01168     PFNGLHINTPGIPROC                                                    glHintPGI;
    01170     PFNGLCOLORTABLEEXTPROC                                              glColorTableEXT;
    01171     PFNGLGETCOLORTABLEEXTPROC                                           glGetColorTableEXT;
    01172     PFNGLGETCOLORTABLEPARAMETERIVEXTPROC                                glGetColorTableParameterivEXT;
    01173     PFNGLGETCOLORTABLEPARAMETERFVEXTPROC                                glGetColorTableParameterfvEXT;
    01175     PFNGLGETLISTPARAMETERFVSGIXPROC                                     glGetListParameterfvSGIX;
    01176     PFNGLGETLISTPARAMETERIVSGIXPROC                                     glGetListParameterivSGIX;
    01177     PFNGLLISTPARAMETERFSGIXPROC                                         glListParameterfSGIX;
    01178     PFNGLLISTPARAMETERFVSGIXPROC                                        glListParameterfvSGIX;
    01179     PFNGLLISTPARAMETERISGIXPROC                                         glListParameteriSGIX;
    01180     PFNGLLISTPARAMETERIVSGIXPROC                                        glListParameterivSGIX;
    01182     PFNGLINDEXMATERIALEXTPROC                                           glIndexMaterialEXT;
    01184     PFNGLINDEXFUNCEXTPROC                                               glIndexFuncEXT;
    01186     PFNGLLOCKARRAYSEXTPROC                                              glLockArraysEXT;
    01187     PFNGLUNLOCKARRAYSEXTPROC                                            glUnlockArraysEXT;
    01189     PFNGLCULLPARAMETERDVEXTPROC                                         glCullParameterdvEXT;
    01190     PFNGLCULLPARAMETERFVEXTPROC                                         glCullParameterfvEXT;
    01192     PFNGLFRAGMENTCOLORMATERIALSGIXPROC                                  glFragmentColorMaterialSGIX;
    01193     PFNGLFRAGMENTLIGHTFSGIXPROC                                         glFragmentLightfSGIX;
    01194     PFNGLFRAGMENTLIGHTFVSGIXPROC                                        glFragmentLightfvSGIX;
    01195     PFNGLFRAGMENTLIGHTISGIXPROC                                         glFragmentLightiSGIX;
    01196     PFNGLFRAGMENTLIGHTIVSGIXPROC                                        glFragmentLightivSGIX;
    01197     PFNGLFRAGMENTLIGHTMODELFSGIXPROC                                    glFragmentLightModelfSGIX;
    01198     PFNGLFRAGMENTLIGHTMODELFVSGIXPROC                                   glFragmentLightModelfvSGIX;
    01199     PFNGLFRAGMENTLIGHTMODELISGIXPROC                                    glFragmentLightModeliSGIX;
    01200     PFNGLFRAGMENTLIGHTMODELIVSGIXPROC                                   glFragmentLightModelivSGIX;
    01201     PFNGLFRAGMENTMATERIALFSGIXPROC                                      glFragmentMaterialfSGIX;
    01202     PFNGLFRAGMENTMATERIALFVSGIXPROC                                     glFragmentMaterialfvSGIX;
    01203     PFNGLFRAGMENTMATERIALISGIXPROC                                      glFragmentMaterialiSGIX;
    01204     PFNGLFRAGMENTMATERIALIVSGIXPROC                                     glFragmentMaterialivSGIX;
    01205     PFNGLGETFRAGMENTLIGHTFVSGIXPROC                                     glGetFragmentLightfvSGIX;
    01206     PFNGLGETFRAGMENTLIGHTIVSGIXPROC                                     glGetFragmentLightivSGIX;
    01207     PFNGLGETFRAGMENTMATERIALFVSGIXPROC                                  glGetFragmentMaterialfvSGIX;
    01208     PFNGLGETFRAGMENTMATERIALIVSGIXPROC                                  glGetFragmentMaterialivSGIX;
    01209     PFNGLLIGHTENVISGIXPROC                                              glLightEnviSGIX;
    01211     PFNGLDRAWRANGEELEMENTSEXTPROC                                       glDrawRangeElementsEXT;
    01213     PFNGLAPPLYTEXTUREEXTPROC                                            glApplyTextureEXT;
    01214     PFNGLTEXTURELIGHTEXTPROC                                            glTextureLightEXT;
    01215     PFNGLTEXTUREMATERIALEXTPROC                                         glTextureMaterialEXT;
    01217     PFNGLASYNCMARKERSGIXPROC                                            glAsyncMarkerSGIX;
    01218     PFNGLFINISHASYNCSGIXPROC                                            glFinishAsyncSGIX;
    01219     PFNGLPOLLASYNCSGIXPROC                                              glPollAsyncSGIX;
    01220     PFNGLGENASYNCMARKERSSGIXPROC                                        glGenAsyncMarkersSGIX;
    01221     PFNGLDELETEASYNCMARKERSSGIXPROC                                     glDeleteAsyncMarkersSGIX;
    01222     PFNGLISASYNCMARKERSGIXPROC                                          glIsAsyncMarkerSGIX;
    01224     PFNGLVERTEXPOINTERVINTELPROC                                        glVertexPointervINTEL;
    01225     PFNGLNORMALPOINTERVINTELPROC                                        glNormalPointervINTEL;
    01226     PFNGLCOLORPOINTERVINTELPROC                                         glColorPointervINTEL;
    01227     PFNGLTEXCOORDPOINTERVINTELPROC                                      glTexCoordPointervINTEL;
    01229     PFNGLPIXELTRANSFORMPARAMETERIEXTPROC                                glPixelTransformParameteriEXT;
    01230     PFNGLPIXELTRANSFORMPARAMETERFEXTPROC                                glPixelTransformParameterfEXT;
    01231     PFNGLPIXELTRANSFORMPARAMETERIVEXTPROC                               glPixelTransformParameterivEXT;
    01232     PFNGLPIXELTRANSFORMPARAMETERFVEXTPROC                               glPixelTransformParameterfvEXT;
    01234     PFNGLSECONDARYCOLOR3BEXTPROC                                        glSecondaryColor3bEXT;
    01235     PFNGLSECONDARYCOLOR3BVEXTPROC                                       glSecondaryColor3bvEXT;
    01236     PFNGLSECONDARYCOLOR3DEXTPROC                                        glSecondaryColor3dEXT;
    01237     PFNGLSECONDARYCOLOR3DVEXTPROC                                       glSecondaryColor3dvEXT;
    01238     PFNGLSECONDARYCOLOR3FEXTPROC                                        glSecondaryColor3fEXT;
    01239     PFNGLSECONDARYCOLOR3FVEXTPROC                                       glSecondaryColor3fvEXT;
    01240     PFNGLSECONDARYCOLOR3IEXTPROC                                        glSecondaryColor3iEXT;
    01241     PFNGLSECONDARYCOLOR3IVEXTPROC                                       glSecondaryColor3ivEXT;
    01242     PFNGLSECONDARYCOLOR3SEXTPROC                                        glSecondaryColor3sEXT;
    01243     PFNGLSECONDARYCOLOR3SVEXTPROC                                       glSecondaryColor3svEXT;
    01244     PFNGLSECONDARYCOLOR3UBEXTPROC                                       glSecondaryColor3ubEXT;
    01245     PFNGLSECONDARYCOLOR3UBVEXTPROC                                      glSecondaryColor3ubvEXT;
    01246     PFNGLSECONDARYCOLOR3UIEXTPROC                                       glSecondaryColor3uiEXT;
    01247     PFNGLSECONDARYCOLOR3UIVEXTPROC                                      glSecondaryColor3uivEXT;
    01248     PFNGLSECONDARYCOLOR3USEXTPROC                                       glSecondaryColor3usEXT;
    01249     PFNGLSECONDARYCOLOR3USVEXTPROC                                      glSecondaryColor3usvEXT;
    01250     PFNGLSECONDARYCOLORPOINTEREXTPROC                                   glSecondaryColorPointerEXT;
    01252     PFNGLTEXTURENORMALEXTPROC                                           glTextureNormalEXT;
    01254     PFNGLMULTIDRAWARRAYSEXTPROC                                         glMultiDrawArraysEXT;
    01255     PFNGLMULTIDRAWELEMENTSEXTPROC                                       glMultiDrawElementsEXT;
    01257     PFNGLFOGCOORDFEXTPROC                                               glFogCoordfEXT;
    01258     PFNGLFOGCOORDFVEXTPROC                                              glFogCoordfvEXT;
    01259     PFNGLFOGCOORDDEXTPROC                                               glFogCoorddEXT;
    01260     PFNGLFOGCOORDDVEXTPROC                                              glFogCoorddvEXT;
    01261     PFNGLFOGCOORDPOINTEREXTPROC                                         glFogCoordPointerEXT;
    01263     PFNGLTANGENT3BEXTPROC                                               glTangent3bEXT;
    01264     PFNGLTANGENT3BVEXTPROC                                              glTangent3bvEXT;
    01265     PFNGLTANGENT3DEXTPROC                                               glTangent3dEXT;
    01266     PFNGLTANGENT3DVEXTPROC                                              glTangent3dvEXT;
    01267     PFNGLTANGENT3FEXTPROC                                               glTangent3fEXT;
    01268     PFNGLTANGENT3FVEXTPROC                                              glTangent3fvEXT;
    01269     PFNGLTANGENT3IEXTPROC                                               glTangent3iEXT;
    01270     PFNGLTANGENT3IVEXTPROC                                              glTangent3ivEXT;
    01271     PFNGLTANGENT3SEXTPROC                                               glTangent3sEXT;
    01272     PFNGLTANGENT3SVEXTPROC                                              glTangent3svEXT;
    01273     PFNGLBINORMAL3BEXTPROC                                              glBinormal3bEXT;
    01274     PFNGLBINORMAL3BVEXTPROC                                             glBinormal3bvEXT;
    01275     PFNGLBINORMAL3DEXTPROC                                              glBinormal3dEXT;
    01276     PFNGLBINORMAL3DVEXTPROC                                             glBinormal3dvEXT;
    01277     PFNGLBINORMAL3FEXTPROC                                              glBinormal3fEXT;
    01278     PFNGLBINORMAL3FVEXTPROC                                             glBinormal3fvEXT;
    01279     PFNGLBINORMAL3IEXTPROC                                              glBinormal3iEXT;
    01280     PFNGLBINORMAL3IVEXTPROC                                             glBinormal3ivEXT;
    01281     PFNGLBINORMAL3SEXTPROC                                              glBinormal3sEXT;
    01282     PFNGLBINORMAL3SVEXTPROC                                             glBinormal3svEXT;
    01283     PFNGLTANGENTPOINTEREXTPROC                                          glTangentPointerEXT;
    01284     PFNGLBINORMALPOINTEREXTPROC                                         glBinormalPointerEXT;
    01286     PFNGLFINISHTEXTURESUNXPROC                                          glFinishTextureSUNX;
    01288     PFNGLGLOBALALPHAFACTORBSUNPROC                                      glGlobalAlphaFactorbSUN;
    01289     PFNGLGLOBALALPHAFACTORSSUNPROC                                      glGlobalAlphaFactorsSUN;
    01290     PFNGLGLOBALALPHAFACTORISUNPROC                                      glGlobalAlphaFactoriSUN;
    01291     PFNGLGLOBALALPHAFACTORFSUNPROC                                      glGlobalAlphaFactorfSUN;
    01292     PFNGLGLOBALALPHAFACTORDSUNPROC                                      glGlobalAlphaFactordSUN;
    01293     PFNGLGLOBALALPHAFACTORUBSUNPROC                                     glGlobalAlphaFactorubSUN;
    01294     PFNGLGLOBALALPHAFACTORUSSUNPROC                                     glGlobalAlphaFactorusSUN;
    01295     PFNGLGLOBALALPHAFACTORUISUNPROC                                     glGlobalAlphaFactoruiSUN;
    01297     PFNGLREPLACEMENTCODEUISUNPROC                                       glReplacementCodeuiSUN;
    01298     PFNGLREPLACEMENTCODEUSSUNPROC                                       glReplacementCodeusSUN;
    01299     PFNGLREPLACEMENTCODEUBSUNPROC                                       glReplacementCodeubSUN;
    01300     PFNGLREPLACEMENTCODEUIVSUNPROC                                      glReplacementCodeuivSUN;
    01301     PFNGLREPLACEMENTCODEUSVSUNPROC                                      glReplacementCodeusvSUN;
    01302     PFNGLREPLACEMENTCODEUBVSUNPROC                                      glReplacementCodeubvSUN;
    01303     PFNGLREPLACEMENTCODEPOINTERSUNPROC                                  glReplacementCodePointerSUN;
    01305     PFNGLCOLOR4UBVERTEX2FSUNPROC                                        glColor4ubVertex2fSUN;
    01306     PFNGLCOLOR4UBVERTEX2FVSUNPROC                                       glColor4ubVertex2fvSUN;
    01307     PFNGLCOLOR4UBVERTEX3FSUNPROC                                        glColor4ubVertex3fSUN;
    01308     PFNGLCOLOR4UBVERTEX3FVSUNPROC                                       glColor4ubVertex3fvSUN;
    01309     PFNGLCOLOR3FVERTEX3FSUNPROC                                         glColor3fVertex3fSUN;
    01310     PFNGLCOLOR3FVERTEX3FVSUNPROC                                        glColor3fVertex3fvSUN;
    01311     PFNGLNORMAL3FVERTEX3FSUNPROC                                        glNormal3fVertex3fSUN;
    01312     PFNGLNORMAL3FVERTEX3FVSUNPROC                                       glNormal3fVertex3fvSUN;
    01313     PFNGLCOLOR4FNORMAL3FVERTEX3FSUNPROC                                 glColor4fNormal3fVertex3fSUN;
    01314     PFNGLCOLOR4FNORMAL3FVERTEX3FVSUNPROC                                glColor4fNormal3fVertex3fvSUN;
    01315     PFNGLTEXCOORD2FVERTEX3FSUNPROC                                      glTexCoord2fVertex3fSUN;
    01316     PFNGLTEXCOORD2FVERTEX3FVSUNPROC                                     glTexCoord2fVertex3fvSUN;
    01317     PFNGLTEXCOORD4FVERTEX4FSUNPROC                                      glTexCoord4fVertex4fSUN;
    01318     PFNGLTEXCOORD4FVERTEX4FVSUNPROC                                     glTexCoord4fVertex4fvSUN;
    01319     PFNGLTEXCOORD2FCOLOR4UBVERTEX3FSUNPROC                              glTexCoord2fColor4ubVertex3fSUN;
    01320     PFNGLTEXCOORD2FCOLOR4UBVERTEX3FVSUNPROC                             glTexCoord2fColor4ubVertex3fvSUN;
    01321     PFNGLTEXCOORD2FCOLOR3FVERTEX3FSUNPROC                               glTexCoord2fColor3fVertex3fSUN;
    01322     PFNGLTEXCOORD2FCOLOR3FVERTEX3FVSUNPROC                              glTexCoord2fColor3fVertex3fvSUN;
    01323     PFNGLTEXCOORD2FNORMAL3FVERTEX3FSUNPROC                              glTexCoord2fNormal3fVertex3fSUN;
    01324     PFNGLTEXCOORD2FNORMAL3FVERTEX3FVSUNPROC                             glTexCoord2fNormal3fVertex3fvSUN;
    01325     PFNGLTEXCOORD2FCOLOR4FNORMAL3FVERTEX3FSUNPROC                       glTexCoord2fColor4fNormal3fVertex3fSUN;
    01326     PFNGLTEXCOORD2FCOLOR4FNORMAL3FVERTEX3FVSUNPROC                      glTexCoord2fColor4fNormal3fVertex3fvSUN;
    01327     PFNGLTEXCOORD4FCOLOR4FNORMAL3FVERTEX4FSUNPROC                       glTexCoord4fColor4fNormal3fVertex4fSUN;
    01328     PFNGLTEXCOORD4FCOLOR4FNORMAL3FVERTEX4FVSUNPROC                      glTexCoord4fColor4fNormal3fVertex4fvSUN;
    01329     PFNGLREPLACEMENTCODEUIVERTEX3FSUNPROC                               glReplacementCodeuiVertex3fSUN;
    01330     PFNGLREPLACEMENTCODEUIVERTEX3FVSUNPROC                              glReplacementCodeuiVertex3fvSUN;
    01331     PFNGLREPLACEMENTCODEUICOLOR4UBVERTEX3FSUNPROC                       glReplacementCodeuiColor4ubVertex3fSUN;
    01332     PFNGLREPLACEMENTCODEUICOLOR4UBVERTEX3FVSUNPROC                      glReplacementCodeuiColor4ubVertex3fvSUN;
    01333     PFNGLREPLACEMENTCODEUICOLOR3FVERTEX3FSUNPROC                        glReplacementCodeuiColor3fVertex3fSUN;
    01334     PFNGLREPLACEMENTCODEUICOLOR3FVERTEX3FVSUNPROC                       glReplacementCodeuiColor3fVertex3fvSUN;
    01335     PFNGLREPLACEMENTCODEUINORMAL3FVERTEX3FSUNPROC                       glReplacementCodeuiNormal3fVertex3fSUN;
    01336     PFNGLREPLACEMENTCODEUINORMAL3FVERTEX3FVSUNPROC                      glReplacementCodeuiNormal3fVertex3fvSUN;
    01337     PFNGLREPLACEMENTCODEUICOLOR4FNORMAL3FVERTEX3FSUNPROC                glReplacementCodeuiColor4fNormal3fVertex3fSUN;
    01338     PFNGLREPLACEMENTCODEUICOLOR4FNORMAL3FVERTEX3FVSUNPROC               glReplacementCodeuiColor4fNormal3fVertex3fvSUN;
    01339     PFNGLREPLACEMENTCODEUITEXCOORD2FVERTEX3FSUNPROC                     glReplacementCodeuiTexCoord2fVertex3fSUN;
    01340     PFNGLREPLACEMENTCODEUITEXCOORD2FVERTEX3FVSUNPROC                    glReplacementCodeuiTexCoord2fVertex3fvSUN;
    01341     PFNGLREPLACEMENTCODEUITEXCOORD2FNORMAL3FVERTEX3FSUNPROC             glReplacementCodeuiTexCoord2fNormal3fVertex3fSUN;
    01342     PFNGLREPLACEMENTCODEUITEXCOORD2FNORMAL3FVERTEX3FVSUNPROC            glReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN;
    01343     PFNGLREPLACEMENTCODEUITEXCOORD2FCOLOR4FNORMAL3FVERTEX3FSUNPROC      glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN;
    01344     PFNGLREPLACEMENTCODEUITEXCOORD2FCOLOR4FNORMAL3FVERTEX3FVSUNPROC     glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN;
    01346     PFNGLBLENDFUNCSEPARATEEXTPROC                                       glBlendFuncSeparateEXT;
    01347     PFNGLBLENDFUNCSEPARATEINGRPROC                                      glBlendFuncSeparateINGR;
    01349     PFNGLVERTEXWEIGHTFEXTPROC                                           glVertexWeightfEXT;
    01350     PFNGLVERTEXWEIGHTFVEXTPROC                                          glVertexWeightfvEXT;
    01351     PFNGLVERTEXWEIGHTPOINTEREXTPROC                                     glVertexWeightPointerEXT;
    01353     PFNGLFLUSHVERTEXARRAYRANGENVPROC                                    glFlushVertexArrayRangeNV;
    01354     PFNGLVERTEXARRAYRANGENVPROC                                         glVertexArrayRangeNV;
    01356     PFNGLCOMBINERPARAMETERFVNVPROC                                      glCombinerParameterfvNV;
    01357     PFNGLCOMBINERPARAMETERFNVPROC                                       glCombinerParameterfNV;
    01358     PFNGLCOMBINERPARAMETERIVNVPROC                                      glCombinerParameterivNV;
    01359     PFNGLCOMBINERPARAMETERINVPROC                                       glCombinerParameteriNV;
    01360     PFNGLCOMBINERINPUTNVPROC                                            glCombinerInputNV;
    01361     PFNGLCOMBINEROUTPUTNVPROC                                           glCombinerOutputNV;
    01362     PFNGLFINALCOMBINERINPUTNVPROC                                       glFinalCombinerInputNV;
    01363     PFNGLGETCOMBINERINPUTPARAMETERFVNVPROC                              glGetCombinerInputParameterfvNV;
    01364     PFNGLGETCOMBINERINPUTPARAMETERIVNVPROC                              glGetCombinerInputParameterivNV;
    01365     PFNGLGETCOMBINEROUTPUTPARAMETERFVNVPROC                             glGetCombinerOutputParameterfvNV;
    01366     PFNGLGETCOMBINEROUTPUTPARAMETERIVNVPROC                             glGetCombinerOutputParameterivNV;
    01367     PFNGLGETFINALCOMBINERINPUTPARAMETERFVNVPROC                         glGetFinalCombinerInputParameterfvNV;
    01368     PFNGLGETFINALCOMBINERINPUTPARAMETERIVNVPROC                         glGetFinalCombinerInputParameterivNV;
    01370     PFNGLRESIZEBUFFERSMESAPROC                                          glResizeBuffersMESA;
    01372     PFNGLWINDOWPOS2DMESAPROC                                            glWindowPos2dMESA;
    01373     PFNGLWINDOWPOS2DVMESAPROC                                           glWindowPos2dvMESA;
    01374     PFNGLWINDOWPOS2FMESAPROC                                            glWindowPos2fMESA;
    01375     PFNGLWINDOWPOS2FVMESAPROC                                           glWindowPos2fvMESA;
    01376     PFNGLWINDOWPOS2IMESAPROC                                            glWindowPos2iMESA;
    01377     PFNGLWINDOWPOS2IVMESAPROC                                           glWindowPos2ivMESA;
    01378     PFNGLWINDOWPOS2SMESAPROC                                            glWindowPos2sMESA;
    01379     PFNGLWINDOWPOS2SVMESAPROC                                           glWindowPos2svMESA;
    01380     PFNGLWINDOWPOS3DMESAPROC                                            glWindowPos3dMESA;
    01381     PFNGLWINDOWPOS3DVMESAPROC                                           glWindowPos3dvMESA;
    01382     PFNGLWINDOWPOS3FMESAPROC                                            glWindowPos3fMESA;
    01383     PFNGLWINDOWPOS3FVMESAPROC                                           glWindowPos3fvMESA;
    01384     PFNGLWINDOWPOS3IMESAPROC                                            glWindowPos3iMESA;
    01385     PFNGLWINDOWPOS3IVMESAPROC                                           glWindowPos3ivMESA;
    01386     PFNGLWINDOWPOS3SMESAPROC                                            glWindowPos3sMESA;
    01387     PFNGLWINDOWPOS3SVMESAPROC                                           glWindowPos3svMESA;
    01388     PFNGLWINDOWPOS4DMESAPROC                                            glWindowPos4dMESA;
    01389     PFNGLWINDOWPOS4DVMESAPROC                                           glWindowPos4dvMESA;
    01390     PFNGLWINDOWPOS4FMESAPROC                                            glWindowPos4fMESA;
    01391     PFNGLWINDOWPOS4FVMESAPROC                                           glWindowPos4fvMESA;
    01392     PFNGLWINDOWPOS4IMESAPROC                                            glWindowPos4iMESA;
    01393     PFNGLWINDOWPOS4IVMESAPROC                                           glWindowPos4ivMESA;
    01394     PFNGLWINDOWPOS4SMESAPROC                                            glWindowPos4sMESA;
    01395     PFNGLWINDOWPOS4SVMESAPROC                                           glWindowPos4svMESA;
    01397     PFNGLMULTIMODEDRAWARRAYSIBMPROC                                     glMultiModeDrawArraysIBM;
    01398     PFNGLMULTIMODEDRAWELEMENTSIBMPROC                                   glMultiModeDrawElementsIBM;
    01400     PFNGLCOLORPOINTERLISTIBMPROC                                        glColorPointerListIBM;
    01401     PFNGLSECONDARYCOLORPOINTERLISTIBMPROC                                   glSecondaryColorPointerListIBM;
    01402     PFNGLEDGEFLAGPOINTERLISTIBMPROC                                     glEdgeFlagPointerListIBM;
    01403     PFNGLFOGCOORDPOINTERLISTIBMPROC                                     glFogCoordPointerListIBM;
    01404     PFNGLINDEXPOINTERLISTIBMPROC                                        glIndexPointerListIBM;
    01405     PFNGLNORMALPOINTERLISTIBMPROC                                       glNormalPointerListIBM;
    01406     PFNGLTEXCOORDPOINTERLISTIBMPROC                                     glTexCoordPointerListIBM;
    01407     PFNGLVERTEXPOINTERLISTIBMPROC                                       glVertexPointerListIBM;
    01409     PFNGLTBUFFERMASK3DFXPROC                                            glTbufferMask3DFX;
    01411     PFNGLSAMPLEMASKEXTPROC                                              glSampleMaskEXT;
    01412     PFNGLSAMPLEPATTERNEXTPROC                                           glSamplePatternEXT;
    01414     PFNGLTEXTURECOLORMASKSGISPROC                                       glTextureColorMaskSGIS;
    01416     PFNGLIGLOOINTERFACESGIXPROC                                         glIglooInterfaceSGIX;
    01418     PFNGLDELETEFENCESNVPROC                                             glDeleteFencesNV;
    01419     PFNGLGENFENCESNVPROC                                                glGenFencesNV;
    01420     PFNGLISFENCENVPROC                                                  glIsFenceNV;
    01421     PFNGLTESTFENCENVPROC                                                glTestFenceNV;
    01422     PFNGLGETFENCEIVNVPROC                                               glGetFenceivNV;
    01423     PFNGLFINISHFENCENVPROC                                              glFinishFenceNV;
    01424     PFNGLSETFENCENVPROC                                                 glSetFenceNV;
    01426     PFNGLMAPCONTROLPOINTSNVPROC                                         glMapControlPointsNV;
    01427     PFNGLMAPPARAMETERIVNVPROC                                           glMapParameterivNV;
    01428     PFNGLMAPPARAMETERFVNVPROC                                           glMapParameterfvNV;
    01429     PFNGLGETMAPCONTROLPOINTSNVPROC                                      glGetMapControlPointsNV;
    01430     PFNGLGETMAPPARAMETERIVNVPROC                                        glGetMapParameterivNV;
    01431     PFNGLGETMAPPARAMETERFVNVPROC                                        glGetMapParameterfvNV;
    01432     PFNGLGETMAPATTRIBPARAMETERIVNVPROC                                  glGetMapAttribParameterivNV;
    01433     PFNGLGETMAPATTRIBPARAMETERFVNVPROC                                  glGetMapAttribParameterfvNV;
    01434     PFNGLEVALMAPSNVPROC                                                 glEvalMapsNV;
    01436     PFNGLCOMBINERSTAGEPARAMETERFVNVPROC                                 glCombinerStageParameterfvNV;
    01437     PFNGLGETCOMBINERSTAGEPARAMETERFVNVPROC                              glGetCombinerStageParameterfvNV;
    01439     PFNGLAREPROGRAMSRESIDENTNVPROC                                      glAreProgramsResidentNV;
    01440     PFNGLBINDPROGRAMNVPROC                                              glBindProgramNV;
    01441     PFNGLDELETEPROGRAMSNVPROC                                           glDeleteProgramsNV;
    01442     PFNGLEXECUTEPROGRAMNVPROC                                           glExecuteProgramNV;
    01443     PFNGLGENPROGRAMSNVPROC                                              glGenProgramsNV;
    01444     PFNGLGETPROGRAMPARAMETERDVNVPROC                                    glGetProgramParameterdvNV;
    01445     PFNGLGETPROGRAMPARAMETERFVNVPROC                                    glGetProgramParameterfvNV;
    01446     PFNGLGETPROGRAMIVNVPROC                                             glGetProgramivNV;
    01447     PFNGLGETPROGRAMSTRINGNVPROC                                         glGetProgramStringNV;
    01448     PFNGLGETTRACKMATRIXIVNVPROC                                         glGetTrackMatrixivNV;
    01449     PFNGLGETVERTEXATTRIBDVNVPROC                                        glGetVertexAttribdvNV;
    01450     PFNGLGETVERTEXATTRIBFVNVPROC                                        glGetVertexAttribfvNV;
    01451     PFNGLGETVERTEXATTRIBIVNVPROC                                        glGetVertexAttribivNV;
    01452     PFNGLGETVERTEXATTRIBPOINTERVNVPROC                                  glGetVertexAttribPointervNV;
    01453     PFNGLISPROGRAMNVPROC                                                glIsProgramNV;
    01454     PFNGLLOADPROGRAMNVPROC                                              glLoadProgramNV;
    01455     PFNGLPROGRAMPARAMETER4DNVPROC                                       glProgramParameter4dNV;
    01456     PFNGLPROGRAMPARAMETER4DVNVPROC                                      glProgramParameter4dvNV;
    01457     PFNGLPROGRAMPARAMETER4FNVPROC                                       glProgramParameter4fNV;
    01458     PFNGLPROGRAMPARAMETER4FVNVPROC                                      glProgramParameter4fvNV;
    01459     PFNGLPROGRAMPARAMETERS4DVNVPROC                                     glProgramParameters4dvNV;
    01460     PFNGLPROGRAMPARAMETERS4FVNVPROC                                     glProgramParameters4fvNV;
    01461     PFNGLREQUESTRESIDENTPROGRAMSNVPROC                                  glRequestResidentProgramsNV;
    01462     PFNGLTRACKMATRIXNVPROC                                              glTrackMatrixNV;
    01463     PFNGLVERTEXATTRIBPOINTERNVPROC                                      glVertexAttribPointerNV;
    01464     PFNGLVERTEXATTRIB1DNVPROC                                           glVertexAttrib1dNV;
    01465     PFNGLVERTEXATTRIB1DVNVPROC                                          glVertexAttrib1dvNV;
    01466     PFNGLVERTEXATTRIB1FNVPROC                                           glVertexAttrib1fNV;
    01467     PFNGLVERTEXATTRIB1FVNVPROC                                          glVertexAttrib1fvNV;
    01468     PFNGLVERTEXATTRIB1SNVPROC                                           glVertexAttrib1sNV;
    01469     PFNGLVERTEXATTRIB1SVNVPROC                                          glVertexAttrib1svNV;
    01470     PFNGLVERTEXATTRIB2DNVPROC                                           glVertexAttrib2dNV;
    01471     PFNGLVERTEXATTRIB2DVNVPROC                                          glVertexAttrib2dvNV;
    01472     PFNGLVERTEXATTRIB2FNVPROC                                           glVertexAttrib2fNV;
    01473     PFNGLVERTEXATTRIB2FVNVPROC                                          glVertexAttrib2fvNV;
    01474     PFNGLVERTEXATTRIB2SNVPROC                                           glVertexAttrib2sNV;
    01475     PFNGLVERTEXATTRIB2SVNVPROC                                          glVertexAttrib2svNV;
    01476     PFNGLVERTEXATTRIB3DNVPROC                                           glVertexAttrib3dNV;
    01477     PFNGLVERTEXATTRIB3DVNVPROC                                          glVertexAttrib3dvNV;
    01478     PFNGLVERTEXATTRIB3FNVPROC                                           glVertexAttrib3fNV;
    01479     PFNGLVERTEXATTRIB3FVNVPROC                                          glVertexAttrib3fvNV;
    01480     PFNGLVERTEXATTRIB3SNVPROC                                           glVertexAttrib3sNV;
    01481     PFNGLVERTEXATTRIB3SVNVPROC                                          glVertexAttrib3svNV;
    01482     PFNGLVERTEXATTRIB4DNVPROC                                           glVertexAttrib4dNV;
    01483     PFNGLVERTEXATTRIB4DVNVPROC                                          glVertexAttrib4dvNV;
    01484     PFNGLVERTEXATTRIB4FNVPROC                                           glVertexAttrib4fNV;
    01485     PFNGLVERTEXATTRIB4FVNVPROC                                          glVertexAttrib4fvNV;
    01486     PFNGLVERTEXATTRIB4SNVPROC                                           glVertexAttrib4sNV;
    01487     PFNGLVERTEXATTRIB4SVNVPROC                                          glVertexAttrib4svNV;
    01488     PFNGLVERTEXATTRIB4UBNVPROC                                          glVertexAttrib4ubNV;
    01489     PFNGLVERTEXATTRIB4UBVNVPROC                                         glVertexAttrib4ubvNV;
    01490     PFNGLVERTEXATTRIBS1DVNVPROC                                         glVertexAttribs1dvNV;
    01491     PFNGLVERTEXATTRIBS1FVNVPROC                                         glVertexAttribs1fvNV;
    01492     PFNGLVERTEXATTRIBS1SVNVPROC                                         glVertexAttribs1svNV;
    01493     PFNGLVERTEXATTRIBS2DVNVPROC                                         glVertexAttribs2dvNV;
    01494     PFNGLVERTEXATTRIBS2FVNVPROC                                         glVertexAttribs2fvNV;
    01495     PFNGLVERTEXATTRIBS2SVNVPROC                                         glVertexAttribs2svNV;
    01496     PFNGLVERTEXATTRIBS3DVNVPROC                                         glVertexAttribs3dvNV;
    01497     PFNGLVERTEXATTRIBS3FVNVPROC                                         glVertexAttribs3fvNV;
    01498     PFNGLVERTEXATTRIBS3SVNVPROC                                         glVertexAttribs3svNV;
    01499     PFNGLVERTEXATTRIBS4DVNVPROC                                         glVertexAttribs4dvNV;
    01500     PFNGLVERTEXATTRIBS4FVNVPROC                                         glVertexAttribs4fvNV;
    01501     PFNGLVERTEXATTRIBS4SVNVPROC                                         glVertexAttribs4svNV;
    01502     PFNGLVERTEXATTRIBS4UBVNVPROC                                        glVertexAttribs4ubvNV;
    01504     PFNGLTEXBUMPPARAMETERIVATIPROC                                      glTexBumpParameterivATI;
    01505     PFNGLTEXBUMPPARAMETERFVATIPROC                                      glTexBumpParameterfvATI;
    01506     PFNGLGETTEXBUMPPARAMETERIVATIPROC                                   glGetTexBumpParameterivATI;
    01507     PFNGLGETTEXBUMPPARAMETERFVATIPROC                                   glGetTexBumpParameterfvATI;
    01509     PFNGLGENFRAGMENTSHADERSATIPROC                                      glGenFragmentShadersATI;
    01510     PFNGLBINDFRAGMENTSHADERATIPROC                                      glBindFragmentShaderATI;
    01511     PFNGLDELETEFRAGMENTSHADERATIPROC                                    glDeleteFragmentShaderATI;
    01512     PFNGLBEGINFRAGMENTSHADERATIPROC                                     glBeginFragmentShaderATI;
    01513     PFNGLENDFRAGMENTSHADERATIPROC                                       glEndFragmentShaderATI;
    01514     PFNGLPASSTEXCOORDATIPROC                                            glPassTexCoordATI;
    01515     PFNGLSAMPLEMAPATIPROC                                               glSampleMapATI;
    01516     PFNGLCOLORFRAGMENTOP1ATIPROC                                        glColorFragmentOp1ATI;
    01517     PFNGLCOLORFRAGMENTOP2ATIPROC                                        glColorFragmentOp2ATI;
    01518     PFNGLCOLORFRAGMENTOP3ATIPROC                                        glColorFragmentOp3ATI;
    01519     PFNGLALPHAFRAGMENTOP1ATIPROC                                        glAlphaFragmentOp1ATI;
    01520     PFNGLALPHAFRAGMENTOP2ATIPROC                                        glAlphaFragmentOp2ATI;
    01521     PFNGLALPHAFRAGMENTOP3ATIPROC                                        glAlphaFragmentOp3ATI;
    01522     PFNGLSETFRAGMENTSHADERCONSTANTATIPROC                               glSetFragmentShaderConstantATI;
    01524     PFNGLPNTRIANGLESIATIPROC                                            glPNTrianglesiATI;
    01525     PFNGLPNTRIANGLESFATIPROC                                            glPNTrianglesfATI;
    01527     PFNGLNEWOBJECTBUFFERATIPROC                                         glNewObjectBufferATI;
    01528     PFNGLISOBJECTBUFFERATIPROC                                          glIsObjectBufferATI;
    01529     PFNGLUPDATEOBJECTBUFFERATIPROC                                      glUpdateObjectBufferATI;
    01530     PFNGLGETOBJECTBUFFERFVATIPROC                                       glGetObjectBufferfvATI;
    01531     PFNGLGETOBJECTBUFFERIVATIPROC                                       glGetObjectBufferivATI;
    01532     PFNGLFREEOBJECTBUFFERATIPROC                                        glFreeObjectBufferATI;
    01533     PFNGLARRAYOBJECTATIPROC                                             glArrayObjectATI;
    01534     PFNGLGETARRAYOBJECTFVATIPROC                                        glGetArrayObjectfvATI;
    01535     PFNGLGETARRAYOBJECTIVATIPROC                                        glGetArrayObjectivATI;
    01536     PFNGLVARIANTARRAYOBJECTATIPROC                                      glVariantArrayObjectATI;
    01537     PFNGLGETVARIANTARRAYOBJECTFVATIPROC                                 glGetVariantArrayObjectfvATI;
    01538     PFNGLGETVARIANTARRAYOBJECTIVATIPROC                                 glGetVariantArrayObjectivATI;
    01540     PFNGLBEGINVERTEXSHADEREXTPROC                                       glBeginVertexShaderEXT;
    01541     PFNGLENDVERTEXSHADEREXTPROC                                         glEndVertexShaderEXT;
    01542     PFNGLBINDVERTEXSHADEREXTPROC                                        glBindVertexShaderEXT;
    01543     PFNGLGENVERTEXSHADERSEXTPROC                                        glGenVertexShadersEXT;
    01544     PFNGLDELETEVERTEXSHADEREXTPROC                                      glDeleteVertexShaderEXT;
    01545     PFNGLSHADEROP1EXTPROC                                               glShaderOp1EXT;
    01546     PFNGLSHADEROP2EXTPROC                                               glShaderOp2EXT;
    01547     PFNGLSHADEROP3EXTPROC                                               glShaderOp3EXT;
    01548     PFNGLSWIZZLEEXTPROC                                                 glSwizzleEXT;
    01549     PFNGLWRITEMASKEXTPROC                                               glWriteMaskEXT;
    01550     PFNGLINSERTCOMPONENTEXTPROC                                         glInsertComponentEXT;
    01551     PFNGLEXTRACTCOMPONENTEXTPROC                                        glExtractComponentEXT;
    01552     PFNGLGENSYMBOLSEXTPROC                                              glGenSymbolsEXT;
    01553     PFNGLSETINVARIANTEXTPROC                                            glSetInvariantEXT;
    01554     PFNGLSETLOCALCONSTANTEXTPROC                                        glSetLocalConstantEXT;
    01555     PFNGLVARIANTBVEXTPROC                                               glVariantbvEXT;
    01556     PFNGLVARIANTSVEXTPROC                                               glVariantsvEXT;
    01557     PFNGLVARIANTIVEXTPROC                                               glVariantivEXT;
    01558     PFNGLVARIANTFVEXTPROC                                               glVariantfvEXT;
    01559     PFNGLVARIANTDVEXTPROC                                               glVariantdvEXT;
    01560     PFNGLVARIANTUBVEXTPROC                                              glVariantubvEXT;
    01561     PFNGLVARIANTUSVEXTPROC                                              glVariantusvEXT;
    01562     PFNGLVARIANTUIVEXTPROC                                              glVariantuivEXT;
    01563     PFNGLVARIANTPOINTEREXTPROC                                          glVariantPointerEXT;
    01564     PFNGLENABLEVARIANTCLIENTSTATEEXTPROC                                glEnableVariantClientStateEXT;
    01565     PFNGLDISABLEVARIANTCLIENTSTATEEXTPROC                               glDisableVariantClientStateEXT;
    01566     PFNGLBINDLIGHTPARAMETEREXTPROC                                      glBindLightParameterEXT;
    01567     PFNGLBINDMATERIALPARAMETEREXTPROC                                   glBindMaterialParameterEXT;
    01568     PFNGLBINDTEXGENPARAMETEREXTPROC                                     glBindTexGenParameterEXT;
    01569     PFNGLBINDTEXTUREUNITPARAMETEREXTPROC                                glBindTextureUnitParameterEXT;
    01570     PFNGLBINDPARAMETEREXTPROC                                           glBindParameterEXT;
    01571     PFNGLISVARIANTENABLEDEXTPROC                                        glIsVariantEnabledEXT;
    01572     PFNGLGETVARIANTBOOLEANVEXTPROC                                      glGetVariantBooleanvEXT;
    01573     PFNGLGETVARIANTINTEGERVEXTPROC                                      glGetVariantIntegervEXT;
    01574     PFNGLGETVARIANTFLOATVEXTPROC                                        glGetVariantFloatvEXT;
    01575     PFNGLGETVARIANTPOINTERVEXTPROC                                      glGetVariantPointervEXT;
    01576     PFNGLGETINVARIANTBOOLEANVEXTPROC                                    glGetInvariantBooleanvEXT;
    01577     PFNGLGETINVARIANTINTEGERVEXTPROC                                    glGetInvariantIntegervEXT;
    01578     PFNGLGETINVARIANTFLOATVEXTPROC                                      glGetInvariantFloatvEXT;
    01579     PFNGLGETLOCALCONSTANTBOOLEANVEXTPROC                                glGetLocalConstantBooleanvEXT;
    01580     PFNGLGETLOCALCONSTANTINTEGERVEXTPROC                                glGetLocalConstantIntegervEXT;
    01581     PFNGLGETLOCALCONSTANTFLOATVEXTPROC                                  glGetLocalConstantFloatvEXT;
    01583     PFNGLVERTEXSTREAM1SATIPROC                                          glVertexStream1sATI;
    01584     PFNGLVERTEXSTREAM1SVATIPROC                                         glVertexStream1svATI;
    01585     PFNGLVERTEXSTREAM1IATIPROC                                          glVertexStream1iATI;
    01586     PFNGLVERTEXSTREAM1IVATIPROC                                         glVertexStream1ivATI;
    01587     PFNGLVERTEXSTREAM1FATIPROC                                          glVertexStream1fATI;
    01588     PFNGLVERTEXSTREAM1FVATIPROC                                         glVertexStream1fvATI;
    01589     PFNGLVERTEXSTREAM1DATIPROC                                          glVertexStream1dATI;
    01590     PFNGLVERTEXSTREAM1DVATIPROC                                         glVertexStream1dvATI;
    01591     PFNGLVERTEXSTREAM2SATIPROC                                          glVertexStream2sATI;
    01592     PFNGLVERTEXSTREAM2SVATIPROC                                         glVertexStream2svATI;
    01593     PFNGLVERTEXSTREAM2IATIPROC                                          glVertexStream2iATI;
    01594     PFNGLVERTEXSTREAM2IVATIPROC                                         glVertexStream2ivATI;
    01595     PFNGLVERTEXSTREAM2FATIPROC                                          glVertexStream2fATI;
    01596     PFNGLVERTEXSTREAM2FVATIPROC                                         glVertexStream2fvATI;
    01597     PFNGLVERTEXSTREAM2DATIPROC                                          glVertexStream2dATI;
    01598     PFNGLVERTEXSTREAM2DVATIPROC                                         glVertexStream2dvATI;
    01599     PFNGLVERTEXSTREAM3SATIPROC                                          glVertexStream3sATI;
    01600     PFNGLVERTEXSTREAM3SVATIPROC                                         glVertexStream3svATI;
    01601     PFNGLVERTEXSTREAM3IATIPROC                                          glVertexStream3iATI;
    01602     PFNGLVERTEXSTREAM3IVATIPROC                                         glVertexStream3ivATI;
    01603     PFNGLVERTEXSTREAM3FATIPROC                                          glVertexStream3fATI;
    01604     PFNGLVERTEXSTREAM3FVATIPROC                                         glVertexStream3fvATI;
    01605     PFNGLVERTEXSTREAM3DATIPROC                                          glVertexStream3dATI;
    01606     PFNGLVERTEXSTREAM3DVATIPROC                                         glVertexStream3dvATI;
    01607     PFNGLVERTEXSTREAM4SATIPROC                                          glVertexStream4sATI;
    01608     PFNGLVERTEXSTREAM4SVATIPROC                                         glVertexStream4svATI;
    01609     PFNGLVERTEXSTREAM4IATIPROC                                          glVertexStream4iATI;
    01610     PFNGLVERTEXSTREAM4IVATIPROC                                         glVertexStream4ivATI;
    01611     PFNGLVERTEXSTREAM4FATIPROC                                          glVertexStream4fATI;
    01612     PFNGLVERTEXSTREAM4FVATIPROC                                         glVertexStream4fvATI;
    01613     PFNGLVERTEXSTREAM4DATIPROC                                          glVertexStream4dATI;
    01614     PFNGLVERTEXSTREAM4DVATIPROC                                         glVertexStream4dvATI;
    01615     PFNGLNORMALSTREAM3BATIPROC                                          glNormalStream3bATI;
    01616     PFNGLNORMALSTREAM3BVATIPROC                                         glNormalStream3bvATI;
    01617     PFNGLNORMALSTREAM3SATIPROC                                          glNormalStream3sATI;
    01618     PFNGLNORMALSTREAM3SVATIPROC                                         glNormalStream3svATI;
    01619     PFNGLNORMALSTREAM3IATIPROC                                          glNormalStream3iATI;
    01620     PFNGLNORMALSTREAM3IVATIPROC                                         glNormalStream3ivATI;
    01621     PFNGLNORMALSTREAM3FATIPROC                                          glNormalStream3fATI;
    01622     PFNGLNORMALSTREAM3FVATIPROC                                         glNormalStream3fvATI;
    01623     PFNGLNORMALSTREAM3DATIPROC                                          glNormalStream3dATI;
    01624     PFNGLNORMALSTREAM3DVATIPROC                                         glNormalStream3dvATI;
    01625     PFNGLCLIENTACTIVEVERTEXSTREAMATIPROC                                glClientActiveVertexStreamATI;
    01626     PFNGLVERTEXBLENDENVIATIPROC                                         glVertexBlendEnviATI;
    01627     PFNGLVERTEXBLENDENVFATIPROC                                         glVertexBlendEnvfATI;
    01629     PFNGLELEMENTPOINTERATIPROC                                          glElementPointerATI;
    01630     PFNGLDRAWELEMENTARRAYATIPROC                                        glDrawElementArrayATI;
    01631     PFNGLDRAWRANGEELEMENTARRAYATIPROC                                   glDrawRangeElementArrayATI;
    01633     PFNGLDRAWMESHARRAYSSUNPROC                                          glDrawMeshArraysSUN;
    01635     PFNGLGENOCCLUSIONQUERIESNVPROC                                      glGenOcclusionQueriesNV;
    01636     PFNGLDELETEOCCLUSIONQUERIESNVPROC                                   glDeleteOcclusionQueriesNV;
    01637     PFNGLISOCCLUSIONQUERYNVPROC                                         glIsOcclusionQueryNV;
    01638     PFNGLBEGINOCCLUSIONQUERYNVPROC                                      glBeginOcclusionQueryNV;
    01639     PFNGLENDOCCLUSIONQUERYNVPROC                                        glEndOcclusionQueryNV;
    01640     PFNGLGETOCCLUSIONQUERYIVNVPROC                                      glGetOcclusionQueryivNV;
    01641     PFNGLGETOCCLUSIONQUERYUIVNVPROC                                     glGetOcclusionQueryuivNV;
    01643     PFNGLPOINTPARAMETERINVPROC                                          glPointParameteriNV;
    01644     PFNGLPOINTPARAMETERIVNVPROC                                         glPointParameterivNV;
    01646     PFNGLACTIVESTENCILFACEEXTPROC                                       glActiveStencilFaceEXT;
    01648     PFNGLDRAWBUFFERSATIPROC                                             glDrawBuffersATI;
    01650     PFNGLPROGRAMNAMEDPARAMETER4FNVPROC                                  glProgramNamedParameter4fNV;
    01651     PFNGLPROGRAMNAMEDPARAMETER4DNVPROC                                  glProgramNamedParameter4dNV;
    01652     PFNGLPROGRAMNAMEDPARAMETER4FVNVPROC                                 glProgramNamedParameter4fvNV;
    01653     PFNGLPROGRAMNAMEDPARAMETER4DVNVPROC                                 glProgramNamedParameter4dvNV;
    01654     PFNGLGETPROGRAMNAMEDPARAMETERFVNVPROC                               glGetProgramNamedParameterfvNV;
    01655     PFNGLGETPROGRAMNAMEDPARAMETERDVNVPROC                               glGetProgramNamedParameterdvNV;
    01657     PFNGLVERTEX2HNVPROC                                                 glVertex2hNV;
    01658     PFNGLVERTEX2HVNVPROC                                                glVertex2hvNV;
    01659     PFNGLVERTEX3HNVPROC                                                 glVertex3hNV;
    01660     PFNGLVERTEX3HVNVPROC                                                glVertex3hvNV;
    01661     PFNGLVERTEX4HNVPROC                                                 glVertex4hNV;
    01662     PFNGLVERTEX4HVNVPROC                                                glVertex4hvNV;
    01663     PFNGLNORMAL3HNVPROC                                                 glNormal3hNV;
    01664     PFNGLNORMAL3HVNVPROC                                                glNormal3hvNV;
    01665     PFNGLCOLOR3HNVPROC                                                  glColor3hNV;
    01666     PFNGLCOLOR3HVNVPROC                                                 glColor3hvNV;
    01667     PFNGLCOLOR4HNVPROC                                                  glColor4hNV;
    01668     PFNGLCOLOR4HVNVPROC                                                 glColor4hvNV;
    01669     PFNGLTEXCOORD1HNVPROC                                               glTexCoord1hNV;
    01670     PFNGLTEXCOORD1HVNVPROC                                              glTexCoord1hvNV;
    01671     PFNGLTEXCOORD2HNVPROC                                               glTexCoord2hNV;
    01672     PFNGLTEXCOORD2HVNVPROC                                              glTexCoord2hvNV;
    01673     PFNGLTEXCOORD3HNVPROC                                               glTexCoord3hNV;
    01674     PFNGLTEXCOORD3HVNVPROC                                              glTexCoord3hvNV;
    01675     PFNGLTEXCOORD4HNVPROC                                               glTexCoord4hNV;
    01676     PFNGLTEXCOORD4HVNVPROC                                              glTexCoord4hvNV;
    01677     PFNGLMULTITEXCOORD1HNVPROC                                          glMultiTexCoord1hNV;
    01678     PFNGLMULTITEXCOORD1HVNVPROC                                         glMultiTexCoord1hvNV;
    01679     PFNGLMULTITEXCOORD2HNVPROC                                          glMultiTexCoord2hNV;
    01680     PFNGLMULTITEXCOORD2HVNVPROC                                         glMultiTexCoord2hvNV;
    01681     PFNGLMULTITEXCOORD3HNVPROC                                          glMultiTexCoord3hNV;
    01682     PFNGLMULTITEXCOORD3HVNVPROC                                         glMultiTexCoord3hvNV;
    01683     PFNGLMULTITEXCOORD4HNVPROC                                          glMultiTexCoord4hNV;
    01684     PFNGLMULTITEXCOORD4HVNVPROC                                         glMultiTexCoord4hvNV;
    01685     PFNGLFOGCOORDHNVPROC                                                glFogCoordhNV;
    01686     PFNGLFOGCOORDHVNVPROC                                               glFogCoordhvNV;
    01687     PFNGLSECONDARYCOLOR3HNVPROC                                         glSecondaryColor3hNV;
    01688     PFNGLSECONDARYCOLOR3HVNVPROC                                        glSecondaryColor3hvNV;
    01689     PFNGLVERTEXWEIGHTHNVPROC                                            glVertexWeighthNV;
    01690     PFNGLVERTEXWEIGHTHVNVPROC                                           glVertexWeighthvNV;
    01691     PFNGLVERTEXATTRIB1HNVPROC                                           glVertexAttrib1hNV;
    01692     PFNGLVERTEXATTRIB1HVNVPROC                                          glVertexAttrib1hvNV;
    01693     PFNGLVERTEXATTRIB2HNVPROC                                           glVertexAttrib2hNV;
    01694     PFNGLVERTEXATTRIB2HVNVPROC                                          glVertexAttrib2hvNV;
    01695     PFNGLVERTEXATTRIB3HNVPROC                                           glVertexAttrib3hNV;
    01696     PFNGLVERTEXATTRIB3HVNVPROC                                          glVertexAttrib3hvNV;
    01697     PFNGLVERTEXATTRIB4HNVPROC                                           glVertexAttrib4hNV;
    01698     PFNGLVERTEXATTRIB4HVNVPROC                                          glVertexAttrib4hvNV;
    01699     PFNGLVERTEXATTRIBS1HVNVPROC                                         glVertexAttribs1hvNV;
    01700     PFNGLVERTEXATTRIBS2HVNVPROC                                         glVertexAttribs2hvNV;
    01701     PFNGLVERTEXATTRIBS3HVNVPROC                                         glVertexAttribs3hvNV;
    01702     PFNGLVERTEXATTRIBS4HVNVPROC                                         glVertexAttribs4hvNV;
    01704     PFNGLPIXELDATARANGENVPROC                                           glPixelDataRangeNV;
    01705     PFNGLFLUSHPIXELDATARANGENVPROC                                      glFlushPixelDataRangeNV;
    01707     PFNGLPRIMITIVERESTARTNVPROC                                         glPrimitiveRestartNV;
    01708     PFNGLPRIMITIVERESTARTINDEXNVPROC                                    glPrimitiveRestartIndexNV;
    01710     PFNGLMAPOBJECTBUFFERATIPROC                                         glMapObjectBufferATI;
    01711     PFNGLUNMAPOBJECTBUFFERATIPROC                                       glUnmapObjectBufferATI;
    01713     PFNGLSTENCILOPSEPARATEATIPROC                                       glStencilOpSeparateATI;
    01714     PFNGLSTENCILFUNCSEPARATEATIPROC                                     glStencilFuncSeparateATI;
    01716     PFNGLVERTEXATTRIBARRAYOBJECTATIPROC                                 glVertexAttribArrayObjectATI;
    01717     PFNGLGETVERTEXATTRIBARRAYOBJECTFVATIPROC                            glGetVertexAttribArrayObjectfvATI;
    01718     PFNGLGETVERTEXATTRIBARRAYOBJECTIVATIPROC                            glGetVertexAttribArrayObjectivATI;
    01719
    01720     // FBO                                                                                                                          /*! BindFramebufferEXT OGL function */
    01721     PFNGLBINDFRAMEBUFFEREXTPROC                                         glBindFramebufferEXT;
    01722     PFNGLDELETEFRAMEBUFFERSEXTPROC                                      glDeleteFramebuffersEXT;
    01723     PFNGLDELETERENDERBUFFERSEXTPROC                                     glDeleteRenderbuffersEXT;
    01724     PFNGLGENFRAMEBUFFERSEXTPROC                                         glGenFramebuffersEXT;
    01725     PFNGLGENRENDERBUFFERSEXTPROC                                        glGenRenderbuffersEXT;
    01726
    01727     // VBO / PBO                                                                                                                    /*! GetBufferPointervARB OGL function   */
    01728     PFNGLGETBUFFERPOINTERVARBPROC                                       glGetBufferPointervARB;
    01729     PFNGLBINDBUFFERARBPROC                                              glBindBufferARB;
    01730     PFNGLBUFFERDATAARBPROC                                              glBufferDataARB;
    01731     PFNGLDELETEBUFFERSARBPROC                                           glDeleteBuffersARB;
    01732     PFNGLGENBUFFERSARBPROC                                              glGenBuffersARB;
    01733     PFNGLISBUFFERARBPROC                                                glIsBufferARB;
    01734     PFNGLMAPBUFFERARBPROC                                               glMapBufferARB;
    01735     PFNGLUNMAPBUFFERARBPROC                                             glUnmapBufferARB;
    01736     PFNGLGETBUFFERPARAMETERIVARBPROC                                    glGetBufferParameterivARB;
    01737
    01738     // GLSL                                                                                                                         /*! AttachObjectARB OGL function    */
    01739     PFNGLATTACHOBJECTARBPROC                                            glAttachObjectARB;
    01740     PFNGLCOMPILESHADERARBPROC                                           glCompileShaderARB;
    01741     PFNGLCREATEPROGRAMOBJECTARBPROC                                     glCreateProgramObjectARB;
    01742     PFNGLCREATESHADEROBJECTARBPROC                                      glCreateShaderObjectARB;
    01743     PFNGLDELETEOBJECTARBPROC                                            glDeleteObjectARB;
    01744     PFNGLDETACHOBJECTARBPROC                                            glDetachObjectARB;
    01745     PFNGLGETACTIVEUNIFORMARBPROC                                        glGetActiveUniformARB;
    01746     PFNGLGETATTACHEDOBJECTSARBPROC                                      glGetAttachedObjectsARB;
    01747     PFNGLGETHANDLEARBPROC                                               glGetHandleARB;
    01748     PFNGLGETINFOLOGARBPROC                                              glGetInfoLogARB;
    01749     PFNGLGETOBJECTPARAMETERFVARBPROC                                    glGetObjectParameterfvARB;
    01750     PFNGLGETOBJECTPARAMETERIVARBPROC                                    glGetObjectParameterivARB;
    01751     PFNGLGETSHADERSOURCEARBPROC                                         glGetShaderSourceARB;
    01752     PFNGLGETUNIFORMLOCATIONARBPROC                                      glGetUniformLocationARB;
    01753     PFNGLGETUNIFORMFVARBPROC                                            glGetUniformfvARB;
    01754     PFNGLGETUNIFORMIVARBPROC                                            glGetUniformivARB;
    01755     PFNGLLINKPROGRAMARBPROC                                             glLinkProgramARB;
    01756     PFNGLSHADERSOURCEARBPROC                                            glShaderSourceARB;
    01757     PFNGLUNIFORM1FARBPROC                                               glUniform1fARB;
    01758     PFNGLUNIFORM1FVARBPROC                                              glUniform1fvARB;
    01759     PFNGLUNIFORM1IARBPROC                                               glUniform1iARB;
    01760     PFNGLUNIFORM1IVARBPROC                                              glUniform1ivARB;
    01761     PFNGLUNIFORM2FARBPROC                                               glUniform2fARB;
    01762     PFNGLUNIFORM2FVARBPROC                                              glUniform2fvARB;
    01763     PFNGLUNIFORM2IARBPROC                                               glUniform2iARB;
    01764     PFNGLUNIFORM2IVARBPROC                                              glUniform2ivARB;
    01765     PFNGLUNIFORM3FARBPROC                                               glUniform3fARB;
    01766     PFNGLUNIFORM3FVARBPROC                                              glUniform3fvARB;
    01767     PFNGLUNIFORM3IARBPROC                                               glUniform3iARB;
    01768     PFNGLUNIFORM3IVARBPROC                                              glUniform3ivARB;
    01769     PFNGLUNIFORM4FARBPROC                                               glUniform4fARB;
    01770     PFNGLUNIFORM4FVARBPROC                                              glUniform4fvARB;
    01771     PFNGLUNIFORM4IARBPROC                                               glUniform4iARB;
    01772     PFNGLUNIFORM4IVARBPROC                                              glUniform4ivARB;
    01773     PFNGLUNIFORMMATRIX2FVARBPROC                                        glUniformMatrix2fvARB;
    01774     PFNGLUNIFORMMATRIX3FVARBPROC                                        glUniformMatrix3fvARB;
    01775     PFNGLUNIFORMMATRIX4FVARBPROC                                        glUniformMatrix4fvARB;
    01776     PFNGLUSEPROGRAMOBJECTARBPROC                                        glUseProgramObjectARB;
    01777     PFNGLVALIDATEPROGRAMARBPROC                                         glValidateProgramARB;
    01778     PFNGLISPROGRAMARBPROC                                               glIsProgramARB;
    01780     PFNGLGENQUERIESARBPROC                                              glGenQueriesARB;
    01781     PFNGLDELETEQUERIESARBPROC                                           glDeleteQueriesARB;
    01782     PFNGLISQUERYARBPROC                                                 glIsQueryARB;
    01783     PFNGLBEGINQUERYARBPROC                                              glBeginQueryARB;
    01784     PFNGLENDQUERYARBPROC                                                glEndQueryARB;
    01785     PFNGLGETQUERYIVARBPROC                                              glGetQueryivARB;
    01786     PFNGLGETQUERYOBJECTIVARBPROC                                        glGetQueryObjectivARB;
    01787     PFNGLGETQUERYOBJECTUIVARBPROC                                       glGetQueryObjectuivARB;
    01788
    01789
    01790 } XGSGLExtensionsFuncs;
    01791
    01792 //***************************************************************************************
    01793 // Forward decls
    01794 //***************************************************************************************
    01795 class IRTSExecutionState ;
    01796
    01797 //***************************************************************************************
    01798 // Structures
    01799 //***************************************************************************************
    01800
    01808 typedef struct tagXSI_RTS_Light
    01809 {
    01810     float                   m_fRed;
    01811     float                   m_fGreen;
    01812     float                   m_fBlue;
    01813     float                   m_fAlpha;
    01815     float                   m_fPosX;
    01816     float                   m_fPosY;
    01817     float                   m_fPosZ;
    01818     float                   m_fPosW;
    01820     float                   m_fDirX;
    01821     float                   m_fDirY;
    01822     float                   m_fDirZ;
    01824     float                   m_fConeAngle;
    01826     int                     m_iID;
    01827     char*                   m_pchID;
    01829     eXSI_RTS_LightType      m_eType;
    01831     bool                    m_bCastsShadows;
    01833     bool                    m_bVisible;
    01834
    01835 } XSI_RTS_Light;
    01836
    01844 typedef struct tagXSI_RTS_Camera
    01845 {
    01846     float                   m_mMatrix[16];
    01847     eXSI_RTS_CameraType     m_eCameraType;
    01849     float                   m_fRight;
    01850     float                   m_fLeft;
    01851     float                   m_fTop;
    01852     float                   m_fBottom;
    01854     float                   m_fNear;
    01855     float                   m_fFar;
    01857     float                   m_fFOV;
    01859     float                   m_fAspect;
    01860 } XSI_RTS_Camera;
    01861
    01862
    01871 typedef struct tagXSI_RTS_SceneData
    01872 {
    01873     int                         m_iNbLights;
    01874     XSI_RTS_Light*              m_pLights;
    01876     XSI_RTS_Camera              m_sCamera;
    01878     double                      m_fCurrentTime;
    01879 } XSI_RTS_SceneData;
    01880
    01912 typedef struct tagXSI_RTS_SystemParams
    01913 {
    01914     ULONG                       m_lNbParams;
    01916     ULONG                       m_lAppID;
    01917     ULONG                       m_lRTSVersion;
    01918     RTSContext                  m_lContext;
    01920     void                        *m_pShaderHandle;
    01921     void                        *m_pObjectHandle;
    01922     void                        *m_pMaterialHandle;
    01924     void                        *m_pGS;
    01925     XGSExtensionsGL             *m_pGLExt;
    01926     XGSGLExtensionsFuncs        *m_pGLExtFuncs;
    01928     ULONG                       m_lShaderFlags;
    01929     ULONG                       m_lObjectFlags;
    01931     float                       m_m4x4ObjectPose[16];
    01933     XSI_RTS_SceneData           *m_SceneData;
    01934 } XSI_RTS_SystemParams;
    01935
    01953 typedef struct tagXSI_RTS_TriangleList
    01954 {
    01955     ULONG           m_lOffset;
    01956     ULONG           m_lNbVertices;
    01957     ULONG           m_lType;
    01958     ULONG           m_lMinIndex;
    01959     ULONG           m_lMaxIndex;
    01960
    01961     // The following fields are added in order for the XSI_RTS_TriangleList to
    01962     // use the same amound of memory as a C3DStrip<TvCoord, TNormal, TColor, TTCCord>
    01963     // object.  This enables to cast a array of one type into a array of the other
    01964     // type without problems.  This is used in C3DDrawObject<TVcoord, TNormal, TColor, TTcoord>::RealtimeShaderDraw
    01965     // for example.
    01967     void *          m_pReserved0;
    01968     void *          m_pReserved1;
    01969     void *          m_pReserved2;
    01970     ULONG           m_lReserved3;
    01971 } XSI_RTS_TriangleList;
    01972
    01981 typedef struct tagXSI_RTS_Primitive
    01982 {
    01983     eXSI_RTS_PrimitiveType  m_Type;
    01984     void*                   m_pIndices;
    01985     int                     m_iIndicesWidth;
    01986     ULONG                   m_ulNbIndices;
    01987     ULONG                   m_ulBaseOffset;
    01988     ULONG                   m_NbVertices;
    01989 } XSI_RTS_Primitive;
    01990
    01991 typedef struct tagXSI_RTS_SasCamera
    01992 {
    01993     float m_WorldToView[4][4];
    01994     float m_Projection[4][4];
    01995     float m_NearFarClipping[2];
    01996     float m_Position[3];
    01997 } XSI_RTS_SasCamera;
    01998
    01999 typedef struct tagXSI_RTS_SasAmbientLight
    02000 {
    02001     float m_Color[3];         // default: {0, 0, 0}
    02002 } XSI_RTS_SasAmbientLight;
    02003
    02004 typedef struct tagXSI_RTS_SasDirectionalLight
    02005 {
    02006     float m_Color[3];         // default: {0, 0, 0}
    02007     float m_Direction[3];     // default: {0, 0, 0}
    02008 } XSI_RTS_SasDirectionalLight;
    02009
    02010 typedef struct tagXSI_RTS_SasPointLight
    02011 {
    02012     float m_Color[3];         // default: {0, 0, 0}
    02013     float m_Position[3];      // default: {0, 0, 0}
    02014     float m_Range;            // default: 0
    02015 } XSI_RTS_SasPointLight;
    02016
    02017 typedef struct tagXSI_RTS_SasSpotLight
    02018 {
    02019     float m_Color[3];         // default: {0, 0, 0}
    02020     float m_Position[3];      // default: {0, 0, 0}
    02021     float m_Direction[3];     // default: {0, 0, 0}
    02022     float m_Range;            // default: 0
    02023     float m_Theta;            // default: 0
    02024     float m_Phi;              // default: 0
    02025 } XSI_RTS_SasSpotLight;
    02026
    02027 #define MAX_SAS_LIGHTS  256
    02028
    02029 typedef struct tagXSI_RTS_FXSemantics
    02030 {
    02031     // the matrices
    02032     float   m_World[4][4];
    02033     float   m_WorldI[4][4];
    02034     float   m_WorldT[4][4];
    02035     float   m_WorldIT[4][4];
    02036
    02037     float   m_WorldView[4][4];
    02038     float   m_WorldViewI[4][4];
    02039     float   m_WorldViewT[4][4];
    02040     float   m_WorldViewIT[4][4];
    02041
    02042     float   m_WorldViewProj[4][4];
    02043     float   m_WorldViewProjI[4][4];
    02044     float   m_WorldViewProjT[4][4];
    02045     float   m_WorldViewProjIT[4][4];
    02046
    02047     float   m_View[4][4];
    02048     float   m_ViewI[4][4];
    02049     float   m_ViewT[4][4];
    02050     float   m_ViewIT[4][4];
    02051
    02052     float   m_Proj[4][4];
    02053     float   m_ProjI[4][4];
    02054     float   m_ProjT[4][4];
    02055     float   m_ProjIT[4][4];
    02056
    02057     // vectors
    02058     float   m_CameraPos[4];
    02059     float   m_CameraNearFar[4];
    02060
    02061     // scalars
    02062     float   m_TimeNow[1];
    02063     float   m_TimeLast[1];
    02064     float   m_TimeFrameNumber[1];
    02065     float   m_NumAmbientLights[1];
    02066     float   m_NumDirectionalLights[1];
    02067     float   m_NumPointLights[1];
    02068     float   m_NumSpotLights[1];
    02069
    02070     // structures
    02071     XSI_RTS_SasCamera               m_SasCamera[1];
    02072     XSI_RTS_SasAmbientLight         m_AmbientLights[MAX_SAS_LIGHTS];
    02073     XSI_RTS_SasDirectionalLight     m_DirectionalLights[MAX_SAS_LIGHTS];
    02074     XSI_RTS_SasPointLight           m_PointLights[MAX_SAS_LIGHTS];
    02075     XSI_RTS_SasSpotLight            m_SpotLights[MAX_SAS_LIGHTS];
    02076 /*
    02077     int     m_MaxAmbientLights;
    02078     int     m_MaxDirectionalLights;
    02079     int     m_MaxPointLights;
    02080     int     m_MaxSpotLights;
    02081 */
    02082 } XSI_RTS_FXSemantics;
    02083
    02084 typedef struct tagXSI_RTS_FXSemantics_Param
    02085 {
    02086     void*   m_pSourceParam;
    02087     void*   m_pDestParam;
    02088 } XSI_RTS_FXSemantics_Param;
    02089
    02090 typedef struct tagXSI_RTS_FXSemantics_inuse
    02091 {
    02092     // the matrices
    02093     bool    m_World;
    02094     bool    m_WorldI;
    02095     bool    m_WorldT;
    02096     bool    m_WorldIT;
    02097
    02098     bool    m_WorldView;
    02099     bool    m_WorldViewI;
    02100     bool    m_WorldViewT;
    02101     bool    m_WorldViewIT;
    02102
    02103     bool    m_WorldViewProj;
    02104     bool    m_WorldViewProjI;
    02105     bool    m_WorldViewProjT;
    02106     bool    m_WorldViewProjIT;
    02107
    02108     bool    m_View;
    02109     bool    m_ViewI;
    02110     bool    m_ViewT;
    02111     bool    m_ViewIT;
    02112
    02113     bool    m_Proj;
    02114     bool    m_ProjI;
    02115     bool    m_ProjT;
    02116     bool    m_ProjIT;
    02117
    02118     // vectors
    02119     bool    m_CameraPos;
    02120     bool    m_CameraNearFar;
    02121
    02122     // scalars
    02123     bool    m_TimeNow;
    02124     bool    m_TimeLast;
    02125     bool    m_TimeFrameNumber;
    02126     bool    m_NumAmbientLights;
    02127     bool    m_NumDirectionalLights;
    02128     bool    m_NumPointLights;
    02129     bool    m_NumSpotLights;
    02130
    02131     // structures
    02132     bool    m_SasCamera;
    02133     bool    m_AmbientLights;
    02134     bool    m_DirectionalLights;
    02135     bool    m_PointLights;
    02136     bool    m_SpotLights;
    02137
    02138     // last time
    02139     float   m_LastTime;
    02140
    02141     // table of parameters to bind
    02142     CSIBCArray<XSI_RTS_FXSemantics_Param>   m_Params;
    02143
    02144 } XSI_RTS_FXSemantics_inuse;
    02145
    02152 enum eErrorType
    02153 {
    02154     Info = 0,
    02155     Warning,
    02156     Error
    02157 };
    02162 //***************************************************************************************
    02163 // Entry points
    02164 //***************************************************************************************
    02165
    02166 //***************************************************************************************
    02167 //  PostFix     : _Init
    02168 //  Called      : when the shader is created
    02169 //  Mandatory   : No
    02170 //
    02171 //***************************************************************************************
    02172 typedef     RTSHADER_API bool (*RTS_Shader2_Init)
    02173 (
    02174     XSI_RTS_SystemParams            *in_pSysParams,
    02175     void                            *in_pParams,
    02176     void                            **io_pShaderInstanceData
    02177 );
    02178
    02179 //***************************************************************************************
    02180 //  PostFix     : _Term
    02181 //  Called      : when the shader is deleted
    02182 //  Mandatory   : No
    02183 //
    02184 //***************************************************************************************
    02185 typedef     RTSHADER_API bool (*RTS_Shader2_Term)
    02186 (
    02187     XSI_RTS_SystemParams            *in_pSysParams,
    02188     void                            *in_pParams,
    02189     void                            **io_pShaderInstanceData
    02190 );
    02191
    02192 //***************************************************************************************
    02193 //  PostFix     : _GetRequirements
    02194 //  Called      : At various places
    02195 //  Mandatory   : No
    02196 //
    02197 //***************************************************************************************
    02198 typedef     RTSHADER_API bool (*RTS_Shader2_GetRequirements)
    02199 (
    02200     XSI_RTS_SystemParams            *in_pSysParams,
    02201     void                            *in_pParams,
    02202     XSI_RTS_Primitive               *in_pGeom,
    02203     void                            **io_pShaderInstanceData,
    02204     ULONG                   in_lRequirement,
    02205     ULONG                   *out_pRequirementValue
    02206 );
    02207
    02208 //***************************************************************************************
    02209 //  PostFix     : _Execute
    02210 //  Called      : on every refresh for every object that own the shader
    02211 //  Mandatory   : Yes
    02212 //
    02213 //***************************************************************************************
    02214 typedef     RTSHADER_API bool (*RTS_Shader2_Execute)
    02215 (
    02216     XSI_RTS_SystemParams            *in_pSysParams,
    02217     void                            *in_pParams,
    02218     void                            *in_pBackcomp,
    02219     void                            **io_pShaderInstanceData
    02220 );
    02221
    02222 //***************************************************************************************
    02223 //  Called      : one per DLL
    02224 //  Mandatory   : Yes
    02225 //
    02226 //***************************************************************************************
    02240 typedef     RTSHADER_API ULONG (*RTS_Shader2_GetVersion)();
    02241
    02242 enum XSI_RTS_PPG_TYPES
    02243 {
    02244     XSI_RTS_SCALAR,
    02245     XSI_RTS_STRING,
    02246     XSI_RTS_IMAGE,
    02247     XSI_RTS_TSPACE,
    02248     XSI_RTS_CSPACE,
    02249 };
    02250
    02251 typedef struct
    02252 {
    02253     char                *m_pName;
    02254     XSI_RTS_PPG_TYPES   m_type;
    02255 } ShaderParamDefinition;
    02256
    02257 typedef struct
    02258 {
    02259     char                    *m_pProgID;
    02260     char                    *m_pModule;
    02261     char                    *m_pPrefix;
    02262     int                     m_pNbParams;
    02263     ShaderParamDefinition   *m_ShaderParams;
    02264 } ShaderDefinition;
    02265
    02266 typedef     RTSHADER_API int (*RTS2_GetNumberOfShadersFunc)();
    02267 typedef     RTSHADER_API ShaderDefinition * (*RTS2_GetShaderDefinitionFunc)(int in_nIndex);
    02268
    02269
    02270 //***************************************************************************************
    02271 // Inlined functionality
    02272 //***************************************************************************************
    02273
    02274 #define XSI_RTS_EPS     1.0e-3
    02275
    02276 inline void   XSI_RTS_MatrixTranspose(float in_pSrcM4x4[4][4], float in_pDstM4x4[4][4])
    02277 {
    02278     float   tmpMatrix[4][4];
    02279
    02280     memcpy(tmpMatrix, in_pSrcM4x4, sizeof(float) * 16);
    02281     in_pDstM4x4[0][0] = tmpMatrix[0][0];
    02282     in_pDstM4x4[0][1] = tmpMatrix[1][0];
    02283     in_pDstM4x4[0][2] = tmpMatrix[2][0];
    02284     in_pDstM4x4[0][3] = tmpMatrix[3][0];
    02285
    02286     in_pDstM4x4[1][0] = tmpMatrix[0][1];
    02287     in_pDstM4x4[1][1] = tmpMatrix[1][1];
    02288     in_pDstM4x4[1][2] = tmpMatrix[2][1];
    02289     in_pDstM4x4[1][3] = tmpMatrix[3][1];
    02290
    02291     in_pDstM4x4[2][0] = tmpMatrix[0][2];
    02292     in_pDstM4x4[2][1] = tmpMatrix[1][2];
    02293     in_pDstM4x4[2][2] = tmpMatrix[2][2];
    02294     in_pDstM4x4[2][3] = tmpMatrix[3][2];
    02295
    02296     in_pDstM4x4[3][0] = tmpMatrix[0][3];
    02297     in_pDstM4x4[3][1] = tmpMatrix[1][3];
    02298     in_pDstM4x4[3][2] = tmpMatrix[2][3];
    02299     in_pDstM4x4[3][3] = tmpMatrix[3][3];
    02300 }
    02301
    02302 inline bool   XSI_RTS_MatrixInvert(float in_pSrcM4x4[4][4], float in_pDstM4x4[4][4])
    02303 {
    02304
    02305     float   sys[ 4 ][ 8 ] =
    02306     {
    02307         1,0,0,0,1,0,0,0,
    02308         0,1,0,0,0,1,0,0,
    02309         0,0,1,0,0,0,1,0,
    02310         0,0,0,1,0,0,0,1
    02311     };
    02312
    02313     int     i,  j,  k;
    02314     float   temp;
    02315
    02316
    02317     memcpy(sys[0], in_pSrcM4x4[0], sizeof(float) * 4);
    02318     memcpy(sys[1], in_pSrcM4x4[1], sizeof(float) * 4);
    02319     memcpy(sys[2], in_pSrcM4x4[2], sizeof(float) * 4);
    02320     memcpy(sys[3], in_pSrcM4x4[3], sizeof(float) * 4);
    02321
    02322     for( j = 0; j < 4; j++ )
    02323     {
    02324         if( fabs( sys[ j ][ j ] ) < XSI_RTS_EPS )
    02325         {
    02326             for( i = j + 1; ( i < 4 ) && ( fabs ( sys[ i ][ j ] ) < XSI_RTS_EPS ); i++ );
    02327
    02328             if( i == 4 )
    02329                 return( false );
    02330             else
    02331                 for( k = 0; k < 8; k++ )
    02332                 {
    02333                     temp = sys[ i ][ k ];
    02334                     sys[ i ][ k ] = sys[ j ][ k ];
    02335                     sys[ j ][ k ] = temp;
    02336                 }
    02337         }
    02338
    02339         temp = 1.0f / sys[ j ][ j ];
    02340
    02341         for( i = 0; i < 8; i++ )
    02342             sys[ j ][ i ] *= temp;
    02343
    02344         for( i = 0; i < 4; i++ )
    02345         {
    02346             if( i != j )
    02347             {
    02348                 temp = - sys[ i ][ j ];
    02349                 for( k = 0; k < 8; k++ )
    02350                 {
    02351                     sys[ i ][ k ] += sys[ j ][ k ] * temp;
    02352                 }
    02353             }
    02354         }
    02355     }
    02356
    02357     memcpy(in_pDstM4x4[0], &(sys[0][4]), sizeof(float) * 4);
    02358     memcpy(in_pDstM4x4[1], &(sys[1][4]), sizeof(float) * 4);
    02359     memcpy(in_pDstM4x4[2], &(sys[2][4]), sizeof(float) * 4);
    02360     memcpy(in_pDstM4x4[3], &(sys[3][4]), sizeof(float) * 4);
    02361
    02362     return true;
    02363 }
    02364
    02365 inline void XSI_RTS_MatrixMultiply(float in_pSrc1M4x4[4][4], float in_pSrc2M4x4[4][4], float in_pDstM4x4[4][4])
    02366 {
    02367     float *a = (float*)in_pSrc2M4x4,*b = (float*)in_pSrc1M4x4,*c = (float*)in_pDstM4x4;
    02368
    02369     *c = b[0]*a[0] + b[1]*a[4] + b[2]*a[8] + b[3]*a[12];   c++;
    02370     *c = b[0]*a[1] + b[1]*a[5] + b[2]*a[9] + b[3]*a[13];   c++;
    02371     *c = b[0]*a[2] + b[1]*a[6] + b[2]*a[10] + b[3]*a[14];   c++;
    02372     *c = b[0]*a[3] + b[1]*a[7] + b[2]*a[11] + b[3]*a[15];   c++;
    02373
    02374     *c = b[4]*a[0] + b[5]*a[4] + b[6]*a[8] + b[7]*a[12];   c++;
    02375     *c = b[4]*a[1] + b[5]*a[5] + b[6]*a[9] + b[7]*a[13];   c++;
    02376     *c = b[4]*a[2] + b[5]*a[6] + b[6]*a[10] + b[7]*a[14];   c++;
    02377     *c = b[4]*a[3] + b[5]*a[7] + b[6]*a[11] + b[7]*a[15];   c++;
    02378
    02379     *c = b[8]*a[0] + b[9]*a[4] + b[10]*a[8] + b[11]*a[12];   c++;
    02380     *c = b[8]*a[1] + b[9]*a[5] + b[10]*a[9] + b[11]*a[13];   c++;
    02381     *c = b[8]*a[2] + b[9]*a[6] + b[10]*a[10] + b[11]*a[14];   c++;
    02382     *c = b[8]*a[3] + b[9]*a[7] + b[10]*a[11] + b[11]*a[15];   c++;
    02383
    02384     *c = b[12]*a[0] + b[13]*a[4] + b[14]*a[8] + b[15]*a[12];   c++;
    02385     *c = b[12]*a[1] + b[13]*a[5] + b[14]*a[9] + b[15]*a[13];   c++;
    02386     *c = b[12]*a[2] + b[13]*a[6] + b[14]*a[10] + b[15]*a[14];   c++;
    02387     *c = b[12]*a[3] + b[13]*a[7] + b[14]*a[11] + b[15]*a[15];
    02388 }
    02389
    02390 inline void XSI_RTS_InitializeSemantics_inuse(XSI_RTS_FXSemantics_inuse& in_Data)
    02391 {
    02392     memset(&in_Data, 0, sizeof(XSI_RTS_FXSemantics_inuse) - sizeof(in_Data.m_Params));
    02393     in_Data.m_Params.DisposeData();
    02394 }
    02395
    02396 inline void XSI_RTS_InitializeSemantics(XSI_RTS_FXSemantics& in_Data)
    02397 {
    02398     memset(&in_Data, 0, sizeof(XSI_RTS_FXSemantics));
    02399 }
    02400
    02401
    02402 inline bool XSI_RTS_RegisterSemanticParam
    02403 (
    02404     XSI_RTS_FXSemantics_inuse&  in_SemanticInUse,
    02405     void*                       in_pSrcParam,
    02406     void*                       in_pDstParam,
    02407     bool&                       in_pComputeFlag
    02408 )
    02409 {
    02410     LONG index;
    02411
    02412     in_SemanticInUse.m_Params.Extend(1);
    02413     index = in_SemanticInUse.m_Params.GetUsed()-1;
    02414     in_SemanticInUse.m_Params[index].m_pSourceParam = in_pSrcParam;
    02415     in_SemanticInUse.m_Params[index].m_pDestParam = in_pDstParam;
    02416     in_pComputeFlag = true;
    02417     return true;
    02418 }
    02419
    02420 inline bool XSI_RTS_RegisterSemantics
    02421 (
    02422     XSI_RTS_FXSemantics&        in_SemanticData,
    02423     XSI_RTS_FXSemantics_inuse&  in_SemanticInUse,
    02424     char*                       in_pSemanticName,
    02425     void*                       in_pParameterHandle
    02426 )
    02427 {
    02428     bool l_bRetValue = true;
    02429 /*
    02430     in_SemanticData.m_MaxAmbientLights = 0;
    02431     in_SemanticData.m_MaxDirectionalLights = 0;
    02432     in_SemanticData.m_MaxPointLights = 0;
    02433     in_SemanticData.m_MaxSpotLights = 0;
    02434 */
    02435
    02436     // big if cascade, should be easy to add stuff in there
    02437
    02438     if(_strnicmp(in_pSemanticName, "Sas.Skeleton.MeshToJointToWorld", strlen("Sas.Skeleton.MeshToJointToWorld")) == 0)
    02439     {
    02440         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_World, in_pParameterHandle, in_SemanticInUse.m_World);
    02441     }
    02442     else if(_stricmp(in_pSemanticName, "world") == 0)
    02443     {
    02444         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_World, in_pParameterHandle, in_SemanticInUse.m_World);
    02445     }
    02446     else if(_stricmp(in_pSemanticName, "worldi") == 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, "worldt") == 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, "worldit") == 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, "worldinverse") == 0)
    02459     {
    02460         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_WorldI, in_pParameterHandle, in_SemanticInUse.m_WorldI);
    02461     }
    02462     else if(_stricmp(in_pSemanticName, "worldtranspose") == 0)
    02463     {
    02464         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_WorldT, in_pParameterHandle, in_SemanticInUse.m_WorldT);
    02465     }
    02466     else if(_stricmp(in_pSemanticName, "worldinversetranspose") == 0)
    02467     {
    02468         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_WorldIT, in_pParameterHandle, in_SemanticInUse.m_WorldIT);
    02469     }
    02470     else if(_stricmp(in_pSemanticName, "model") == 0)
    02471     {
    02472         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_World, in_pParameterHandle, in_SemanticInUse.m_World);
    02473     }
    02474     else if(_stricmp(in_pSemanticName, "modeli") == 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, "modelt") == 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, "modelit") == 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, "modelinverse") == 0)
    02487     {
    02488         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_WorldI, in_pParameterHandle, in_SemanticInUse.m_WorldI);
    02489     }
    02490     else if(_stricmp(in_pSemanticName, "modeltranspose") == 0)
    02491     {
    02492         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_WorldT, in_pParameterHandle, in_SemanticInUse.m_WorldT);
    02493     }
    02494     else if(_stricmp(in_pSemanticName, "modelinversetranspose") == 0)
    02495     {
    02496         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_WorldIT, in_pParameterHandle, in_SemanticInUse.m_WorldIT);
    02497     }
    02498     else if(_stricmp(in_pSemanticName, "simodel") == 0)
    02499     {
    02500         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_World, in_pParameterHandle, in_SemanticInUse.m_World);
    02501     }
    02502     else if(_stricmp(in_pSemanticName, "simodeli") == 0)
    02503     {
    02504         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_WorldI, in_pParameterHandle, in_SemanticInUse.m_WorldI);
    02505     }
    02506     else if(_stricmp(in_pSemanticName, "simodelt") == 0)
    02507     {
    02508         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_WorldT, in_pParameterHandle, in_SemanticInUse.m_WorldT);
    02509     }
    02510     else if(_stricmp(in_pSemanticName, "simodelit") == 0)
    02511     {
    02512         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_WorldIT, in_pParameterHandle, in_SemanticInUse.m_WorldIT);
    02513     }
    02514     else if(_stricmp(in_pSemanticName, "view") == 0)
    02515     {
    02516         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_View, in_pParameterHandle, in_SemanticInUse.m_View);
    02517     }
    02518     else if(_stricmp(in_pSemanticName, "viewi") == 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, "viewt") == 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, "viewit") == 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, "viewinverse") == 0)
    02531     {
    02532         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_ViewI, in_pParameterHandle, in_SemanticInUse.m_ViewI);
    02533     }
    02534     else if(_stricmp(in_pSemanticName, "viewtranspose") == 0)
    02535     {
    02536         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_ViewT, in_pParameterHandle, in_SemanticInUse.m_ViewT);
    02537     }
    02538     else if(_stricmp(in_pSemanticName, "viewinversetranspose") == 0)
    02539     {
    02540         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_ViewIT, in_pParameterHandle, in_SemanticInUse.m_ViewIT);
    02541     }
    02542     else if(_stricmp(in_pSemanticName, "siview") == 0)
    02543     {
    02544         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_View, in_pParameterHandle, in_SemanticInUse.m_View);
    02545     }
    02546     else if(_stricmp(in_pSemanticName, "siviewi") == 0)
    02547     {
    02548         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_ViewI, in_pParameterHandle, in_SemanticInUse.m_ViewI);
    02549     }
    02550     else if(_stricmp(in_pSemanticName, "siviewt") == 0)
    02551     {
    02552         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_ViewT, in_pParameterHandle, in_SemanticInUse.m_ViewT);
    02553     }
    02554     else if(_stricmp(in_pSemanticName, "siviewit") == 0)
    02555     {
    02556         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_ViewIT, in_pParameterHandle, in_SemanticInUse.m_ViewIT);
    02557     }
    02558     else if(_stricmp(in_pSemanticName, "Sas.Camera.Projection") == 0)
    02559     {
    02560         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_Proj, in_pParameterHandle, in_SemanticInUse.m_Proj);
    02561     }
    02562     else if(_stricmp(in_pSemanticName, "projection") == 0)
    02563     {
    02564         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_Proj, in_pParameterHandle, in_SemanticInUse.m_Proj);
    02565     }
    02566     else if(_stricmp(in_pSemanticName, "projectioni") == 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, "projectiont") == 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, "projectionit") == 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, "projectioninverse") == 0)
    02579     {
    02580         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_ProjI, in_pParameterHandle, in_SemanticInUse.m_ProjI);
    02581     }
    02582     else if(_stricmp(in_pSemanticName, "projectiontranspose") == 0)
    02583     {
    02584         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_ProjT, in_pParameterHandle, in_SemanticInUse.m_ProjT);
    02585     }
    02586     else if(_stricmp(in_pSemanticName, "projectioninversetranspose") == 0)
    02587     {
    02588         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_ProjIT, in_pParameterHandle, in_SemanticInUse.m_ProjIT);
    02589     }
    02590     else if(_stricmp(in_pSemanticName, "siproj") == 0)
    02591     {
    02592         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_Proj, in_pParameterHandle, in_SemanticInUse.m_Proj);
    02593     }
    02594     else if(_stricmp(in_pSemanticName, "siproji") == 0)
    02595     {
    02596         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_ProjI, in_pParameterHandle, in_SemanticInUse.m_ProjI);
    02597     }
    02598     else if(_stricmp(in_pSemanticName, "siprojt") == 0)
    02599     {
    02600         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_ProjT, in_pParameterHandle, in_SemanticInUse.m_ProjT);
    02601     }
    02602     else if(_stricmp(in_pSemanticName, "siprojit") == 0)
    02603     {
    02604         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_ProjIT, in_pParameterHandle, in_SemanticInUse.m_ProjIT);
    02605     }
    02606     else if(_stricmp(in_pSemanticName, "Sas.Camera.WorldToView") == 0)
    02607     {
    02608         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_WorldView, in_pParameterHandle, in_SemanticInUse.m_WorldView);
    02609     }
    02610     else if(_stricmp(in_pSemanticName, "worldview") == 0)
    02611     {
    02612         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_WorldView, in_pParameterHandle, in_SemanticInUse.m_WorldView);
    02613     }
    02614     else if(_stricmp(in_pSemanticName, "worldviewi") == 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, "worldviewt") == 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, "worldviewit") == 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, "worldviewinverse") == 0)
    02627     {
    02628         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_WorldViewI, in_pParameterHandle, in_SemanticInUse.m_WorldViewI);
    02629     }
    02630     else if(_stricmp(in_pSemanticName, "worldviewtranspose") == 0)
    02631     {
    02632         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_WorldViewT, in_pParameterHandle, in_SemanticInUse.m_WorldViewT);
    02633     }
    02634     else if(_stricmp(in_pSemanticName, "worldviewinversetranspose") == 0)
    02635     {
    02636         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_WorldViewIT, in_pParameterHandle, in_SemanticInUse.m_WorldViewIT);
    02637     }
    02638     else if(_stricmp(in_pSemanticName, "modelview") == 0)
    02639     {
    02640         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_WorldView, in_pParameterHandle, in_SemanticInUse.m_WorldView);
    02641     }
    02642     else if(_stricmp(in_pSemanticName, "modelviewi") == 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, "modelviewt") == 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, "modelviewit") == 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, "modelviewinverse") == 0)
    02655     {
    02656         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_WorldViewI, in_pParameterHandle, in_SemanticInUse.m_WorldViewI);
    02657     }
    02658     else if(_stricmp(in_pSemanticName, "modelviewtranspose") == 0)
    02659     {
    02660         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_WorldViewT, in_pParameterHandle, in_SemanticInUse.m_WorldViewT);
    02661     }
    02662     else if(_stricmp(in_pSemanticName, "modelviewinversetranspose") == 0)
    02663     {
    02664         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_WorldViewIT, in_pParameterHandle, in_SemanticInUse.m_WorldViewIT);
    02665     }
    02666     else if(_stricmp(in_pSemanticName, "simodelview") == 0)
    02667     {
    02668         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_WorldView, in_pParameterHandle, in_SemanticInUse.m_WorldView);
    02669     }
    02670     else if(_stricmp(in_pSemanticName, "simodelviewi") == 0)
    02671     {
    02672         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_WorldViewI, in_pParameterHandle, in_SemanticInUse.m_WorldViewI);
    02673     }
    02674     else if(_stricmp(in_pSemanticName, "simodelviewt") == 0)
    02675     {
    02676         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_WorldViewT, in_pParameterHandle, in_SemanticInUse.m_WorldViewT);
    02677     }
    02678     else if(_stricmp(in_pSemanticName, "simodelviewit") == 0)
    02679     {
    02680         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_WorldViewIT, in_pParameterHandle, in_SemanticInUse.m_WorldViewIT);
    02681     }
    02682     else if(_stricmp(in_pSemanticName, "worldviewprojection") == 0)
    02683     {
    02684         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_WorldViewProj, in_pParameterHandle, in_SemanticInUse.m_WorldViewProj);
    02685     }
    02686     else if(_stricmp(in_pSemanticName, "worldviewprojectioni") == 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, "worldviewprojectiont") == 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, "worldviewprojectionit") == 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, "worldviewprojectioninverse") == 0)
    02699     {
    02700         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_WorldViewProjI, in_pParameterHandle, in_SemanticInUse.m_WorldViewProjI);
    02701     }
    02702     else if(_stricmp(in_pSemanticName, "worldviewprojectiontranspose") == 0)
    02703     {
    02704         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_WorldViewProjT, in_pParameterHandle, in_SemanticInUse.m_WorldViewProjT);
    02705     }
    02706     else if(_stricmp(in_pSemanticName, "worldviewprojectioninversetranspose") == 0)
    02707     {
    02708         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_WorldViewProjIT, in_pParameterHandle, in_SemanticInUse.m_WorldViewProjIT);
    02709     }
    02710     else if(_stricmp(in_pSemanticName, "modelviewprojection") == 0)
    02711     {
    02712         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_WorldViewProj, in_pParameterHandle, in_SemanticInUse.m_WorldViewProj);
    02713     }
    02714     else if(_stricmp(in_pSemanticName, "modelviewprojectioni") == 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, "modelviewprojectiont") == 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, "modelviewprojectionit") == 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, "modelviewprojectioninverse") == 0)
    02727     {
    02728         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_WorldViewProjI, in_pParameterHandle, in_SemanticInUse.m_WorldViewProjI);
    02729     }
    02730     else if(_stricmp(in_pSemanticName, "modelviewprojectiontranspose") == 0)
    02731     {
    02732         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_WorldViewProjT, in_pParameterHandle, in_SemanticInUse.m_WorldViewProjT);
    02733     }
    02734     else if(_stricmp(in_pSemanticName, "modelviewprojectioninversetranspose") == 0)
    02735     {
    02736         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_WorldViewProjIT, in_pParameterHandle, in_SemanticInUse.m_WorldViewProjIT);
    02737     }
    02738     else if(_stricmp(in_pSemanticName, "simodelviewproj") == 0)
    02739     {
    02740         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_WorldViewProj, in_pParameterHandle, in_SemanticInUse.m_WorldViewProj);
    02741     }
    02742     else if(_stricmp(in_pSemanticName, "simodelviewproji") == 0)
    02743     {
    02744         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_WorldViewProjI, in_pParameterHandle, in_SemanticInUse.m_WorldViewProjI);
    02745     }
    02746     else if(_stricmp(in_pSemanticName, "simodelviewprojt") == 0)
    02747     {
    02748         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_WorldViewProjT, in_pParameterHandle, in_SemanticInUse.m_WorldViewProjT);
    02749     }
    02750     else if(_stricmp(in_pSemanticName, "simodelviewprojit") == 0)
    02751     {
    02752         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_WorldViewProjIT, in_pParameterHandle, in_SemanticInUse.m_WorldViewProjIT);
    02753     }
    02754     else if(_stricmp(in_pSemanticName, "cameraposition") == 0)
    02755     {
    02756         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_CameraPos, in_pParameterHandle, in_SemanticInUse.m_CameraPos);
    02757     }
    02758     else if(_stricmp(in_pSemanticName, "sieyepos") == 0)
    02759     {
    02760         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_CameraPos, in_pParameterHandle, in_SemanticInUse.m_CameraPos);
    02761     }
    02762     else if(_stricmp(in_pSemanticName, "sas.camera.position") == 0)
    02763     {
    02764         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_CameraPos, in_pParameterHandle, in_SemanticInUse.m_CameraPos);
    02765     }
    02766     else if(_stricmp(in_pSemanticName, "sas.camera.nearfarclipping") == 0)
    02767     {
    02768         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_CameraNearFar, in_pParameterHandle, in_SemanticInUse.m_CameraNearFar);
    02769     }
    02770     else if(_stricmp(in_pSemanticName, "sas.time.now") == 0)
    02771     {
    02772         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_TimeNow, in_pParameterHandle, in_SemanticInUse.m_TimeNow);
    02773     }
    02774     else if(_stricmp(in_pSemanticName, "sas.time.last") == 0)
    02775     {
    02776         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_TimeLast, in_pParameterHandle, in_SemanticInUse.m_TimeLast);
    02777     }
    02778     else if(_stricmp(in_pSemanticName, "sas.time.framenumber") == 0)
    02779     {
    02780         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_TimeFrameNumber, in_pParameterHandle, in_SemanticInUse.m_TimeFrameNumber);
    02781     }
    02782     else if(_stricmp(in_pSemanticName, "sas.numambientlights") == 0)
    02783     {
    02784         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_NumAmbientLights, in_pParameterHandle, in_SemanticInUse.m_NumAmbientLights);
    02785     }
    02786     else if(_stricmp(in_pSemanticName, "sas.numdirectionallights") == 0)
    02787     {
    02788         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_NumDirectionalLights, in_pParameterHandle, in_SemanticInUse.m_NumDirectionalLights);
    02789     }
    02790     else if(_stricmp(in_pSemanticName, "sas.numpointlights") == 0)
    02791     {
    02792         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_NumPointLights, in_pParameterHandle, in_SemanticInUse.m_NumPointLights);
    02793     }
    02794     else if(_stricmp(in_pSemanticName, "sas.numspotlights") == 0)
    02795     {
    02796         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_NumSpotLights, in_pParameterHandle, in_SemanticInUse.m_NumSpotLights);
    02797     }
    02798     else if(_stricmp(in_pSemanticName, "sas.camera") == 0)
    02799     {
    02800         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_SasCamera, in_pParameterHandle, in_SemanticInUse.m_SasCamera);
    02801     }
    02802     else if(_stricmp(in_pSemanticName, "sas.ambientlight") == 0)
    02803     {
    02804         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_AmbientLights, in_pParameterHandle, in_SemanticInUse.m_AmbientLights);
    02805     }
    02806     else if(_strnicmp(in_pSemanticName, "sas.ambientlight", strlen("sas.ambientlight")) == 0)
    02807     {
    02808         char l_IndexText[256];
    02809         char *l_pAddress = NULL;
    02810
    02811         l_pAddress = strchr(in_pSemanticName, '[');
    02812         if(l_pAddress)
    02813         {
    02814             int l_Index, l_DstIndex = 0;
    02815
    02816             l_pAddress ++;
    02817             while((*l_pAddress != 0) && (*l_pAddress >= '0') && (*l_pAddress <= '9'))
    02818             {
    02819                 l_IndexText[l_DstIndex ++] = *l_pAddress;
    02820                 l_pAddress++;
    02821             }
    02822             l_IndexText[l_DstIndex ++] = 0;
    02823
    02824             l_pAddress = strchr(l_pAddress, '.');
    02825             if(l_pAddress)
    02826                 l_pAddress++;
    02827
    02828             l_Index = atol(l_IndexText);
    02829 //          in_SemanticData.m_MaxAmbientLights = max(in_SemanticData.m_MaxAmbientLights, l_Index);
    02830
    02831             if(l_pAddress == NULL)
    02832             {
    02833                 XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_AmbientLights, in_pParameterHandle, in_SemanticInUse.m_AmbientLights);
    02834             }
    02835             else if(_stricmp(l_pAddress, "color") == 0)
    02836             {
    02837                 XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_AmbientLights[l_Index].m_Color, in_pParameterHandle, in_SemanticInUse.m_AmbientLights);
    02838             }
    02839         }
    02840     }
    02841     else if(_stricmp(in_pSemanticName, "sas.directionallight") == 0)
    02842     {
    02843         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_DirectionalLights, in_pParameterHandle, in_SemanticInUse.m_DirectionalLights);
    02844     }
    02845     else if(_strnicmp(in_pSemanticName, "sas.directionallight", strlen("sas.directionallight")) == 0)
    02846     {
    02847         char l_IndexText[256];
    02848         char *l_pAddress = NULL;
    02849
    02850         l_pAddress = strchr(in_pSemanticName, '[');
    02851         if(l_pAddress)
    02852         {
    02853             int l_Index, l_DstIndex = 0;
    02854
    02855             l_pAddress ++;
    02856             while((*l_pAddress != 0) && (*l_pAddress >= '0') && (*l_pAddress <= '9'))
    02857             {
    02858                 l_IndexText[l_DstIndex ++] = *l_pAddress;
    02859                 l_pAddress++;
    02860             }
    02861             l_IndexText[l_DstIndex ++] = 0;
    02862
    02863             l_pAddress = strchr(l_pAddress, '.');
    02864             if(l_pAddress)
    02865                 l_pAddress++;
    02866
    02867             l_Index = atol(l_IndexText);
    02868 //          in_SemanticData.m_MaxDirectionalLights = max(in_SemanticData.m_MaxDirectionalLights, l_Index);
    02869
    02870
    02871             if(l_pAddress == NULL)
    02872             {
    02873                 XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_DirectionalLights[l_Index], in_pParameterHandle, in_SemanticInUse.m_DirectionalLights);
    02874             }
    02875             else if(_stricmp(l_pAddress, "color") == 0)
    02876             {
    02877                 XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_DirectionalLights[l_Index].m_Color, in_pParameterHandle, in_SemanticInUse.m_DirectionalLights);
    02878             }
    02879             else if(_stricmp(l_pAddress, "direction") == 0)
    02880             {
    02881                 XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_DirectionalLights[l_Index].m_Direction, in_pParameterHandle, in_SemanticInUse.m_DirectionalLights);
    02882             }
    02883         }
    02884     }
    02885     else if(_stricmp(in_pSemanticName, "sas.pointlight") == 0)
    02886     {
    02887         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_PointLights, in_pParameterHandle, in_SemanticInUse.m_PointLights);
    02888     }
    02889     else if(_strnicmp(in_pSemanticName, "sas.pointlight", strlen("sas.pointlight")) == 0)
    02890     {
    02891         char l_IndexText[256];
    02892         char *l_pAddress = NULL;
    02893
    02894         l_pAddress = strchr(in_pSemanticName, '[');
    02895         if(l_pAddress)
    02896         {
    02897             int l_Index, l_DstIndex = 0;
    02898
    02899             l_pAddress ++;
    02900             while((*l_pAddress != 0) && (*l_pAddress >= '0') && (*l_pAddress <= '9'))
    02901             {
    02902                 l_IndexText[l_DstIndex ++] = *l_pAddress;
    02903                 l_pAddress++;
    02904             }
    02905             l_IndexText[l_DstIndex ++] = 0;
    02906
    02907             l_pAddress = strchr(l_pAddress, '.');
    02908             if(l_pAddress)
    02909                 l_pAddress++;
    02910
    02911             l_Index = atol(l_IndexText);
    02912 //          in_SemanticData.m_MaxPointLights = max(in_SemanticData.m_MaxPointLights, l_Index);
    02913
    02914
    02915             if(l_pAddress == NULL)
    02916             {
    02917                 XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_PointLights[l_Index], in_pParameterHandle, in_SemanticInUse.m_PointLights);
    02918             }
    02919             else if(_stricmp(l_pAddress, "color") == 0)
    02920             {
    02921                 XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_PointLights[l_Index].m_Color, in_pParameterHandle, in_SemanticInUse.m_PointLights);
    02922             }
    02923             else if(_stricmp(l_pAddress, "position") == 0)
    02924             {
    02925                 XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_PointLights[l_Index].m_Position, in_pParameterHandle, in_SemanticInUse.m_PointLights);
    02926             }
    02927             else if(_stricmp(l_pAddress, "range") == 0)
    02928             {
    02929                 XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_PointLights[l_Index].m_Range, in_pParameterHandle, in_SemanticInUse.m_PointLights);
    02930             }
    02931         }
    02932     }
    02933     else if(_stricmp(in_pSemanticName, "sas.spotlight") == 0)
    02934     {
    02935         XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_SpotLights, in_pParameterHandle, in_SemanticInUse.m_SpotLights);
    02936     }
    02937     else if(_strnicmp(in_pSemanticName, "sas.spotlight", strlen("sas.spotlight")) == 0)
    02938     {
    02939         char l_IndexText[256];
    02940         char *l_pAddress = NULL;
    02941
    02942         l_pAddress = strchr(in_pSemanticName, '[');
    02943         if(l_pAddress)
    02944         {
    02945             int l_Index, l_DstIndex = 0;
    02946
    02947             l_pAddress ++;
    02948             while((*l_pAddress != 0) && (*l_pAddress >= '0') && (*l_pAddress <= '9'))
    02949             {
    02950                 l_IndexText[l_DstIndex ++] = *l_pAddress;
    02951                 l_pAddress++;
    02952             }
    02953             l_IndexText[l_DstIndex ++] = 0;
    02954
    02955             l_pAddress = strchr(l_pAddress, '.');
    02956             if(l_pAddress)
    02957                 l_pAddress++;
    02958
    02959             l_Index = atol(l_IndexText);
    02960 //          in_SemanticData.m_MaxSpotLights = max(in_SemanticData.m_MaxSpotLights, l_Index);
    02961
    02962
    02963             if(l_pAddress == NULL)
    02964             {
    02965                 XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_SpotLights[l_Index], in_pParameterHandle, in_SemanticInUse.m_SpotLights);
    02966             }
    02967             else if(_stricmp(l_pAddress, "color") == 0)
    02968             {
    02969                 XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_SpotLights[l_Index].m_Color, in_pParameterHandle, in_SemanticInUse.m_SpotLights);
    02970             }
    02971             else if(_stricmp(l_pAddress, "position") == 0)
    02972             {
    02973                 XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_SpotLights[l_Index].m_Position, in_pParameterHandle, in_SemanticInUse.m_SpotLights);
    02974             }
    02975             else if(_stricmp(l_pAddress, "direction") == 0)
    02976             {
    02977                 XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_SpotLights[l_Index].m_Direction, in_pParameterHandle, in_SemanticInUse.m_SpotLights);
    02978             }
    02979             else if(_stricmp(l_pAddress, "range") == 0)
    02980             {
    02981                 XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_SpotLights[l_Index].m_Range, in_pParameterHandle, in_SemanticInUse.m_SpotLights);
    02982             }
    02983             else if(_stricmp(l_pAddress, "phi") == 0)
    02984             {
    02985                 XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_SpotLights[l_Index].m_Phi, in_pParameterHandle, in_SemanticInUse.m_SpotLights);
    02986             }
    02987             else if(_stricmp(l_pAddress, "theta") == 0)
    02988             {
    02989                 XSI_RTS_RegisterSemanticParam(in_SemanticInUse, &in_SemanticData.m_SpotLights[l_Index].m_Theta, in_pParameterHandle, in_SemanticInUse.m_SpotLights);
    02990             }
    02991         }
    02992     }
    02993     else if(_strnicmp(in_pSemanticName, "sasglobal", strlen("sasglobal")) == 0)
    02994     {
    02995
    02996     }
    02997     else
    02998     {
    02999         l_bRetValue = false;
    03000     }
    03001
    03002     return l_bRetValue;
    03003 }
    03004
    03005 typedef     void (*RTS_BindSemanticCallback)
    03006 (
    03007     void*       in_pContext,
    03008     void*       in_pParameterHandle,
    03009     void*       in_pValue
    03010 );
    03011
    03012 inline void XSI_RTS_BindCommonSemantics
    03013 (
    03014     XSI_RTS_FXSemantics&        in_SemanticData,
    03015     XSI_RTS_FXSemantics_inuse&  in_SemanticInUse,
    03016     XSI_RTS_SystemParams*       in_pSysParams,
    03017     void*                       in_pContext,
    03018     RTS_BindSemanticCallback    fnBind
    03019 )
    03020 {
    03021
    03022     memcpy(in_SemanticData.m_ViewI, in_pSysParams->m_SceneData->m_sCamera.m_mMatrix, sizeof(in_SemanticData.m_ViewI));
    03023     XSI_RTS_MatrixInvert(in_SemanticData.m_ViewI, in_SemanticData.m_View);
    03024
    03025     memcpy(in_SemanticData.m_World, in_pSysParams->m_m4x4ObjectPose, sizeof(in_SemanticData.m_World));
    03026
    03027     // compute these matrices
    03028     XSI_RTS_MatrixMultiply(in_SemanticData.m_World, in_SemanticData.m_View, in_SemanticData.m_WorldView);
    03029     XSI_RTS_MatrixMultiply(in_SemanticData.m_WorldView, in_SemanticData.m_Proj, in_SemanticData.m_WorldViewProj);
    03030
    03031     if(in_SemanticInUse.m_WorldI)
    03032     {
    03033         XSI_RTS_MatrixInvert(in_SemanticData.m_World, in_SemanticData.m_WorldI);
    03034     }
    03035
    03036     if(in_SemanticInUse.m_WorldT)
    03037     {
    03038         XSI_RTS_MatrixTranspose(in_SemanticData.m_World, in_SemanticData.m_WorldT);
    03039     }
    03040
    03041     if(in_SemanticInUse.m_WorldIT)
    03042     {
    03043         XSI_RTS_MatrixInvert(in_SemanticData.m_World, in_SemanticData.m_WorldI);
    03044         XSI_RTS_MatrixTranspose(in_SemanticData.m_WorldI, in_SemanticData.m_WorldIT);
    03045     }
    03046
    03047     if(in_SemanticInUse.m_ViewT)
    03048     {
    03049         XSI_RTS_MatrixTranspose(in_SemanticData.m_View, in_SemanticData.m_ViewT);
    03050     }
    03051
    03052     if(in_SemanticInUse.m_ViewIT)
    03053     {
    03054         XSI_RTS_MatrixTranspose(in_SemanticData.m_ViewI, in_SemanticData.m_ViewIT);
    03055     }
    03056
    03057     if(in_SemanticInUse.m_ProjI)
    03058     {
    03059         XSI_RTS_MatrixInvert(in_SemanticData.m_Proj, in_SemanticData.m_ProjI);
    03060     }
    03061
    03062     if(in_SemanticInUse.m_ProjT)
    03063     {
    03064         XSI_RTS_MatrixTranspose(in_SemanticData.m_Proj, in_SemanticData.m_ProjT);
    03065     }
    03066
    03067     if(in_SemanticInUse.m_ProjIT)
    03068     {
    03069         XSI_RTS_MatrixInvert(in_SemanticData.m_Proj, in_SemanticData.m_ProjI);
    03070         XSI_RTS_MatrixTranspose(in_SemanticData.m_ProjI, in_SemanticData.m_ProjIT);
    03071     }
    03072
    03073
    03074     if(in_SemanticInUse.m_WorldViewI)
    03075     {
    03076         XSI_RTS_MatrixInvert(in_SemanticData.m_WorldView, in_SemanticData.m_WorldViewI);
    03077     }
    03078
    03079     if(in_SemanticInUse.m_WorldViewT)
    03080     {
    03081         XSI_RTS_MatrixTranspose(in_SemanticData.m_WorldView, in_SemanticData.m_WorldViewT);
    03082     }
    03083
    03084     if(in_SemanticInUse.m_WorldViewIT)
    03085     {
    03086         XSI_RTS_MatrixInvert(in_SemanticData.m_WorldView, in_SemanticData.m_WorldViewI);
    03087         XSI_RTS_MatrixTranspose(in_SemanticData.m_WorldViewI, in_SemanticData.m_WorldViewIT);
    03088     }
    03089
    03090     if(in_SemanticInUse.m_WorldViewProjI)
    03091     {
    03092         XSI_RTS_MatrixInvert(in_SemanticData.m_WorldViewProj, in_SemanticData.m_WorldViewProjI);
    03093     }
    03094
    03095     if(in_SemanticInUse.m_WorldViewProjT)
    03096     {
    03097         XSI_RTS_MatrixTranspose(in_SemanticData.m_WorldViewProj, in_SemanticData.m_WorldViewProjT);
    03098     }
    03099
    03100     if(in_SemanticInUse.m_WorldViewProjIT)
    03101     {
    03102         XSI_RTS_MatrixInvert(in_SemanticData.m_WorldViewProj, in_SemanticData.m_WorldViewProjI);
    03103         XSI_RTS_MatrixTranspose(in_SemanticData.m_WorldViewProjI, in_SemanticData.m_WorldViewProjIT);
    03104     }
    03105
    03106     if( in_SemanticInUse.m_CameraPos )
    03107     {
    03108         if(!in_SemanticInUse.m_ViewI)
    03109         {
    03110             XSI_RTS_MatrixInvert(in_SemanticData.m_View, in_SemanticData.m_ViewI);
    03111         }
    03112
    03113         memcpy(in_SemanticData.m_CameraPos, in_SemanticData.m_ViewI[3], sizeof(in_SemanticData.m_CameraPos));
    03114     }
    03115
    03116     if( in_SemanticInUse.m_CameraNearFar )
    03117     {
    03118         in_SemanticData.m_CameraNearFar[0] = in_pSysParams->m_SceneData->m_sCamera.m_fNear;
    03119         in_SemanticData.m_CameraNearFar[1] = in_pSysParams->m_SceneData->m_sCamera.m_fFar;
    03120     }
    03121
    03122     if( in_SemanticInUse.m_TimeNow )
    03123     {
    03124         in_SemanticData.m_TimeNow[0] = (float) in_pSysParams->m_SceneData->m_fCurrentTime;
    03125     }
    03126
    03127     if( in_SemanticInUse.m_TimeLast )
    03128     {
    03129         in_SemanticData.m_TimeLast[0] = in_SemanticInUse.m_LastTime;
    03130     }
    03131
    03132     if( in_SemanticInUse.m_TimeFrameNumber )
    03133     {
    03134         in_SemanticData.m_TimeFrameNumber[0] = (float)in_pSysParams->m_SceneData->m_fCurrentTime * 30.0f; // hard coded for 30 fps
    03135     }
    03136
    03137     if( in_SemanticInUse.m_NumAmbientLights )
    03138     {
    03139         in_SemanticData.m_NumAmbientLights[0] = 1;
    03140     }
    03141
    03142     if( in_SemanticInUse.m_SasCamera )
    03143     {
    03144         if(!in_SemanticInUse.m_ViewI)
    03145         {
    03146             XSI_RTS_MatrixInvert(in_SemanticData.m_View, in_SemanticData.m_ViewI);
    03147         }
    03148
    03149         in_SemanticData.m_SasCamera[0].m_NearFarClipping[0] = in_pSysParams->m_SceneData->m_sCamera.m_fNear;
    03150         in_SemanticData.m_SasCamera[0].m_NearFarClipping[1] = in_pSysParams->m_SceneData->m_sCamera.m_fFar;
    03151         memcpy(in_SemanticData.m_SasCamera[0].m_Position, in_SemanticData.m_ViewI[3], sizeof(in_SemanticData.m_SasCamera[0].m_Position));
    03152         memcpy(in_SemanticData.m_SasCamera[0].m_Projection, in_SemanticData.m_Proj,  sizeof(in_SemanticData.m_SasCamera[0].m_Projection));
    03153         memcpy(in_SemanticData.m_SasCamera[0].m_WorldToView, in_SemanticData.m_WorldView,  sizeof(in_SemanticData.m_SasCamera[0].m_WorldToView));
    03154     }
    03155
    03156     if( in_SemanticInUse.m_AmbientLights )
    03157     {
    03158         in_SemanticData.m_AmbientLights[0].m_Color[0] = 0.3f;
    03159         in_SemanticData.m_AmbientLights[0].m_Color[1] = 0.3f;
    03160         in_SemanticData.m_AmbientLights[0].m_Color[2] = 0.3f;
    03161         in_SemanticData.m_AmbientLights[0].m_Color[3] = 1.0f;
    03162     }
    03163
    03164     int loop;
    03165
    03166     int l_NumDirectionalLights = 0;
    03167     int l_NumPointLights = 0;
    03168     int l_NumSpotLights = 0;
    03169
    03170     in_SemanticData.m_NumDirectionalLights[0] = 0;
    03171     in_SemanticData.m_NumPointLights[0] = 0;
    03172     in_SemanticData.m_NumSpotLights[0] = 0;
    03173
    03174
    03175     bool bConvertToPointLights =        in_SemanticInUse.m_PointLights && !in_SemanticInUse.m_DirectionalLights && !in_SemanticInUse.m_SpotLights;
    03176     bool bConvertToDirectionalLights =  !in_SemanticInUse.m_PointLights && in_SemanticInUse.m_DirectionalLights && !in_SemanticInUse.m_SpotLights;
    03177
    03178     if( (in_SemanticInUse.m_PointLights) || (in_SemanticInUse.m_DirectionalLights) || (in_SemanticInUse.m_SpotLights))
    03179     {
    03180         for(loop = 0; loop < in_pSysParams->m_SceneData->m_iNbLights; loop++)
    03181         {
    03182             XSI_RTS_Light& sceneLight( in_pSysParams->m_SceneData->m_pLights[loop] );
    03183
    03184             if( sceneLight.m_eType == RTS_LIGHT_POINT )
    03185             {
    03186                 if( bConvertToDirectionalLights )
    03187                 {
    03188                     XSI_RTS_SasDirectionalLight& dirLight(in_SemanticData.m_DirectionalLights[l_NumDirectionalLights]);
    03189
    03190                     memcpy( dirLight.m_Color, &sceneLight.m_fRed, 4*sizeof(float) );
    03191
    03192                     dirLight.m_Direction[0] = -sceneLight.m_fPosX; // Heuristic light pointing at the origin
    03193                     dirLight.m_Direction[1] = -sceneLight.m_fPosY; // Heuristic light pointing at the origin
    03194                     dirLight.m_Direction[2] = -sceneLight.m_fPosZ; // Heuristic light pointing at the origin
    03195                     dirLight.m_Direction[3] = 1.0f;  // Heuristic light pointing at the origin
    03196
    03197                     // Normalize
    03198                     float fNorm = sqrtf( dirLight.m_Direction[0]*dirLight.m_Direction[0] + dirLight.m_Direction[1]*dirLight.m_Direction[1] + dirLight.m_Direction[2]*dirLight.m_Direction[2] );
    03199                     dirLight.m_Direction[0] /= fNorm;
    03200                     dirLight.m_Direction[1] /= fNorm;
    03201                     dirLight.m_Direction[2] /= fNorm;
    03202
    03203                     l_NumDirectionalLights++;
    03204                     in_SemanticData.m_NumDirectionalLights[0]++;
    03205                 }
    03206                 else // Normal Point Light
    03207                 {
    03208                     tagXSI_RTS_SasPointLight& pointLight(in_SemanticData.m_PointLights[l_NumPointLights]);
    03209
    03210                     memcpy( pointLight.m_Color, &sceneLight.m_fRed, 4*sizeof(float) );
    03211                     memcpy( pointLight.m_Position, &sceneLight.m_fPosX, 4*sizeof(float) );
    03212
    03213                     pointLight.m_Range = FLT_MAX;
    03214
    03215                     l_NumPointLights++;
    03216                     in_SemanticData.m_NumPointLights[0]++;
    03217                 }
    03218
    03219             }
    03220             else if(in_pSysParams->m_SceneData->m_pLights[loop].m_eType == RTS_LIGHT_INFINITE)
    03221             {
    03222                 if( bConvertToPointLights )
    03223                 {
    03224                     tagXSI_RTS_SasPointLight& pointLight(in_SemanticData.m_PointLights[l_NumPointLights]);
    03225
    03226                     memcpy( pointLight.m_Color, &sceneLight.m_fRed, 4*sizeof(float) );
    03227
    03228                     // Guess what the directionnal position is encoded in the direction. This helps us convert it to a point light.
    03229                     pointLight.m_Position[0] = sceneLight.m_fDirX;
    03230                     pointLight.m_Position[1] = sceneLight.m_fDirY;
    03231                     pointLight.m_Position[2] = sceneLight.m_fDirZ;
    03232                     pointLight.m_Position[3] = 1.0f;
    03233
    03234                     pointLight.m_Range = FLT_MAX;
    03235
    03236                     l_NumPointLights++;
    03237                     in_SemanticData.m_NumPointLights[0]++;
    03238                 }
    03239                 else
    03240                 {
    03241                     XSI_RTS_SasDirectionalLight& dirLight(in_SemanticData.m_DirectionalLights[l_NumDirectionalLights]);
    03242
    03243                     memcpy( dirLight.m_Color, &sceneLight.m_fRed, 4*sizeof(float) );
    03244
    03245                     dirLight.m_Direction[0] = -sceneLight.m_fPosX;
    03246                     dirLight.m_Direction[1] = -sceneLight.m_fPosY;
    03247                     dirLight.m_Direction[2] = -sceneLight.m_fPosZ;
    03248                     dirLight.m_Direction[3] = sceneLight.m_fPosW;
    03249
    03250                     l_NumDirectionalLights++;
    03251                     in_SemanticData.m_NumDirectionalLights[0]++;
    03252                 }
    03253             }
    03254             else if(in_pSysParams->m_SceneData->m_pLights[loop].m_eType == RTS_LIGHT_SPOT)
    03255             {
    03256                 if( bConvertToPointLights )
    03257                 {
    03258                     tagXSI_RTS_SasPointLight& pointLight(in_SemanticData.m_PointLights[l_NumPointLights]);
    03259
    03260                     memcpy( pointLight.m_Color, &sceneLight.m_fRed, 4*sizeof(float) );
    03261                     memcpy( pointLight.m_Position, &sceneLight.m_fPosX, 4*sizeof(float) );
    03262
    03263                     pointLight.m_Range = FLT_MAX;
    03264
    03265                     l_NumPointLights++;
    03266                     in_SemanticData.m_NumPointLights[0]++;
    03267                 }
    03268                 else if( bConvertToDirectionalLights )
    03269                 {
    03270                     XSI_RTS_SasDirectionalLight& dirLight(in_SemanticData.m_DirectionalLights[l_NumDirectionalLights]);
    03271
    03272                     memcpy( dirLight.m_Color, &sceneLight.m_fRed, 4*sizeof(float) );
    03273                     memcpy( dirLight.m_Direction, &sceneLight.m_fDirX, 3*sizeof(float) );
    03274
    03275                     l_NumDirectionalLights++;
    03276                     in_SemanticData.m_NumDirectionalLights[0]++;
    03277                 }
    03278                 else
    03279                 {
    03280                     XSI_RTS_SasSpotLight& spotLight( in_SemanticData.m_SpotLights[l_NumSpotLights] );
    03281
    03282                     memcpy( spotLight.m_Color, &sceneLight.m_fRed, 4*sizeof(float) );
    03283                     memcpy( spotLight.m_Position, &sceneLight.m_fPosX, 4*sizeof(float) );
    03284
    03285
    03286                     memcpy( spotLight.m_Direction, &sceneLight.m_fDirX, 3*sizeof(float) );
    03287                     spotLight.m_Direction[3] = 1.0f;
    03288
    03289
    03290                     spotLight.m_Range   = FLT_MAX;
    03291                     spotLight.m_Phi     = sceneLight.m_fConeAngle;
    03292                     spotLight.m_Theta   = sceneLight.m_fConeAngle;
    03293
    03294                     l_NumSpotLights++;
    03295                     in_SemanticData.m_NumSpotLights[0]++;
    03296                 }
    03297             }
    03298         }
    03299     }
    03300
    03301     // now bind everything
    03302     for(loop = 0; loop < in_SemanticInUse.m_Params.GetUsed(); loop++)
    03303     {
    03304         fnBind(in_pContext, in_SemanticInUse.m_Params[loop].m_pDestParam, in_SemanticInUse.m_Params[loop].m_pSourceParam);
    03305     }
    03306
    03307 }
    03308
    03310 //
    03311 // RTS 3.0
    03312 //
    03314
    03321 enum eRenderMode {
    03322         RenderMode_Render = 0,
    03323         RenderMode_Picking
    03324 };
    03325
    03341 enum eChannel {
    03342     Channel_None = 0,
    03343     Composite,
    03344     Albedo,
    03345     Normal,
    03346     Specular,
    03347     Reflection,
    03348     AmbientOcclusion,
    03349     EyePosition,
    03350     Custom
    03351 };
    03363 enum eStandardVertexAttribute
    03364 {
    03365     ePOSITION=0,
    03366     eNORMAL,
    03367     eCOLOR0,
    03368     eCOLOR1,
    03369     eTEXCOORD0,
    03370     eTEXCOORD1,
    03371     eTEXCOORD2,
    03372     eTEXCOORD3,
    03373     eTEXCOORD4,
    03374     eTEXCOORD5,
    03375     eTEXCOORD6,
    03376     eTEXCOORD7,
    03377     eTEXCOORD8,
    03378     eTEXCOORD9,
    03379     eTEXCOORD10,
    03380     eTEXCOORD11,
    03381     eTEXCOORD12,
    03382     eTEXCOORD13,
    03383     eTEXCOORD14,
    03384     eTEXCOORD15,
    03385     eATTR0,
    03386     eATTR1,
    03387     eATTR2,
    03388     eATTR3,
    03389     eATTR4,
    03390     eATTR5,
    03391     eATTR6,
    03392     eATTR7,
    03393     eATTR8,
    03394     eATTR9,
    03395     eATTR10,
    03396     eATTR11,
    03397     eATTR12,
    03398     eATTR13,
    03399     eATTR14,
    03400     eATTR15,
    03401     eFOGCOORD,
    03402     ePSIZE,
    03403     eTANGENT,
    03404     eBINORMAL,
    03405     eWEIGHT,
    03406         eINDICE,
    03407     eTESSFACTOR,
    03408     eDEPTH,
    03409         eSAMPLE,
    03410     eMAX_STANDARD_VERTEX_ATTRIBUTE      // must always remain last enum
    03411 };
    03449 inline const char* GetStandardVertexAttributeName ( eStandardVertexAttribute in_eAttribute )
    03450 {
    03451     switch ( in_eAttribute )
    03452     {
    03453     case ePOSITION: return "position"; break;
    03454     case eNORMAL: return "normal"; break;
    03455     case eCOLOR0: return "color0"; break;
    03456     case eCOLOR1: return "color1"; break;
    03457     case eTEXCOORD0: return "texcoord0"; break;
    03458     case eTEXCOORD1: return "texcoord1"; break;
    03459     case eTEXCOORD2: return "texcoord2"; break;
    03460     case eTEXCOORD3: return "texcoord3"; break;
    03461     case eTEXCOORD4: return "texcoord4"; break;
    03462     case eTEXCOORD5: return "texcoord5"; break;
    03463     case eTEXCOORD6: return "texcoord6"; break;
    03464     case eTEXCOORD7: return "texcoord7"; break;
    03465     case eTEXCOORD8: return "texcoord8"; break;
    03466     case eTEXCOORD9: return "texcoord9"; break;
    03467     case eTEXCOORD10: return "texcoord10"; break;
    03468     case eTEXCOORD11: return "texcoord11"; break;
    03469     case eTEXCOORD12: return "texcoord12"; break;
    03470     case eTEXCOORD13: return "texcoord13"; break;
    03471     case eTEXCOORD14: return "texcoord14"; break;
    03472     case eTEXCOORD15: return "texcoord15"; break;
    03473     case eATTR0: return "attr0"; break;
    03474     case eATTR1: return "attr1"; break;
    03475     case eATTR2: return "attr2"; break;
    03476     case eATTR3: return "attr3"; break;
    03477     case eATTR4: return "attr4"; break;
    03478     case eATTR5: return "attr5"; break;
    03479     case eATTR6: return "attr6"; break;
    03480     case eATTR7: return "attr7"; break;
    03481     case eATTR8: return "attr8"; break;
    03482     case eATTR9: return "attr9"; break;
    03483     case eATTR10: return "attr10"; break;
    03484     case eATTR11: return "attr11"; break;
    03485     case eATTR12: return "attr12"; break;
    03486     case eATTR13: return "attr13"; break;
    03487     case eATTR14: return "attr14"; break;
    03488     case eATTR15: return "attr15"; break;
    03489     case eFOGCOORD: return "fogcoord"; break;
    03490     case ePSIZE: return "psize"; break;
    03491     case eTANGENT: return "tangent"; break;
    03492     case eBINORMAL: return "binormal"; break;
    03493     case eWEIGHT: return "weight"; break;
    03494     case eINDICE: return "indice"; break;
    03495     case eTESSFACTOR: return "tessfactor"; break;
    03496     case eDEPTH: return "depth"; break;
    03497     case eSAMPLE: return "sample"; break;
    03498     case eMAX_STANDARD_VERTEX_ATTRIBUTE: return "undefined"; break;
    03499     //default: assert(0);
    03500     }
    03501     return NULL;
    03502 };
    03503
    03513 inline const char* GetStandardVertexAttributeComponents ( eStandardVertexAttribute in_eAttribute )
    03514 {
    03515     switch ( in_eAttribute )
    03516     {
    03517     case ePOSITION: return "xyz"; break;
    03518     case eNORMAL: return "xyz"; break;
    03519     case eCOLOR0: return "rgba"; break;
    03520     case eCOLOR1: return "rgba"; break;
    03521     case eTEXCOORD0: return "xyzw"; break;
    03522     case eTEXCOORD1: return "xyzw"; break;
    03523     case eTEXCOORD2: return "xyzw"; break;
    03524     case eTEXCOORD3: return "xyzw"; break;
    03525     case eTEXCOORD4: return "xyzw"; break;
    03526     case eTEXCOORD5: return "xyzw"; break;
    03527     case eTEXCOORD6: return "xyzw"; break;
    03528     case eTEXCOORD7: return "xyzw"; break;
    03529     case eTEXCOORD8: return "xyzw"; break;
    03530     case eTEXCOORD9: return "xyzw"; break;
    03531     case eTEXCOORD10: return "xyzw"; break;
    03532     case eTEXCOORD11: return "xyzw"; break;
    03533     case eTEXCOORD12: return "xyzw"; break;
    03534     case eTEXCOORD13: return "xyzw"; break;
    03535     case eTEXCOORD14: return "xyzw"; break;
    03536     case eTEXCOORD15: return "xyzw"; break;
    03537     case eATTR0: return "xyzw"; break;
    03538     case eATTR1: return "xyzw"; break;
    03539     case eATTR2: return "xyzw"; break;
    03540     case eATTR3: return "xyzw"; break;
    03541     case eATTR4: return "xyzw"; break;
    03542     case eATTR5: return "xyzw"; break;
    03543     case eATTR6: return "xyzw"; break;
    03544     case eATTR7: return "xyzw"; break;
    03545     case eATTR8: return "xyzw"; break;
    03546     case eATTR9: return "xyzw"; break;
    03547     case eATTR10: return "xyzw"; break;
    03548     case eATTR11: return "xyzw"; break;
    03549     case eATTR12: return "xyzw"; break;
    03550     case eATTR13: return "xyzw"; break;
    03551     case eATTR14: return "xyzw"; break;
    03552     case eATTR15: return "xyzw"; break;
    03553     case eFOGCOORD: return "x"; break;
    03554     case ePSIZE: return "x"; break;
    03555     case eTANGENT: return "xyzw"; break;    // Softimage encode tangents into a 4-float RGBA vertex color
    03556     case eBINORMAL: return "xyzw"; break;
    03557     case eWEIGHT: return "xyzw"; break;
    03558     case eINDICE: return "xyzw"; break;
    03559     case eTESSFACTOR: return "x"; break;
    03560     case eDEPTH: return "x"; break;
    03561     case eSAMPLE: return "xyzw"; break;
    03562     case eMAX_STANDARD_VERTEX_ATTRIBUTE: return "xyz"; break;
    03563     //default: assert(0);
    03564     }
    03565     return NULL;
    03566 };
    03567
    03574 #define XSI_RTS_ATTRIBUTE_POSITION      "PointPosition"         //!< Point position
    03575 #define XSI_RTS_ATTRIBUTE_NORMAL        "PointNormal"           //!< Point normal
    03576 #define XSI_RTS_ATTRIBUTE_COLOR         "Vertex_Color"          //!< Vertex color
    03577 #define XSI_RTS_ATTRIBUTE_TANGENT       "Tangents"          //!< Tangent
    03578 #define XSI_RTS_ATTRIBUTE_BINORMAL      "Binormals"         //!< Binormal
    03579 #define XSI_RTS_ATTRIBUTE_TEXUVW        "Texture_Projection"        //!< Texture projection
    03580 #define XSI_RTS_ATTRIBUTE_WEIGHTMAP     "weightmap"         //!< Weight map
    03581 #define XSI_RTS_ATTRIBUTE_VELOCITY      "PointVelocity"         //!< Point velocity
    03582 #define XSI_RTS_ATTRIBUTE_ORIENTATION       "Orientation"           //!< Orientation
    03583 #define XSI_RTS_ATTRIBUTE_AGE           "Age"               //!< Age
    03584 #define XSI_RTS_ATTRIBUTE_SIZE          "radius"            //!< Radius
    03585 #define XSI_RTS_ATTRIBUTE_ID            "ID"                //!< ID
    03586 #define XSI_RTS_ATTRIBUTE_FOG           "Fog"               //!< Fog
    03587 #define XSI_RTS_ATTRIBUTE_WEIGHT        "Weight"            //!< Weight
    03588 #define XSI_RTS_ATTRIBUTE_INDICE        "Indice"            //!< Index
    03589 #define XSI_RTS_ATTRIBUTE_TESSFACTOR        "Tessfactor"            //!< Tesselation factor
    03590 #define XSI_RTS_ATTRIBUTE_DEPTH         "Depth"             //!< Depth
    03591 #define XSI_RTS_ATTRIBUTE_SAMPLE        "Sample"            //!< Sample
    03592
    03593 #define XSI_RTS_ATTRIBUTE_AUTOCREATE    "SIAUTOCREATE"      //!< Let Softimage handle the creation of the attribute (useful for tangents and binormals)
    03594
    03603 inline const char* GetStandardVertexAttributeDefaultXSIName ( eStandardVertexAttribute in_eAttribute )
    03604 {
    03605     switch ( in_eAttribute )
    03606     {
    03607     case ePOSITION: return XSI_RTS_ATTRIBUTE_POSITION; break;
    03608     case eNORMAL: return XSI_RTS_ATTRIBUTE_NORMAL; break;
    03609     case eCOLOR0: return XSI_RTS_ATTRIBUTE_COLOR; break;
    03610     case eCOLOR1: return XSI_RTS_ATTRIBUTE_COLOR; break;
    03611     case eTEXCOORD0: return XSI_RTS_ATTRIBUTE_TEXUVW; break;
    03612     case eTEXCOORD1: return XSI_RTS_ATTRIBUTE_TEXUVW; break;
    03613     case eTEXCOORD2: return XSI_RTS_ATTRIBUTE_TEXUVW; break;
    03614     case eTEXCOORD3: return XSI_RTS_ATTRIBUTE_TEXUVW; break;
    03615     case eTEXCOORD4: return XSI_RTS_ATTRIBUTE_TEXUVW; break;
    03616     case eTEXCOORD5: return XSI_RTS_ATTRIBUTE_TEXUVW; break;
    03617     case eTEXCOORD6: return XSI_RTS_ATTRIBUTE_TEXUVW; break;
    03618     case eTEXCOORD7: return XSI_RTS_ATTRIBUTE_TEXUVW; break;
    03619     case eTEXCOORD8: return XSI_RTS_ATTRIBUTE_TEXUVW; break;
    03620     case eTEXCOORD9: return XSI_RTS_ATTRIBUTE_TEXUVW; break;
    03621     case eTEXCOORD10: return XSI_RTS_ATTRIBUTE_TEXUVW; break;
    03622     case eTEXCOORD11: return XSI_RTS_ATTRIBUTE_TEXUVW; break;
    03623     case eTEXCOORD12: return XSI_RTS_ATTRIBUTE_TEXUVW; break;
    03624     case eTEXCOORD13: return XSI_RTS_ATTRIBUTE_TEXUVW; break;
    03625     case eTEXCOORD14: return XSI_RTS_ATTRIBUTE_TEXUVW; break;
    03626     case eTEXCOORD15: return XSI_RTS_ATTRIBUTE_TEXUVW; break;
    03627     case eATTR0: return XSI_RTS_ATTRIBUTE_TEXUVW; break;
    03628     case eATTR1: return XSI_RTS_ATTRIBUTE_TEXUVW; break;
    03629     case eATTR2: return XSI_RTS_ATTRIBUTE_TEXUVW; break;
    03630     case eATTR3: return XSI_RTS_ATTRIBUTE_TEXUVW; break;
    03631     case eATTR4: return XSI_RTS_ATTRIBUTE_TEXUVW; break;
    03632     case eATTR5: return XSI_RTS_ATTRIBUTE_TEXUVW; break;
    03633     case eATTR6: return XSI_RTS_ATTRIBUTE_TEXUVW; break;
    03634     case eATTR7: return XSI_RTS_ATTRIBUTE_TEXUVW; break;
    03635     case eATTR8: return XSI_RTS_ATTRIBUTE_TEXUVW; break;
    03636     case eATTR9: return XSI_RTS_ATTRIBUTE_TEXUVW; break;
    03637     case eATTR10: return XSI_RTS_ATTRIBUTE_TEXUVW; break;
    03638     case eATTR11: return XSI_RTS_ATTRIBUTE_TEXUVW; break;
    03639     case eATTR12: return XSI_RTS_ATTRIBUTE_TEXUVW; break;
    03640     case eATTR13: return XSI_RTS_ATTRIBUTE_TEXUVW; break;
    03641     case eATTR14: return XSI_RTS_ATTRIBUTE_TEXUVW; break;
    03642     case eATTR15: return XSI_RTS_ATTRIBUTE_TEXUVW; break;
    03643     case ePSIZE: return XSI_RTS_ATTRIBUTE_SIZE; break;
    03644     case eFOGCOORD: return XSI_RTS_ATTRIBUTE_FOG; break;
    03645     case eTANGENT: return XSI_RTS_ATTRIBUTE_TANGENT; break;
    03646     case eBINORMAL: return XSI_RTS_ATTRIBUTE_BINORMAL; break;
    03647     case eWEIGHT: return XSI_RTS_ATTRIBUTE_WEIGHT; break;
    03648     case eINDICE: return XSI_RTS_ATTRIBUTE_INDICE; break;
    03649     case eTESSFACTOR: return XSI_RTS_ATTRIBUTE_TESSFACTOR; break;
    03650     case eDEPTH: return XSI_RTS_ATTRIBUTE_DEPTH; break;
    03651     case eSAMPLE: return XSI_RTS_ATTRIBUTE_SAMPLE; break;
    03652     }
    03653     return "undefined";
    03654 };
    03655
    03661 inline eStandardVertexAttribute GetStandardVertexAttributeFromXSIName ( const char* in_szName )
    03662 {
    03663     if ( !strcmp ( in_szName, XSI_RTS_ATTRIBUTE_POSITION ) )
    03664         return ePOSITION;
    03665     if ( !strcmp ( in_szName, XSI_RTS_ATTRIBUTE_NORMAL ) )
    03666         return eNORMAL;
    03667     if ( !strcmp ( in_szName, XSI_RTS_ATTRIBUTE_COLOR ) )
    03668         return eCOLOR0;
    03669     if ( !strcmp ( in_szName, XSI_RTS_ATTRIBUTE_TEXUVW ) )
    03670         return eTEXCOORD0;
    03671     if ( !strcmp ( in_szName, XSI_RTS_ATTRIBUTE_FOG ) )
    03672         return eFOGCOORD;
    03673     if ( !strcmp ( in_szName, XSI_RTS_ATTRIBUTE_SIZE ) )
    03674         return ePSIZE;
    03675     if ( !strcmp ( in_szName, XSI_RTS_ATTRIBUTE_WEIGHT ) )
    03676         return eWEIGHT;
    03677     if ( !strcmp ( in_szName, XSI_RTS_ATTRIBUTE_INDICE ) )
    03678         return eINDICE;
    03679     if ( !strcmp ( in_szName, XSI_RTS_ATTRIBUTE_TESSFACTOR ) )
    03680         return eTESSFACTOR;
    03681     if ( !strcmp ( in_szName, XSI_RTS_ATTRIBUTE_DEPTH ) )
    03682         return eDEPTH;
    03683     if ( !strcmp ( in_szName, XSI_RTS_ATTRIBUTE_SAMPLE ) )
    03684         return eSAMPLE;
    03685
    03686     if ( strlen(in_szName) >= 7 )
    03687     {
    03688         if ( !strncmp ( in_szName, "TANGENT",7 ) )
    03689             return eTANGENT;
    03690     }
    03691     if ( strlen(in_szName) >= 8 )
    03692     {
    03693         if ( !strncmp ( in_szName, "BINORMAL",8 ) )
    03694             return eBINORMAL;
    03695     }
    03696
    03697     return eMAX_STANDARD_VERTEX_ATTRIBUTE;
    03698 };
    03699
    03706 enum eXSI_Attribute_Size
    03707 {
    03708     XSI_RTS_ZERO = 0,
    03709     XSI_RTS_LONG,
    03710     XSI_RTS_LONG_2,
    03711     XSI_RTS_LONG_3,
    03712     XSI_RTS_LONG_4,
    03713     XSI_RTS_FLOAT,
    03714     XSI_RTS_FLOAT_2,
    03715     XSI_RTS_FLOAT_3,
    03716     XSI_RTS_FLOAT_4,
    03717     XSI_RTS_FLOAT_QUATERNION_WXYZ,
    03718     XSI_RTS_DOUBLE,
    03719     XSI_RTS_DOUBLE_2,
    03720     XSI_RTS_DOUBLE_3,
    03721     XSI_RTS_DOUBLE_4,
    03722     XSI_RTS_DOUBLE_QUATERNION_WXYZ,
    03723     XSI_RTS_MATRIX_3x3,
    03724     XSI_RTS_MATRIX_3x4,
    03725     XSI_RTS_MATRIX_4x4
    03726 };
    03739 typedef struct _tXSI_RTS_Attribute_Size
    03740 {
    03741     eXSI_Attribute_Size     m_eSize;
    03742     ULONG                   m_iArrayCount;
    03743
    03744     size_t GetDynamicMemSize() const { return 0; }
    03745 } XSI_RTS_Attribute_Size;
    03746
    03752 inline size_t GetSizeOfAttribute ( eXSI_Attribute_Size in_eAttrib )
    03753 {
    03754     size_t retval = 0;
    03755
    03756     switch ( in_eAttrib )
    03757     {
    03758         case XSI_RTS_ZERO: retval=0; break;
    03759         case XSI_RTS_LONG: retval=sizeof(LONG); break;
    03760         case XSI_RTS_LONG_2: retval=sizeof(LONG)*2; break;
    03761         case XSI_RTS_LONG_3: retval=sizeof(LONG)*3; break;
    03762         case XSI_RTS_LONG_4: retval=sizeof(LONG)*4; break;
    03763         case XSI_RTS_FLOAT: retval=sizeof(float); break;
    03764         case XSI_RTS_FLOAT_2: retval=sizeof(float)*2; break;
    03765         case XSI_RTS_FLOAT_3: retval=sizeof(float)*3; break;
    03766         case XSI_RTS_FLOAT_4: retval=sizeof(float)*4; break;
    03767         case XSI_RTS_FLOAT_QUATERNION_WXYZ: retval=sizeof(float)*4; break;
    03768         case XSI_RTS_DOUBLE: retval=sizeof(double); break;
    03769         case XSI_RTS_DOUBLE_2: retval=sizeof(double)*2; break;
    03770         case XSI_RTS_DOUBLE_3: retval=sizeof(double)*3; break;
    03771         case XSI_RTS_DOUBLE_4: retval=sizeof(double)*4; break;
    03772         case XSI_RTS_DOUBLE_QUATERNION_WXYZ: retval=sizeof(double)*4; break;
    03773         case XSI_RTS_MATRIX_3x3: retval=sizeof(float)*9; break;
    03774         case XSI_RTS_MATRIX_3x4: retval=sizeof(float)*12; break;
    03775         case XSI_RTS_MATRIX_4x4: retval=sizeof(float)*16; break;
    03776     }
    03777     return retval;
    03778 }
    03779
    03792 typedef struct _XSI_RTS_Attribute
    03793 {
    03794     char*                           m_szName;
    03795     eStandardVertexAttribute        m_eVertexAttrib;
    03796 } XSI_RTS_Attribute;
    03797
    03799 // RTS 3.0 Entry points
    03801
    03858 typedef     RTSHADER_API bool (*RTS_Shader3_Init)
    03859 (
    03860     IRTSExecutionState  *in_pExecState,
    03861     void                *in_pParams,
    03862     void                **io_pShaderInstanceData
    03863 );
    03864
    03888 typedef     RTSHADER_API bool (*RTS_Shader3_InitUI)
    03889 (
    03890     IRTSExecutionState  *in_pExecState,
    03891     void                *in_pParams,
    03892     void                **io_pShaderInstanceData
    03893 );
    03894
    03911 typedef     RTSHADER_API bool (*RTS_Shader3_Term)
    03912 (
    03913     IRTSExecutionState  *in_pExecState,
    03914     void            *in_pParams,
    03915     void            **io_pShaderInstanceData
    03916 );
    03917
    03941 typedef     RTSHADER_API bool (*RTS_Shader3_GetRequirements)
    03942 (
    03943     IRTSExecutionState  *in_pExecState,
    03944     void            *in_pParams,
    03945     XSI_RTS_Primitive   *in_pGeom,
    03946     void            **io_pShaderInstanceData,
    03947     ULONG           in_lRequirement,
    03948     ULONG           *out_pRequirementValue
    03949 );
    03950
    04020 typedef     RTSHADER_API XSI_RTS_Attribute* (*RTS_Shader3_GetAttributeList)
    04021 (
    04022     IRTSExecutionState  *in_pExecState,
    04023     void                *in_pParams,
    04024     void                **io_pShaderInstanceData
    04025 );
    04026
    04087 typedef     RTSHADER_API bool (*RTS_Shader3_Execute)
    04088 (
    04089     IRTSExecutionState      *in_pExecState,
    04090     void                    *in_pParams,
    04091     XSI_RTS_Primitive       *in_pPrimitive,
    04092     void                    *in_pAttributes,
    04093     XSI_RTS_Attribute_Size  *in_pAttributesSize,
    04094     void                    **io_pShaderInstanceData
    04095 );
    04096
    04108 class CRTSState
    04109 {
    04110 public:
    04117     CRTSState(const char* in_szName, void* in_pData, unsigned long in_ID =0)
    04118     {
    04119         assert ( in_szName != NULL );
    04120         m_szName = strdup ( in_szName );
    04121         m_pData = in_pData ;
    04122         m_bIsValid = true;
    04123         m_ID = in_ID;
    04124     }
    04125
    04126     ~CRTSState()
    04127     {
    04128         if ( m_szName )
    04129         {
    04130             free(m_szName);
    04131             m_szName = NULL;
    04132         }
    04133     }
    04134
    04139     bool    IsValid () { return m_bIsValid; };
    04140
    04144     void    Validate() { m_bIsValid = true;};
    04145
    04149     void    Invalidate() { m_bIsValid = false;};
    04150
    04155     const char*     GetName() { return m_szName; };
    04156
    04160     void*           GetData() { return m_pData; };
    04161
    04166     unsigned long   GetID() { return m_ID; };
    04167
    04168 private:
    04169     unsigned long   m_ID;
    04170     char*           m_szName;
    04171     void*           m_pData;
    04172     bool            m_bIsValid;
    04173 };
    04174
    04175
    04183 class CRTSStateList
    04184 {
    04185 public:
    04186     CRTSStateList() {};
    04187     ~CRTSStateList()
    04188     {
    04189         for (int a=0;a<m_Array.GetUsed();a++)
    04190         {
    04191             delete m_Array[a];
    04192         }
    04193
    04194         m_Array.DisposeData();
    04195     }
    04196
    04200     int     GetNbStates ()
    04201     {
    04202         return m_Array.GetUsed();
    04203     }
    04204
    04210     CRTSState*  GetState ( unsigned int in_Idx )
    04211     {
    04212         assert ( (int)in_Idx < m_Array.GetUsed() );
    04213         return m_Array[in_Idx];
    04214     }
    04215
    04221     CRTSState* GetStateByName( const char* in_szName )
    04222     {
    04223         for (int a=0;a<m_Array.GetUsed();a++)
    04224         {
    04225             if ( !strcmp ( in_szName, m_Array[a]->GetName()) )
    04226                 return m_Array[a];
    04227         }
    04228
    04229         return NULL;
    04230     }
    04231
    04237     CRTSState* GetStateByID( unsigned long  in_ID )
    04238     {
    04239         for (int a=0;a<m_Array.GetUsed();a++)
    04240         {
    04241             if ( in_ID == m_Array[a]->GetID() )
    04242                 return m_Array[a];
    04243         }
    04244
    04245         return NULL;
    04246     }
    04247
    04255     CRTSState* AddState( const char* in_szName, void* in_pData, unsigned long in_ID = 0 )
    04256     {
    04257         assert ( in_szName != NULL );
    04258         CRTSState* l_pNewState = new CRTSState(in_szName,in_pData, in_ID);
    04259         m_Array.Add ( l_pNewState );
    04260         return l_pNewState;
    04261     }
    04262
    04267     void RemoveState ( CRTSState* in_pState )
    04268     {
    04269         assert ( in_pState != NULL );
    04270         for (int a=0;a<m_Array.GetUsed();a++)
    04271         {
    04272             if ( m_Array[a] == in_pState )
    04273             {
    04274                 delete m_Array[a];
    04275                 m_Array.DeleteAt ( a ,1);
    04276                 m_Array.Pack();
    04277                 break;
    04278             }
    04279         }
    04280     }
    04281
    04282 private:
    04283     CSIBCArray<CRTSState*>  m_Array;
    04284 };
    04285
    04286 //*****************************************************************************
    04311 //*****************************************************************************
    04312 class IRTSExecutionState
    04313 {
    04314 public:
    04315
    04319     virtual XSI_RTS_SystemParams*   GetSystemParams() = 0;
    04320
    04325     virtual CRTSStateList*          GetStateList() = 0 ;
    04326
    04331     virtual void*                   GetShader()                             = 0;
    04332
    04337     virtual void*                   GetShaderInstanceData()                 = 0;
    04338
    04343     virtual void                    SetShaderInstanceData( void* in_pData ) = 0;
    04344
    04349     virtual void*                   GetShaderParameters()                   = 0;
    04350
    04354     virtual long                    GetShaderUniqueID()                     = 0;
    04355
    04360     virtual eChannel                GetChannel(int in_iBuffer) = 0 ;
    04361
    04365     virtual void*                   GetMaterial()   = 0;
    04366
    04370     virtual void*                   GetPrimitive()  = 0;
    04371
    04375     virtual void*                   GetCamera()     = 0;
    04376
    04385     virtual bool                    DefineUniform (  XSI_RTS_Uniform::eUniformType in_eType, const char* in_szName, unsigned int in_uiSize, void* in_pData ) = 0;
    04386
    04387
    04392     virtual bool                    ClearUniforms () = 0;
    04393
    04398     virtual unsigned long           GetNbUniforms () = 0;
    04399
    04404     virtual XSI_RTS_Uniform**       GetUniformList () = 0;
    04405
    04422     virtual bool DrawGeometry ( XSI::siGraphicDriver in_eDriver,
    04423                     XSI_RTS_Primitive       *in_pGeometry,
    04424                     XSI_RTS_Attribute       *in_pAttributes,
    04425                     void*           in_pAttribData,
    04426                     XSI_RTS_Attribute_Size  *in_pAttributesSize) = 0;
    04427
    04441     virtual bool DrawGeometry ( XSI::siGraphicDriver in_eDriver,
    04442                     XSI_RTS_Primitive       *in_pGeometry,
    04443                     const char*         in_szMapping,
    04444                     void*           in_pAttribData,
    04445                     XSI_RTS_Attribute_Size  *in_pAttributesSize) = 0;
    04446
    04452     virtual XSI_RTS_Attribute* GetAttributeDescriptorFromMapping( const char* in_szMapping ) = 0;
    04453
    04459     virtual void RaiseError( const char* in_szError, eErrorType in_eErrorType) = 0;
    04460
    04468     virtual void RaiseError( const char* in_szError, eErrorType in_eErrorType, int in_Parameter, ULONG_PTR in_lData ) = 0;
    04469
    04473     virtual void PushExecutionState() = 0;
    04474
    04478     virtual void PopExecutionState  () = 0;
    04479
    04487     virtual void* GetGraphicsAPI(XSI::siGraphicDriver in_eDriver) = 0;
    04488
    04489
    04495     virtual eRenderMode GetRenderMode() = 0;
    04496 };
    04497
    04498 #pragma pack(pop)
    04499
    04500 #endif // XSI_RTSHADERS_H