mirror of
https://github.com/openmoh/openmohaa.git
synced 2025-04-28 21:57:57 +03:00
Added qglCompressedTexImage
This commit is contained in:
parent
59bf9fbd54
commit
dceceb976d
4 changed files with 92 additions and 0 deletions
|
@ -528,6 +528,34 @@ extern void ( APIENTRY * qglVertex4sv )(const GLshort *v);
|
|||
extern void ( APIENTRY * qglVertexPointer )(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
|
||||
extern void ( APIENTRY * qglViewport )(GLint x, GLint y, GLsizei width, GLsizei height);
|
||||
|
||||
// GL_ARB_texture_compression
|
||||
extern void (APIENTRY* qglCompressedTexImage3DARB)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void* data);
|
||||
extern void (APIENTRY* qglCompressedTexImage2DARB)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void* data);
|
||||
extern void (APIENTRY* qglCompressedTexSubImage3DARB)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void* data);
|
||||
extern void (APIENTRY* qglCompressedTexSubImage2DARB)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void* data);
|
||||
extern void (APIENTRY* qglGetCompressedTexImageARB)(GLenum target, GLint lod, void* img);
|
||||
#ifndef GL_COMPRESSED_RGB_ARB
|
||||
#define GL_COMPRESSED_ALPHA_ARB 0x84E9
|
||||
#define GL_COMPRESSED_LUMINANCE_ARB 0x84EA
|
||||
#define GL_COMPRESSED_LUMINANCE_ALPHA_ARB 0x84EB
|
||||
#define GL_COMPRESSED_INTENSITY_ARB 0x84EC
|
||||
#define GL_COMPRESSED_RGB_ARB 0x84ED
|
||||
#define GL_COMPRESSED_RGBA_ARB 0x84EE
|
||||
#define GL_TEXTURE_COMPRESSION_HINT_ARB 0x84EF
|
||||
#define GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB 0x86A0
|
||||
#define GL_TEXTURE_COMPRESSED_ARB 0x86A1
|
||||
#define GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB 0x86A2
|
||||
#define GL_COMPRESSED_TEXTURE_FORMATS_ARB 0x86A3
|
||||
#endif
|
||||
|
||||
// GL_EXT_texture_compression_s3tc
|
||||
#ifndef GL_COMPRESSED_RGB_S3TC_DXT1_EXT
|
||||
#define GL_COMPRESSED_RGB_S3TC_DXT1_EXT 0x83F0
|
||||
#define GL_COMPRESSED_RGBA_S3TC_DXT1_EXT 0x83F1
|
||||
#define GL_COMPRESSED_RGBA_S3TC_DXT3_EXT 0x83F2
|
||||
#define GL_COMPRESSED_RGBA_S3TC_DXT5_EXT 0x83F3
|
||||
#endif
|
||||
|
||||
#if defined( _WIN32 )
|
||||
|
||||
extern int ( WINAPI * qwglChoosePixelFormat )(HDC, CONST PIXELFORMATDESCRIPTOR *);
|
||||
|
|
|
@ -355,3 +355,8 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|||
#define qglVertexPointer glVertexPointer
|
||||
#define qglViewport glViewport
|
||||
|
||||
#define qglCompressedTexImage3DARB glCompressedTexImage3D
|
||||
#define qglCompressedTexImage2DARB glCompressedTexImage2D
|
||||
#define qglCompressedTexSubImage3DARB glCompressedTexSubImage3D
|
||||
#define qglCompressedTexSubImage2DARB glCompressedTexSubImage2D
|
||||
#define qglGetCompressedTexImageARB glGetCompressedTexImage
|
|
@ -404,6 +404,12 @@ void ( APIENTRY * qglVertex4sv )(const GLshort *v);
|
|||
void ( APIENTRY * qglVertexPointer )(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
|
||||
void ( APIENTRY * qglViewport )(GLint x, GLint y, GLsizei width, GLsizei height);
|
||||
|
||||
void (APIENTRY* qglCompressedTexImage3DARB)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void* data);
|
||||
void (APIENTRY* qglCompressedTexImage2DARB)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void* data);
|
||||
void (APIENTRY* qglCompressedTexSubImage3DARB)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void* data);
|
||||
void (APIENTRY* qglCompressedTexSubImage2DARB)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void* data);
|
||||
void (APIENTRY* qglGetCompressedTexImageARB)(GLenum target, GLint lod, void* img);
|
||||
|
||||
void ( APIENTRY * qglMultiTexCoord2fARB )( GLenum texture, GLfloat s, GLfloat t );
|
||||
void ( APIENTRY * qglActiveTextureARB )( GLenum texture );
|
||||
void ( APIENTRY * qglClientActiveTextureARB )( GLenum texture );
|
||||
|
@ -755,6 +761,12 @@ static void ( APIENTRY * dllVertex4sv )(const GLshort *v);
|
|||
static void ( APIENTRY * dllVertexPointer )(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
|
||||
static void ( APIENTRY * dllViewport )(GLint x, GLint y, GLsizei width, GLsizei height);
|
||||
|
||||
void (APIENTRY* dllCompressedTexImage3DARB)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void* data);
|
||||
void (APIENTRY* dllCompressedTexImage2DARB)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void* data);
|
||||
void (APIENTRY* dllCompressedTexSubImage3DARB)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void* data);
|
||||
void (APIENTRY* dllCompressedTexSubImage2DARB)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void* data);
|
||||
void (APIENTRY* dllGetCompressedTexImageARB)(GLenum target, GLint lod, void* img);
|
||||
|
||||
static void APIENTRY logAccum(GLenum op, GLfloat value)
|
||||
{
|
||||
fprintf( glw_state.log_fp, "glAccum\n" );
|
||||
|
@ -2994,6 +3006,12 @@ void QGL_Shutdown( void )
|
|||
qglVertexPointer = NULL;
|
||||
qglViewport = NULL;
|
||||
|
||||
qglCompressedTexImage3DARB = NULL;
|
||||
qglCompressedTexImage2DARB = NULL;
|
||||
qglCompressedTexSubImage3DARB = NULL;
|
||||
qglCompressedTexSubImage2DARB = NULL;
|
||||
qglGetCompressedTexImageARB = NULL;
|
||||
|
||||
// bk001129 - from cvs1.17 (mkv)
|
||||
#if defined(__FX__)
|
||||
qfxMesaCreateContext = NULL;
|
||||
|
@ -3391,6 +3409,12 @@ qboolean QGL_Init( const char *dllname )
|
|||
qglVertexPointer = dllVertexPointer = GPA( "glVertexPointer" );
|
||||
qglViewport = dllViewport = GPA( "glViewport" );
|
||||
|
||||
qglCompressedTexImage3DARB = dllCompressedTexImage3DARB = GPA("glCompressedTexImage3DARB");
|
||||
qglCompressedTexImage2DARB = dllCompressedTexImage2DARB = GPA("qglCompressedTexImage2DARB");
|
||||
qglCompressedTexSubImage3DARB = dllCompressedTexSubImage3DARB = GPA("qglCompressedTexSubImage3DARB");
|
||||
qglCompressedTexSubImage2DARB = dllCompressedTexSubImage2DARB = GPA("qglCompressedTexSubImage2DARB");
|
||||
qglGetCompressedTexImageARB = dllGetCompressedTexImageARB = GPA("qglGetCompressedTexImageARB");
|
||||
|
||||
// bk001129 - from cvs1.17 (mkv)
|
||||
#if defined(__FX__)
|
||||
qfxMesaCreateContext = GPA("fxMesaCreateContext");
|
||||
|
@ -4141,6 +4165,12 @@ void QGL_EnableLogging( qboolean enable ) {
|
|||
qglVertex4sv = dllVertex4sv ;
|
||||
qglVertexPointer = dllVertexPointer ;
|
||||
qglViewport = dllViewport ;
|
||||
|
||||
qglCompressedTexImage3DARB = dllCompressedTexImage3DARB;
|
||||
qglCompressedTexImage2DARB = dllCompressedTexImage2DARB;
|
||||
qglCompressedTexSubImage3DARB = dllCompressedTexSubImage3DARB;
|
||||
qglCompressedTexSubImage2DARB = dllCompressedTexSubImage2DARB;
|
||||
qglGetCompressedTexImageARB = dllGetCompressedTexImageARB;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -404,6 +404,11 @@ void ( APIENTRY * qglVertex4s )(GLshort x, GLshort y, GLshort z, GLshort w);
|
|||
void ( APIENTRY * qglVertex4sv )(const GLshort *v);
|
||||
void ( APIENTRY * qglVertexPointer )(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
|
||||
void ( APIENTRY * qglViewport )(GLint x, GLint y, GLsizei width, GLsizei height);
|
||||
void (APIENTRY* qglCompressedTexImage3DARB)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void* data);
|
||||
void (APIENTRY* qglCompressedTexImage2DARB)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void* data);
|
||||
void (APIENTRY* qglCompressedTexSubImage3DARB)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void* data);
|
||||
void (APIENTRY* qglCompressedTexSubImage2DARB)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void* data);
|
||||
void (APIENTRY* qglGetCompressedTexImageARB)(GLenum target, GLint lod, void* img);
|
||||
|
||||
void ( APIENTRY * qglMultiTexCoord2fARB )( GLenum texture, GLfloat s, GLfloat t );
|
||||
void ( APIENTRY * qglActiveTextureARB )( GLenum texture );
|
||||
|
@ -749,6 +754,12 @@ static void ( APIENTRY * dllVertex4sv )(const GLshort *v);
|
|||
static void ( APIENTRY * dllVertexPointer )(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
|
||||
static void ( APIENTRY * dllViewport )(GLint x, GLint y, GLsizei width, GLsizei height);
|
||||
|
||||
void (APIENTRY* dllCompressedTexImage3DARB)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void* data);
|
||||
void (APIENTRY* dllCompressedTexImage2DARB)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void* data);
|
||||
void (APIENTRY* dllCompressedTexSubImage3DARB)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void* data);
|
||||
void (APIENTRY* dllCompressedTexSubImage2DARB)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void* data);
|
||||
void (APIENTRY* dllGetCompressedTexImageARB)(GLenum target, GLint lod, void* img);
|
||||
|
||||
static const char * BooleanToString( GLboolean b )
|
||||
{
|
||||
if ( b == GL_FALSE )
|
||||
|
@ -3159,6 +3170,12 @@ void QGL_Shutdown( void )
|
|||
qglVertexPointer = NULL;
|
||||
qglViewport = NULL;
|
||||
|
||||
qglCompressedTexImage3DARB = NULL;
|
||||
qglCompressedTexImage2DARB = NULL;
|
||||
qglCompressedTexSubImage3DARB = NULL;
|
||||
qglCompressedTexSubImage2DARB = NULL;
|
||||
qglGetCompressedTexImageARB = NULL;
|
||||
|
||||
qwglCopyContext = NULL;
|
||||
qwglCreateContext = NULL;
|
||||
qwglCreateLayerContext = NULL;
|
||||
|
@ -3611,6 +3628,12 @@ qboolean QGL_Init( const char *dllname )
|
|||
qglVertexPointer = dllVertexPointer = GPA( "glVertexPointer" );
|
||||
qglViewport = dllViewport = GPA( "glViewport" );
|
||||
|
||||
qglCompressedTexImage3DARB = dllCompressedTexImage3DARB = GPA("glCompressedTexImage3D");
|
||||
qglCompressedTexImage2DARB = dllCompressedTexImage2DARB = GPA("glCompressedTexImage2D");
|
||||
qglCompressedTexSubImage3DARB = dllCompressedTexSubImage3DARB = GPA("glCompressedTexSubImage3D");
|
||||
qglCompressedTexSubImage2DARB = dllCompressedTexSubImage2DARB = GPA("glCompressedTexSubImage2D");
|
||||
qglGetCompressedTexImageARB = dllGetCompressedTexImageARB = GPA("glGetCompressedTexImage");
|
||||
|
||||
qwglCopyContext = GPA( "wglCopyContext" );
|
||||
qwglCreateContext = GPA( "wglCreateContext" );
|
||||
qwglCreateLayerContext = GPA( "wglCreateLayerContext" );
|
||||
|
@ -4370,6 +4393,12 @@ void QGL_EnableLogging( qboolean enable )
|
|||
qglVertex4sv = dllVertex4sv ;
|
||||
qglVertexPointer = dllVertexPointer ;
|
||||
qglViewport = dllViewport ;
|
||||
|
||||
qglCompressedTexImage3DARB = dllCompressedTexImage3DARB;
|
||||
qglCompressedTexImage2DARB = dllCompressedTexImage2DARB;
|
||||
qglCompressedTexSubImage3DARB = dllCompressedTexSubImage3DARB;
|
||||
qglCompressedTexSubImage2DARB = dllCompressedTexSubImage2DARB;
|
||||
qglGetCompressedTexImageARB = dllGetCompressedTexImageARB;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue