version 1.2 | | version 1.3 |
---|
| | |
#include <GL/gl.h>
| | #include <GL/gl.h>
|
#include "types.h"
| | #include "types.h"
|
| |
|
| | //gl extensions.
|
| | #ifndef GL_ARB_multitexture
|
| | #define GL_ARB_multitexture 1
|
| | #define GL_TEXTURE0_ARB 0x84C0
|
| | #define GL_TEXTURE1_ARB 0x84C1
|
| | #endif
|
| |
|
| | #ifndef GL_SGIS_multitexture
|
| | #define GL_SGIS_multitexture 1
|
| | #define GL_TEXTURE0_SGIS 0x835F
|
| | #define GL_TEXTURE1_SGIS 0x8360
|
| | #endif
|
| |
|
| |
|
#ifdef _cplusplus
| | #ifdef _cplusplus
|
#define OEXTERN extern "C"
| | #define OEXTERN extern "C"
|
#else
| | #else
|
| | |
#define glVertexPointer dglVertexPointer
| | #define glVertexPointer dglVertexPointer
|
#define glViewport dglViewport
| | #define glViewport dglViewport
|
| |
|
| | #define glMultiTexCoord2fARB dglMultiTexCoord2fARB
|
| | #define glActiveTextureARB dglActiveTextureARB
|
| | #define glMultiTexCoord2fSGIS dglMultiTexCoord2fSGIS
|
| | #define glSelectTextureSGIS dglSelectTextureSGIS
|
| |
|
#ifdef WIN32
| | #ifdef WIN32
|
#define wglCopyContext dwglCopyContext
| | #define wglCopyContext dwglCopyContext
|
| | |
typedef void (OGLFUNCCALL *glVertexPointer_fp)(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
| | typedef void (OGLFUNCCALL *glVertexPointer_fp)(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
|
typedef void (OGLFUNCCALL *glViewport_fp)(GLint x, GLint y, GLsizei width, GLsizei height);
| | typedef void (OGLFUNCCALL *glViewport_fp)(GLint x, GLint y, GLsizei width, GLsizei height);
|
| |
|
| | typedef void (OGLFUNCCALL *glMultiTexCoord2fARB_fp)(GLenum target, GLfloat s, GLfloat t);
|
| | typedef void (OGLFUNCCALL *glActiveTextureARB_fp)(GLenum target);
|
| | typedef void (OGLFUNCCALL *glMultiTexCoord2fSGIS_fp)(GLenum target, GLfloat s, GLfloat t);
|
| | typedef void (OGLFUNCCALL *glSelectTextureSGIS_fp)(GLenum target);
|
| |
|
#ifdef WIN32
| | #ifdef WIN32
|
typedef BOOL (OGLFUNCCALL *wglCopyContext_fp)(HGLRC, HGLRC, UINT);
| | typedef BOOL (OGLFUNCCALL *wglCopyContext_fp)(HGLRC, HGLRC, UINT);
|
typedef HGLRC (OGLFUNCCALL *wglCreateContext_fp)(HDC);
| | typedef HGLRC (OGLFUNCCALL *wglCreateContext_fp)(HDC);
|
| | |
DEFVAR glVertexPointer_fp dglVertexPointer;
| | DEFVAR glVertexPointer_fp dglVertexPointer;
|
DEFVAR glViewport_fp dglViewport;
| | DEFVAR glViewport_fp dglViewport;
|
| |
|
| | DEFVAR glMultiTexCoord2fARB_fp dglMultiTexCoord2fARB;
|
| | DEFVAR glActiveTextureARB_fp dglActiveTextureARB;
|
| | DEFVAR glMultiTexCoord2fSGIS_fp dglMultiTexCoord2fSGIS;
|
| | DEFVAR glSelectTextureSGIS_fp dglSelectTextureSGIS;
|
| |
|
#ifdef WIN32
| | #ifdef WIN32
|
DEFVAR wglCopyContext_fp dwglCopyContext;
| | DEFVAR wglCopyContext_fp dwglCopyContext;
|
DEFVAR wglCreateContext_fp dwglCreateContext;
| | DEFVAR wglCreateContext_fp dwglCreateContext;
|
| | |
dwglSwapMultipleBuffers = (wglSwapMultipleBuffers_fp)dll_GetSymbol(OpenGLModuleHandle,"wglSwapMultipleBuffers");
| | dwglSwapMultipleBuffers = (wglSwapMultipleBuffers_fp)dll_GetSymbol(OpenGLModuleHandle,"wglSwapMultipleBuffers");
|
#endif
| | #endif
|
#endif
| | #endif
|
| | |
}
| | }
|
| |
|
return true;
| | return true;
|
| | |
dglVertex4sv = NULL;
| | dglVertex4sv = NULL;
|
dglVertexPointer = NULL;
| | dglVertexPointer = NULL;
|
dglViewport = NULL;
| | dglViewport = NULL;
|
| |
|
| | dglMultiTexCoord2fARB = NULL;
|
| | dglActiveTextureARB = NULL;
|
| | dglMultiTexCoord2fSGIS = NULL;
|
| | dglSelectTextureSGIS = NULL;
|
| |
|
#ifdef WIN32
| | #ifdef WIN32
|
dwglCopyContext = NULL;
| | dwglCopyContext = NULL;
|