mirror of
https://github.com/id-Software/DOOM-3-BFG.git
synced 2026-03-20 17:11:16 +01:00
Initial commit
This commit is contained in:
494
neo/renderer/OpenGL/gl_GraphicsAPIWrapper.cpp
Normal file
494
neo/renderer/OpenGL/gl_GraphicsAPIWrapper.cpp
Normal file
@@ -0,0 +1,494 @@
|
||||
/*
|
||||
===========================================================================
|
||||
|
||||
Doom 3 BFG Edition GPL Source Code
|
||||
Copyright (C) 1993-2012 id Software LLC, a ZeniMax Media company.
|
||||
|
||||
This file is part of the Doom 3 BFG Edition GPL Source Code ("Doom 3 BFG Edition Source Code").
|
||||
|
||||
Doom 3 BFG Edition Source Code is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Doom 3 BFG Edition Source Code is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Doom 3 BFG Edition Source Code. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
In addition, the Doom 3 BFG Edition Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the Doom 3 BFG Edition Source Code. If not, please request a copy in writing from id Software at the address below.
|
||||
|
||||
If you have questions concerning this license or the applicable additional terms, you may contact in writing id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA.
|
||||
|
||||
===========================================================================
|
||||
*/
|
||||
|
||||
#pragma hdrstop
|
||||
#include "../../idlib/precompiled.h"
|
||||
|
||||
#include "../tr_local.h"
|
||||
|
||||
/*
|
||||
====================
|
||||
GL_SelectTexture
|
||||
====================
|
||||
*/
|
||||
void GL_SelectTexture( int unit ) {
|
||||
if ( backEnd.glState.currenttmu == unit ) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ( unit < 0 || unit >= glConfig.maxTextureImageUnits ) {
|
||||
common->Warning( "GL_SelectTexture: unit = %i", unit );
|
||||
return;
|
||||
}
|
||||
|
||||
RENDERLOG_PRINTF( "GL_SelectTexture( %i );\n", unit );
|
||||
|
||||
backEnd.glState.currenttmu = unit;
|
||||
}
|
||||
|
||||
/*
|
||||
====================
|
||||
GL_Cull
|
||||
|
||||
This handles the flipping needed when the view being
|
||||
rendered is a mirored view.
|
||||
====================
|
||||
*/
|
||||
void GL_Cull( int cullType ) {
|
||||
if ( backEnd.glState.faceCulling == cullType ) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ( cullType == CT_TWO_SIDED ) {
|
||||
qglDisable( GL_CULL_FACE );
|
||||
} else {
|
||||
if ( backEnd.glState.faceCulling == CT_TWO_SIDED ) {
|
||||
qglEnable( GL_CULL_FACE );
|
||||
}
|
||||
|
||||
if ( cullType == CT_BACK_SIDED ) {
|
||||
if ( backEnd.viewDef->isMirror ) {
|
||||
qglCullFace( GL_FRONT );
|
||||
} else {
|
||||
qglCullFace( GL_BACK );
|
||||
}
|
||||
} else {
|
||||
if ( backEnd.viewDef->isMirror ) {
|
||||
qglCullFace( GL_BACK );
|
||||
} else {
|
||||
qglCullFace( GL_FRONT );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
backEnd.glState.faceCulling = cullType;
|
||||
}
|
||||
|
||||
/*
|
||||
====================
|
||||
GL_Scissor
|
||||
====================
|
||||
*/
|
||||
void GL_Scissor( int x /* left*/, int y /* bottom */, int w, int h ) {
|
||||
qglScissor( x, y, w, h );
|
||||
}
|
||||
|
||||
/*
|
||||
====================
|
||||
GL_Viewport
|
||||
====================
|
||||
*/
|
||||
void GL_Viewport( int x /* left */, int y /* bottom */, int w, int h ) {
|
||||
qglViewport( x, y, w, h );
|
||||
}
|
||||
|
||||
/*
|
||||
====================
|
||||
GL_PolygonOffset
|
||||
====================
|
||||
*/
|
||||
void GL_PolygonOffset( float scale, float bias ) {
|
||||
backEnd.glState.polyOfsScale = scale;
|
||||
backEnd.glState.polyOfsBias = bias;
|
||||
if ( backEnd.glState.glStateBits & GLS_POLYGON_OFFSET ) {
|
||||
qglPolygonOffset( scale, bias );
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
========================
|
||||
GL_DepthBoundsTest
|
||||
========================
|
||||
*/
|
||||
void GL_DepthBoundsTest( const float zmin, const float zmax ) {
|
||||
if ( !glConfig.depthBoundsTestAvailable || zmin > zmax ) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ( zmin == 0.0f && zmax == 0.0f ) {
|
||||
qglDisable( GL_DEPTH_BOUNDS_TEST_EXT );
|
||||
} else {
|
||||
qglEnable( GL_DEPTH_BOUNDS_TEST_EXT );
|
||||
qglDepthBoundsEXT( zmin, zmax );
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
========================
|
||||
GL_StartDepthPass
|
||||
========================
|
||||
*/
|
||||
void GL_StartDepthPass( const idScreenRect & rect ) {
|
||||
}
|
||||
|
||||
/*
|
||||
========================
|
||||
GL_FinishDepthPass
|
||||
========================
|
||||
*/
|
||||
void GL_FinishDepthPass() {
|
||||
}
|
||||
|
||||
/*
|
||||
========================
|
||||
GL_GetDepthPassRect
|
||||
========================
|
||||
*/
|
||||
void GL_GetDepthPassRect( idScreenRect & rect ) {
|
||||
rect.Clear();
|
||||
}
|
||||
|
||||
/*
|
||||
====================
|
||||
GL_Color
|
||||
====================
|
||||
*/
|
||||
void GL_Color( float * color ) {
|
||||
if ( color == NULL ) {
|
||||
return;
|
||||
}
|
||||
GL_Color( color[0], color[1], color[2], color[3] );
|
||||
}
|
||||
|
||||
/*
|
||||
====================
|
||||
GL_Color
|
||||
====================
|
||||
*/
|
||||
void GL_Color( float r, float g, float b ) {
|
||||
GL_Color( r, g, b, 1.0f );
|
||||
}
|
||||
|
||||
/*
|
||||
====================
|
||||
GL_Color
|
||||
====================
|
||||
*/
|
||||
void GL_Color( float r, float g, float b, float a ) {
|
||||
float parm[4];
|
||||
parm[0] = idMath::ClampFloat( 0.0f, 1.0f, r );
|
||||
parm[1] = idMath::ClampFloat( 0.0f, 1.0f, g );
|
||||
parm[2] = idMath::ClampFloat( 0.0f, 1.0f, b );
|
||||
parm[3] = idMath::ClampFloat( 0.0f, 1.0f, a );
|
||||
renderProgManager.SetRenderParm( RENDERPARM_COLOR, parm );
|
||||
}
|
||||
|
||||
/*
|
||||
========================
|
||||
GL_Clear
|
||||
========================
|
||||
*/
|
||||
void GL_Clear( bool color, bool depth, bool stencil, byte stencilValue, float r, float g, float b, float a ) {
|
||||
int clearFlags = 0;
|
||||
if ( color ) {
|
||||
qglClearColor( r, g, b, a );
|
||||
clearFlags |= GL_COLOR_BUFFER_BIT;
|
||||
}
|
||||
if ( depth ) {
|
||||
clearFlags |= GL_DEPTH_BUFFER_BIT;
|
||||
}
|
||||
if ( stencil ) {
|
||||
qglClearStencil( stencilValue );
|
||||
clearFlags |= GL_STENCIL_BUFFER_BIT;
|
||||
}
|
||||
qglClear( clearFlags );
|
||||
}
|
||||
|
||||
/*
|
||||
========================
|
||||
GL_SetDefaultState
|
||||
|
||||
This should initialize all GL state that any part of the entire program
|
||||
may touch, including the editor.
|
||||
========================
|
||||
*/
|
||||
void GL_SetDefaultState() {
|
||||
RENDERLOG_PRINTF( "--- GL_SetDefaultState ---\n" );
|
||||
|
||||
qglClearDepth( 1.0f );
|
||||
|
||||
// make sure our GL state vector is set correctly
|
||||
memset( &backEnd.glState, 0, sizeof( backEnd.glState ) );
|
||||
GL_State( 0, true );
|
||||
|
||||
// These are changed by GL_Cull
|
||||
qglCullFace( GL_FRONT_AND_BACK );
|
||||
qglEnable( GL_CULL_FACE );
|
||||
|
||||
// These are changed by GL_State
|
||||
qglColorMask( GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE );
|
||||
qglBlendFunc( GL_ONE, GL_ZERO );
|
||||
qglDepthMask( GL_TRUE );
|
||||
qglDepthFunc( GL_LESS );
|
||||
qglDisable( GL_STENCIL_TEST );
|
||||
qglDisable( GL_POLYGON_OFFSET_FILL );
|
||||
qglDisable( GL_POLYGON_OFFSET_LINE );
|
||||
qglPolygonMode( GL_FRONT_AND_BACK, GL_FILL );
|
||||
|
||||
// These should never be changed
|
||||
qglShadeModel( GL_SMOOTH );
|
||||
qglEnable( GL_DEPTH_TEST );
|
||||
qglEnable( GL_BLEND );
|
||||
qglEnable( GL_SCISSOR_TEST );
|
||||
qglDrawBuffer( GL_BACK );
|
||||
qglReadBuffer( GL_BACK );
|
||||
|
||||
if ( r_useScissor.GetBool() ) {
|
||||
qglScissor( 0, 0, renderSystem->GetWidth(), renderSystem->GetHeight() );
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
====================
|
||||
GL_State
|
||||
|
||||
This routine is responsible for setting the most commonly changed state
|
||||
====================
|
||||
*/
|
||||
void GL_State( uint64 stateBits, bool forceGlState ) {
|
||||
uint64 diff = stateBits ^ backEnd.glState.glStateBits;
|
||||
|
||||
if ( !r_useStateCaching.GetBool() || forceGlState ) {
|
||||
// make sure everything is set all the time, so we
|
||||
// can see if our delta checking is screwing up
|
||||
diff = 0xFFFFFFFFFFFFFFFF;
|
||||
} else if ( diff == 0 ) {
|
||||
return;
|
||||
}
|
||||
|
||||
//
|
||||
// check depthFunc bits
|
||||
//
|
||||
if ( diff & GLS_DEPTHFUNC_BITS ) {
|
||||
switch ( stateBits & GLS_DEPTHFUNC_BITS ) {
|
||||
case GLS_DEPTHFUNC_EQUAL: qglDepthFunc( GL_EQUAL ); break;
|
||||
case GLS_DEPTHFUNC_ALWAYS: qglDepthFunc( GL_ALWAYS ); break;
|
||||
case GLS_DEPTHFUNC_LESS: qglDepthFunc( GL_LEQUAL ); break;
|
||||
case GLS_DEPTHFUNC_GREATER: qglDepthFunc( GL_GEQUAL ); break;
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// check blend bits
|
||||
//
|
||||
if ( diff & ( GLS_SRCBLEND_BITS | GLS_DSTBLEND_BITS ) ) {
|
||||
GLenum srcFactor = GL_ONE;
|
||||
GLenum dstFactor = GL_ZERO;
|
||||
|
||||
switch ( stateBits & GLS_SRCBLEND_BITS ) {
|
||||
case GLS_SRCBLEND_ZERO: srcFactor = GL_ZERO; break;
|
||||
case GLS_SRCBLEND_ONE: srcFactor = GL_ONE; break;
|
||||
case GLS_SRCBLEND_DST_COLOR: srcFactor = GL_DST_COLOR; break;
|
||||
case GLS_SRCBLEND_ONE_MINUS_DST_COLOR: srcFactor = GL_ONE_MINUS_DST_COLOR; break;
|
||||
case GLS_SRCBLEND_SRC_ALPHA: srcFactor = GL_SRC_ALPHA; break;
|
||||
case GLS_SRCBLEND_ONE_MINUS_SRC_ALPHA: srcFactor = GL_ONE_MINUS_SRC_ALPHA; break;
|
||||
case GLS_SRCBLEND_DST_ALPHA: srcFactor = GL_DST_ALPHA; break;
|
||||
case GLS_SRCBLEND_ONE_MINUS_DST_ALPHA: srcFactor = GL_ONE_MINUS_DST_ALPHA; break;
|
||||
default:
|
||||
assert( !"GL_State: invalid src blend state bits\n" );
|
||||
break;
|
||||
}
|
||||
|
||||
switch ( stateBits & GLS_DSTBLEND_BITS ) {
|
||||
case GLS_DSTBLEND_ZERO: dstFactor = GL_ZERO; break;
|
||||
case GLS_DSTBLEND_ONE: dstFactor = GL_ONE; break;
|
||||
case GLS_DSTBLEND_SRC_COLOR: dstFactor = GL_SRC_COLOR; break;
|
||||
case GLS_DSTBLEND_ONE_MINUS_SRC_COLOR: dstFactor = GL_ONE_MINUS_SRC_COLOR; break;
|
||||
case GLS_DSTBLEND_SRC_ALPHA: dstFactor = GL_SRC_ALPHA; break;
|
||||
case GLS_DSTBLEND_ONE_MINUS_SRC_ALPHA: dstFactor = GL_ONE_MINUS_SRC_ALPHA; break;
|
||||
case GLS_DSTBLEND_DST_ALPHA: dstFactor = GL_DST_ALPHA; break;
|
||||
case GLS_DSTBLEND_ONE_MINUS_DST_ALPHA: dstFactor = GL_ONE_MINUS_DST_ALPHA; break;
|
||||
default:
|
||||
assert( !"GL_State: invalid dst blend state bits\n" );
|
||||
break;
|
||||
}
|
||||
|
||||
// Only actually update GL's blend func if blending is enabled.
|
||||
if ( srcFactor == GL_ONE && dstFactor == GL_ZERO ) {
|
||||
qglDisable( GL_BLEND );
|
||||
} else {
|
||||
qglEnable( GL_BLEND );
|
||||
qglBlendFunc( srcFactor, dstFactor );
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// check depthmask
|
||||
//
|
||||
if ( diff & GLS_DEPTHMASK ) {
|
||||
if ( stateBits & GLS_DEPTHMASK ) {
|
||||
qglDepthMask( GL_FALSE );
|
||||
} else {
|
||||
qglDepthMask( GL_TRUE );
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// check colormask
|
||||
//
|
||||
if ( diff & (GLS_REDMASK|GLS_GREENMASK|GLS_BLUEMASK|GLS_ALPHAMASK) ) {
|
||||
GLboolean r = ( stateBits & GLS_REDMASK ) ? GL_FALSE : GL_TRUE;
|
||||
GLboolean g = ( stateBits & GLS_GREENMASK ) ? GL_FALSE : GL_TRUE;
|
||||
GLboolean b = ( stateBits & GLS_BLUEMASK ) ? GL_FALSE : GL_TRUE;
|
||||
GLboolean a = ( stateBits & GLS_ALPHAMASK ) ? GL_FALSE : GL_TRUE;
|
||||
qglColorMask( r, g, b, a );
|
||||
}
|
||||
|
||||
//
|
||||
// fill/line mode
|
||||
//
|
||||
if ( diff & GLS_POLYMODE_LINE ) {
|
||||
if ( stateBits & GLS_POLYMODE_LINE ) {
|
||||
qglPolygonMode( GL_FRONT_AND_BACK, GL_LINE );
|
||||
} else {
|
||||
qglPolygonMode( GL_FRONT_AND_BACK, GL_FILL );
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// polygon offset
|
||||
//
|
||||
if ( diff & GLS_POLYGON_OFFSET ) {
|
||||
if ( stateBits & GLS_POLYGON_OFFSET ) {
|
||||
qglPolygonOffset( backEnd.glState.polyOfsScale, backEnd.glState.polyOfsBias );
|
||||
qglEnable( GL_POLYGON_OFFSET_FILL );
|
||||
qglEnable( GL_POLYGON_OFFSET_LINE );
|
||||
} else {
|
||||
qglDisable( GL_POLYGON_OFFSET_FILL );
|
||||
qglDisable( GL_POLYGON_OFFSET_LINE );
|
||||
}
|
||||
}
|
||||
|
||||
#if !defined( USE_CORE_PROFILE )
|
||||
//
|
||||
// alpha test
|
||||
//
|
||||
if ( diff & ( GLS_ALPHATEST_FUNC_BITS | GLS_ALPHATEST_FUNC_REF_BITS ) ) {
|
||||
if ( ( stateBits & GLS_ALPHATEST_FUNC_BITS ) != 0 ) {
|
||||
qglEnable( GL_ALPHA_TEST );
|
||||
|
||||
GLenum func = GL_ALWAYS;
|
||||
switch ( stateBits & GLS_ALPHATEST_FUNC_BITS ) {
|
||||
case GLS_ALPHATEST_FUNC_LESS: func = GL_LESS; break;
|
||||
case GLS_ALPHATEST_FUNC_EQUAL: func = GL_EQUAL; break;
|
||||
case GLS_ALPHATEST_FUNC_GREATER: func = GL_GEQUAL; break;
|
||||
default: assert( false );
|
||||
}
|
||||
GLclampf ref = ( ( stateBits & GLS_ALPHATEST_FUNC_REF_BITS ) >> GLS_ALPHATEST_FUNC_REF_SHIFT ) / (float)0xFF;
|
||||
qglAlphaFunc( func, ref );
|
||||
} else {
|
||||
qglDisable( GL_ALPHA_TEST );
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
//
|
||||
// stencil
|
||||
//
|
||||
if ( diff & ( GLS_STENCIL_FUNC_BITS | GLS_STENCIL_OP_BITS ) ) {
|
||||
if ( ( stateBits & ( GLS_STENCIL_FUNC_BITS | GLS_STENCIL_OP_BITS ) ) != 0 ) {
|
||||
qglEnable( GL_STENCIL_TEST );
|
||||
} else {
|
||||
qglDisable( GL_STENCIL_TEST );
|
||||
}
|
||||
}
|
||||
if ( diff & ( GLS_STENCIL_FUNC_BITS | GLS_STENCIL_FUNC_REF_BITS | GLS_STENCIL_FUNC_MASK_BITS ) ) {
|
||||
GLuint ref = GLuint( ( stateBits & GLS_STENCIL_FUNC_REF_BITS ) >> GLS_STENCIL_FUNC_REF_SHIFT );
|
||||
GLuint mask = GLuint( ( stateBits & GLS_STENCIL_FUNC_MASK_BITS ) >> GLS_STENCIL_FUNC_MASK_SHIFT );
|
||||
GLenum func = 0;
|
||||
|
||||
switch ( stateBits & GLS_STENCIL_FUNC_BITS ) {
|
||||
case GLS_STENCIL_FUNC_NEVER: func = GL_NEVER; break;
|
||||
case GLS_STENCIL_FUNC_LESS: func = GL_LESS; break;
|
||||
case GLS_STENCIL_FUNC_EQUAL: func = GL_EQUAL; break;
|
||||
case GLS_STENCIL_FUNC_LEQUAL: func = GL_LEQUAL; break;
|
||||
case GLS_STENCIL_FUNC_GREATER: func = GL_GREATER; break;
|
||||
case GLS_STENCIL_FUNC_NOTEQUAL: func = GL_NOTEQUAL; break;
|
||||
case GLS_STENCIL_FUNC_GEQUAL: func = GL_GEQUAL; break;
|
||||
case GLS_STENCIL_FUNC_ALWAYS: func = GL_ALWAYS; break;
|
||||
}
|
||||
qglStencilFunc( func, ref, mask );
|
||||
}
|
||||
if ( diff & ( GLS_STENCIL_OP_FAIL_BITS | GLS_STENCIL_OP_ZFAIL_BITS | GLS_STENCIL_OP_PASS_BITS ) ) {
|
||||
GLenum sFail = 0;
|
||||
GLenum zFail = 0;
|
||||
GLenum pass = 0;
|
||||
|
||||
switch ( stateBits & GLS_STENCIL_OP_FAIL_BITS ) {
|
||||
case GLS_STENCIL_OP_FAIL_KEEP: sFail = GL_KEEP; break;
|
||||
case GLS_STENCIL_OP_FAIL_ZERO: sFail = GL_ZERO; break;
|
||||
case GLS_STENCIL_OP_FAIL_REPLACE: sFail = GL_REPLACE; break;
|
||||
case GLS_STENCIL_OP_FAIL_INCR: sFail = GL_INCR; break;
|
||||
case GLS_STENCIL_OP_FAIL_DECR: sFail = GL_DECR; break;
|
||||
case GLS_STENCIL_OP_FAIL_INVERT: sFail = GL_INVERT; break;
|
||||
case GLS_STENCIL_OP_FAIL_INCR_WRAP: sFail = GL_INCR_WRAP; break;
|
||||
case GLS_STENCIL_OP_FAIL_DECR_WRAP: sFail = GL_DECR_WRAP; break;
|
||||
}
|
||||
switch ( stateBits & GLS_STENCIL_OP_ZFAIL_BITS ) {
|
||||
case GLS_STENCIL_OP_ZFAIL_KEEP: zFail = GL_KEEP; break;
|
||||
case GLS_STENCIL_OP_ZFAIL_ZERO: zFail = GL_ZERO; break;
|
||||
case GLS_STENCIL_OP_ZFAIL_REPLACE: zFail = GL_REPLACE; break;
|
||||
case GLS_STENCIL_OP_ZFAIL_INCR: zFail = GL_INCR; break;
|
||||
case GLS_STENCIL_OP_ZFAIL_DECR: zFail = GL_DECR; break;
|
||||
case GLS_STENCIL_OP_ZFAIL_INVERT: zFail = GL_INVERT; break;
|
||||
case GLS_STENCIL_OP_ZFAIL_INCR_WRAP:zFail = GL_INCR_WRAP; break;
|
||||
case GLS_STENCIL_OP_ZFAIL_DECR_WRAP:zFail = GL_DECR_WRAP; break;
|
||||
}
|
||||
switch ( stateBits & GLS_STENCIL_OP_PASS_BITS ) {
|
||||
case GLS_STENCIL_OP_PASS_KEEP: pass = GL_KEEP; break;
|
||||
case GLS_STENCIL_OP_PASS_ZERO: pass = GL_ZERO; break;
|
||||
case GLS_STENCIL_OP_PASS_REPLACE: pass = GL_REPLACE; break;
|
||||
case GLS_STENCIL_OP_PASS_INCR: pass = GL_INCR; break;
|
||||
case GLS_STENCIL_OP_PASS_DECR: pass = GL_DECR; break;
|
||||
case GLS_STENCIL_OP_PASS_INVERT: pass = GL_INVERT; break;
|
||||
case GLS_STENCIL_OP_PASS_INCR_WRAP: pass = GL_INCR_WRAP; break;
|
||||
case GLS_STENCIL_OP_PASS_DECR_WRAP: pass = GL_DECR_WRAP; break;
|
||||
}
|
||||
qglStencilOp( sFail, zFail, pass );
|
||||
}
|
||||
|
||||
backEnd.glState.glStateBits = stateBits;
|
||||
}
|
||||
|
||||
/*
|
||||
=================
|
||||
GL_GetCurrentState
|
||||
=================
|
||||
*/
|
||||
uint64 GL_GetCurrentState() {
|
||||
return backEnd.glState.glStateBits;
|
||||
}
|
||||
|
||||
/*
|
||||
========================
|
||||
GL_GetCurrentStateMinusStencil
|
||||
========================
|
||||
*/
|
||||
uint64 GL_GetCurrentStateMinusStencil() {
|
||||
return GL_GetCurrentState() & ~(GLS_STENCIL_OP_BITS|GLS_STENCIL_FUNC_BITS|GLS_STENCIL_FUNC_REF_BITS|GLS_STENCIL_FUNC_MASK_BITS);
|
||||
}
|
||||
482
neo/renderer/OpenGL/gl_Image.cpp
Normal file
482
neo/renderer/OpenGL/gl_Image.cpp
Normal file
@@ -0,0 +1,482 @@
|
||||
/*
|
||||
===========================================================================
|
||||
|
||||
Doom 3 BFG Edition GPL Source Code
|
||||
Copyright (C) 1993-2012 id Software LLC, a ZeniMax Media company.
|
||||
|
||||
This file is part of the Doom 3 BFG Edition GPL Source Code ("Doom 3 BFG Edition Source Code").
|
||||
|
||||
Doom 3 BFG Edition Source Code is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Doom 3 BFG Edition Source Code is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Doom 3 BFG Edition Source Code. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
In addition, the Doom 3 BFG Edition Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the Doom 3 BFG Edition Source Code. If not, please request a copy in writing from id Software at the address below.
|
||||
|
||||
If you have questions concerning this license or the applicable additional terms, you may contact in writing id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA.
|
||||
|
||||
===========================================================================
|
||||
*/
|
||||
#pragma hdrstop
|
||||
#include "../../idlib/precompiled.h"
|
||||
|
||||
/*
|
||||
================================================================================================
|
||||
Contains the Image implementation for OpenGL.
|
||||
================================================================================================
|
||||
*/
|
||||
|
||||
#include "../tr_local.h"
|
||||
|
||||
/*
|
||||
========================
|
||||
idImage::SubImageUpload
|
||||
========================
|
||||
*/
|
||||
void idImage::SubImageUpload( int mipLevel, int x, int y, int z, int width, int height, const void * pic, int pixelPitch ) const {
|
||||
assert( x >= 0 && y >= 0 && mipLevel >= 0 && width >= 0 && height >= 0 && mipLevel < opts.numLevels );
|
||||
|
||||
int compressedSize = 0;
|
||||
|
||||
if ( IsCompressed() ) {
|
||||
assert( !(x&3) && !(y&3) );
|
||||
|
||||
// compressed size may be larger than the dimensions due to padding to quads
|
||||
int quadW = ( width + 3 ) & ~3;
|
||||
int quadH = ( height + 3 ) & ~3;
|
||||
compressedSize = quadW * quadH * BitsForFormat( opts.format ) / 8;
|
||||
|
||||
int padW = ( opts.width + 3 ) & ~3;
|
||||
int padH = ( opts.height + 3 ) & ~3;
|
||||
(void)padH;
|
||||
(void)padW;
|
||||
assert( x + width <= padW && y + height <= padH );
|
||||
// upload the non-aligned value, OpenGL understands that there
|
||||
// will be padding
|
||||
if ( x + width > opts.width ) {
|
||||
width = opts.width - x;
|
||||
}
|
||||
if ( y + height > opts.height ) {
|
||||
height = opts.height - x;
|
||||
}
|
||||
} else {
|
||||
assert( x + width <= opts.width && y + height <= opts.height );
|
||||
}
|
||||
|
||||
int target;
|
||||
int uploadTarget;
|
||||
if ( opts.textureType == TT_2D ) {
|
||||
target = GL_TEXTURE_2D;
|
||||
uploadTarget = GL_TEXTURE_2D;
|
||||
} else if ( opts.textureType == TT_CUBIC ) {
|
||||
target = GL_TEXTURE_CUBE_MAP_EXT;
|
||||
uploadTarget = GL_TEXTURE_CUBE_MAP_POSITIVE_X_EXT + z;
|
||||
} else {
|
||||
assert( !"invalid opts.textureType" );
|
||||
target = GL_TEXTURE_2D;
|
||||
uploadTarget = GL_TEXTURE_2D;
|
||||
}
|
||||
|
||||
qglBindTexture( target, texnum );
|
||||
|
||||
if ( pixelPitch != 0 ) {
|
||||
qglPixelStorei( GL_UNPACK_ROW_LENGTH, pixelPitch );
|
||||
}
|
||||
if ( opts.format == FMT_RGB565 ) {
|
||||
glPixelStorei( GL_UNPACK_SWAP_BYTES, GL_TRUE );
|
||||
}
|
||||
#ifdef DEBUG
|
||||
GL_CheckErrors();
|
||||
#endif
|
||||
if ( IsCompressed() ) {
|
||||
qglCompressedTexSubImage2DARB( uploadTarget, mipLevel, x, y, width, height, internalFormat, compressedSize, pic );
|
||||
} else {
|
||||
|
||||
// make sure the pixel store alignment is correct so that lower mips get created
|
||||
// properly for odd shaped textures - this fixes the mip mapping issues with
|
||||
// fonts
|
||||
int unpackAlignment = width * BitsForFormat( (textureFormat_t)opts.format ) / 8;
|
||||
if ( ( unpackAlignment & 3 ) == 0 ) {
|
||||
qglPixelStorei( GL_UNPACK_ALIGNMENT, 4 );
|
||||
} else {
|
||||
qglPixelStorei( GL_UNPACK_ALIGNMENT, 1 );
|
||||
}
|
||||
|
||||
qglTexSubImage2D( uploadTarget, mipLevel, x, y, width, height, dataFormat, dataType, pic );
|
||||
}
|
||||
#ifdef DEBUG
|
||||
GL_CheckErrors();
|
||||
#endif
|
||||
if ( opts.format == FMT_RGB565 ) {
|
||||
glPixelStorei( GL_UNPACK_SWAP_BYTES, GL_FALSE );
|
||||
}
|
||||
if ( pixelPitch != 0 ) {
|
||||
qglPixelStorei( GL_UNPACK_ROW_LENGTH, 0 );
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
========================
|
||||
idImage::SetPixel
|
||||
========================
|
||||
*/
|
||||
void idImage::SetPixel( int mipLevel, int x, int y, const void * data, int dataSize ) {
|
||||
SubImageUpload( mipLevel, x, y, 0, 1, 1, data );
|
||||
}
|
||||
|
||||
/*
|
||||
========================
|
||||
idImage::SetTexParameters
|
||||
========================
|
||||
*/
|
||||
void idImage::SetTexParameters() {
|
||||
int target = GL_TEXTURE_2D;
|
||||
switch ( opts.textureType ) {
|
||||
case TT_2D:
|
||||
target = GL_TEXTURE_2D;
|
||||
break;
|
||||
case TT_CUBIC:
|
||||
target = GL_TEXTURE_CUBE_MAP_EXT;
|
||||
break;
|
||||
default:
|
||||
idLib::FatalError( "%s: bad texture type %d", GetName(), opts.textureType );
|
||||
return;
|
||||
}
|
||||
|
||||
// ALPHA, LUMINANCE, LUMINANCE_ALPHA, and INTENSITY have been removed
|
||||
// in OpenGL 3.2. In order to mimic those modes, we use the swizzle operators
|
||||
#if defined( USE_CORE_PROFILE )
|
||||
if ( opts.colorFormat == CFM_GREEN_ALPHA ) {
|
||||
qglTexParameteri( target, GL_TEXTURE_SWIZZLE_R, GL_ONE );
|
||||
qglTexParameteri( target, GL_TEXTURE_SWIZZLE_G, GL_ONE );
|
||||
qglTexParameteri( target, GL_TEXTURE_SWIZZLE_B, GL_ONE );
|
||||
qglTexParameteri( target, GL_TEXTURE_SWIZZLE_A, GL_GREEN );
|
||||
} else if ( opts.format == FMT_LUM8 ) {
|
||||
qglTexParameteri( target, GL_TEXTURE_SWIZZLE_R, GL_RED );
|
||||
qglTexParameteri( target, GL_TEXTURE_SWIZZLE_G, GL_RED );
|
||||
qglTexParameteri( target, GL_TEXTURE_SWIZZLE_B, GL_RED );
|
||||
qglTexParameteri( target, GL_TEXTURE_SWIZZLE_A, GL_ONE );
|
||||
} else if ( opts.format == FMT_L8A8 ) {
|
||||
qglTexParameteri( target, GL_TEXTURE_SWIZZLE_R, GL_RED );
|
||||
qglTexParameteri( target, GL_TEXTURE_SWIZZLE_G, GL_RED );
|
||||
qglTexParameteri( target, GL_TEXTURE_SWIZZLE_B, GL_RED );
|
||||
qglTexParameteri( target, GL_TEXTURE_SWIZZLE_A, GL_GREEN );
|
||||
} else if ( opts.format == FMT_ALPHA ) {
|
||||
qglTexParameteri( target, GL_TEXTURE_SWIZZLE_R, GL_ONE );
|
||||
qglTexParameteri( target, GL_TEXTURE_SWIZZLE_G, GL_ONE );
|
||||
qglTexParameteri( target, GL_TEXTURE_SWIZZLE_B, GL_ONE );
|
||||
qglTexParameteri( target, GL_TEXTURE_SWIZZLE_A, GL_RED );
|
||||
} else if ( opts.format == FMT_INT8 ) {
|
||||
qglTexParameteri( target, GL_TEXTURE_SWIZZLE_R, GL_RED );
|
||||
qglTexParameteri( target, GL_TEXTURE_SWIZZLE_G, GL_RED );
|
||||
qglTexParameteri( target, GL_TEXTURE_SWIZZLE_B, GL_RED );
|
||||
qglTexParameteri( target, GL_TEXTURE_SWIZZLE_A, GL_RED );
|
||||
} else {
|
||||
qglTexParameteri( target, GL_TEXTURE_SWIZZLE_R, GL_RED );
|
||||
qglTexParameteri( target, GL_TEXTURE_SWIZZLE_G, GL_GREEN );
|
||||
qglTexParameteri( target, GL_TEXTURE_SWIZZLE_B, GL_BLUE );
|
||||
qglTexParameteri( target, GL_TEXTURE_SWIZZLE_A, GL_ALPHA );
|
||||
}
|
||||
#else
|
||||
if ( opts.colorFormat == CFM_GREEN_ALPHA ) {
|
||||
qglTexParameteri( target, GL_TEXTURE_SWIZZLE_R, GL_ONE );
|
||||
qglTexParameteri( target, GL_TEXTURE_SWIZZLE_G, GL_ONE );
|
||||
qglTexParameteri( target, GL_TEXTURE_SWIZZLE_B, GL_ONE );
|
||||
qglTexParameteri( target, GL_TEXTURE_SWIZZLE_A, GL_GREEN );
|
||||
} else if ( opts.format == FMT_ALPHA ) {
|
||||
qglTexParameteri( target, GL_TEXTURE_SWIZZLE_R, GL_ONE );
|
||||
qglTexParameteri( target, GL_TEXTURE_SWIZZLE_G, GL_ONE );
|
||||
qglTexParameteri( target, GL_TEXTURE_SWIZZLE_B, GL_ONE );
|
||||
qglTexParameteri( target, GL_TEXTURE_SWIZZLE_A, GL_RED );
|
||||
}
|
||||
#endif
|
||||
|
||||
switch( filter ) {
|
||||
case TF_DEFAULT:
|
||||
if ( r_useTrilinearFiltering.GetBool() ) {
|
||||
qglTexParameterf( target, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR );
|
||||
} else {
|
||||
qglTexParameterf( target, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_NEAREST );
|
||||
}
|
||||
qglTexParameterf( target, GL_TEXTURE_MAG_FILTER, GL_LINEAR );
|
||||
break;
|
||||
case TF_LINEAR:
|
||||
qglTexParameterf( target, GL_TEXTURE_MIN_FILTER, GL_LINEAR );
|
||||
qglTexParameterf( target, GL_TEXTURE_MAG_FILTER, GL_LINEAR );
|
||||
break;
|
||||
case TF_NEAREST:
|
||||
qglTexParameterf( target, GL_TEXTURE_MIN_FILTER, GL_NEAREST );
|
||||
qglTexParameterf( target, GL_TEXTURE_MAG_FILTER, GL_NEAREST );
|
||||
break;
|
||||
default:
|
||||
common->FatalError( "%s: bad texture filter %d", GetName(), filter );
|
||||
}
|
||||
|
||||
if ( glConfig.anisotropicFilterAvailable ) {
|
||||
// only do aniso filtering on mip mapped images
|
||||
if ( filter == TF_DEFAULT ) {
|
||||
int aniso = r_maxAnisotropicFiltering.GetInteger();
|
||||
if ( aniso > glConfig.maxTextureAnisotropy ) {
|
||||
aniso = glConfig.maxTextureAnisotropy;
|
||||
}
|
||||
if ( aniso < 0 ) {
|
||||
aniso = 0;
|
||||
}
|
||||
qglTexParameterf(target, GL_TEXTURE_MAX_ANISOTROPY_EXT, aniso );
|
||||
} else {
|
||||
qglTexParameterf(target, GL_TEXTURE_MAX_ANISOTROPY_EXT, 1 );
|
||||
}
|
||||
}
|
||||
if ( glConfig.textureLODBiasAvailable && ( usage != TD_FONT ) ) {
|
||||
// use a blurring LOD bias in combination with high anisotropy to fix our aliasing grate textures...
|
||||
qglTexParameterf(target, GL_TEXTURE_LOD_BIAS_EXT, r_lodBias.GetFloat() );
|
||||
}
|
||||
|
||||
// set the wrap/clamp modes
|
||||
switch( repeat ) {
|
||||
case TR_REPEAT:
|
||||
qglTexParameterf( target, GL_TEXTURE_WRAP_S, GL_REPEAT );
|
||||
qglTexParameterf( target, GL_TEXTURE_WRAP_T, GL_REPEAT );
|
||||
break;
|
||||
case TR_CLAMP_TO_ZERO: {
|
||||
float color[4] = { 0.0f, 0.0f, 0.0f, 1.0f };
|
||||
qglTexParameterfv(target, GL_TEXTURE_BORDER_COLOR, color );
|
||||
qglTexParameterf( target, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_BORDER );
|
||||
qglTexParameterf( target, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_BORDER );
|
||||
}
|
||||
break;
|
||||
case TR_CLAMP_TO_ZERO_ALPHA: {
|
||||
float color[4] = { 0.0f, 0.0f, 0.0f, 0.0f };
|
||||
qglTexParameterfv(target, GL_TEXTURE_BORDER_COLOR, color );
|
||||
qglTexParameterf( target, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_BORDER );
|
||||
qglTexParameterf( target, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_BORDER );
|
||||
}
|
||||
break;
|
||||
case TR_CLAMP:
|
||||
qglTexParameterf( target, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE );
|
||||
qglTexParameterf( target, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE );
|
||||
break;
|
||||
default:
|
||||
common->FatalError( "%s: bad texture repeat %d", GetName(), repeat );
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
========================
|
||||
idImage::AllocImage
|
||||
|
||||
Every image will pass through this function. Allocates all the necessary MipMap levels for the
|
||||
Image, but doesn't put anything in them.
|
||||
|
||||
This should not be done during normal game-play, if you can avoid it.
|
||||
========================
|
||||
*/
|
||||
void idImage::AllocImage() {
|
||||
GL_CheckErrors();
|
||||
PurgeImage();
|
||||
|
||||
switch ( opts.format ) {
|
||||
case FMT_RGBA8:
|
||||
internalFormat = GL_RGBA8;
|
||||
dataFormat = GL_RGBA;
|
||||
dataType = GL_UNSIGNED_BYTE;
|
||||
break;
|
||||
case FMT_XRGB8:
|
||||
internalFormat = GL_RGB;
|
||||
dataFormat = GL_RGBA;
|
||||
dataType = GL_UNSIGNED_BYTE;
|
||||
break;
|
||||
case FMT_RGB565:
|
||||
internalFormat = GL_RGB;
|
||||
dataFormat = GL_RGB;
|
||||
dataType = GL_UNSIGNED_SHORT_5_6_5;
|
||||
break;
|
||||
case FMT_ALPHA:
|
||||
#if defined( USE_CORE_PROFILE )
|
||||
internalFormat = GL_R8;
|
||||
dataFormat = GL_RED;
|
||||
#else
|
||||
internalFormat = GL_ALPHA8;
|
||||
dataFormat = GL_ALPHA;
|
||||
#endif
|
||||
dataType = GL_UNSIGNED_BYTE;
|
||||
break;
|
||||
case FMT_L8A8:
|
||||
#if defined( USE_CORE_PROFILE )
|
||||
internalFormat = GL_RG8;
|
||||
dataFormat = GL_RG;
|
||||
#else
|
||||
internalFormat = GL_LUMINANCE8_ALPHA8;
|
||||
dataFormat = GL_LUMINANCE_ALPHA;
|
||||
#endif
|
||||
dataType = GL_UNSIGNED_BYTE;
|
||||
break;
|
||||
case FMT_LUM8:
|
||||
#if defined( USE_CORE_PROFILE )
|
||||
internalFormat = GL_R8;
|
||||
dataFormat = GL_RED;
|
||||
#else
|
||||
internalFormat = GL_LUMINANCE8;
|
||||
dataFormat = GL_LUMINANCE;
|
||||
#endif
|
||||
dataType = GL_UNSIGNED_BYTE;
|
||||
break;
|
||||
case FMT_INT8:
|
||||
#if defined( USE_CORE_PROFILE )
|
||||
internalFormat = GL_R8;
|
||||
dataFormat = GL_RED;
|
||||
#else
|
||||
internalFormat = GL_INTENSITY8;
|
||||
dataFormat = GL_LUMINANCE;
|
||||
#endif
|
||||
dataType = GL_UNSIGNED_BYTE;
|
||||
break;
|
||||
case FMT_DXT1:
|
||||
internalFormat = GL_COMPRESSED_RGBA_S3TC_DXT1_EXT;
|
||||
dataFormat = GL_RGBA;
|
||||
dataType = GL_UNSIGNED_BYTE;
|
||||
break;
|
||||
case FMT_DXT5:
|
||||
internalFormat = GL_COMPRESSED_RGBA_S3TC_DXT5_EXT;
|
||||
dataFormat = GL_RGBA;
|
||||
dataType = GL_UNSIGNED_BYTE;
|
||||
break;
|
||||
case FMT_DEPTH:
|
||||
internalFormat = GL_DEPTH_COMPONENT;
|
||||
dataFormat = GL_DEPTH_COMPONENT;
|
||||
dataType = GL_UNSIGNED_BYTE;
|
||||
break;
|
||||
case FMT_X16:
|
||||
internalFormat = GL_INTENSITY16;
|
||||
dataFormat = GL_LUMINANCE;
|
||||
dataType = GL_UNSIGNED_SHORT;
|
||||
break;
|
||||
case FMT_Y16_X16:
|
||||
internalFormat = GL_LUMINANCE16_ALPHA16;
|
||||
dataFormat = GL_LUMINANCE_ALPHA;
|
||||
dataType = GL_UNSIGNED_SHORT;
|
||||
break;
|
||||
default:
|
||||
idLib::Error( "Unhandled image format %d in %s\n", opts.format, GetName() );
|
||||
}
|
||||
|
||||
// if we don't have a rendering context, just return after we
|
||||
// have filled in the parms. We must have the values set, or
|
||||
// an image match from a shader before OpenGL starts would miss
|
||||
// the generated texture
|
||||
if ( !R_IsInitialized() ) {
|
||||
return;
|
||||
}
|
||||
|
||||
// generate the texture number
|
||||
qglGenTextures( 1, (GLuint *)&texnum );
|
||||
assert( texnum != TEXTURE_NOT_LOADED );
|
||||
|
||||
//----------------------------------------------------
|
||||
// allocate all the mip levels with NULL data
|
||||
//----------------------------------------------------
|
||||
|
||||
int numSides;
|
||||
int target;
|
||||
int uploadTarget;
|
||||
if ( opts.textureType == TT_2D ) {
|
||||
target = uploadTarget = GL_TEXTURE_2D;
|
||||
numSides = 1;
|
||||
} else if ( opts.textureType == TT_CUBIC ) {
|
||||
target = GL_TEXTURE_CUBE_MAP_EXT;
|
||||
uploadTarget = GL_TEXTURE_CUBE_MAP_POSITIVE_X_EXT;
|
||||
numSides = 6;
|
||||
} else {
|
||||
assert( !"opts.textureType" );
|
||||
target = uploadTarget = GL_TEXTURE_2D;
|
||||
numSides = 1;
|
||||
}
|
||||
|
||||
qglBindTexture( target, texnum );
|
||||
|
||||
for ( int side = 0; side < numSides; side++ ) {
|
||||
int w = opts.width;
|
||||
int h = opts.height;
|
||||
if ( opts.textureType == TT_CUBIC ) {
|
||||
h = w;
|
||||
}
|
||||
for ( int level = 0; level < opts.numLevels; level++ ) {
|
||||
|
||||
// clear out any previous error
|
||||
GL_CheckErrors();
|
||||
|
||||
if ( IsCompressed() ) {
|
||||
int compressedSize = ( ((w+3)/4) * ((h+3)/4) * int64( 16 ) * BitsForFormat( opts.format ) ) / 8;
|
||||
|
||||
// Even though the OpenGL specification allows the 'data' pointer to be NULL, for some
|
||||
// drivers we actually need to upload data to get it to allocate the texture.
|
||||
// However, on 32-bit systems we may fail to allocate a large block of memory for large
|
||||
// textures. We handle this case by using HeapAlloc directly and allowing the allocation
|
||||
// to fail in which case we simply pass down NULL to glCompressedTexImage2D and hope for the best.
|
||||
// As of 2011-10-6 using NVIDIA hardware and drivers we have to allocate the memory with HeapAlloc
|
||||
// with the exact size otherwise large image allocation (for instance for physical page textures)
|
||||
// may fail on Vista 32-bit.
|
||||
void * data = HeapAlloc( GetProcessHeap(), 0, compressedSize );
|
||||
qglCompressedTexImage2DARB( uploadTarget+side, level, internalFormat, w, h, 0, compressedSize, data );
|
||||
if ( data != NULL ) {
|
||||
HeapFree( GetProcessHeap(), 0, data );
|
||||
}
|
||||
} else {
|
||||
qglTexImage2D( uploadTarget + side, level, internalFormat, w, h, 0, dataFormat, dataType, NULL );
|
||||
}
|
||||
|
||||
GL_CheckErrors();
|
||||
|
||||
w = Max( 1, w >> 1 );
|
||||
h = Max( 1, h >> 1 );
|
||||
}
|
||||
}
|
||||
|
||||
qglTexParameteri( target, GL_TEXTURE_MAX_LEVEL, opts.numLevels - 1 );
|
||||
|
||||
// see if we messed anything up
|
||||
GL_CheckErrors();
|
||||
|
||||
SetTexParameters();
|
||||
|
||||
GL_CheckErrors();
|
||||
}
|
||||
|
||||
/*
|
||||
========================
|
||||
idImage::PurgeImage
|
||||
========================
|
||||
*/
|
||||
void idImage::PurgeImage() {
|
||||
if ( texnum != TEXTURE_NOT_LOADED ) {
|
||||
qglDeleteTextures( 1, (GLuint *)&texnum ); // this should be the ONLY place it is ever called!
|
||||
texnum = TEXTURE_NOT_LOADED;
|
||||
}
|
||||
// clear all the current binding caches, so the next bind will do a real one
|
||||
for ( int i = 0 ; i < MAX_MULTITEXTURE_UNITS ; i++ ) {
|
||||
backEnd.glState.tmu[i].current2DMap = TEXTURE_NOT_LOADED;
|
||||
backEnd.glState.tmu[i].currentCubeMap = TEXTURE_NOT_LOADED;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
========================
|
||||
idImage::Resize
|
||||
========================
|
||||
*/
|
||||
void idImage::Resize( int width, int height ) {
|
||||
if ( opts.width == width && opts.height == height ) {
|
||||
return;
|
||||
}
|
||||
opts.width = width;
|
||||
opts.height = height;
|
||||
AllocImage();
|
||||
}
|
||||
579
neo/renderer/OpenGL/gl_backend.cpp
Normal file
579
neo/renderer/OpenGL/gl_backend.cpp
Normal file
@@ -0,0 +1,579 @@
|
||||
/*
|
||||
===========================================================================
|
||||
|
||||
Doom 3 BFG Edition GPL Source Code
|
||||
Copyright (C) 1993-2012 id Software LLC, a ZeniMax Media company.
|
||||
|
||||
This file is part of the Doom 3 BFG Edition GPL Source Code ("Doom 3 BFG Edition Source Code").
|
||||
|
||||
Doom 3 BFG Edition Source Code is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Doom 3 BFG Edition Source Code is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Doom 3 BFG Edition Source Code. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
In addition, the Doom 3 BFG Edition Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the Doom 3 BFG Edition Source Code. If not, please request a copy in writing from id Software at the address below.
|
||||
|
||||
If you have questions concerning this license or the applicable additional terms, you may contact in writing id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA.
|
||||
|
||||
===========================================================================
|
||||
*/
|
||||
|
||||
#pragma hdrstop
|
||||
#include "../../idlib/precompiled.h"
|
||||
|
||||
#include "../tr_local.h"
|
||||
#include "../../framework/Common_local.h"
|
||||
|
||||
idCVar r_drawFlickerBox( "r_drawFlickerBox", "0", CVAR_RENDERER | CVAR_BOOL, "visual test for dropping frames" );
|
||||
idCVar stereoRender_warp( "stereoRender_warp", "0", CVAR_RENDERER | CVAR_ARCHIVE | CVAR_BOOL, "use the optical warping renderprog instead of stereoDeGhost" );
|
||||
idCVar stereoRender_warpStrength( "stereoRender_warpStrength", "1.45", CVAR_RENDERER | CVAR_ARCHIVE | CVAR_FLOAT, "amount of pre-distortion" );
|
||||
|
||||
idCVar stereoRender_warpCenterX( "stereoRender_warpCenterX", "0.5", CVAR_RENDERER | CVAR_FLOAT | CVAR_ARCHIVE, "center for left eye, right eye will be 1.0 - this" );
|
||||
idCVar stereoRender_warpCenterY( "stereoRender_warpCenterY", "0.5", CVAR_RENDERER | CVAR_FLOAT | CVAR_ARCHIVE, "center for both eyes" );
|
||||
idCVar stereoRender_warpParmZ( "stereoRender_warpParmZ", "0", CVAR_RENDERER | CVAR_FLOAT | CVAR_ARCHIVE, "development parm" );
|
||||
idCVar stereoRender_warpParmW( "stereoRender_warpParmW", "0", CVAR_RENDERER | CVAR_FLOAT | CVAR_ARCHIVE, "development parm" );
|
||||
idCVar stereoRender_warpTargetFraction( "stereoRender_warpTargetFraction", "1.0", CVAR_RENDERER | CVAR_FLOAT | CVAR_ARCHIVE, "fraction of half-width the through-lens view covers" );
|
||||
|
||||
idCVar r_showSwapBuffers( "r_showSwapBuffers", "0", CVAR_BOOL, "Show timings from GL_BlockingSwapBuffers" );
|
||||
idCVar r_syncEveryFrame( "r_syncEveryFrame", "1", CVAR_BOOL, "Don't let the GPU buffer execution past swapbuffers" );
|
||||
|
||||
static int swapIndex; // 0 or 1 into renderSync
|
||||
static GLsync renderSync[2];
|
||||
|
||||
void GLimp_SwapBuffers();
|
||||
void RB_SetMVP( const idRenderMatrix & mvp );
|
||||
|
||||
/*
|
||||
============================================================================
|
||||
|
||||
RENDER BACK END THREAD FUNCTIONS
|
||||
|
||||
============================================================================
|
||||
*/
|
||||
|
||||
/*
|
||||
=============
|
||||
RB_DrawFlickerBox
|
||||
=============
|
||||
*/
|
||||
static void RB_DrawFlickerBox() {
|
||||
if ( !r_drawFlickerBox.GetBool() ) {
|
||||
return;
|
||||
}
|
||||
if ( tr.frameCount & 1 ) {
|
||||
qglClearColor( 1, 0, 0, 1 );
|
||||
} else {
|
||||
qglClearColor( 0, 1, 0, 1 );
|
||||
}
|
||||
qglScissor( 0, 0, 256, 256 );
|
||||
qglClear( GL_COLOR_BUFFER_BIT );
|
||||
}
|
||||
|
||||
/*
|
||||
=============
|
||||
RB_SetBuffer
|
||||
=============
|
||||
*/
|
||||
static void RB_SetBuffer( const void *data ) {
|
||||
// see which draw buffer we want to render the frame to
|
||||
|
||||
const setBufferCommand_t * cmd = (const setBufferCommand_t *)data;
|
||||
|
||||
RENDERLOG_PRINTF( "---------- RB_SetBuffer ---------- to buffer # %d\n", cmd->buffer );
|
||||
|
||||
GL_Scissor( 0, 0, tr.GetWidth(), tr.GetHeight() );
|
||||
|
||||
// clear screen for debugging
|
||||
// automatically enable this with several other debug tools
|
||||
// that might leave unrendered portions of the screen
|
||||
if ( r_clear.GetFloat() || idStr::Length( r_clear.GetString() ) != 1 || r_singleArea.GetBool() || r_showOverDraw.GetBool() ) {
|
||||
float c[3];
|
||||
if ( sscanf( r_clear.GetString(), "%f %f %f", &c[0], &c[1], &c[2] ) == 3 ) {
|
||||
GL_Clear( true, false, false, 0, c[0], c[1], c[2], 1.0f );
|
||||
} else if ( r_clear.GetInteger() == 2 ) {
|
||||
GL_Clear( true, false, false, 0, 0.0f, 0.0f, 0.0f, 1.0f );
|
||||
} else if ( r_showOverDraw.GetBool() ) {
|
||||
GL_Clear( true, false, false, 0, 1.0f, 1.0f, 1.0f, 1.0f );
|
||||
} else {
|
||||
GL_Clear( true, false, false, 0, 0.4f, 0.0f, 0.25f, 1.0f );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
=============
|
||||
GL_BlockingSwapBuffers
|
||||
|
||||
We want to exit this with the GPU idle, right at vsync
|
||||
=============
|
||||
*/
|
||||
const void GL_BlockingSwapBuffers() {
|
||||
RENDERLOG_PRINTF( "***************** GL_BlockingSwapBuffers *****************\n\n\n" );
|
||||
|
||||
const int beforeFinish = Sys_Milliseconds();
|
||||
|
||||
if ( !glConfig.syncAvailable ) {
|
||||
glFinish();
|
||||
}
|
||||
|
||||
const int beforeSwap = Sys_Milliseconds();
|
||||
if ( r_showSwapBuffers.GetBool() && beforeSwap - beforeFinish > 1 ) {
|
||||
common->Printf( "%i msec to glFinish\n", beforeSwap - beforeFinish );
|
||||
}
|
||||
|
||||
GLimp_SwapBuffers();
|
||||
|
||||
const int beforeFence = Sys_Milliseconds();
|
||||
if ( r_showSwapBuffers.GetBool() && beforeFence - beforeSwap > 1 ) {
|
||||
common->Printf( "%i msec to swapBuffers\n", beforeFence - beforeSwap );
|
||||
}
|
||||
|
||||
if ( glConfig.syncAvailable ) {
|
||||
swapIndex ^= 1;
|
||||
|
||||
if ( qglIsSync( renderSync[swapIndex] ) ) {
|
||||
qglDeleteSync( renderSync[swapIndex] );
|
||||
}
|
||||
// draw something tiny to ensure the sync is after the swap
|
||||
const int start = Sys_Milliseconds();
|
||||
qglScissor( 0, 0, 1, 1 );
|
||||
qglEnable( GL_SCISSOR_TEST );
|
||||
qglClear( GL_COLOR_BUFFER_BIT );
|
||||
renderSync[swapIndex] = qglFenceSync( GL_SYNC_GPU_COMMANDS_COMPLETE, 0 );
|
||||
const int end = Sys_Milliseconds();
|
||||
if ( r_showSwapBuffers.GetBool() && end - start > 1 ) {
|
||||
common->Printf( "%i msec to start fence\n", end - start );
|
||||
}
|
||||
|
||||
GLsync syncToWaitOn;
|
||||
if ( r_syncEveryFrame.GetBool() ) {
|
||||
syncToWaitOn = renderSync[swapIndex];
|
||||
} else {
|
||||
syncToWaitOn = renderSync[!swapIndex];
|
||||
}
|
||||
|
||||
if ( qglIsSync( syncToWaitOn ) ) {
|
||||
for ( GLenum r = GL_TIMEOUT_EXPIRED; r == GL_TIMEOUT_EXPIRED; ) {
|
||||
r = qglClientWaitSync( syncToWaitOn, GL_SYNC_FLUSH_COMMANDS_BIT, 1000 * 1000 );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const int afterFence = Sys_Milliseconds();
|
||||
if ( r_showSwapBuffers.GetBool() && afterFence - beforeFence > 1 ) {
|
||||
common->Printf( "%i msec to wait on fence\n", afterFence - beforeFence );
|
||||
}
|
||||
|
||||
const int64 exitBlockTime = Sys_Microseconds();
|
||||
|
||||
static int64 prevBlockTime;
|
||||
if ( r_showSwapBuffers.GetBool() && prevBlockTime ) {
|
||||
const int delta = (int) ( exitBlockTime - prevBlockTime );
|
||||
common->Printf( "blockToBlock: %i\n", delta );
|
||||
}
|
||||
prevBlockTime = exitBlockTime;
|
||||
}
|
||||
|
||||
/*
|
||||
====================
|
||||
R_MakeStereoRenderImage
|
||||
====================
|
||||
*/
|
||||
static void R_MakeStereoRenderImage( idImage *image ) {
|
||||
idImageOpts opts;
|
||||
opts.width = renderSystem->GetWidth();
|
||||
opts.height = renderSystem->GetHeight();
|
||||
opts.numLevels = 1;
|
||||
opts.format = FMT_RGBA8;
|
||||
image->AllocImage( opts, TF_LINEAR, TR_CLAMP );
|
||||
}
|
||||
|
||||
/*
|
||||
====================
|
||||
RB_StereoRenderExecuteBackEndCommands
|
||||
|
||||
Renders the draw list twice, with slight modifications for left eye / right eye
|
||||
====================
|
||||
*/
|
||||
void RB_StereoRenderExecuteBackEndCommands( const emptyCommand_t * const allCmds ) {
|
||||
uint64 backEndStartTime = Sys_Microseconds();
|
||||
|
||||
// If we are in a monoscopic context, this draws to the only buffer, and is
|
||||
// the same as GL_BACK. In a quad-buffer stereo context, this is necessary
|
||||
// to prevent GL from forcing the rendering to go to both BACK_LEFT and
|
||||
// BACK_RIGHT at a performance penalty.
|
||||
// To allow stereo deghost processing, the views have to be copied to separate
|
||||
// textures anyway, so there isn't any benefit to rendering to BACK_RIGHT for
|
||||
// that eye.
|
||||
qglDrawBuffer( GL_BACK_LEFT );
|
||||
|
||||
// create the stereoRenderImage if we haven't already
|
||||
static idImage * stereoRenderImages[2];
|
||||
for ( int i = 0; i < 2; i++ ) {
|
||||
if ( stereoRenderImages[i] == NULL ) {
|
||||
stereoRenderImages[i] = globalImages->ImageFromFunction( va("_stereoRender%i",i), R_MakeStereoRenderImage );
|
||||
}
|
||||
|
||||
// resize the stereo render image if the main window has changed size
|
||||
if ( stereoRenderImages[i]->GetUploadWidth() != renderSystem->GetWidth() ||
|
||||
stereoRenderImages[i]->GetUploadHeight() != renderSystem->GetHeight() ) {
|
||||
stereoRenderImages[i]->Resize( renderSystem->GetWidth(), renderSystem->GetHeight() );
|
||||
}
|
||||
}
|
||||
|
||||
// In stereoRender mode, the front end has generated two RC_DRAW_VIEW commands
|
||||
// with slightly different origins for each eye.
|
||||
|
||||
// TODO: only do the copy after the final view has been rendered, not mirror subviews?
|
||||
|
||||
// Render the 3D draw views from the screen origin so all the screen relative
|
||||
// texture mapping works properly, then copy the portion we are going to use
|
||||
// off to a texture.
|
||||
bool foundEye[2] = { false, false };
|
||||
|
||||
for ( int stereoEye = 1; stereoEye >= -1; stereoEye -= 2 ) {
|
||||
// set up the target texture we will draw to
|
||||
const int targetEye = ( stereoEye == 1 ) ? 1 : 0;
|
||||
|
||||
// Set the back end into a known default state to fix any stale render state issues
|
||||
GL_SetDefaultState();
|
||||
renderProgManager.Unbind();
|
||||
renderProgManager.ZeroUniforms();
|
||||
|
||||
for ( const emptyCommand_t * cmds = allCmds; cmds != NULL; cmds = (const emptyCommand_t *)cmds->next ) {
|
||||
switch ( cmds->commandId ) {
|
||||
case RC_NOP:
|
||||
break;
|
||||
case RC_DRAW_VIEW_GUI:
|
||||
case RC_DRAW_VIEW_3D:
|
||||
{
|
||||
const drawSurfsCommand_t * const dsc = (const drawSurfsCommand_t *)cmds;
|
||||
const viewDef_t & eyeViewDef = *dsc->viewDef;
|
||||
|
||||
if ( eyeViewDef.renderView.viewEyeBuffer && eyeViewDef.renderView.viewEyeBuffer != stereoEye ) {
|
||||
// this is the render view for the other eye
|
||||
continue;
|
||||
}
|
||||
|
||||
foundEye[ targetEye ] = true;
|
||||
RB_DrawView( dsc, stereoEye );
|
||||
if ( cmds->commandId == RC_DRAW_VIEW_GUI ) {
|
||||
}
|
||||
}
|
||||
break;
|
||||
case RC_SET_BUFFER:
|
||||
RB_SetBuffer( cmds );
|
||||
break;
|
||||
case RC_COPY_RENDER:
|
||||
RB_CopyRender( cmds );
|
||||
break;
|
||||
case RC_POST_PROCESS:
|
||||
{
|
||||
postProcessCommand_t * cmd = (postProcessCommand_t *)cmds;
|
||||
if ( cmd->viewDef->renderView.viewEyeBuffer != stereoEye ) {
|
||||
break;
|
||||
}
|
||||
RB_PostProcess( cmds );
|
||||
}
|
||||
break;
|
||||
default:
|
||||
common->Error( "RB_ExecuteBackEndCommands: bad commandId" );
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// copy to the target
|
||||
stereoRenderImages[ targetEye ]->CopyFramebuffer( 0, 0, renderSystem->GetWidth(), renderSystem->GetHeight() );
|
||||
}
|
||||
|
||||
// perform the final compositing / warping / deghosting to the actual framebuffer(s)
|
||||
assert( foundEye[0] && foundEye[1] );
|
||||
|
||||
GL_SetDefaultState();
|
||||
|
||||
RB_SetMVP( renderMatrix_identity );
|
||||
|
||||
// If we are in quad-buffer pixel format but testing another 3D mode,
|
||||
// make sure we draw to both eyes. This is likely to be sub-optimal
|
||||
// performance on most cards and drivers, but it is better than getting
|
||||
// a confusing, half-ghosted view.
|
||||
if ( renderSystem->GetStereo3DMode() != STEREO3D_QUAD_BUFFER ) {
|
||||
glDrawBuffer( GL_BACK );
|
||||
}
|
||||
|
||||
GL_State( GLS_DEPTHFUNC_ALWAYS );
|
||||
GL_Cull( CT_TWO_SIDED );
|
||||
|
||||
// We just want to do a quad pass - so make sure we disable any texgen and
|
||||
// set the texture matrix to the identity so we don't get anomalies from
|
||||
// any stale uniform data being present from a previous draw call
|
||||
const float texS[4] = { 1.0f, 0.0f, 0.0f, 0.0f };
|
||||
const float texT[4] = { 0.0f, 1.0f, 0.0f, 0.0f };
|
||||
renderProgManager.SetRenderParm( RENDERPARM_TEXTUREMATRIX_S, texS );
|
||||
renderProgManager.SetRenderParm( RENDERPARM_TEXTUREMATRIX_T, texT );
|
||||
|
||||
// disable any texgen
|
||||
const float texGenEnabled[4] = { 0.0f, 0.0f, 0.0f, 0.0f };
|
||||
renderProgManager.SetRenderParm( RENDERPARM_TEXGEN_0_ENABLED, texGenEnabled );
|
||||
|
||||
renderProgManager.BindShader_Texture();
|
||||
GL_Color( 1, 1, 1, 1 );
|
||||
|
||||
switch( renderSystem->GetStereo3DMode() ) {
|
||||
case STEREO3D_QUAD_BUFFER:
|
||||
glDrawBuffer( GL_BACK_RIGHT );
|
||||
GL_SelectTexture( 0 );
|
||||
stereoRenderImages[1]->Bind();
|
||||
GL_SelectTexture( 1 );
|
||||
stereoRenderImages[0]->Bind();
|
||||
RB_DrawElementsWithCounters( &backEnd.unitSquareSurface );
|
||||
|
||||
glDrawBuffer( GL_BACK_LEFT );
|
||||
GL_SelectTexture( 1 );
|
||||
stereoRenderImages[1]->Bind();
|
||||
GL_SelectTexture( 0 );
|
||||
stereoRenderImages[0]->Bind();
|
||||
RB_DrawElementsWithCounters( &backEnd.unitSquareSurface );
|
||||
|
||||
break;
|
||||
case STEREO3D_HDMI_720:
|
||||
// HDMI 720P 3D
|
||||
GL_SelectTexture( 0 );
|
||||
stereoRenderImages[1]->Bind();
|
||||
GL_SelectTexture( 1 );
|
||||
stereoRenderImages[0]->Bind();
|
||||
GL_ViewportAndScissor( 0, 0, 1280, 720 );
|
||||
RB_DrawElementsWithCounters( &backEnd.unitSquareSurface );
|
||||
|
||||
GL_SelectTexture( 0 );
|
||||
stereoRenderImages[0]->Bind();
|
||||
GL_SelectTexture( 1 );
|
||||
stereoRenderImages[1]->Bind();
|
||||
GL_ViewportAndScissor( 0, 750, 1280, 720 );
|
||||
RB_DrawElementsWithCounters( &backEnd.unitSquareSurface );
|
||||
|
||||
// force the HDMI 720P 3D guard band to a constant color
|
||||
glScissor( 0, 720, 1280, 30 );
|
||||
glClear( GL_COLOR_BUFFER_BIT );
|
||||
break;
|
||||
default:
|
||||
case STEREO3D_SIDE_BY_SIDE:
|
||||
if ( stereoRender_warp.GetBool() ) {
|
||||
// this is the Rift warp
|
||||
// renderSystem->GetWidth() / GetHeight() have returned equal values (640 for initial Rift)
|
||||
// and we are going to warp them onto a symetric square region of each half of the screen
|
||||
|
||||
renderProgManager.BindShader_StereoWarp();
|
||||
|
||||
// clear the entire screen to black
|
||||
// we could be smart and only clear the areas we aren't going to draw on, but
|
||||
// clears are fast...
|
||||
glScissor ( 0, 0, glConfig.nativeScreenWidth, glConfig.nativeScreenHeight );
|
||||
glClearColor( 0, 0, 0, 0 );
|
||||
glClear( GL_COLOR_BUFFER_BIT );
|
||||
|
||||
// the size of the box that will get the warped pixels
|
||||
// With the 7" displays, this will be less than half the screen width
|
||||
const int pixelDimensions = ( glConfig.nativeScreenWidth >> 1 ) * stereoRender_warpTargetFraction.GetFloat();
|
||||
|
||||
// Always scissor to the half-screen boundary, but the viewports
|
||||
// might cross that boundary if the lenses can be adjusted closer
|
||||
// together.
|
||||
glViewport( ( glConfig.nativeScreenWidth >> 1 ) - pixelDimensions,
|
||||
( glConfig.nativeScreenHeight >> 1 ) - ( pixelDimensions >> 1 ),
|
||||
pixelDimensions, pixelDimensions );
|
||||
glScissor ( 0, 0, glConfig.nativeScreenWidth >> 1, glConfig.nativeScreenHeight );
|
||||
|
||||
idVec4 color( stereoRender_warpCenterX.GetFloat(), stereoRender_warpCenterY.GetFloat(), stereoRender_warpParmZ.GetFloat(), stereoRender_warpParmW.GetFloat() );
|
||||
// don't use GL_Color(), because we don't want to clamp
|
||||
renderProgManager.SetRenderParm( RENDERPARM_COLOR, color.ToFloatPtr() );
|
||||
|
||||
GL_SelectTexture( 0 );
|
||||
stereoRenderImages[0]->Bind();
|
||||
qglTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_BORDER );
|
||||
qglTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_BORDER );
|
||||
RB_DrawElementsWithCounters( &backEnd.unitSquareSurface );
|
||||
|
||||
idVec4 color2( stereoRender_warpCenterX.GetFloat(), stereoRender_warpCenterY.GetFloat(), stereoRender_warpParmZ.GetFloat(), stereoRender_warpParmW.GetFloat() );
|
||||
// don't use GL_Color(), because we don't want to clamp
|
||||
renderProgManager.SetRenderParm( RENDERPARM_COLOR, color2.ToFloatPtr() );
|
||||
|
||||
glViewport( ( glConfig.nativeScreenWidth >> 1 ),
|
||||
( glConfig.nativeScreenHeight >> 1 ) - ( pixelDimensions >> 1 ),
|
||||
pixelDimensions, pixelDimensions );
|
||||
glScissor ( glConfig.nativeScreenWidth >> 1, 0, glConfig.nativeScreenWidth >> 1, glConfig.nativeScreenHeight );
|
||||
|
||||
GL_SelectTexture( 0 );
|
||||
stereoRenderImages[1]->Bind();
|
||||
qglTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_BORDER );
|
||||
qglTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_BORDER );
|
||||
RB_DrawElementsWithCounters( &backEnd.unitSquareSurface );
|
||||
break;
|
||||
}
|
||||
// a non-warped side-by-side-uncompressed (dual input cable) is rendered
|
||||
// just like STEREO3D_SIDE_BY_SIDE_COMPRESSED, so fall through.
|
||||
case STEREO3D_SIDE_BY_SIDE_COMPRESSED:
|
||||
GL_SelectTexture( 0 );
|
||||
stereoRenderImages[0]->Bind();
|
||||
GL_SelectTexture( 1 );
|
||||
stereoRenderImages[1]->Bind();
|
||||
GL_ViewportAndScissor( 0, 0, renderSystem->GetWidth(), renderSystem->GetHeight() );
|
||||
RB_DrawElementsWithCounters( &backEnd.unitSquareSurface );
|
||||
|
||||
GL_SelectTexture( 0 );
|
||||
stereoRenderImages[1]->Bind();
|
||||
GL_SelectTexture( 1 );
|
||||
stereoRenderImages[0]->Bind();
|
||||
GL_ViewportAndScissor( renderSystem->GetWidth(), 0, renderSystem->GetWidth(), renderSystem->GetHeight() );
|
||||
RB_DrawElementsWithCounters( &backEnd.unitSquareSurface );
|
||||
break;
|
||||
|
||||
case STEREO3D_TOP_AND_BOTTOM_COMPRESSED:
|
||||
GL_SelectTexture( 1 );
|
||||
stereoRenderImages[0]->Bind();
|
||||
GL_SelectTexture( 0 );
|
||||
stereoRenderImages[1]->Bind();
|
||||
GL_ViewportAndScissor( 0, 0, renderSystem->GetWidth(), renderSystem->GetHeight() );
|
||||
RB_DrawElementsWithCounters( &backEnd.unitSquareSurface );
|
||||
|
||||
GL_SelectTexture( 1 );
|
||||
stereoRenderImages[1]->Bind();
|
||||
GL_SelectTexture( 0 );
|
||||
stereoRenderImages[0]->Bind();
|
||||
GL_ViewportAndScissor( 0, renderSystem->GetHeight(), renderSystem->GetWidth(), renderSystem->GetHeight() );
|
||||
RB_DrawElementsWithCounters( &backEnd.unitSquareSurface );
|
||||
break;
|
||||
|
||||
case STEREO3D_INTERLACED:
|
||||
// every other scanline
|
||||
GL_SelectTexture( 0 );
|
||||
stereoRenderImages[0]->Bind();
|
||||
qglTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST );
|
||||
qglTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST );
|
||||
|
||||
GL_SelectTexture( 1 );
|
||||
stereoRenderImages[1]->Bind();
|
||||
qglTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST );
|
||||
qglTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST );
|
||||
|
||||
GL_ViewportAndScissor( 0, 0, renderSystem->GetWidth(), renderSystem->GetHeight()*2 );
|
||||
renderProgManager.BindShader_StereoInterlace();
|
||||
RB_DrawElementsWithCounters( &backEnd.unitSquareSurface );
|
||||
|
||||
GL_SelectTexture( 0 );
|
||||
qglTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR );
|
||||
qglTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR );
|
||||
|
||||
GL_SelectTexture( 1 );
|
||||
qglTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR );
|
||||
qglTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR );
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
// debug tool
|
||||
RB_DrawFlickerBox();
|
||||
|
||||
// make sure the drawing is actually started
|
||||
qglFlush();
|
||||
|
||||
// we may choose to sync to the swapbuffers before the next frame
|
||||
|
||||
// stop rendering on this thread
|
||||
uint64 backEndFinishTime = Sys_Microseconds();
|
||||
backEnd.pc.totalMicroSec = backEndFinishTime - backEndStartTime;
|
||||
}
|
||||
|
||||
/*
|
||||
====================
|
||||
RB_ExecuteBackEndCommands
|
||||
|
||||
This function will be called syncronously if running without
|
||||
smp extensions, or asyncronously by another thread.
|
||||
====================
|
||||
*/
|
||||
void RB_ExecuteBackEndCommands( const emptyCommand_t *cmds ) {
|
||||
// r_debugRenderToTexture
|
||||
int c_draw3d = 0;
|
||||
int c_draw2d = 0;
|
||||
int c_setBuffers = 0;
|
||||
int c_copyRenders = 0;
|
||||
|
||||
resolutionScale.SetCurrentGPUFrameTime( commonLocal.GetRendererGPUMicroseconds() );
|
||||
|
||||
renderLog.StartFrame();
|
||||
|
||||
if ( cmds->commandId == RC_NOP && !cmds->next ) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ( renderSystem->GetStereo3DMode() != STEREO3D_OFF ) {
|
||||
RB_StereoRenderExecuteBackEndCommands( cmds );
|
||||
renderLog.EndFrame();
|
||||
return;
|
||||
}
|
||||
|
||||
uint64 backEndStartTime = Sys_Microseconds();
|
||||
|
||||
// needed for editor rendering
|
||||
GL_SetDefaultState();
|
||||
|
||||
// If we have a stereo pixel format, this will draw to both
|
||||
// the back left and back right buffers, which will have a
|
||||
// performance penalty.
|
||||
qglDrawBuffer( GL_BACK );
|
||||
|
||||
for ( ; cmds != NULL; cmds = (const emptyCommand_t *)cmds->next ) {
|
||||
switch ( cmds->commandId ) {
|
||||
case RC_NOP:
|
||||
break;
|
||||
case RC_DRAW_VIEW_3D:
|
||||
case RC_DRAW_VIEW_GUI:
|
||||
RB_DrawView( cmds, 0 );
|
||||
if ( ((const drawSurfsCommand_t *)cmds)->viewDef->viewEntitys ) {
|
||||
c_draw3d++;
|
||||
} else {
|
||||
c_draw2d++;
|
||||
}
|
||||
break;
|
||||
case RC_SET_BUFFER:
|
||||
c_setBuffers++;
|
||||
break;
|
||||
case RC_COPY_RENDER:
|
||||
RB_CopyRender( cmds );
|
||||
c_copyRenders++;
|
||||
break;
|
||||
case RC_POST_PROCESS:
|
||||
RB_PostProcess( cmds );
|
||||
break;
|
||||
default:
|
||||
common->Error( "RB_ExecuteBackEndCommands: bad commandId" );
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
RB_DrawFlickerBox();
|
||||
|
||||
// Fix for the steam overlay not showing up while in game without Shell/Debug/Console/Menu also rendering
|
||||
qglColorMask( 1, 1, 1, 1 );
|
||||
|
||||
qglFlush();
|
||||
|
||||
// stop rendering on this thread
|
||||
uint64 backEndFinishTime = Sys_Microseconds();
|
||||
backEnd.pc.totalMicroSec = backEndFinishTime - backEndStartTime;
|
||||
|
||||
if ( r_debugRenderToTexture.GetInteger() == 1 ) {
|
||||
common->Printf( "3d: %i, 2d: %i, SetBuf: %i, CpyRenders: %i, CpyFrameBuf: %i\n", c_draw3d, c_draw2d, c_setBuffers, c_copyRenders, backEnd.pc.c_copyFrameBuffer );
|
||||
backEnd.pc.c_copyFrameBuffer = 0;
|
||||
}
|
||||
renderLog.EndFrame();
|
||||
}
|
||||
11807
neo/renderer/OpenGL/glext.h
Normal file
11807
neo/renderer/OpenGL/glext.h
Normal file
File diff suppressed because it is too large
Load Diff
549
neo/renderer/OpenGL/qgl.h
Normal file
549
neo/renderer/OpenGL/qgl.h
Normal file
@@ -0,0 +1,549 @@
|
||||
/*
|
||||
===========================================================================
|
||||
|
||||
Doom 3 BFG Edition GPL Source Code
|
||||
Copyright (C) 1993-2012 id Software LLC, a ZeniMax Media company.
|
||||
|
||||
This file is part of the Doom 3 BFG Edition GPL Source Code ("Doom 3 BFG Edition Source Code").
|
||||
|
||||
Doom 3 BFG Edition Source Code is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Doom 3 BFG Edition Source Code is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Doom 3 BFG Edition Source Code. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
In addition, the Doom 3 BFG Edition Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the Doom 3 BFG Edition Source Code. If not, please request a copy in writing from id Software at the address below.
|
||||
|
||||
If you have questions concerning this license or the applicable additional terms, you may contact in writing id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA.
|
||||
|
||||
===========================================================================
|
||||
*/
|
||||
/*
|
||||
** QGL.H
|
||||
*/
|
||||
|
||||
#ifndef __QGL_H__
|
||||
#define __QGL_H__
|
||||
|
||||
|
||||
#include <gl/gl.h>
|
||||
|
||||
|
||||
#ifndef APIENTRY
|
||||
#define APIENTRY
|
||||
#endif
|
||||
#ifndef WINAPI
|
||||
#define WINAPI
|
||||
#endif
|
||||
|
||||
// only use local glext.h if we are not using the system one already
|
||||
// http://oss.sgi.com/projects/ogl-sample/ABI/
|
||||
#ifndef GL_GLEXT_VERSION
|
||||
|
||||
#include "glext.h"
|
||||
|
||||
#endif
|
||||
|
||||
typedef void (*GLExtension_t)(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
GLExtension_t GLimp_ExtensionPointer( const char *name );
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
// GL_EXT_direct_state_access
|
||||
extern PFNGLBINDMULTITEXTUREEXTPROC qglBindMultiTextureEXT;
|
||||
|
||||
// GL_ARB_texture_compression
|
||||
extern PFNGLCOMPRESSEDTEXIMAGE2DARBPROC qglCompressedTexImage2DARB;
|
||||
extern PFNGLCOMPRESSEDTEXSUBIMAGE2DARBPROC qglCompressedTexSubImage2DARB;
|
||||
extern PFNGLGETCOMPRESSEDTEXIMAGEARBPROC qglGetCompressedTexImageARB;
|
||||
|
||||
// GL_ARB_vertex_buffer_object
|
||||
extern PFNGLBINDBUFFERARBPROC qglBindBufferARB;
|
||||
extern PFNGLBINDBUFFERRANGEPROC qglBindBufferRange;
|
||||
extern PFNGLDELETEBUFFERSARBPROC qglDeleteBuffersARB;
|
||||
extern PFNGLGENBUFFERSARBPROC qglGenBuffersARB;
|
||||
extern PFNGLISBUFFERARBPROC qglIsBufferARB;
|
||||
extern PFNGLBUFFERDATAARBPROC qglBufferDataARB;
|
||||
extern PFNGLBUFFERSUBDATAARBPROC qglBufferSubDataARB;
|
||||
extern PFNGLGETBUFFERSUBDATAARBPROC qglGetBufferSubDataARB;
|
||||
extern PFNGLMAPBUFFERARBPROC qglMapBufferARB;
|
||||
extern PFNGLUNMAPBUFFERARBPROC qglUnmapBufferARB;
|
||||
extern PFNGLGETBUFFERPARAMETERIVARBPROC qglGetBufferParameterivARB;
|
||||
extern PFNGLGETBUFFERPOINTERVARBPROC qglGetBufferPointervARB;
|
||||
|
||||
// GL_ARB_map_buffer_Range
|
||||
extern PFNGLMAPBUFFERRANGEPROC qglMapBufferRange;
|
||||
|
||||
// GL_ARB_draw_elements_base_vertex
|
||||
extern PFNGLDRAWELEMENTSBASEVERTEXPROC qglDrawElementsBaseVertex;
|
||||
|
||||
// GL_ARB_vertex_array_object
|
||||
extern PFNGLGENVERTEXARRAYSPROC qglGenVertexArrays;
|
||||
extern PFNGLBINDVERTEXARRAYPROC qglBindVertexArray;
|
||||
extern PFNGLDELETEVERTEXARRAYSPROC qglDeleteVertexArrays;
|
||||
|
||||
// GL_ARB_vertex_program / GL_ARB_fragment_program
|
||||
extern PFNGLVERTEXATTRIBPOINTERARBPROC qglVertexAttribPointerARB;
|
||||
extern PFNGLENABLEVERTEXATTRIBARRAYARBPROC qglEnableVertexAttribArrayARB;
|
||||
extern PFNGLDISABLEVERTEXATTRIBARRAYARBPROC qglDisableVertexAttribArrayARB;
|
||||
extern PFNGLPROGRAMSTRINGARBPROC qglProgramStringARB;
|
||||
extern PFNGLBINDPROGRAMARBPROC qglBindProgramARB;
|
||||
extern PFNGLGENPROGRAMSARBPROC qglGenProgramsARB;
|
||||
extern PFNGLDELETEPROGRAMSARBPROC qglDeleteProgramsARB;
|
||||
extern PFNGLPROGRAMENVPARAMETER4FVARBPROC qglProgramEnvParameter4fvARB;
|
||||
extern PFNGLPROGRAMLOCALPARAMETER4FVARBPROC qglProgramLocalParameter4fvARB;
|
||||
|
||||
// GLSL / OpenGL 2.0
|
||||
extern PFNGLCREATESHADERPROC qglCreateShader;
|
||||
extern PFNGLDELETESHADERPROC qglDeleteShader;
|
||||
extern PFNGLSHADERSOURCEPROC qglShaderSource;
|
||||
extern PFNGLCOMPILESHADERPROC qglCompileShader;
|
||||
extern PFNGLGETSHADERIVPROC qglGetShaderiv;
|
||||
extern PFNGLGETSHADERINFOLOGPROC qglGetShaderInfoLog;
|
||||
extern PFNGLCREATEPROGRAMPROC qglCreateProgram;
|
||||
extern PFNGLDELETEPROGRAMPROC qglDeleteProgram;
|
||||
extern PFNGLATTACHSHADERPROC qglAttachShader;
|
||||
extern PFNGLDETACHSHADERPROC qglDetachShader;
|
||||
extern PFNGLLINKPROGRAMPROC qglLinkProgram;
|
||||
extern PFNGLUSEPROGRAMPROC qglUseProgram;
|
||||
extern PFNGLGETPROGRAMIVPROC qglGetProgramiv;
|
||||
extern PFNGLGETPROGRAMINFOLOGPROC qglGetProgramInfoLog;
|
||||
extern PFNGLPROGRAMPARAMETERIPROC qglProgramParameteri;
|
||||
extern PFNGLBINDATTRIBLOCATIONPROC qglBindAttribLocation;
|
||||
extern PFNGLGETUNIFORMLOCATIONPROC qglGetUniformLocation;
|
||||
extern PFNGLUNIFORM1IPROC qglUniform1i;
|
||||
extern PFNGLUNIFORM4FVPROC qglUniform4fv;
|
||||
|
||||
// GL_ARB_uniform_buffer_object
|
||||
extern PFNGLGETUNIFORMBLOCKINDEXPROC qglGetUniformBlockIndex;
|
||||
extern PFNGLUNIFORMBLOCKBINDINGPROC qglUniformBlockBinding;
|
||||
|
||||
// GL_ATI_separate_stencil / OpenGL 2.0 separate stencil
|
||||
extern PFNGLSTENCILOPSEPARATEATIPROC qglStencilOpSeparate;
|
||||
extern PFNGLSTENCILFUNCSEPARATEATIPROC qglStencilFuncSeparate;
|
||||
|
||||
// GL_EXT_depth_bounds_test
|
||||
extern PFNGLDEPTHBOUNDSEXTPROC qglDepthBoundsEXT;
|
||||
|
||||
// GL_ARB_sync
|
||||
extern PFNGLFENCESYNCPROC qglFenceSync;
|
||||
extern PFNGLISSYNCPROC qglIsSync;
|
||||
extern PFNGLCLIENTWAITSYNCPROC qglClientWaitSync;
|
||||
extern PFNGLDELETESYNCPROC qglDeleteSync;
|
||||
|
||||
// GL_ARB_occlusion_query
|
||||
extern PFNGLGENQUERIESARBPROC qglGenQueriesARB;
|
||||
extern PFNGLDELETEQUERIESARBPROC qglDeleteQueriesARB;
|
||||
extern PFNGLISQUERYARBPROC qglIsQueryARB;
|
||||
extern PFNGLBEGINQUERYARBPROC qglBeginQueryARB;
|
||||
extern PFNGLENDQUERYARBPROC qglEndQueryARB;
|
||||
extern PFNGLGETQUERYIVARBPROC qglGetQueryivARB;
|
||||
extern PFNGLGETQUERYOBJECTIVARBPROC qglGetQueryObjectivARB;
|
||||
extern PFNGLGETQUERYOBJECTUIVARBPROC qglGetQueryObjectuivARB;
|
||||
|
||||
// GL_ARB_timer_query / GL_EXT_timer_query
|
||||
extern PFNGLGETQUERYOBJECTUI64VEXTPROC qglGetQueryObjectui64vEXT;
|
||||
|
||||
// GL_ARB_debug_output
|
||||
extern PFNGLDEBUGMESSAGECONTROLARBPROC qglDebugMessageControlARB;
|
||||
extern PFNGLDEBUGMESSAGEINSERTARBPROC qglDebugMessageInsertARB;
|
||||
extern PFNGLDEBUGMESSAGECALLBACKARBPROC qglDebugMessageCallbackARB;
|
||||
extern PFNGLGETDEBUGMESSAGELOGARBPROC qglGetDebugMessageLogARB;
|
||||
|
||||
//===========================================================================
|
||||
|
||||
// non-windows systems will just redefine qgl* to gl*
|
||||
#if defined( __APPLE__ ) || defined( ID_GL_HARDLINK )
|
||||
|
||||
#include "qgl_linked.h"
|
||||
|
||||
#else
|
||||
|
||||
// windows systems use a function pointer for each call so we can do our log file intercepts
|
||||
|
||||
extern void ( APIENTRY * qglAccum )(GLenum op, GLfloat value);
|
||||
extern void ( APIENTRY * qglAlphaFunc )(GLenum func, GLclampf ref);
|
||||
extern GLboolean ( APIENTRY * qglAreTexturesResident )(GLsizei n, const GLuint *textures, GLboolean *residences);
|
||||
extern void ( APIENTRY * qglArrayElement )(GLint i);
|
||||
extern void ( APIENTRY * qglBegin )(GLenum mode);
|
||||
extern void ( APIENTRY * qglBindTexture )(GLenum target, GLuint texture);
|
||||
extern void ( APIENTRY * qglBitmap )(GLsizei width, GLsizei height, GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove, const GLubyte *bitmap);
|
||||
extern void ( APIENTRY * qglBlendFunc )(GLenum sfactor, GLenum dfactor);
|
||||
extern void ( APIENTRY * qglCallList )(GLuint list);
|
||||
extern void ( APIENTRY * qglCallLists )(GLsizei n, GLenum type, const GLvoid *lists);
|
||||
extern void ( APIENTRY * qglClear )(GLbitfield mask);
|
||||
extern void ( APIENTRY * qglClearAccum )(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
|
||||
extern void ( APIENTRY * qglClearColor )(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
|
||||
extern void ( APIENTRY * qglClearDepth )(GLclampd depth);
|
||||
extern void ( APIENTRY * qglClearIndex )(GLfloat c);
|
||||
extern void ( APIENTRY * qglClearStencil )(GLint s);
|
||||
extern void ( APIENTRY * qglClipPlane )(GLenum plane, const GLdouble *equation);
|
||||
extern void ( APIENTRY * qglColor3b )(GLbyte red, GLbyte green, GLbyte blue);
|
||||
extern void ( APIENTRY * qglColor3bv )(const GLbyte *v);
|
||||
extern void ( APIENTRY * qglColor3d )(GLdouble red, GLdouble green, GLdouble blue);
|
||||
extern void ( APIENTRY * qglColor3dv )(const GLdouble *v);
|
||||
extern void ( APIENTRY * qglColor3f )(GLfloat red, GLfloat green, GLfloat blue);
|
||||
extern void ( APIENTRY * qglColor3fv )(const GLfloat *v);
|
||||
extern void ( APIENTRY * qglColor3i )(GLint red, GLint green, GLint blue);
|
||||
extern void ( APIENTRY * qglColor3iv )(const GLint *v);
|
||||
extern void ( APIENTRY * qglColor3s )(GLshort red, GLshort green, GLshort blue);
|
||||
extern void ( APIENTRY * qglColor3sv )(const GLshort *v);
|
||||
extern void ( APIENTRY * qglColor3ub )(GLubyte red, GLubyte green, GLubyte blue);
|
||||
extern void ( APIENTRY * qglColor3ubv )(const GLubyte *v);
|
||||
extern void ( APIENTRY * qglColor3ui )(GLuint red, GLuint green, GLuint blue);
|
||||
extern void ( APIENTRY * qglColor3uiv )(const GLuint *v);
|
||||
extern void ( APIENTRY * qglColor3us )(GLushort red, GLushort green, GLushort blue);
|
||||
extern void ( APIENTRY * qglColor3usv )(const GLushort *v);
|
||||
extern void ( APIENTRY * qglColor4b )(GLbyte red, GLbyte green, GLbyte blue, GLbyte alpha);
|
||||
extern void ( APIENTRY * qglColor4bv )(const GLbyte *v);
|
||||
extern void ( APIENTRY * qglColor4d )(GLdouble red, GLdouble green, GLdouble blue, GLdouble alpha);
|
||||
extern void ( APIENTRY * qglColor4dv )(const GLdouble *v);
|
||||
extern void ( APIENTRY * qglColor4f )(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
|
||||
extern void ( APIENTRY * qglColor4fv )(const GLfloat *v);
|
||||
extern void ( APIENTRY * qglColor4i )(GLint red, GLint green, GLint blue, GLint alpha);
|
||||
extern void ( APIENTRY * qglColor4iv )(const GLint *v);
|
||||
extern void ( APIENTRY * qglColor4s )(GLshort red, GLshort green, GLshort blue, GLshort alpha);
|
||||
extern void ( APIENTRY * qglColor4sv )(const GLshort *v);
|
||||
extern void ( APIENTRY * qglColor4ub )(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha);
|
||||
extern void ( APIENTRY * qglColor4ubv )(const GLubyte *v);
|
||||
extern void ( APIENTRY * qglColor4ui )(GLuint red, GLuint green, GLuint blue, GLuint alpha);
|
||||
extern void ( APIENTRY * qglColor4uiv )(const GLuint *v);
|
||||
extern void ( APIENTRY * qglColor4us )(GLushort red, GLushort green, GLushort blue, GLushort alpha);
|
||||
extern void ( APIENTRY * qglColor4usv )(const GLushort *v);
|
||||
extern void ( APIENTRY * qglColorMask )(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
|
||||
extern void ( APIENTRY * qglColorMaterial )(GLenum face, GLenum mode);
|
||||
extern void ( APIENTRY * qglColorPointer )(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
|
||||
extern void ( APIENTRY * qglCopyPixels )(GLint x, GLint y, GLsizei width, GLsizei height, GLenum type);
|
||||
extern void ( APIENTRY * qglCopyTexImage1D )(GLenum target, GLint level, GLenum internalFormat, GLint x, GLint y, GLsizei width, GLint border);
|
||||
extern void ( APIENTRY * qglCopyTexImage2D )(GLenum target, GLint level, GLenum internalFormat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
|
||||
extern void ( APIENTRY * qglCopyTexSubImage1D )(GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width);
|
||||
extern void ( APIENTRY * qglCopyTexSubImage2D )(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
|
||||
extern void ( APIENTRY * qglCullFace )(GLenum mode);
|
||||
extern void ( APIENTRY * qglDeleteLists )(GLuint list, GLsizei range);
|
||||
extern void ( APIENTRY * qglDeleteTextures )(GLsizei n, const GLuint *textures);
|
||||
extern void ( APIENTRY * qglDepthFunc )(GLenum func);
|
||||
extern void ( APIENTRY * qglDepthMask )(GLboolean flag);
|
||||
extern void ( APIENTRY * qglDepthRange )(GLclampd zNear, GLclampd zFar);
|
||||
extern void ( APIENTRY * qglDisable )(GLenum cap);
|
||||
extern void ( APIENTRY * qglDisableClientState )(GLenum array);
|
||||
extern void ( APIENTRY * qglDrawArrays )(GLenum mode, GLint first, GLsizei count);
|
||||
extern void ( APIENTRY * qglDrawBuffer )(GLenum mode);
|
||||
extern void ( APIENTRY * qglDrawElements )(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices);
|
||||
extern void ( APIENTRY * qglDrawPixels )(GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels);
|
||||
extern void ( APIENTRY * qglEdgeFlag )(GLboolean flag);
|
||||
extern void ( APIENTRY * qglEdgeFlagPointer )(GLsizei stride, const GLvoid *pointer);
|
||||
extern void ( APIENTRY * qglEdgeFlagv )(const GLboolean *flag);
|
||||
extern void ( APIENTRY * qglEnable )(GLenum cap);
|
||||
extern void ( APIENTRY * qglEnableClientState )(GLenum array);
|
||||
extern void ( APIENTRY * qglEnd )(void);
|
||||
extern void ( APIENTRY * qglEndList )(void);
|
||||
extern void ( APIENTRY * qglEvalCoord1d )(GLdouble u);
|
||||
extern void ( APIENTRY * qglEvalCoord1dv )(const GLdouble *u);
|
||||
extern void ( APIENTRY * qglEvalCoord1f )(GLfloat u);
|
||||
extern void ( APIENTRY * qglEvalCoord1fv )(const GLfloat *u);
|
||||
extern void ( APIENTRY * qglEvalCoord2d )(GLdouble u, GLdouble v);
|
||||
extern void ( APIENTRY * qglEvalCoord2dv )(const GLdouble *u);
|
||||
extern void ( APIENTRY * qglEvalCoord2f )(GLfloat u, GLfloat v);
|
||||
extern void ( APIENTRY * qglEvalCoord2fv )(const GLfloat *u);
|
||||
extern void ( APIENTRY * qglEvalMesh1 )(GLenum mode, GLint i1, GLint i2);
|
||||
extern void ( APIENTRY * qglEvalMesh2 )(GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2);
|
||||
extern void ( APIENTRY * qglEvalPoint1 )(GLint i);
|
||||
extern void ( APIENTRY * qglEvalPoint2 )(GLint i, GLint j);
|
||||
extern void ( APIENTRY * qglFeedbackBuffer )(GLsizei size, GLenum type, GLfloat *buffer);
|
||||
extern void ( APIENTRY * qglFinish )(void);
|
||||
extern void ( APIENTRY * qglFlush )(void);
|
||||
extern void ( APIENTRY * qglFogf )(GLenum pname, GLfloat param);
|
||||
extern void ( APIENTRY * qglFogfv )(GLenum pname, const GLfloat *params);
|
||||
extern void ( APIENTRY * qglFogi )(GLenum pname, GLint param);
|
||||
extern void ( APIENTRY * qglFogiv )(GLenum pname, const GLint *params);
|
||||
extern void ( APIENTRY * qglFrontFace )(GLenum mode);
|
||||
extern void ( APIENTRY * qglFrustum )(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar);
|
||||
extern GLuint ( APIENTRY * qglGenLists )(GLsizei range);
|
||||
extern void ( APIENTRY * qglGenTextures )(GLsizei n, GLuint *textures);
|
||||
extern void ( APIENTRY * qglGetBooleanv )(GLenum pname, GLboolean *params);
|
||||
extern void ( APIENTRY * qglGetClipPlane )(GLenum plane, GLdouble *equation);
|
||||
extern void ( APIENTRY * qglGetDoublev )(GLenum pname, GLdouble *params);
|
||||
extern GLenum ( APIENTRY * qglGetError )(void);
|
||||
extern void ( APIENTRY * qglGetFloatv )(GLenum pname, GLfloat *params);
|
||||
extern void ( APIENTRY * qglGetIntegerv )(GLenum pname, GLint *params);
|
||||
extern void ( APIENTRY * qglGetLightfv )(GLenum light, GLenum pname, GLfloat *params);
|
||||
extern void ( APIENTRY * qglGetLightiv )(GLenum light, GLenum pname, GLint *params);
|
||||
extern void ( APIENTRY * qglGetMapdv )(GLenum target, GLenum query, GLdouble *v);
|
||||
extern void ( APIENTRY * qglGetMapfv )(GLenum target, GLenum query, GLfloat *v);
|
||||
extern void ( APIENTRY * qglGetMapiv )(GLenum target, GLenum query, GLint *v);
|
||||
extern void ( APIENTRY * qglGetMaterialfv )(GLenum face, GLenum pname, GLfloat *params);
|
||||
extern void ( APIENTRY * qglGetMaterialiv )(GLenum face, GLenum pname, GLint *params);
|
||||
extern void ( APIENTRY * qglGetPixelMapfv )(GLenum map, GLfloat *values);
|
||||
extern void ( APIENTRY * qglGetPixelMapuiv )(GLenum map, GLuint *values);
|
||||
extern void ( APIENTRY * qglGetPixelMapusv )(GLenum map, GLushort *values);
|
||||
extern void ( APIENTRY * qglGetPointerv )(GLenum pname, GLvoid* *params);
|
||||
extern void ( APIENTRY * qglGetPolygonStipple )(GLubyte *mask);
|
||||
extern const GLubyte * ( APIENTRY * qglGetString )(GLenum name);
|
||||
extern void ( APIENTRY * qglGetTexEnvfv )(GLenum target, GLenum pname, GLfloat *params);
|
||||
extern void ( APIENTRY * qglGetTexEnviv )(GLenum target, GLenum pname, GLint *params);
|
||||
extern void ( APIENTRY * qglGetTexGendv )(GLenum coord, GLenum pname, GLdouble *params);
|
||||
extern void ( APIENTRY * qglGetTexGenfv )(GLenum coord, GLenum pname, GLfloat *params);
|
||||
extern void ( APIENTRY * qglGetTexGeniv )(GLenum coord, GLenum pname, GLint *params);
|
||||
extern void ( APIENTRY * qglGetTexImage )(GLenum target, GLint level, GLenum format, GLenum type, GLvoid *pixels);
|
||||
extern void ( APIENTRY * qglGetTexLevelParameterfv )(GLenum target, GLint level, GLenum pname, GLfloat *params);
|
||||
extern void ( APIENTRY * qglGetTexLevelParameteriv )(GLenum target, GLint level, GLenum pname, GLint *params);
|
||||
extern void ( APIENTRY * qglGetTexParameterfv )(GLenum target, GLenum pname, GLfloat *params);
|
||||
extern void ( APIENTRY * qglGetTexParameteriv )(GLenum target, GLenum pname, GLint *params);
|
||||
extern void ( APIENTRY * qglHint )(GLenum target, GLenum mode);
|
||||
extern void ( APIENTRY * qglIndexMask )(GLuint mask);
|
||||
extern void ( APIENTRY * qglIndexPointer )(GLenum type, GLsizei stride, const GLvoid *pointer);
|
||||
extern void ( APIENTRY * qglIndexd )(GLdouble c);
|
||||
extern void ( APIENTRY * qglIndexdv )(const GLdouble *c);
|
||||
extern void ( APIENTRY * qglIndexf )(GLfloat c);
|
||||
extern void ( APIENTRY * qglIndexfv )(const GLfloat *c);
|
||||
extern void ( APIENTRY * qglIndexi )(GLint c);
|
||||
extern void ( APIENTRY * qglIndexiv )(const GLint *c);
|
||||
extern void ( APIENTRY * qglIndexs )(GLshort c);
|
||||
extern void ( APIENTRY * qglIndexsv )(const GLshort *c);
|
||||
extern void ( APIENTRY * qglIndexub )(GLubyte c);
|
||||
extern void ( APIENTRY * qglIndexubv )(const GLubyte *c);
|
||||
extern void ( APIENTRY * qglInitNames )(void);
|
||||
extern void ( APIENTRY * qglInterleavedArrays )(GLenum format, GLsizei stride, const GLvoid *pointer);
|
||||
extern GLboolean ( APIENTRY * qglIsEnabled )(GLenum cap);
|
||||
extern GLboolean ( APIENTRY * qglIsList )(GLuint list);
|
||||
extern GLboolean ( APIENTRY * qglIsTexture )(GLuint texture);
|
||||
extern void ( APIENTRY * qglLightModelf )(GLenum pname, GLfloat param);
|
||||
extern void ( APIENTRY * qglLightModelfv )(GLenum pname, const GLfloat *params);
|
||||
extern void ( APIENTRY * qglLightModeli )(GLenum pname, GLint param);
|
||||
extern void ( APIENTRY * qglLightModeliv )(GLenum pname, const GLint *params);
|
||||
extern void ( APIENTRY * qglLightf )(GLenum light, GLenum pname, GLfloat param);
|
||||
extern void ( APIENTRY * qglLightfv )(GLenum light, GLenum pname, const GLfloat *params);
|
||||
extern void ( APIENTRY * qglLighti )(GLenum light, GLenum pname, GLint param);
|
||||
extern void ( APIENTRY * qglLightiv )(GLenum light, GLenum pname, const GLint *params);
|
||||
extern void ( APIENTRY * qglLineStipple )(GLint factor, GLushort pattern);
|
||||
extern void ( APIENTRY * qglLineWidth )(GLfloat width);
|
||||
extern void ( APIENTRY * qglListBase )(GLuint base);
|
||||
extern void ( APIENTRY * qglLoadIdentity )(void);
|
||||
extern void ( APIENTRY * qglLoadMatrixd )(const GLdouble *m);
|
||||
extern void ( APIENTRY * qglLoadMatrixf )(const GLfloat *m);
|
||||
extern void ( APIENTRY * qglLoadName )(GLuint name);
|
||||
extern void ( APIENTRY * qglLogicOp )(GLenum opcode);
|
||||
extern void ( APIENTRY * qglMap1d )(GLenum target, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble *points);
|
||||
extern void ( APIENTRY * qglMap1f )(GLenum target, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat *points);
|
||||
extern void ( APIENTRY * qglMap2d )(GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, const GLdouble *points);
|
||||
extern void ( APIENTRY * qglMap2f )(GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, const GLfloat *points);
|
||||
extern void ( APIENTRY * qglMapGrid1d )(GLint un, GLdouble u1, GLdouble u2);
|
||||
extern void ( APIENTRY * qglMapGrid1f )(GLint un, GLfloat u1, GLfloat u2);
|
||||
extern void ( APIENTRY * qglMapGrid2d )(GLint un, GLdouble u1, GLdouble u2, GLint vn, GLdouble v1, GLdouble v2);
|
||||
extern void ( APIENTRY * qglMapGrid2f )(GLint un, GLfloat u1, GLfloat u2, GLint vn, GLfloat v1, GLfloat v2);
|
||||
extern void ( APIENTRY * qglMaterialf )(GLenum face, GLenum pname, GLfloat param);
|
||||
extern void ( APIENTRY * qglMaterialfv )(GLenum face, GLenum pname, const GLfloat *params);
|
||||
extern void ( APIENTRY * qglMateriali )(GLenum face, GLenum pname, GLint param);
|
||||
extern void ( APIENTRY * qglMaterialiv )(GLenum face, GLenum pname, const GLint *params);
|
||||
extern void ( APIENTRY * qglMatrixMode )(GLenum mode);
|
||||
extern void ( APIENTRY * qglMultMatrixd )(const GLdouble *m);
|
||||
extern void ( APIENTRY * qglMultMatrixf )(const GLfloat *m);
|
||||
extern void ( APIENTRY * qglNewList )(GLuint list, GLenum mode);
|
||||
extern void ( APIENTRY * qglNormal3b )(GLbyte nx, GLbyte ny, GLbyte nz);
|
||||
extern void ( APIENTRY * qglNormal3bv )(const GLbyte *v);
|
||||
extern void ( APIENTRY * qglNormal3d )(GLdouble nx, GLdouble ny, GLdouble nz);
|
||||
extern void ( APIENTRY * qglNormal3dv )(const GLdouble *v);
|
||||
extern void ( APIENTRY * qglNormal3f )(GLfloat nx, GLfloat ny, GLfloat nz);
|
||||
extern void ( APIENTRY * qglNormal3fv )(const GLfloat *v);
|
||||
extern void ( APIENTRY * qglNormal3i )(GLint nx, GLint ny, GLint nz);
|
||||
extern void ( APIENTRY * qglNormal3iv )(const GLint *v);
|
||||
extern void ( APIENTRY * qglNormal3s )(GLshort nx, GLshort ny, GLshort nz);
|
||||
extern void ( APIENTRY * qglNormal3sv )(const GLshort *v);
|
||||
extern void ( APIENTRY * qglNormalPointer )(GLenum type, GLsizei stride, const GLvoid *pointer);
|
||||
extern void ( APIENTRY * qglOrtho )(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar);
|
||||
extern void ( APIENTRY * qglPassThrough )(GLfloat token);
|
||||
extern void ( APIENTRY * qglPixelMapfv )(GLenum map, GLsizei mapsize, const GLfloat *values);
|
||||
extern void ( APIENTRY * qglPixelMapuiv )(GLenum map, GLsizei mapsize, const GLuint *values);
|
||||
extern void ( APIENTRY * qglPixelMapusv )(GLenum map, GLsizei mapsize, const GLushort *values);
|
||||
extern void ( APIENTRY * qglPixelStoref )(GLenum pname, GLfloat param);
|
||||
extern void ( APIENTRY * qglPixelStorei )(GLenum pname, GLint param);
|
||||
extern void ( APIENTRY * qglPixelTransferf )(GLenum pname, GLfloat param);
|
||||
extern void ( APIENTRY * qglPixelTransferi )(GLenum pname, GLint param);
|
||||
extern void ( APIENTRY * qglPixelZoom )(GLfloat xfactor, GLfloat yfactor);
|
||||
extern void ( APIENTRY * qglPointSize )(GLfloat size);
|
||||
extern void ( APIENTRY * qglPolygonMode )(GLenum face, GLenum mode);
|
||||
extern void ( APIENTRY * qglPolygonOffset )(GLfloat factor, GLfloat units);
|
||||
extern void ( APIENTRY * qglPolygonStipple )(const GLubyte *mask);
|
||||
extern void ( APIENTRY * qglPopAttrib )(void);
|
||||
extern void ( APIENTRY * qglPopClientAttrib )(void);
|
||||
extern void ( APIENTRY * qglPopMatrix )(void);
|
||||
extern void ( APIENTRY * qglPopName )(void);
|
||||
extern void ( APIENTRY * qglPrioritizeTextures )(GLsizei n, const GLuint *textures, const GLclampf *priorities);
|
||||
extern void ( APIENTRY * qglPushAttrib )(GLbitfield mask);
|
||||
extern void ( APIENTRY * qglPushClientAttrib )(GLbitfield mask);
|
||||
extern void ( APIENTRY * qglPushMatrix )(void);
|
||||
extern void ( APIENTRY * qglPushName )(GLuint name);
|
||||
extern void ( APIENTRY * qglRasterPos2d )(GLdouble x, GLdouble y);
|
||||
extern void ( APIENTRY * qglRasterPos2dv )(const GLdouble *v);
|
||||
extern void ( APIENTRY * qglRasterPos2f )(GLfloat x, GLfloat y);
|
||||
extern void ( APIENTRY * qglRasterPos2fv )(const GLfloat *v);
|
||||
extern void ( APIENTRY * qglRasterPos2i )(GLint x, GLint y);
|
||||
extern void ( APIENTRY * qglRasterPos2iv )(const GLint *v);
|
||||
extern void ( APIENTRY * qglRasterPos2s )(GLshort x, GLshort y);
|
||||
extern void ( APIENTRY * qglRasterPos2sv )(const GLshort *v);
|
||||
extern void ( APIENTRY * qglRasterPos3d )(GLdouble x, GLdouble y, GLdouble z);
|
||||
extern void ( APIENTRY * qglRasterPos3dv )(const GLdouble *v);
|
||||
extern void ( APIENTRY * qglRasterPos3f )(GLfloat x, GLfloat y, GLfloat z);
|
||||
extern void ( APIENTRY * qglRasterPos3fv )(const GLfloat *v);
|
||||
extern void ( APIENTRY * qglRasterPos3i )(GLint x, GLint y, GLint z);
|
||||
extern void ( APIENTRY * qglRasterPos3iv )(const GLint *v);
|
||||
extern void ( APIENTRY * qglRasterPos3s )(GLshort x, GLshort y, GLshort z);
|
||||
extern void ( APIENTRY * qglRasterPos3sv )(const GLshort *v);
|
||||
extern void ( APIENTRY * qglRasterPos4d )(GLdouble x, GLdouble y, GLdouble z, GLdouble w);
|
||||
extern void ( APIENTRY * qglRasterPos4dv )(const GLdouble *v);
|
||||
extern void ( APIENTRY * qglRasterPos4f )(GLfloat x, GLfloat y, GLfloat z, GLfloat w);
|
||||
extern void ( APIENTRY * qglRasterPos4fv )(const GLfloat *v);
|
||||
extern void ( APIENTRY * qglRasterPos4i )(GLint x, GLint y, GLint z, GLint w);
|
||||
extern void ( APIENTRY * qglRasterPos4iv )(const GLint *v);
|
||||
extern void ( APIENTRY * qglRasterPos4s )(GLshort x, GLshort y, GLshort z, GLshort w);
|
||||
extern void ( APIENTRY * qglRasterPos4sv )(const GLshort *v);
|
||||
extern void ( APIENTRY * qglReadBuffer )(GLenum mode);
|
||||
extern void ( APIENTRY * qglReadPixels )(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels);
|
||||
extern void ( APIENTRY * qglRectd )(GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2);
|
||||
extern void ( APIENTRY * qglRectdv )(const GLdouble *v1, const GLdouble *v2);
|
||||
extern void ( APIENTRY * qglRectf )(GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2);
|
||||
extern void ( APIENTRY * qglRectfv )(const GLfloat *v1, const GLfloat *v2);
|
||||
extern void ( APIENTRY * qglRecti )(GLint x1, GLint y1, GLint x2, GLint y2);
|
||||
extern void ( APIENTRY * qglRectiv )(const GLint *v1, const GLint *v2);
|
||||
extern void ( APIENTRY * qglRects )(GLshort x1, GLshort y1, GLshort x2, GLshort y2);
|
||||
extern void ( APIENTRY * qglRectsv )(const GLshort *v1, const GLshort *v2);
|
||||
extern GLint ( APIENTRY * qglRenderMode )(GLenum mode);
|
||||
extern void ( APIENTRY * qglRotated )(GLdouble angle, GLdouble x, GLdouble y, GLdouble z);
|
||||
extern void ( APIENTRY * qglRotatef )(GLfloat angle, GLfloat x, GLfloat y, GLfloat z);
|
||||
extern void ( APIENTRY * qglScaled )(GLdouble x, GLdouble y, GLdouble z);
|
||||
extern void ( APIENTRY * qglScalef )(GLfloat x, GLfloat y, GLfloat z);
|
||||
extern void ( APIENTRY * qglScissor )(GLint x, GLint y, GLsizei width, GLsizei height);
|
||||
extern void ( APIENTRY * qglSelectBuffer )(GLsizei size, GLuint *buffer);
|
||||
extern void ( APIENTRY * qglShadeModel )(GLenum mode);
|
||||
extern void ( APIENTRY * qglStencilFunc )(GLenum func, GLint ref, GLuint mask);
|
||||
extern void ( APIENTRY * qglStencilMask )(GLuint mask);
|
||||
extern void ( APIENTRY * qglStencilOp )(GLenum fail, GLenum zfail, GLenum zpass);
|
||||
extern void ( APIENTRY * qglTexCoord1d )(GLdouble s);
|
||||
extern void ( APIENTRY * qglTexCoord1dv )(const GLdouble *v);
|
||||
extern void ( APIENTRY * qglTexCoord1f )(GLfloat s);
|
||||
extern void ( APIENTRY * qglTexCoord1fv )(const GLfloat *v);
|
||||
extern void ( APIENTRY * qglTexCoord1i )(GLint s);
|
||||
extern void ( APIENTRY * qglTexCoord1iv )(const GLint *v);
|
||||
extern void ( APIENTRY * qglTexCoord1s )(GLshort s);
|
||||
extern void ( APIENTRY * qglTexCoord1sv )(const GLshort *v);
|
||||
extern void ( APIENTRY * qglTexCoord2d )(GLdouble s, GLdouble t);
|
||||
extern void ( APIENTRY * qglTexCoord2dv )(const GLdouble *v);
|
||||
extern void ( APIENTRY * qglTexCoord2f )(GLfloat s, GLfloat t);
|
||||
extern void ( APIENTRY * qglTexCoord2fv )(const GLfloat *v);
|
||||
extern void ( APIENTRY * qglTexCoord2i )(GLint s, GLint t);
|
||||
extern void ( APIENTRY * qglTexCoord2iv )(const GLint *v);
|
||||
extern void ( APIENTRY * qglTexCoord2s )(GLshort s, GLshort t);
|
||||
extern void ( APIENTRY * qglTexCoord2sv )(const GLshort *v);
|
||||
extern void ( APIENTRY * qglTexCoord3d )(GLdouble s, GLdouble t, GLdouble r);
|
||||
extern void ( APIENTRY * qglTexCoord3dv )(const GLdouble *v);
|
||||
extern void ( APIENTRY * qglTexCoord3f )(GLfloat s, GLfloat t, GLfloat r);
|
||||
extern void ( APIENTRY * qglTexCoord3fv )(const GLfloat *v);
|
||||
extern void ( APIENTRY * qglTexCoord3i )(GLint s, GLint t, GLint r);
|
||||
extern void ( APIENTRY * qglTexCoord3iv )(const GLint *v);
|
||||
extern void ( APIENTRY * qglTexCoord3s )(GLshort s, GLshort t, GLshort r);
|
||||
extern void ( APIENTRY * qglTexCoord3sv )(const GLshort *v);
|
||||
extern void ( APIENTRY * qglTexCoord4d )(GLdouble s, GLdouble t, GLdouble r, GLdouble q);
|
||||
extern void ( APIENTRY * qglTexCoord4dv )(const GLdouble *v);
|
||||
extern void ( APIENTRY * qglTexCoord4f )(GLfloat s, GLfloat t, GLfloat r, GLfloat q);
|
||||
extern void ( APIENTRY * qglTexCoord4fv )(const GLfloat *v);
|
||||
extern void ( APIENTRY * qglTexCoord4i )(GLint s, GLint t, GLint r, GLint q);
|
||||
extern void ( APIENTRY * qglTexCoord4iv )(const GLint *v);
|
||||
extern void ( APIENTRY * qglTexCoord4s )(GLshort s, GLshort t, GLshort r, GLshort q);
|
||||
extern void ( APIENTRY * qglTexCoord4sv )(const GLshort *v);
|
||||
extern void ( APIENTRY * qglTexCoordPointer )(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
|
||||
extern void ( APIENTRY * qglTexEnvf )(GLenum target, GLenum pname, GLfloat param);
|
||||
extern void ( APIENTRY * qglTexEnvfv )(GLenum target, GLenum pname, const GLfloat *params);
|
||||
extern void ( APIENTRY * qglTexEnvi )(GLenum target, GLenum pname, GLint param);
|
||||
extern void ( APIENTRY * qglTexEnviv )(GLenum target, GLenum pname, const GLint *params);
|
||||
extern void ( APIENTRY * qglTexGend )(GLenum coord, GLenum pname, GLdouble param);
|
||||
extern void ( APIENTRY * qglTexGendv )(GLenum coord, GLenum pname, const GLdouble *params);
|
||||
extern void ( APIENTRY * qglTexGenf )(GLenum coord, GLenum pname, GLfloat param);
|
||||
extern void ( APIENTRY * qglTexGenfv )(GLenum coord, GLenum pname, const GLfloat *params);
|
||||
extern void ( APIENTRY * qglTexGeni )(GLenum coord, GLenum pname, GLint param);
|
||||
extern void ( APIENTRY * qglTexGeniv )(GLenum coord, GLenum pname, const GLint *params);
|
||||
extern void ( APIENTRY * qglTexImage1D )(GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid *pixels);
|
||||
extern void ( APIENTRY * qglTexImage2D )(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels);
|
||||
extern void ( APIENTRY * qglTexParameterf )(GLenum target, GLenum pname, GLfloat param);
|
||||
extern void ( APIENTRY * qglTexParameterfv )(GLenum target, GLenum pname, const GLfloat *params);
|
||||
extern void ( APIENTRY * qglTexParameteri )(GLenum target, GLenum pname, GLint param);
|
||||
extern void ( APIENTRY * qglTexParameteriv )(GLenum target, GLenum pname, const GLint *params);
|
||||
extern void ( APIENTRY * qglTexSubImage1D )(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels);
|
||||
extern void ( APIENTRY * qglTexSubImage2D )(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels);
|
||||
extern void ( APIENTRY * qglTranslated )(GLdouble x, GLdouble y, GLdouble z);
|
||||
extern void ( APIENTRY * qglTranslatef )(GLfloat x, GLfloat y, GLfloat z);
|
||||
extern void ( APIENTRY * qglVertex2d )(GLdouble x, GLdouble y);
|
||||
extern void ( APIENTRY * qglVertex2dv )(const GLdouble *v);
|
||||
extern void ( APIENTRY * qglVertex2f )(GLfloat x, GLfloat y);
|
||||
extern void ( APIENTRY * qglVertex2fv )(const GLfloat *v);
|
||||
extern void ( APIENTRY * qglVertex2i )(GLint x, GLint y);
|
||||
extern void ( APIENTRY * qglVertex2iv )(const GLint *v);
|
||||
extern void ( APIENTRY * qglVertex2s )(GLshort x, GLshort y);
|
||||
extern void ( APIENTRY * qglVertex2sv )(const GLshort *v);
|
||||
extern void ( APIENTRY * qglVertex3d )(GLdouble x, GLdouble y, GLdouble z);
|
||||
extern void ( APIENTRY * qglVertex3dv )(const GLdouble *v);
|
||||
extern void ( APIENTRY * qglVertex3f )(GLfloat x, GLfloat y, GLfloat z);
|
||||
extern void ( APIENTRY * qglVertex3fv )(const GLfloat *v);
|
||||
extern void ( APIENTRY * qglVertex3i )(GLint x, GLint y, GLint z);
|
||||
extern void ( APIENTRY * qglVertex3iv )(const GLint *v);
|
||||
extern void ( APIENTRY * qglVertex3s )(GLshort x, GLshort y, GLshort z);
|
||||
extern void ( APIENTRY * qglVertex3sv )(const GLshort *v);
|
||||
extern void ( APIENTRY * qglVertex4d )(GLdouble x, GLdouble y, GLdouble z, GLdouble w);
|
||||
extern void ( APIENTRY * qglVertex4dv )(const GLdouble *v);
|
||||
extern void ( APIENTRY * qglVertex4f )(GLfloat x, GLfloat y, GLfloat z, GLfloat w);
|
||||
extern void ( APIENTRY * qglVertex4fv )(const GLfloat *v);
|
||||
extern void ( APIENTRY * qglVertex4i )(GLint x, GLint y, GLint z, GLint w);
|
||||
extern void ( APIENTRY * qglVertex4iv )(const GLint *v);
|
||||
extern void ( APIENTRY * qglVertex4s )(GLshort x, GLshort y, GLshort z, GLshort w);
|
||||
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);
|
||||
|
||||
|
||||
extern int ( WINAPI * qwglChoosePixelFormat )(HDC, CONST PIXELFORMATDESCRIPTOR *);
|
||||
extern int ( WINAPI * qwglDescribePixelFormat) (HDC, int, UINT, LPPIXELFORMATDESCRIPTOR);
|
||||
extern int ( WINAPI * qwglGetPixelFormat)(HDC);
|
||||
extern BOOL ( WINAPI * qwglSetPixelFormat)(HDC, int, CONST PIXELFORMATDESCRIPTOR *);
|
||||
extern BOOL ( WINAPI * qwglSwapBuffers)(HDC);
|
||||
|
||||
extern BOOL ( WINAPI * qwglCopyContext)(HGLRC, HGLRC, UINT);
|
||||
extern HGLRC ( WINAPI * qwglCreateContext)(HDC);
|
||||
extern HGLRC ( WINAPI * qwglCreateLayerContext)(HDC, int);
|
||||
extern BOOL ( WINAPI * qwglDeleteContext)(HGLRC);
|
||||
extern HGLRC ( WINAPI * qwglGetCurrentContext)(VOID);
|
||||
extern HDC ( WINAPI * qwglGetCurrentDC)(VOID);
|
||||
extern PROC ( WINAPI * qwglGetProcAddress)(LPCSTR);
|
||||
extern BOOL ( WINAPI * qwglMakeCurrent)(HDC, HGLRC);
|
||||
extern BOOL ( WINAPI * qwglShareLists)(HGLRC, HGLRC);
|
||||
extern BOOL ( WINAPI * qwglUseFontBitmaps)(HDC, DWORD, DWORD, DWORD);
|
||||
|
||||
extern BOOL ( WINAPI * qwglUseFontOutlines)(HDC, DWORD, DWORD, DWORD, FLOAT,
|
||||
FLOAT, int, LPGLYPHMETRICSFLOAT);
|
||||
|
||||
extern BOOL ( WINAPI * qwglDescribeLayerPlane)(HDC, int, int, UINT,
|
||||
LPLAYERPLANEDESCRIPTOR);
|
||||
extern int ( WINAPI * qwglSetLayerPaletteEntries)(HDC, int, int, int,
|
||||
CONST COLORREF *);
|
||||
extern int ( WINAPI * qwglGetLayerPaletteEntries)(HDC, int, int, int,
|
||||
COLORREF *);
|
||||
extern BOOL ( WINAPI * qwglRealizeLayerPalette)(HDC, int, BOOL);
|
||||
extern BOOL ( WINAPI * qwglSwapLayerBuffers)(HDC, UINT);
|
||||
|
||||
|
||||
|
||||
#endif // hardlinlk vs dlopen
|
||||
|
||||
#endif
|
||||
373
neo/renderer/OpenGL/qgl_linked.h
Normal file
373
neo/renderer/OpenGL/qgl_linked.h
Normal file
@@ -0,0 +1,373 @@
|
||||
/*
|
||||
===========================================================================
|
||||
|
||||
Doom 3 BFG Edition GPL Source Code
|
||||
Copyright (C) 1993-2012 id Software LLC, a ZeniMax Media company.
|
||||
|
||||
This file is part of the Doom 3 BFG Edition GPL Source Code ("Doom 3 BFG Edition Source Code").
|
||||
|
||||
Doom 3 BFG Edition Source Code is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Doom 3 BFG Edition Source Code is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with Doom 3 BFG Edition Source Code. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
In addition, the Doom 3 BFG Edition Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the Doom 3 BFG Edition Source Code. If not, please request a copy in writing from id Software at the address below.
|
||||
|
||||
If you have questions concerning this license or the applicable additional terms, you may contact in writing id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA.
|
||||
|
||||
===========================================================================
|
||||
*/
|
||||
|
||||
#define qglAccum glAccum
|
||||
#define qglAlphaFunc glAlphaFunc
|
||||
#define qglAreTexturesResident glAreTexturesResident
|
||||
#define qglArrayElement glArrayElement
|
||||
#define qglBegin glBegin
|
||||
#define qglBindTexture glBindTexture
|
||||
#define qglBitmap glBitmap
|
||||
#define qglBlendFunc glBlendFunc
|
||||
#define qglCallList glCallList
|
||||
#define qglCallLists glCallLists
|
||||
#define qglClear glClear
|
||||
#define qglClearAccum glClearAccum
|
||||
#define qglClearColor glClearColor
|
||||
#define qglClearDepth glClearDepth
|
||||
#define qglClearIndex glClearIndex
|
||||
#define qglClearStencil glClearStencil
|
||||
#define qglClipPlane glClipPlane
|
||||
#define qglColor3b glColor3b
|
||||
#define qglColor3bv glColor3bv
|
||||
#define qglColor3d glColor3d
|
||||
#define qglColor3dv glColor3dv
|
||||
#define qglColor3f glColor3f
|
||||
#define qglColor3fv glColor3fv
|
||||
#define qglColor3i glColor3i
|
||||
#define qglColor3iv glColor3iv
|
||||
#define qglColor3s glColor3s
|
||||
#define qglColor3sv glColor3sv
|
||||
#define qglColor3ub glColor3ub
|
||||
#define qglColor3ubv glColor3ubv
|
||||
#define qglColor3ui glColor3ui
|
||||
#define qglColor3uiv glColor3uiv
|
||||
#define qglColor3us glColor3us
|
||||
#define qglColor3usv glColor3usv
|
||||
#define qglColor4b glColor4b
|
||||
#define qglColor4bv glColor4bv
|
||||
#define qglColor4d glColor4d
|
||||
#define qglColor4dv glColor4dv
|
||||
#define qglColor4f glColor4f
|
||||
#define qglColor4fv glColor4fv
|
||||
#define qglColor4i glColor4i
|
||||
#define qglColor4iv glColor4iv
|
||||
#define qglColor4s glColor4s
|
||||
#define qglColor4sv glColor4sv
|
||||
#define qglColor4ub glColor4ub
|
||||
#define qglColor4ubv glColor4ubv
|
||||
#define qglColor4ui glColor4ui
|
||||
#define qglColor4uiv glColor4uiv
|
||||
#define qglColor4us glColor4us
|
||||
#define qglColor4usv glColor4usv
|
||||
#define qglColorMask glColorMask
|
||||
#define qglColorMaterial glColorMaterial
|
||||
#define qglColorPointer glColorPointer
|
||||
#define qglCopyPixels glCopyPixels
|
||||
#define qglCopyTexImage1D glCopyTexImage1D
|
||||
#define qglCopyTexImage2D glCopyTexImage2D
|
||||
#define qglCopyTexSubImage1D glCopyTexSubImage1D
|
||||
#define qglCopyTexSubImage2D glCopyTexSubImage2D
|
||||
#define qglCullFace glCullFace
|
||||
#define qglDeleteLists glDeleteLists
|
||||
#define qglDeleteTextures glDeleteTextures
|
||||
#define qglDepthFunc glDepthFunc
|
||||
#define qglDepthMask glDepthMask
|
||||
#define qglDepthRange glDepthRange
|
||||
#define qglDisable glDisable
|
||||
#define qglDisableClientState glDisableClientState
|
||||
#define qglDrawArrays glDrawArrays
|
||||
#define qglDrawBuffer glDrawBuffer
|
||||
#define qglDrawElements glDrawElements
|
||||
#define qglDrawPixels glDrawPixels
|
||||
#define qglEdgeFlag glEdgeFlag
|
||||
#define qglEdgeFlagPointer glEdgeFlagPointer
|
||||
#define qglEdgeFlagv glEdgeFlagv
|
||||
#define qglEnable glEnable
|
||||
#define qglEnableClientState glEnableClientState
|
||||
#define qglEnd glEnd
|
||||
#define qglEndList glEndList
|
||||
#define qglEvalCoord1d glEvalCoord1d
|
||||
#define qglEvalCoord1dv glEvalCoord1dv
|
||||
#define qglEvalCoord1f glEvalCoord1f
|
||||
#define qglEvalCoord1fv glEvalCoord1fv
|
||||
#define qglEvalCoord2d glEvalCoord2d
|
||||
#define qglEvalCoord2dv glEvalCoord2dv
|
||||
#define qglEvalCoord2f glEvalCoord2f
|
||||
#define qglEvalCoord2fv glEvalCoord2fv
|
||||
#define qglEvalMesh1 glEvalMesh1
|
||||
#define qglEvalMesh2 glEvalMesh2
|
||||
#define qglEvalPoint1 glEvalPoint1
|
||||
#define qglEvalPoint2 glEvalPoint2
|
||||
#define qglFeedbackBuffer glFeedbackBuffer
|
||||
#define qglFinish glFinish
|
||||
#define qglFlush glFlush
|
||||
#define qglFogf glFogf
|
||||
#define qglFogfv glFogfv
|
||||
#define qglFogi glFogi
|
||||
#define qglFogiv glFogiv
|
||||
#define qglFrontFace glFrontFace
|
||||
#define qglFrustum glFrustum
|
||||
#define qglGenLists glGenLists
|
||||
#define qglGenTextures glGenTextures
|
||||
#define qglGetBooleanv glGetBooleanv
|
||||
#define qglGetClipPlane glGetClipPlane
|
||||
#define qglGetDoublev glGetDoublev
|
||||
#define qglGetError glGetError
|
||||
#define qglGetFloatv glGetFloatv
|
||||
#define qglGetIntegerv glGetIntegerv
|
||||
#define qglGetLightfv glGetLightfv
|
||||
#define qglGetLightiv glGetLightiv
|
||||
#define qglGetMapdv glGetMapdv
|
||||
#define qglGetMapfv glGetMapfv
|
||||
#define qglGetMapiv glGetMapiv
|
||||
#define qglGetMaterialfv glGetMaterialfv
|
||||
#define qglGetMaterialiv glGetMaterialiv
|
||||
#define qglGetPixelMapfv glGetPixelMapfv
|
||||
#define qglGetPixelMapuiv glGetPixelMapuiv
|
||||
#define qglGetPixelMapusv glGetPixelMapusv
|
||||
#define qglGetPointerv glGetPointerv
|
||||
#define qglGetPolygonStipple glGetPolygonStipple
|
||||
#define qglGetString glGetString
|
||||
#define qglGetTexEnviv glGetTexEnviv
|
||||
#define qglGetTexEnvfv glGetTexEnvfv
|
||||
#define qglGetTexGendv glGetTexGendv
|
||||
#define qglGetTexGenfv glGetTexGenfv
|
||||
#define qglGetTexGeniv glGetTexGeniv
|
||||
#define qglGetTexImage glGetTexImage
|
||||
#define qglGetTexLevelParameterfv glGetTexLevelParameterfv
|
||||
#define qglGetTexLevelParameteriv glGetTexLevelParameteriv
|
||||
#define qglGetTexParameterfv glGetTexParameterfv
|
||||
#define qglGetTexParameteriv glGetTexParameteriv
|
||||
#define qglHint glHint
|
||||
#define qglIndexMask glIndexMask
|
||||
#define qglIndexPointer glIndexPointer
|
||||
#define qglIndexd glIndexd
|
||||
#define qglIndexdv glIndexdv
|
||||
#define qglIndexf glIndexf
|
||||
#define qglIndexfv glIndexfv
|
||||
#define qglIndexi glIndexi
|
||||
#define qglIndexiv glIndexiv
|
||||
#define qglIndexs glIndexs
|
||||
#define qglIndexsv glIndexsv
|
||||
#define qglIndexub glIndexub
|
||||
#define qglIndexubv glIndexubv
|
||||
#define qglInitNames glInitNames
|
||||
#define qglInterleavedArrays glInterleavedArrays
|
||||
#define qglIsEnabled glIsEnabled
|
||||
#define qglIsList glIsList
|
||||
#define qglIsTexture glIsTexture
|
||||
#define qglLightModelf glLightModelf
|
||||
#define qglLightModelfv glLightModelfv
|
||||
#define qglLightModeli glLightModeli
|
||||
#define qglLightModeliv glLightModeliv
|
||||
#define qglLightf glLightf
|
||||
#define qglLightfv glLightfv
|
||||
#define qglLighti glLighti
|
||||
#define qglLightiv glLightiv
|
||||
#define qglLineStipple glLineStipple
|
||||
#define qglLineWidth glLineWidth
|
||||
#define qglListBase glListBase
|
||||
#define qglLoadIdentity glLoadIdentity
|
||||
#define qglLoadMatrixd glLoadMatrixd
|
||||
#define qglLoadMatrixf glLoadMatrixf
|
||||
#define qglLoadName glLoadName
|
||||
#define qglLogicOp glLogicOp
|
||||
#define qglMap1d glMap1d
|
||||
#define qglMap1f glMap1f
|
||||
#define qglMap2d glMap2d
|
||||
#define qglMap2f glMap2f
|
||||
#define qglMapGrid1d glMapGrid1d
|
||||
#define qglMapGrid1f glMapGrid1f
|
||||
#define qglMapGrid2d glMapGrid2d
|
||||
#define qglMapGrid2f glMapGrid2f
|
||||
#define qglMaterialf glMaterialf
|
||||
#define qglMaterialfv glMaterialfv
|
||||
#define qglMateriali glMateriali
|
||||
#define qglMaterialiv glMaterialiv
|
||||
#define qglMatrixMode glMatrixMode
|
||||
#define qglMultMatrixd glMultMatrixd
|
||||
#define qglMultMatrixf glMultMatrixf
|
||||
#define qglNewList glNewList
|
||||
#define qglNormal3b glNormal3b
|
||||
#define qglNormal3bv glNormal3bv
|
||||
#define qglNormal3d glNormal3d
|
||||
#define qglNormal3dv glNormal3dv
|
||||
#define qglNormal3f glNormal3f
|
||||
#define qglNormal3fv glNormal3fv
|
||||
#define qglNormal3i glNormal3i
|
||||
#define qglNormal3iv glNormal3iv
|
||||
#define qglNormal3s glNormal3s
|
||||
#define qglNormal3sv glNormal3sv
|
||||
#define qglNormalPointer glNormalPointer
|
||||
#define qglOrtho glOrtho
|
||||
#define qglPassThrough glPassThrough
|
||||
#define qglPixelMapfv glPixelMapfv
|
||||
#define qglPixelMapuiv glPixelMapuiv
|
||||
#define qglPixelMapusv glPixelMapusv
|
||||
#define qglPixelStoref glPixelStoref
|
||||
#define qglPixelStorei glPixelStorei
|
||||
#define qglPixelTransferf glPixelTransferf
|
||||
#define qglPixelTransferi glPixelTransferi
|
||||
#define qglPixelZoom glPixelZoom
|
||||
#define qglPointSize glPointSize
|
||||
#define qglPolygonMode glPolygonMode
|
||||
#define qglPolygonOffset glPolygonOffset
|
||||
#define qglPolygonStipple glPolygonStipple
|
||||
#define qglPopAttrib glPopAttrib
|
||||
#define qglPopClientAttrib glPopClientAttrib
|
||||
#define qglPopMatrix glPopMatrix
|
||||
#define qglPopName glPopName
|
||||
#define qglPrioritizeTextures glPrioritizeTextures
|
||||
#define qglPushAttrib glPushAttrib
|
||||
#define qglPushClientAttrib glPushClientAttrib
|
||||
#define qglPushMatrix glPushMatrix
|
||||
#define qglPushName glPushName
|
||||
#define qglRasterPos2d glRasterPos2d
|
||||
#define qglRasterPos2dv glRasterPos2dv
|
||||
#define qglRasterPos2f glRasterPos2f
|
||||
#define qglRasterPos2fv glRasterPos2fv
|
||||
#define qglRasterPos2i glRasterPos2i
|
||||
#define qglRasterPos2iv glRasterPos2iv
|
||||
#define qglRasterPos2s glRasterPos2s
|
||||
#define qglRasterPos2sv glRasterPos2sv
|
||||
#define qglRasterPos3d glRasterPos3d
|
||||
#define qglRasterPos3dv glRasterPos3dv
|
||||
#define qglRasterPos3f glRasterPos3f
|
||||
#define qglRasterPos3fv glRasterPos3fv
|
||||
#define qglRasterPos3i glRasterPos3i
|
||||
#define qglRasterPos3iv glRasterPos3iv
|
||||
#define qglRasterPos3s glRasterPos3s
|
||||
#define qglRasterPos3sv glRasterPos3sv
|
||||
#define qglRasterPos4d glRasterPos4d
|
||||
#define qglRasterPos4dv glRasterPos4dv
|
||||
#define qglRasterPos4f glRasterPos4f
|
||||
#define qglRasterPos4fv glRasterPos4fv
|
||||
#define qglRasterPos4i glRasterPos4i
|
||||
#define qglRasterPos4iv glRasterPos4iv
|
||||
#define qglRasterPos4s glRasterPos4s
|
||||
#define qglRasterPos4sv glRasterPos4sv
|
||||
#define qglReadBuffer glReadBuffer
|
||||
#define qglReadPixels glReadPixels
|
||||
#define qglRectd glRectd
|
||||
#define qglRectdv glRectdv
|
||||
#define qglRectf glRectf
|
||||
#define qglRectfv glRectfv
|
||||
#define qglRecti glRecti
|
||||
#define qglRectiv glRectiv
|
||||
#define qglRects glRects
|
||||
#define qglRectsv glRectsv
|
||||
#define qglRenderMode glRenderMode
|
||||
#define qglRotated glRotated
|
||||
#define qglRotatef glRotatef
|
||||
#define qglScaled glScaled
|
||||
#define qglScalef glScalef
|
||||
#define qglScissor glScissor
|
||||
#define qglSelectBuffer glSelectBuffer
|
||||
#define qglShadeModel glShadeModel
|
||||
#define qglStencilFunc glStencilFunc
|
||||
#define qglStencilMask glStencilMask
|
||||
#define qglStencilOp glStencilOp
|
||||
#define qglTexCoord1d glTexCoord1d
|
||||
#define qglTexCoord1dv glTexCoord1dv
|
||||
#define qglTexCoord1f glTexCoord1f
|
||||
#define qglTexCoord1fv glTexCoord1fv
|
||||
#define qglTexCoord1i glTexCoord1i
|
||||
#define qglTexCoord1iv glTexCoord1iv
|
||||
#define qglTexCoord1s glTexCoord1s
|
||||
#define qglTexCoord1sv glTexCoord1sv
|
||||
#define qglTexCoord2d glTexCoord2d
|
||||
#define qglTexCoord2dv glTexCoord2dv
|
||||
#define qglTexCoord2f glTexCoord2f
|
||||
#define qglTexCoord2fv glTexCoord2fv
|
||||
#define qglTexCoord2i glTexCoord2i
|
||||
#define qglTexCoord2iv glTexCoord2iv
|
||||
#define qglTexCoord2s glTexCoord2s
|
||||
#define qglTexCoord2sv glTexCoord2sv
|
||||
#define qglTexCoord3d glTexCoord3d
|
||||
#define qglTexCoord3dv glTexCoord3dv
|
||||
#define qglTexCoord3f glTexCoord3f
|
||||
#define qglTexCoord3fv glTexCoord3fv
|
||||
#define qglTexCoord3i glTexCoord3i
|
||||
#define qglTexCoord3iv glTexCoord3iv
|
||||
#define qglTexCoord3s glTexCoord3s
|
||||
#define qglTexCoord3sv glTexCoord3sv
|
||||
#define qglTexCoord4d glTexCoord4d
|
||||
#define qglTexCoord4dv glTexCoord4dv
|
||||
#define qglTexCoord4f glTexCoord4f
|
||||
#define qglTexCoord4fv glTexCoord4fv
|
||||
#define qglTexCoord4i glTexCoord4i
|
||||
#define qglTexCoord4iv glTexCoord4iv
|
||||
#define qglTexCoord4s glTexCoord4s
|
||||
#define qglTexCoord4sv glTexCoord4sv
|
||||
#define qglTexCoordPointer glTexCoordPointer
|
||||
#define qglTexEnvf glTexEnvf
|
||||
#define qglTexEnvfv glTexEnvfv
|
||||
#define qglTexEnvi glTexEnvi
|
||||
#define qglTexEnviv glTexEnviv
|
||||
#define qglTexGend glTexGend
|
||||
#define qglTexGendv glTexGendv
|
||||
#define qglTexGenf glTexGenf
|
||||
#define qglTexGenfv glTexGenfv
|
||||
#define qglTexGeni glTexGeni
|
||||
#define qglTexGeniv glTexGeniv
|
||||
#define qglTexImage1D glTexImage1D
|
||||
#define qglTexImage2D glTexImage2D
|
||||
#define qglTexParameterf glTexParameterf
|
||||
#define qglTexParameterfv glTexParameterfv
|
||||
#define qglTexParameteri glTexParameteri
|
||||
#define qglTexParameteriv glTexParameteriv
|
||||
#define qglTexSubImage1D glTexSubImage1D
|
||||
#define qglTexSubImage2D glTexSubImage2D
|
||||
#define qglTranslated glTranslated
|
||||
#define qglTranslatef glTranslatef
|
||||
#define qglVertex2d glVertex2d
|
||||
#define qglVertex2dv glVertex2dv
|
||||
#define qglVertex2f glVertex2f
|
||||
#define qglVertex2fv glVertex2fv
|
||||
#define qglVertex2i glVertex2i
|
||||
#define qglVertex2iv glVertex2iv
|
||||
#define qglVertex2s glVertex2s
|
||||
#define qglVertex2sv glVertex2sv
|
||||
#define qglVertex3d glVertex3d
|
||||
#define qglVertex3dv glVertex3dv
|
||||
#define qglVertex3f glVertex3f
|
||||
#define qglVertex3fv glVertex3fv
|
||||
#define qglVertex3i glVertex3i
|
||||
#define qglVertex3iv glVertex3iv
|
||||
#define qglVertex3s glVertex3s
|
||||
#define qglVertex3sv glVertex3sv
|
||||
#define qglVertex4d glVertex4d
|
||||
#define qglVertex4dv glVertex4dv
|
||||
#define qglVertex4f glVertex4f
|
||||
#define qglVertex4fv glVertex4fv
|
||||
#define qglVertex4i glVertex4i
|
||||
#define qglVertex4iv glVertex4iv
|
||||
#define qglVertex4s glVertex4s
|
||||
#define qglVertex4sv glVertex4sv
|
||||
#define qglVertexPointer glVertexPointer
|
||||
#define qglViewport glViewport
|
||||
|
||||
#ifdef GLX_VERSION_1_1 // catch all for any GLX-aware situation
|
||||
#define qglXChooseVisual glXChooseVisual
|
||||
#define qglXCreateContext glXCreateContext
|
||||
#define qglXDestroyContext glXDestroyContext
|
||||
#define qglXMakeCurrent glXMakeCurrent
|
||||
#define qglXSwapBuffers glXSwapBuffers
|
||||
#define qglXGetProcAddressARB glXGetProcAddressARB
|
||||
#endif
|
||||
943
neo/renderer/OpenGL/wglext.h
Normal file
943
neo/renderer/OpenGL/wglext.h
Normal file
@@ -0,0 +1,943 @@
|
||||
#ifndef __wglext_h_
|
||||
#define __wglext_h_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
** Copyright (c) 2007-2012 The Khronos Group Inc.
|
||||
**
|
||||
** Permission is hereby granted, free of charge, to any person obtaining a
|
||||
** copy of this software and/or associated documentation files (the
|
||||
** "Materials"), to deal in the Materials without restriction, including
|
||||
** without limitation the rights to use, copy, modify, merge, publish,
|
||||
** distribute, sublicense, and/or sell copies of the Materials, and to
|
||||
** permit persons to whom the Materials are furnished to do so, subject to
|
||||
** the following conditions:
|
||||
**
|
||||
** The above copyright notice and this permission notice shall be included
|
||||
** in all copies or substantial portions of the Materials.
|
||||
**
|
||||
** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
||||
*/
|
||||
|
||||
/* Function declaration macros - to move into glplatform.h */
|
||||
|
||||
#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__)
|
||||
#define WIN32_LEAN_AND_MEAN 1
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
#ifndef APIENTRY
|
||||
#define APIENTRY
|
||||
#endif
|
||||
#ifndef APIENTRYP
|
||||
#define APIENTRYP APIENTRY *
|
||||
#endif
|
||||
#ifndef GLAPI
|
||||
#define GLAPI extern
|
||||
#endif
|
||||
|
||||
/*************************************************************/
|
||||
|
||||
/* Header file version number */
|
||||
/* wglext.h last updated 2012/01/04 */
|
||||
/* Current version at http://www.opengl.org/registry/ */
|
||||
#define WGL_WGLEXT_VERSION 24
|
||||
|
||||
#ifndef WGL_ARB_buffer_region
|
||||
#define WGL_FRONT_COLOR_BUFFER_BIT_ARB 0x00000001
|
||||
#define WGL_BACK_COLOR_BUFFER_BIT_ARB 0x00000002
|
||||
#define WGL_DEPTH_BUFFER_BIT_ARB 0x00000004
|
||||
#define WGL_STENCIL_BUFFER_BIT_ARB 0x00000008
|
||||
#endif
|
||||
|
||||
#ifndef WGL_ARB_multisample
|
||||
#define WGL_SAMPLE_BUFFERS_ARB 0x2041
|
||||
#define WGL_SAMPLES_ARB 0x2042
|
||||
#endif
|
||||
|
||||
#ifndef WGL_ARB_extensions_string
|
||||
#endif
|
||||
|
||||
#ifndef WGL_ARB_pixel_format
|
||||
#define WGL_NUMBER_PIXEL_FORMATS_ARB 0x2000
|
||||
#define WGL_DRAW_TO_WINDOW_ARB 0x2001
|
||||
#define WGL_DRAW_TO_BITMAP_ARB 0x2002
|
||||
#define WGL_ACCELERATION_ARB 0x2003
|
||||
#define WGL_NEED_PALETTE_ARB 0x2004
|
||||
#define WGL_NEED_SYSTEM_PALETTE_ARB 0x2005
|
||||
#define WGL_SWAP_LAYER_BUFFERS_ARB 0x2006
|
||||
#define WGL_SWAP_METHOD_ARB 0x2007
|
||||
#define WGL_NUMBER_OVERLAYS_ARB 0x2008
|
||||
#define WGL_NUMBER_UNDERLAYS_ARB 0x2009
|
||||
#define WGL_TRANSPARENT_ARB 0x200A
|
||||
#define WGL_TRANSPARENT_RED_VALUE_ARB 0x2037
|
||||
#define WGL_TRANSPARENT_GREEN_VALUE_ARB 0x2038
|
||||
#define WGL_TRANSPARENT_BLUE_VALUE_ARB 0x2039
|
||||
#define WGL_TRANSPARENT_ALPHA_VALUE_ARB 0x203A
|
||||
#define WGL_TRANSPARENT_INDEX_VALUE_ARB 0x203B
|
||||
#define WGL_SHARE_DEPTH_ARB 0x200C
|
||||
#define WGL_SHARE_STENCIL_ARB 0x200D
|
||||
#define WGL_SHARE_ACCUM_ARB 0x200E
|
||||
#define WGL_SUPPORT_GDI_ARB 0x200F
|
||||
#define WGL_SUPPORT_OPENGL_ARB 0x2010
|
||||
#define WGL_DOUBLE_BUFFER_ARB 0x2011
|
||||
#define WGL_STEREO_ARB 0x2012
|
||||
#define WGL_PIXEL_TYPE_ARB 0x2013
|
||||
#define WGL_COLOR_BITS_ARB 0x2014
|
||||
#define WGL_RED_BITS_ARB 0x2015
|
||||
#define WGL_RED_SHIFT_ARB 0x2016
|
||||
#define WGL_GREEN_BITS_ARB 0x2017
|
||||
#define WGL_GREEN_SHIFT_ARB 0x2018
|
||||
#define WGL_BLUE_BITS_ARB 0x2019
|
||||
#define WGL_BLUE_SHIFT_ARB 0x201A
|
||||
#define WGL_ALPHA_BITS_ARB 0x201B
|
||||
#define WGL_ALPHA_SHIFT_ARB 0x201C
|
||||
#define WGL_ACCUM_BITS_ARB 0x201D
|
||||
#define WGL_ACCUM_RED_BITS_ARB 0x201E
|
||||
#define WGL_ACCUM_GREEN_BITS_ARB 0x201F
|
||||
#define WGL_ACCUM_BLUE_BITS_ARB 0x2020
|
||||
#define WGL_ACCUM_ALPHA_BITS_ARB 0x2021
|
||||
#define WGL_DEPTH_BITS_ARB 0x2022
|
||||
#define WGL_STENCIL_BITS_ARB 0x2023
|
||||
#define WGL_AUX_BUFFERS_ARB 0x2024
|
||||
#define WGL_NO_ACCELERATION_ARB 0x2025
|
||||
#define WGL_GENERIC_ACCELERATION_ARB 0x2026
|
||||
#define WGL_FULL_ACCELERATION_ARB 0x2027
|
||||
#define WGL_SWAP_EXCHANGE_ARB 0x2028
|
||||
#define WGL_SWAP_COPY_ARB 0x2029
|
||||
#define WGL_SWAP_UNDEFINED_ARB 0x202A
|
||||
#define WGL_TYPE_RGBA_ARB 0x202B
|
||||
#define WGL_TYPE_COLORINDEX_ARB 0x202C
|
||||
#endif
|
||||
|
||||
#ifndef WGL_ARB_make_current_read
|
||||
#define ERROR_INVALID_PIXEL_TYPE_ARB 0x2043
|
||||
#define ERROR_INCOMPATIBLE_DEVICE_CONTEXTS_ARB 0x2054
|
||||
#endif
|
||||
|
||||
#ifndef WGL_ARB_pbuffer
|
||||
#define WGL_DRAW_TO_PBUFFER_ARB 0x202D
|
||||
#define WGL_MAX_PBUFFER_PIXELS_ARB 0x202E
|
||||
#define WGL_MAX_PBUFFER_WIDTH_ARB 0x202F
|
||||
#define WGL_MAX_PBUFFER_HEIGHT_ARB 0x2030
|
||||
#define WGL_PBUFFER_LARGEST_ARB 0x2033
|
||||
#define WGL_PBUFFER_WIDTH_ARB 0x2034
|
||||
#define WGL_PBUFFER_HEIGHT_ARB 0x2035
|
||||
#define WGL_PBUFFER_LOST_ARB 0x2036
|
||||
#endif
|
||||
|
||||
#ifndef WGL_ARB_render_texture
|
||||
#define WGL_BIND_TO_TEXTURE_RGB_ARB 0x2070
|
||||
#define WGL_BIND_TO_TEXTURE_RGBA_ARB 0x2071
|
||||
#define WGL_TEXTURE_FORMAT_ARB 0x2072
|
||||
#define WGL_TEXTURE_TARGET_ARB 0x2073
|
||||
#define WGL_MIPMAP_TEXTURE_ARB 0x2074
|
||||
#define WGL_TEXTURE_RGB_ARB 0x2075
|
||||
#define WGL_TEXTURE_RGBA_ARB 0x2076
|
||||
#define WGL_NO_TEXTURE_ARB 0x2077
|
||||
#define WGL_TEXTURE_CUBE_MAP_ARB 0x2078
|
||||
#define WGL_TEXTURE_1D_ARB 0x2079
|
||||
#define WGL_TEXTURE_2D_ARB 0x207A
|
||||
#define WGL_MIPMAP_LEVEL_ARB 0x207B
|
||||
#define WGL_CUBE_MAP_FACE_ARB 0x207C
|
||||
#define WGL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB 0x207D
|
||||
#define WGL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB 0x207E
|
||||
#define WGL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB 0x207F
|
||||
#define WGL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB 0x2080
|
||||
#define WGL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB 0x2081
|
||||
#define WGL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB 0x2082
|
||||
#define WGL_FRONT_LEFT_ARB 0x2083
|
||||
#define WGL_FRONT_RIGHT_ARB 0x2084
|
||||
#define WGL_BACK_LEFT_ARB 0x2085
|
||||
#define WGL_BACK_RIGHT_ARB 0x2086
|
||||
#define WGL_AUX0_ARB 0x2087
|
||||
#define WGL_AUX1_ARB 0x2088
|
||||
#define WGL_AUX2_ARB 0x2089
|
||||
#define WGL_AUX3_ARB 0x208A
|
||||
#define WGL_AUX4_ARB 0x208B
|
||||
#define WGL_AUX5_ARB 0x208C
|
||||
#define WGL_AUX6_ARB 0x208D
|
||||
#define WGL_AUX7_ARB 0x208E
|
||||
#define WGL_AUX8_ARB 0x208F
|
||||
#define WGL_AUX9_ARB 0x2090
|
||||
#endif
|
||||
|
||||
#ifndef WGL_ARB_pixel_format_float
|
||||
#define WGL_TYPE_RGBA_FLOAT_ARB 0x21A0
|
||||
#endif
|
||||
|
||||
#ifndef WGL_ARB_framebuffer_sRGB
|
||||
#define WGL_FRAMEBUFFER_SRGB_CAPABLE_ARB 0x20A9
|
||||
#endif
|
||||
|
||||
#ifndef WGL_ARB_create_context
|
||||
#define WGL_CONTEXT_DEBUG_BIT_ARB 0x00000001
|
||||
#define WGL_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB 0x00000002
|
||||
#define WGL_CONTEXT_MAJOR_VERSION_ARB 0x2091
|
||||
#define WGL_CONTEXT_MINOR_VERSION_ARB 0x2092
|
||||
#define WGL_CONTEXT_LAYER_PLANE_ARB 0x2093
|
||||
#define WGL_CONTEXT_FLAGS_ARB 0x2094
|
||||
#define ERROR_INVALID_VERSION_ARB 0x2095
|
||||
#endif
|
||||
|
||||
#ifndef WGL_ARB_create_context_profile
|
||||
#define WGL_CONTEXT_PROFILE_MASK_ARB 0x9126
|
||||
#define WGL_CONTEXT_CORE_PROFILE_BIT_ARB 0x00000001
|
||||
#define WGL_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB 0x00000002
|
||||
#define ERROR_INVALID_PROFILE_ARB 0x2096
|
||||
#endif
|
||||
|
||||
#ifndef WGL_ARB_create_context_robustness
|
||||
#define WGL_CONTEXT_ROBUST_ACCESS_BIT_ARB 0x00000004
|
||||
#define WGL_LOSE_CONTEXT_ON_RESET_ARB 0x8252
|
||||
#define WGL_CONTEXT_RESET_NOTIFICATION_STRATEGY_ARB 0x8256
|
||||
#define WGL_NO_RESET_NOTIFICATION_ARB 0x8261
|
||||
#endif
|
||||
|
||||
#ifndef WGL_EXT_make_current_read
|
||||
#define ERROR_INVALID_PIXEL_TYPE_EXT 0x2043
|
||||
#endif
|
||||
|
||||
#ifndef WGL_EXT_pixel_format
|
||||
#define WGL_NUMBER_PIXEL_FORMATS_EXT 0x2000
|
||||
#define WGL_DRAW_TO_WINDOW_EXT 0x2001
|
||||
#define WGL_DRAW_TO_BITMAP_EXT 0x2002
|
||||
#define WGL_ACCELERATION_EXT 0x2003
|
||||
#define WGL_NEED_PALETTE_EXT 0x2004
|
||||
#define WGL_NEED_SYSTEM_PALETTE_EXT 0x2005
|
||||
#define WGL_SWAP_LAYER_BUFFERS_EXT 0x2006
|
||||
#define WGL_SWAP_METHOD_EXT 0x2007
|
||||
#define WGL_NUMBER_OVERLAYS_EXT 0x2008
|
||||
#define WGL_NUMBER_UNDERLAYS_EXT 0x2009
|
||||
#define WGL_TRANSPARENT_EXT 0x200A
|
||||
#define WGL_TRANSPARENT_VALUE_EXT 0x200B
|
||||
#define WGL_SHARE_DEPTH_EXT 0x200C
|
||||
#define WGL_SHARE_STENCIL_EXT 0x200D
|
||||
#define WGL_SHARE_ACCUM_EXT 0x200E
|
||||
#define WGL_SUPPORT_GDI_EXT 0x200F
|
||||
#define WGL_SUPPORT_OPENGL_EXT 0x2010
|
||||
#define WGL_DOUBLE_BUFFER_EXT 0x2011
|
||||
#define WGL_STEREO_EXT 0x2012
|
||||
#define WGL_PIXEL_TYPE_EXT 0x2013
|
||||
#define WGL_COLOR_BITS_EXT 0x2014
|
||||
#define WGL_RED_BITS_EXT 0x2015
|
||||
#define WGL_RED_SHIFT_EXT 0x2016
|
||||
#define WGL_GREEN_BITS_EXT 0x2017
|
||||
#define WGL_GREEN_SHIFT_EXT 0x2018
|
||||
#define WGL_BLUE_BITS_EXT 0x2019
|
||||
#define WGL_BLUE_SHIFT_EXT 0x201A
|
||||
#define WGL_ALPHA_BITS_EXT 0x201B
|
||||
#define WGL_ALPHA_SHIFT_EXT 0x201C
|
||||
#define WGL_ACCUM_BITS_EXT 0x201D
|
||||
#define WGL_ACCUM_RED_BITS_EXT 0x201E
|
||||
#define WGL_ACCUM_GREEN_BITS_EXT 0x201F
|
||||
#define WGL_ACCUM_BLUE_BITS_EXT 0x2020
|
||||
#define WGL_ACCUM_ALPHA_BITS_EXT 0x2021
|
||||
#define WGL_DEPTH_BITS_EXT 0x2022
|
||||
#define WGL_STENCIL_BITS_EXT 0x2023
|
||||
#define WGL_AUX_BUFFERS_EXT 0x2024
|
||||
#define WGL_NO_ACCELERATION_EXT 0x2025
|
||||
#define WGL_GENERIC_ACCELERATION_EXT 0x2026
|
||||
#define WGL_FULL_ACCELERATION_EXT 0x2027
|
||||
#define WGL_SWAP_EXCHANGE_EXT 0x2028
|
||||
#define WGL_SWAP_COPY_EXT 0x2029
|
||||
#define WGL_SWAP_UNDEFINED_EXT 0x202A
|
||||
#define WGL_TYPE_RGBA_EXT 0x202B
|
||||
#define WGL_TYPE_COLORINDEX_EXT 0x202C
|
||||
#endif
|
||||
|
||||
#ifndef WGL_EXT_pbuffer
|
||||
#define WGL_DRAW_TO_PBUFFER_EXT 0x202D
|
||||
#define WGL_MAX_PBUFFER_PIXELS_EXT 0x202E
|
||||
#define WGL_MAX_PBUFFER_WIDTH_EXT 0x202F
|
||||
#define WGL_MAX_PBUFFER_HEIGHT_EXT 0x2030
|
||||
#define WGL_OPTIMAL_PBUFFER_WIDTH_EXT 0x2031
|
||||
#define WGL_OPTIMAL_PBUFFER_HEIGHT_EXT 0x2032
|
||||
#define WGL_PBUFFER_LARGEST_EXT 0x2033
|
||||
#define WGL_PBUFFER_WIDTH_EXT 0x2034
|
||||
#define WGL_PBUFFER_HEIGHT_EXT 0x2035
|
||||
#endif
|
||||
|
||||
#ifndef WGL_EXT_depth_float
|
||||
#define WGL_DEPTH_FLOAT_EXT 0x2040
|
||||
#endif
|
||||
|
||||
#ifndef WGL_3DFX_multisample
|
||||
#define WGL_SAMPLE_BUFFERS_3DFX 0x2060
|
||||
#define WGL_SAMPLES_3DFX 0x2061
|
||||
#endif
|
||||
|
||||
#ifndef WGL_EXT_multisample
|
||||
#define WGL_SAMPLE_BUFFERS_EXT 0x2041
|
||||
#define WGL_SAMPLES_EXT 0x2042
|
||||
#endif
|
||||
|
||||
#ifndef WGL_I3D_digital_video_control
|
||||
#define WGL_DIGITAL_VIDEO_CURSOR_ALPHA_FRAMEBUFFER_I3D 0x2050
|
||||
#define WGL_DIGITAL_VIDEO_CURSOR_ALPHA_VALUE_I3D 0x2051
|
||||
#define WGL_DIGITAL_VIDEO_CURSOR_INCLUDED_I3D 0x2052
|
||||
#define WGL_DIGITAL_VIDEO_GAMMA_CORRECTED_I3D 0x2053
|
||||
#endif
|
||||
|
||||
#ifndef WGL_I3D_gamma
|
||||
#define WGL_GAMMA_TABLE_SIZE_I3D 0x204E
|
||||
#define WGL_GAMMA_EXCLUDE_DESKTOP_I3D 0x204F
|
||||
#endif
|
||||
|
||||
#ifndef WGL_I3D_genlock
|
||||
#define WGL_GENLOCK_SOURCE_MULTIVIEW_I3D 0x2044
|
||||
#define WGL_GENLOCK_SOURCE_EXTENAL_SYNC_I3D 0x2045
|
||||
#define WGL_GENLOCK_SOURCE_EXTENAL_FIELD_I3D 0x2046
|
||||
#define WGL_GENLOCK_SOURCE_EXTENAL_TTL_I3D 0x2047
|
||||
#define WGL_GENLOCK_SOURCE_DIGITAL_SYNC_I3D 0x2048
|
||||
#define WGL_GENLOCK_SOURCE_DIGITAL_FIELD_I3D 0x2049
|
||||
#define WGL_GENLOCK_SOURCE_EDGE_FALLING_I3D 0x204A
|
||||
#define WGL_GENLOCK_SOURCE_EDGE_RISING_I3D 0x204B
|
||||
#define WGL_GENLOCK_SOURCE_EDGE_BOTH_I3D 0x204C
|
||||
#endif
|
||||
|
||||
#ifndef WGL_I3D_image_buffer
|
||||
#define WGL_IMAGE_BUFFER_MIN_ACCESS_I3D 0x00000001
|
||||
#define WGL_IMAGE_BUFFER_LOCK_I3D 0x00000002
|
||||
#endif
|
||||
|
||||
#ifndef WGL_I3D_swap_frame_lock
|
||||
#endif
|
||||
|
||||
#ifndef WGL_NV_render_depth_texture
|
||||
#define WGL_BIND_TO_TEXTURE_DEPTH_NV 0x20A3
|
||||
#define WGL_BIND_TO_TEXTURE_RECTANGLE_DEPTH_NV 0x20A4
|
||||
#define WGL_DEPTH_TEXTURE_FORMAT_NV 0x20A5
|
||||
#define WGL_TEXTURE_DEPTH_COMPONENT_NV 0x20A6
|
||||
#define WGL_DEPTH_COMPONENT_NV 0x20A7
|
||||
#endif
|
||||
|
||||
#ifndef WGL_NV_render_texture_rectangle
|
||||
#define WGL_BIND_TO_TEXTURE_RECTANGLE_RGB_NV 0x20A0
|
||||
#define WGL_BIND_TO_TEXTURE_RECTANGLE_RGBA_NV 0x20A1
|
||||
#define WGL_TEXTURE_RECTANGLE_NV 0x20A2
|
||||
#endif
|
||||
|
||||
#ifndef WGL_ATI_pixel_format_float
|
||||
#define WGL_TYPE_RGBA_FLOAT_ATI 0x21A0
|
||||
#endif
|
||||
|
||||
#ifndef WGL_NV_float_buffer
|
||||
#define WGL_FLOAT_COMPONENTS_NV 0x20B0
|
||||
#define WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_R_NV 0x20B1
|
||||
#define WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RG_NV 0x20B2
|
||||
#define WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RGB_NV 0x20B3
|
||||
#define WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RGBA_NV 0x20B4
|
||||
#define WGL_TEXTURE_FLOAT_R_NV 0x20B5
|
||||
#define WGL_TEXTURE_FLOAT_RG_NV 0x20B6
|
||||
#define WGL_TEXTURE_FLOAT_RGB_NV 0x20B7
|
||||
#define WGL_TEXTURE_FLOAT_RGBA_NV 0x20B8
|
||||
#endif
|
||||
|
||||
#ifndef WGL_3DL_stereo_control
|
||||
#define WGL_STEREO_EMITTER_ENABLE_3DL 0x2055
|
||||
#define WGL_STEREO_EMITTER_DISABLE_3DL 0x2056
|
||||
#define WGL_STEREO_POLARITY_NORMAL_3DL 0x2057
|
||||
#define WGL_STEREO_POLARITY_INVERT_3DL 0x2058
|
||||
#endif
|
||||
|
||||
#ifndef WGL_EXT_pixel_format_packed_float
|
||||
#define WGL_TYPE_RGBA_UNSIGNED_FLOAT_EXT 0x20A8
|
||||
#endif
|
||||
|
||||
#ifndef WGL_EXT_framebuffer_sRGB
|
||||
#define WGL_FRAMEBUFFER_SRGB_CAPABLE_EXT 0x20A9
|
||||
#endif
|
||||
|
||||
#ifndef WGL_NV_present_video
|
||||
#define WGL_NUM_VIDEO_SLOTS_NV 0x20F0
|
||||
#endif
|
||||
|
||||
#ifndef WGL_NV_video_out
|
||||
#define WGL_BIND_TO_VIDEO_RGB_NV 0x20C0
|
||||
#define WGL_BIND_TO_VIDEO_RGBA_NV 0x20C1
|
||||
#define WGL_BIND_TO_VIDEO_RGB_AND_DEPTH_NV 0x20C2
|
||||
#define WGL_VIDEO_OUT_COLOR_NV 0x20C3
|
||||
#define WGL_VIDEO_OUT_ALPHA_NV 0x20C4
|
||||
#define WGL_VIDEO_OUT_DEPTH_NV 0x20C5
|
||||
#define WGL_VIDEO_OUT_COLOR_AND_ALPHA_NV 0x20C6
|
||||
#define WGL_VIDEO_OUT_COLOR_AND_DEPTH_NV 0x20C7
|
||||
#define WGL_VIDEO_OUT_FRAME 0x20C8
|
||||
#define WGL_VIDEO_OUT_FIELD_1 0x20C9
|
||||
#define WGL_VIDEO_OUT_FIELD_2 0x20CA
|
||||
#define WGL_VIDEO_OUT_STACKED_FIELDS_1_2 0x20CB
|
||||
#define WGL_VIDEO_OUT_STACKED_FIELDS_2_1 0x20CC
|
||||
#endif
|
||||
|
||||
#ifndef WGL_NV_swap_group
|
||||
#endif
|
||||
|
||||
#ifndef WGL_NV_gpu_affinity
|
||||
#define WGL_ERROR_INCOMPATIBLE_AFFINITY_MASKS_NV 0x20D0
|
||||
#define WGL_ERROR_MISSING_AFFINITY_MASK_NV 0x20D1
|
||||
#endif
|
||||
|
||||
#ifndef WGL_AMD_gpu_association
|
||||
#define WGL_GPU_VENDOR_AMD 0x1F00
|
||||
#define WGL_GPU_RENDERER_STRING_AMD 0x1F01
|
||||
#define WGL_GPU_OPENGL_VERSION_STRING_AMD 0x1F02
|
||||
#define WGL_GPU_FASTEST_TARGET_GPUS_AMD 0x21A2
|
||||
#define WGL_GPU_RAM_AMD 0x21A3
|
||||
#define WGL_GPU_CLOCK_AMD 0x21A4
|
||||
#define WGL_GPU_NUM_PIPES_AMD 0x21A5
|
||||
#define WGL_GPU_NUM_SIMD_AMD 0x21A6
|
||||
#define WGL_GPU_NUM_RB_AMD 0x21A7
|
||||
#define WGL_GPU_NUM_SPI_AMD 0x21A8
|
||||
#endif
|
||||
|
||||
#ifndef WGL_NV_video_capture
|
||||
#define WGL_UNIQUE_ID_NV 0x20CE
|
||||
#define WGL_NUM_VIDEO_CAPTURE_SLOTS_NV 0x20CF
|
||||
#endif
|
||||
|
||||
#ifndef WGL_NV_copy_image
|
||||
#endif
|
||||
|
||||
#ifndef WGL_NV_multisample_coverage
|
||||
#define WGL_COVERAGE_SAMPLES_NV 0x2042
|
||||
#define WGL_COLOR_SAMPLES_NV 0x20B9
|
||||
#endif
|
||||
|
||||
#ifndef WGL_EXT_create_context_es2_profile
|
||||
#define WGL_CONTEXT_ES2_PROFILE_BIT_EXT 0x00000004
|
||||
#endif
|
||||
|
||||
#ifndef WGL_NV_DX_interop
|
||||
#define WGL_ACCESS_READ_ONLY_NV 0x00000000
|
||||
#define WGL_ACCESS_READ_WRITE_NV 0x00000001
|
||||
#define WGL_ACCESS_WRITE_DISCARD_NV 0x00000002
|
||||
#endif
|
||||
|
||||
#ifndef WGL_NV_DX_interop2
|
||||
#endif
|
||||
|
||||
#ifndef WGL_EXT_swap_control_tear
|
||||
#endif
|
||||
|
||||
|
||||
/*************************************************************/
|
||||
|
||||
#ifndef WGL_ARB_pbuffer
|
||||
DECLARE_HANDLE(HPBUFFERARB);
|
||||
#endif
|
||||
#ifndef WGL_EXT_pbuffer
|
||||
DECLARE_HANDLE(HPBUFFEREXT);
|
||||
#endif
|
||||
#ifndef WGL_NV_present_video
|
||||
DECLARE_HANDLE(HVIDEOOUTPUTDEVICENV);
|
||||
#endif
|
||||
#ifndef WGL_NV_video_output
|
||||
DECLARE_HANDLE(HPVIDEODEV);
|
||||
#endif
|
||||
#ifndef WGL_NV_gpu_affinity
|
||||
DECLARE_HANDLE(HPGPUNV);
|
||||
DECLARE_HANDLE(HGPUNV);
|
||||
|
||||
typedef struct _GPU_DEVICE {
|
||||
DWORD cb;
|
||||
CHAR DeviceName[32];
|
||||
CHAR DeviceString[128];
|
||||
DWORD Flags;
|
||||
RECT rcVirtualScreen;
|
||||
} GPU_DEVICE, *PGPU_DEVICE;
|
||||
#endif
|
||||
#ifndef WGL_NV_video_capture
|
||||
DECLARE_HANDLE(HVIDEOINPUTDEVICENV);
|
||||
#endif
|
||||
|
||||
#ifndef WGL_ARB_buffer_region
|
||||
#define WGL_ARB_buffer_region 1
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
extern HANDLE WINAPI wglCreateBufferRegionARB (HDC hDC, int iLayerPlane, UINT uType);
|
||||
extern VOID WINAPI wglDeleteBufferRegionARB (HANDLE hRegion);
|
||||
extern BOOL WINAPI wglSaveBufferRegionARB (HANDLE hRegion, int x, int y, int width, int height);
|
||||
extern BOOL WINAPI wglRestoreBufferRegionARB (HANDLE hRegion, int x, int y, int width, int height, int xSrc, int ySrc);
|
||||
#endif /* WGL_WGLEXT_PROTOTYPES */
|
||||
typedef HANDLE (WINAPI * PFNWGLCREATEBUFFERREGIONARBPROC) (HDC hDC, int iLayerPlane, UINT uType);
|
||||
typedef VOID (WINAPI * PFNWGLDELETEBUFFERREGIONARBPROC) (HANDLE hRegion);
|
||||
typedef BOOL (WINAPI * PFNWGLSAVEBUFFERREGIONARBPROC) (HANDLE hRegion, int x, int y, int width, int height);
|
||||
typedef BOOL (WINAPI * PFNWGLRESTOREBUFFERREGIONARBPROC) (HANDLE hRegion, int x, int y, int width, int height, int xSrc, int ySrc);
|
||||
#endif
|
||||
|
||||
#ifndef WGL_ARB_multisample
|
||||
#define WGL_ARB_multisample 1
|
||||
#endif
|
||||
|
||||
#ifndef WGL_ARB_extensions_string
|
||||
#define WGL_ARB_extensions_string 1
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
extern const char * WINAPI wglGetExtensionsStringARB (HDC hdc);
|
||||
#endif /* WGL_WGLEXT_PROTOTYPES */
|
||||
typedef const char * (WINAPI * PFNWGLGETEXTENSIONSSTRINGARBPROC) (HDC hdc);
|
||||
#endif
|
||||
|
||||
#ifndef WGL_ARB_pixel_format
|
||||
#define WGL_ARB_pixel_format 1
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
extern BOOL WINAPI wglGetPixelFormatAttribivARB (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, const int *piAttributes, int *piValues);
|
||||
extern BOOL WINAPI wglGetPixelFormatAttribfvARB (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, const int *piAttributes, FLOAT *pfValues);
|
||||
extern BOOL WINAPI wglChoosePixelFormatARB (HDC hdc, const int *piAttribIList, const FLOAT *pfAttribFList, UINT nMaxFormats, int *piFormats, UINT *nNumFormats);
|
||||
#endif /* WGL_WGLEXT_PROTOTYPES */
|
||||
typedef BOOL (WINAPI * PFNWGLGETPIXELFORMATATTRIBIVARBPROC) (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, const int *piAttributes, int *piValues);
|
||||
typedef BOOL (WINAPI * PFNWGLGETPIXELFORMATATTRIBFVARBPROC) (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, const int *piAttributes, FLOAT *pfValues);
|
||||
typedef BOOL (WINAPI * PFNWGLCHOOSEPIXELFORMATARBPROC) (HDC hdc, const int *piAttribIList, const FLOAT *pfAttribFList, UINT nMaxFormats, int *piFormats, UINT *nNumFormats);
|
||||
#endif
|
||||
|
||||
#ifndef WGL_ARB_make_current_read
|
||||
#define WGL_ARB_make_current_read 1
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
extern BOOL WINAPI wglMakeContextCurrentARB (HDC hDrawDC, HDC hReadDC, HGLRC hglrc);
|
||||
extern HDC WINAPI wglGetCurrentReadDCARB (void);
|
||||
#endif /* WGL_WGLEXT_PROTOTYPES */
|
||||
typedef BOOL (WINAPI * PFNWGLMAKECONTEXTCURRENTARBPROC) (HDC hDrawDC, HDC hReadDC, HGLRC hglrc);
|
||||
typedef HDC (WINAPI * PFNWGLGETCURRENTREADDCARBPROC) (void);
|
||||
#endif
|
||||
|
||||
#ifndef WGL_ARB_pbuffer
|
||||
#define WGL_ARB_pbuffer 1
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
extern HPBUFFERARB WINAPI wglCreatePbufferARB (HDC hDC, int iPixelFormat, int iWidth, int iHeight, const int *piAttribList);
|
||||
extern HDC WINAPI wglGetPbufferDCARB (HPBUFFERARB hPbuffer);
|
||||
extern int WINAPI wglReleasePbufferDCARB (HPBUFFERARB hPbuffer, HDC hDC);
|
||||
extern BOOL WINAPI wglDestroyPbufferARB (HPBUFFERARB hPbuffer);
|
||||
extern BOOL WINAPI wglQueryPbufferARB (HPBUFFERARB hPbuffer, int iAttribute, int *piValue);
|
||||
#endif /* WGL_WGLEXT_PROTOTYPES */
|
||||
typedef HPBUFFERARB (WINAPI * PFNWGLCREATEPBUFFERARBPROC) (HDC hDC, int iPixelFormat, int iWidth, int iHeight, const int *piAttribList);
|
||||
typedef HDC (WINAPI * PFNWGLGETPBUFFERDCARBPROC) (HPBUFFERARB hPbuffer);
|
||||
typedef int (WINAPI * PFNWGLRELEASEPBUFFERDCARBPROC) (HPBUFFERARB hPbuffer, HDC hDC);
|
||||
typedef BOOL (WINAPI * PFNWGLDESTROYPBUFFERARBPROC) (HPBUFFERARB hPbuffer);
|
||||
typedef BOOL (WINAPI * PFNWGLQUERYPBUFFERARBPROC) (HPBUFFERARB hPbuffer, int iAttribute, int *piValue);
|
||||
#endif
|
||||
|
||||
#ifndef WGL_ARB_render_texture
|
||||
#define WGL_ARB_render_texture 1
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
extern BOOL WINAPI wglBindTexImageARB (HPBUFFERARB hPbuffer, int iBuffer);
|
||||
extern BOOL WINAPI wglReleaseTexImageARB (HPBUFFERARB hPbuffer, int iBuffer);
|
||||
extern BOOL WINAPI wglSetPbufferAttribARB (HPBUFFERARB hPbuffer, const int *piAttribList);
|
||||
#endif /* WGL_WGLEXT_PROTOTYPES */
|
||||
typedef BOOL (WINAPI * PFNWGLBINDTEXIMAGEARBPROC) (HPBUFFERARB hPbuffer, int iBuffer);
|
||||
typedef BOOL (WINAPI * PFNWGLRELEASETEXIMAGEARBPROC) (HPBUFFERARB hPbuffer, int iBuffer);
|
||||
typedef BOOL (WINAPI * PFNWGLSETPBUFFERATTRIBARBPROC) (HPBUFFERARB hPbuffer, const int *piAttribList);
|
||||
#endif
|
||||
|
||||
#ifndef WGL_ARB_pixel_format_float
|
||||
#define WGL_ARB_pixel_format_float 1
|
||||
#endif
|
||||
|
||||
#ifndef WGL_ARB_framebuffer_sRGB
|
||||
#define WGL_ARB_framebuffer_sRGB 1
|
||||
#endif
|
||||
|
||||
#ifndef WGL_ARB_create_context
|
||||
#define WGL_ARB_create_context 1
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
extern HGLRC WINAPI wglCreateContextAttribsARB (HDC hDC, HGLRC hShareContext, const int *attribList);
|
||||
#endif /* WGL_WGLEXT_PROTOTYPES */
|
||||
typedef HGLRC (WINAPI * PFNWGLCREATECONTEXTATTRIBSARBPROC) (HDC hDC, HGLRC hShareContext, const int *attribList);
|
||||
#endif
|
||||
|
||||
#ifndef WGL_ARB_create_context_profile
|
||||
#define WGL_ARB_create_context_profile 1
|
||||
#endif
|
||||
|
||||
#ifndef WGL_ARB_create_context_robustness
|
||||
#define WGL_ARB_create_context_robustness 1
|
||||
#endif
|
||||
|
||||
#ifndef WGL_EXT_display_color_table
|
||||
#define WGL_EXT_display_color_table 1
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
extern GLboolean WINAPI wglCreateDisplayColorTableEXT (GLushort id);
|
||||
extern GLboolean WINAPI wglLoadDisplayColorTableEXT (const GLushort *table, GLuint length);
|
||||
extern GLboolean WINAPI wglBindDisplayColorTableEXT (GLushort id);
|
||||
extern VOID WINAPI wglDestroyDisplayColorTableEXT (GLushort id);
|
||||
#endif /* WGL_WGLEXT_PROTOTYPES */
|
||||
typedef GLboolean (WINAPI * PFNWGLCREATEDISPLAYCOLORTABLEEXTPROC) (GLushort id);
|
||||
typedef GLboolean (WINAPI * PFNWGLLOADDISPLAYCOLORTABLEEXTPROC) (const GLushort *table, GLuint length);
|
||||
typedef GLboolean (WINAPI * PFNWGLBINDDISPLAYCOLORTABLEEXTPROC) (GLushort id);
|
||||
typedef VOID (WINAPI * PFNWGLDESTROYDISPLAYCOLORTABLEEXTPROC) (GLushort id);
|
||||
#endif
|
||||
|
||||
#ifndef WGL_EXT_extensions_string
|
||||
#define WGL_EXT_extensions_string 1
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
extern const char * WINAPI wglGetExtensionsStringEXT (void);
|
||||
#endif /* WGL_WGLEXT_PROTOTYPES */
|
||||
typedef const char * (WINAPI * PFNWGLGETEXTENSIONSSTRINGEXTPROC) (void);
|
||||
#endif
|
||||
|
||||
#ifndef WGL_EXT_make_current_read
|
||||
#define WGL_EXT_make_current_read 1
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
extern BOOL WINAPI wglMakeContextCurrentEXT (HDC hDrawDC, HDC hReadDC, HGLRC hglrc);
|
||||
extern HDC WINAPI wglGetCurrentReadDCEXT (void);
|
||||
#endif /* WGL_WGLEXT_PROTOTYPES */
|
||||
typedef BOOL (WINAPI * PFNWGLMAKECONTEXTCURRENTEXTPROC) (HDC hDrawDC, HDC hReadDC, HGLRC hglrc);
|
||||
typedef HDC (WINAPI * PFNWGLGETCURRENTREADDCEXTPROC) (void);
|
||||
#endif
|
||||
|
||||
#ifndef WGL_EXT_pbuffer
|
||||
#define WGL_EXT_pbuffer 1
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
extern HPBUFFEREXT WINAPI wglCreatePbufferEXT (HDC hDC, int iPixelFormat, int iWidth, int iHeight, const int *piAttribList);
|
||||
extern HDC WINAPI wglGetPbufferDCEXT (HPBUFFEREXT hPbuffer);
|
||||
extern int WINAPI wglReleasePbufferDCEXT (HPBUFFEREXT hPbuffer, HDC hDC);
|
||||
extern BOOL WINAPI wglDestroyPbufferEXT (HPBUFFEREXT hPbuffer);
|
||||
extern BOOL WINAPI wglQueryPbufferEXT (HPBUFFEREXT hPbuffer, int iAttribute, int *piValue);
|
||||
#endif /* WGL_WGLEXT_PROTOTYPES */
|
||||
typedef HPBUFFEREXT (WINAPI * PFNWGLCREATEPBUFFEREXTPROC) (HDC hDC, int iPixelFormat, int iWidth, int iHeight, const int *piAttribList);
|
||||
typedef HDC (WINAPI * PFNWGLGETPBUFFERDCEXTPROC) (HPBUFFEREXT hPbuffer);
|
||||
typedef int (WINAPI * PFNWGLRELEASEPBUFFERDCEXTPROC) (HPBUFFEREXT hPbuffer, HDC hDC);
|
||||
typedef BOOL (WINAPI * PFNWGLDESTROYPBUFFEREXTPROC) (HPBUFFEREXT hPbuffer);
|
||||
typedef BOOL (WINAPI * PFNWGLQUERYPBUFFEREXTPROC) (HPBUFFEREXT hPbuffer, int iAttribute, int *piValue);
|
||||
#endif
|
||||
|
||||
#ifndef WGL_EXT_pixel_format
|
||||
#define WGL_EXT_pixel_format 1
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
extern BOOL WINAPI wglGetPixelFormatAttribivEXT (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, int *piAttributes, int *piValues);
|
||||
extern BOOL WINAPI wglGetPixelFormatAttribfvEXT (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, int *piAttributes, FLOAT *pfValues);
|
||||
extern BOOL WINAPI wglChoosePixelFormatEXT (HDC hdc, const int *piAttribIList, const FLOAT *pfAttribFList, UINT nMaxFormats, int *piFormats, UINT *nNumFormats);
|
||||
#endif /* WGL_WGLEXT_PROTOTYPES */
|
||||
typedef BOOL (WINAPI * PFNWGLGETPIXELFORMATATTRIBIVEXTPROC) (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, int *piAttributes, int *piValues);
|
||||
typedef BOOL (WINAPI * PFNWGLGETPIXELFORMATATTRIBFVEXTPROC) (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, int *piAttributes, FLOAT *pfValues);
|
||||
typedef BOOL (WINAPI * PFNWGLCHOOSEPIXELFORMATEXTPROC) (HDC hdc, const int *piAttribIList, const FLOAT *pfAttribFList, UINT nMaxFormats, int *piFormats, UINT *nNumFormats);
|
||||
#endif
|
||||
|
||||
#ifndef WGL_EXT_swap_control
|
||||
#define WGL_EXT_swap_control 1
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
extern BOOL WINAPI wglSwapIntervalEXT (int interval);
|
||||
extern int WINAPI wglGetSwapIntervalEXT (void);
|
||||
#endif /* WGL_WGLEXT_PROTOTYPES */
|
||||
typedef BOOL (WINAPI * PFNWGLSWAPINTERVALEXTPROC) (int interval);
|
||||
typedef int (WINAPI * PFNWGLGETSWAPINTERVALEXTPROC) (void);
|
||||
#endif
|
||||
|
||||
#ifndef WGL_EXT_depth_float
|
||||
#define WGL_EXT_depth_float 1
|
||||
#endif
|
||||
|
||||
#ifndef WGL_NV_vertex_array_range
|
||||
#define WGL_NV_vertex_array_range 1
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
extern void* WINAPI wglAllocateMemoryNV (GLsizei size, GLfloat readfreq, GLfloat writefreq, GLfloat priority);
|
||||
extern void WINAPI wglFreeMemoryNV (void *pointer);
|
||||
#endif /* WGL_WGLEXT_PROTOTYPES */
|
||||
typedef void* (WINAPI * PFNWGLALLOCATEMEMORYNVPROC) (GLsizei size, GLfloat readfreq, GLfloat writefreq, GLfloat priority);
|
||||
typedef void (WINAPI * PFNWGLFREEMEMORYNVPROC) (void *pointer);
|
||||
#endif
|
||||
|
||||
#ifndef WGL_3DFX_multisample
|
||||
#define WGL_3DFX_multisample 1
|
||||
#endif
|
||||
|
||||
#ifndef WGL_EXT_multisample
|
||||
#define WGL_EXT_multisample 1
|
||||
#endif
|
||||
|
||||
#ifndef WGL_OML_sync_control
|
||||
#define WGL_OML_sync_control 1
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
extern BOOL WINAPI wglGetSyncValuesOML (HDC hdc, INT64 *ust, INT64 *msc, INT64 *sbc);
|
||||
extern BOOL WINAPI wglGetMscRateOML (HDC hdc, INT32 *numerator, INT32 *denominator);
|
||||
extern INT64 WINAPI wglSwapBuffersMscOML (HDC hdc, INT64 target_msc, INT64 divisor, INT64 remainder);
|
||||
extern INT64 WINAPI wglSwapLayerBuffersMscOML (HDC hdc, int fuPlanes, INT64 target_msc, INT64 divisor, INT64 remainder);
|
||||
extern BOOL WINAPI wglWaitForMscOML (HDC hdc, INT64 target_msc, INT64 divisor, INT64 remainder, INT64 *ust, INT64 *msc, INT64 *sbc);
|
||||
extern BOOL WINAPI wglWaitForSbcOML (HDC hdc, INT64 target_sbc, INT64 *ust, INT64 *msc, INT64 *sbc);
|
||||
#endif /* WGL_WGLEXT_PROTOTYPES */
|
||||
typedef BOOL (WINAPI * PFNWGLGETSYNCVALUESOMLPROC) (HDC hdc, INT64 *ust, INT64 *msc, INT64 *sbc);
|
||||
typedef BOOL (WINAPI * PFNWGLGETMSCRATEOMLPROC) (HDC hdc, INT32 *numerator, INT32 *denominator);
|
||||
typedef INT64 (WINAPI * PFNWGLSWAPBUFFERSMSCOMLPROC) (HDC hdc, INT64 target_msc, INT64 divisor, INT64 remainder);
|
||||
typedef INT64 (WINAPI * PFNWGLSWAPLAYERBUFFERSMSCOMLPROC) (HDC hdc, int fuPlanes, INT64 target_msc, INT64 divisor, INT64 remainder);
|
||||
typedef BOOL (WINAPI * PFNWGLWAITFORMSCOMLPROC) (HDC hdc, INT64 target_msc, INT64 divisor, INT64 remainder, INT64 *ust, INT64 *msc, INT64 *sbc);
|
||||
typedef BOOL (WINAPI * PFNWGLWAITFORSBCOMLPROC) (HDC hdc, INT64 target_sbc, INT64 *ust, INT64 *msc, INT64 *sbc);
|
||||
#endif
|
||||
|
||||
#ifndef WGL_I3D_digital_video_control
|
||||
#define WGL_I3D_digital_video_control 1
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
extern BOOL WINAPI wglGetDigitalVideoParametersI3D (HDC hDC, int iAttribute, int *piValue);
|
||||
extern BOOL WINAPI wglSetDigitalVideoParametersI3D (HDC hDC, int iAttribute, const int *piValue);
|
||||
#endif /* WGL_WGLEXT_PROTOTYPES */
|
||||
typedef BOOL (WINAPI * PFNWGLGETDIGITALVIDEOPARAMETERSI3DPROC) (HDC hDC, int iAttribute, int *piValue);
|
||||
typedef BOOL (WINAPI * PFNWGLSETDIGITALVIDEOPARAMETERSI3DPROC) (HDC hDC, int iAttribute, const int *piValue);
|
||||
#endif
|
||||
|
||||
#ifndef WGL_I3D_gamma
|
||||
#define WGL_I3D_gamma 1
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
extern BOOL WINAPI wglGetGammaTableParametersI3D (HDC hDC, int iAttribute, int *piValue);
|
||||
extern BOOL WINAPI wglSetGammaTableParametersI3D (HDC hDC, int iAttribute, const int *piValue);
|
||||
extern BOOL WINAPI wglGetGammaTableI3D (HDC hDC, int iEntries, USHORT *puRed, USHORT *puGreen, USHORT *puBlue);
|
||||
extern BOOL WINAPI wglSetGammaTableI3D (HDC hDC, int iEntries, const USHORT *puRed, const USHORT *puGreen, const USHORT *puBlue);
|
||||
#endif /* WGL_WGLEXT_PROTOTYPES */
|
||||
typedef BOOL (WINAPI * PFNWGLGETGAMMATABLEPARAMETERSI3DPROC) (HDC hDC, int iAttribute, int *piValue);
|
||||
typedef BOOL (WINAPI * PFNWGLSETGAMMATABLEPARAMETERSI3DPROC) (HDC hDC, int iAttribute, const int *piValue);
|
||||
typedef BOOL (WINAPI * PFNWGLGETGAMMATABLEI3DPROC) (HDC hDC, int iEntries, USHORT *puRed, USHORT *puGreen, USHORT *puBlue);
|
||||
typedef BOOL (WINAPI * PFNWGLSETGAMMATABLEI3DPROC) (HDC hDC, int iEntries, const USHORT *puRed, const USHORT *puGreen, const USHORT *puBlue);
|
||||
#endif
|
||||
|
||||
#ifndef WGL_I3D_genlock
|
||||
#define WGL_I3D_genlock 1
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
extern BOOL WINAPI wglEnableGenlockI3D (HDC hDC);
|
||||
extern BOOL WINAPI wglDisableGenlockI3D (HDC hDC);
|
||||
extern BOOL WINAPI wglIsEnabledGenlockI3D (HDC hDC, BOOL *pFlag);
|
||||
extern BOOL WINAPI wglGenlockSourceI3D (HDC hDC, UINT uSource);
|
||||
extern BOOL WINAPI wglGetGenlockSourceI3D (HDC hDC, UINT *uSource);
|
||||
extern BOOL WINAPI wglGenlockSourceEdgeI3D (HDC hDC, UINT uEdge);
|
||||
extern BOOL WINAPI wglGetGenlockSourceEdgeI3D (HDC hDC, UINT *uEdge);
|
||||
extern BOOL WINAPI wglGenlockSampleRateI3D (HDC hDC, UINT uRate);
|
||||
extern BOOL WINAPI wglGetGenlockSampleRateI3D (HDC hDC, UINT *uRate);
|
||||
extern BOOL WINAPI wglGenlockSourceDelayI3D (HDC hDC, UINT uDelay);
|
||||
extern BOOL WINAPI wglGetGenlockSourceDelayI3D (HDC hDC, UINT *uDelay);
|
||||
extern BOOL WINAPI wglQueryGenlockMaxSourceDelayI3D (HDC hDC, UINT *uMaxLineDelay, UINT *uMaxPixelDelay);
|
||||
#endif /* WGL_WGLEXT_PROTOTYPES */
|
||||
typedef BOOL (WINAPI * PFNWGLENABLEGENLOCKI3DPROC) (HDC hDC);
|
||||
typedef BOOL (WINAPI * PFNWGLDISABLEGENLOCKI3DPROC) (HDC hDC);
|
||||
typedef BOOL (WINAPI * PFNWGLISENABLEDGENLOCKI3DPROC) (HDC hDC, BOOL *pFlag);
|
||||
typedef BOOL (WINAPI * PFNWGLGENLOCKSOURCEI3DPROC) (HDC hDC, UINT uSource);
|
||||
typedef BOOL (WINAPI * PFNWGLGETGENLOCKSOURCEI3DPROC) (HDC hDC, UINT *uSource);
|
||||
typedef BOOL (WINAPI * PFNWGLGENLOCKSOURCEEDGEI3DPROC) (HDC hDC, UINT uEdge);
|
||||
typedef BOOL (WINAPI * PFNWGLGETGENLOCKSOURCEEDGEI3DPROC) (HDC hDC, UINT *uEdge);
|
||||
typedef BOOL (WINAPI * PFNWGLGENLOCKSAMPLERATEI3DPROC) (HDC hDC, UINT uRate);
|
||||
typedef BOOL (WINAPI * PFNWGLGETGENLOCKSAMPLERATEI3DPROC) (HDC hDC, UINT *uRate);
|
||||
typedef BOOL (WINAPI * PFNWGLGENLOCKSOURCEDELAYI3DPROC) (HDC hDC, UINT uDelay);
|
||||
typedef BOOL (WINAPI * PFNWGLGETGENLOCKSOURCEDELAYI3DPROC) (HDC hDC, UINT *uDelay);
|
||||
typedef BOOL (WINAPI * PFNWGLQUERYGENLOCKMAXSOURCEDELAYI3DPROC) (HDC hDC, UINT *uMaxLineDelay, UINT *uMaxPixelDelay);
|
||||
#endif
|
||||
|
||||
#ifndef WGL_I3D_image_buffer
|
||||
#define WGL_I3D_image_buffer 1
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
extern LPVOID WINAPI wglCreateImageBufferI3D (HDC hDC, DWORD dwSize, UINT uFlags);
|
||||
extern BOOL WINAPI wglDestroyImageBufferI3D (HDC hDC, LPVOID pAddress);
|
||||
extern BOOL WINAPI wglAssociateImageBufferEventsI3D (HDC hDC, const HANDLE *pEvent, const LPVOID *pAddress, const DWORD *pSize, UINT count);
|
||||
extern BOOL WINAPI wglReleaseImageBufferEventsI3D (HDC hDC, const LPVOID *pAddress, UINT count);
|
||||
#endif /* WGL_WGLEXT_PROTOTYPES */
|
||||
typedef LPVOID (WINAPI * PFNWGLCREATEIMAGEBUFFERI3DPROC) (HDC hDC, DWORD dwSize, UINT uFlags);
|
||||
typedef BOOL (WINAPI * PFNWGLDESTROYIMAGEBUFFERI3DPROC) (HDC hDC, LPVOID pAddress);
|
||||
typedef BOOL (WINAPI * PFNWGLASSOCIATEIMAGEBUFFEREVENTSI3DPROC) (HDC hDC, const HANDLE *pEvent, const LPVOID *pAddress, const DWORD *pSize, UINT count);
|
||||
typedef BOOL (WINAPI * PFNWGLRELEASEIMAGEBUFFEREVENTSI3DPROC) (HDC hDC, const LPVOID *pAddress, UINT count);
|
||||
#endif
|
||||
|
||||
#ifndef WGL_I3D_swap_frame_lock
|
||||
#define WGL_I3D_swap_frame_lock 1
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
extern BOOL WINAPI wglEnableFrameLockI3D (void);
|
||||
extern BOOL WINAPI wglDisableFrameLockI3D (void);
|
||||
extern BOOL WINAPI wglIsEnabledFrameLockI3D (BOOL *pFlag);
|
||||
extern BOOL WINAPI wglQueryFrameLockMasterI3D (BOOL *pFlag);
|
||||
#endif /* WGL_WGLEXT_PROTOTYPES */
|
||||
typedef BOOL (WINAPI * PFNWGLENABLEFRAMELOCKI3DPROC) (void);
|
||||
typedef BOOL (WINAPI * PFNWGLDISABLEFRAMELOCKI3DPROC) (void);
|
||||
typedef BOOL (WINAPI * PFNWGLISENABLEDFRAMELOCKI3DPROC) (BOOL *pFlag);
|
||||
typedef BOOL (WINAPI * PFNWGLQUERYFRAMELOCKMASTERI3DPROC) (BOOL *pFlag);
|
||||
#endif
|
||||
|
||||
#ifndef WGL_I3D_swap_frame_usage
|
||||
#define WGL_I3D_swap_frame_usage 1
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
extern BOOL WINAPI wglGetFrameUsageI3D (float *pUsage);
|
||||
extern BOOL WINAPI wglBeginFrameTrackingI3D (void);
|
||||
extern BOOL WINAPI wglEndFrameTrackingI3D (void);
|
||||
extern BOOL WINAPI wglQueryFrameTrackingI3D (DWORD *pFrameCount, DWORD *pMissedFrames, float *pLastMissedUsage);
|
||||
#endif /* WGL_WGLEXT_PROTOTYPES */
|
||||
typedef BOOL (WINAPI * PFNWGLGETFRAMEUSAGEI3DPROC) (float *pUsage);
|
||||
typedef BOOL (WINAPI * PFNWGLBEGINFRAMETRACKINGI3DPROC) (void);
|
||||
typedef BOOL (WINAPI * PFNWGLENDFRAMETRACKINGI3DPROC) (void);
|
||||
typedef BOOL (WINAPI * PFNWGLQUERYFRAMETRACKINGI3DPROC) (DWORD *pFrameCount, DWORD *pMissedFrames, float *pLastMissedUsage);
|
||||
#endif
|
||||
|
||||
#ifndef WGL_ATI_pixel_format_float
|
||||
#define WGL_ATI_pixel_format_float 1
|
||||
#endif
|
||||
|
||||
#ifndef WGL_NV_float_buffer
|
||||
#define WGL_NV_float_buffer 1
|
||||
#endif
|
||||
|
||||
#ifndef WGL_3DL_stereo_control
|
||||
#define WGL_3DL_stereo_control 1
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
extern BOOL WINAPI wglSetStereoEmitterState3DL (HDC hDC, UINT uState);
|
||||
#endif /* WGL_WGLEXT_PROTOTYPES */
|
||||
typedef BOOL (WINAPI * PFNWGLSETSTEREOEMITTERSTATE3DLPROC) (HDC hDC, UINT uState);
|
||||
#endif
|
||||
|
||||
#ifndef WGL_EXT_pixel_format_packed_float
|
||||
#define WGL_EXT_pixel_format_packed_float 1
|
||||
#endif
|
||||
|
||||
#ifndef WGL_EXT_framebuffer_sRGB
|
||||
#define WGL_EXT_framebuffer_sRGB 1
|
||||
#endif
|
||||
|
||||
#ifndef WGL_NV_present_video
|
||||
#define WGL_NV_present_video 1
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
extern int WINAPI wglEnumerateVideoDevicesNV (HDC hDC, HVIDEOOUTPUTDEVICENV *phDeviceList);
|
||||
extern BOOL WINAPI wglBindVideoDeviceNV (HDC hDC, unsigned int uVideoSlot, HVIDEOOUTPUTDEVICENV hVideoDevice, const int *piAttribList);
|
||||
extern BOOL WINAPI wglQueryCurrentContextNV (int iAttribute, int *piValue);
|
||||
#endif /* WGL_WGLEXT_PROTOTYPES */
|
||||
typedef int (WINAPI * PFNWGLENUMERATEVIDEODEVICESNVPROC) (HDC hDC, HVIDEOOUTPUTDEVICENV *phDeviceList);
|
||||
typedef BOOL (WINAPI * PFNWGLBINDVIDEODEVICENVPROC) (HDC hDC, unsigned int uVideoSlot, HVIDEOOUTPUTDEVICENV hVideoDevice, const int *piAttribList);
|
||||
typedef BOOL (WINAPI * PFNWGLQUERYCURRENTCONTEXTNVPROC) (int iAttribute, int *piValue);
|
||||
#endif
|
||||
|
||||
#ifndef WGL_NV_video_output
|
||||
#define WGL_NV_video_output 1
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
extern BOOL WINAPI wglGetVideoDeviceNV (HDC hDC, int numDevices, HPVIDEODEV *hVideoDevice);
|
||||
extern BOOL WINAPI wglReleaseVideoDeviceNV (HPVIDEODEV hVideoDevice);
|
||||
extern BOOL WINAPI wglBindVideoImageNV (HPVIDEODEV hVideoDevice, HPBUFFERARB hPbuffer, int iVideoBuffer);
|
||||
extern BOOL WINAPI wglReleaseVideoImageNV (HPBUFFERARB hPbuffer, int iVideoBuffer);
|
||||
extern BOOL WINAPI wglSendPbufferToVideoNV (HPBUFFERARB hPbuffer, int iBufferType, unsigned long *pulCounterPbuffer, BOOL bBlock);
|
||||
extern BOOL WINAPI wglGetVideoInfoNV (HPVIDEODEV hpVideoDevice, unsigned long *pulCounterOutputPbuffer, unsigned long *pulCounterOutputVideo);
|
||||
#endif /* WGL_WGLEXT_PROTOTYPES */
|
||||
typedef BOOL (WINAPI * PFNWGLGETVIDEODEVICENVPROC) (HDC hDC, int numDevices, HPVIDEODEV *hVideoDevice);
|
||||
typedef BOOL (WINAPI * PFNWGLRELEASEVIDEODEVICENVPROC) (HPVIDEODEV hVideoDevice);
|
||||
typedef BOOL (WINAPI * PFNWGLBINDVIDEOIMAGENVPROC) (HPVIDEODEV hVideoDevice, HPBUFFERARB hPbuffer, int iVideoBuffer);
|
||||
typedef BOOL (WINAPI * PFNWGLRELEASEVIDEOIMAGENVPROC) (HPBUFFERARB hPbuffer, int iVideoBuffer);
|
||||
typedef BOOL (WINAPI * PFNWGLSENDPBUFFERTOVIDEONVPROC) (HPBUFFERARB hPbuffer, int iBufferType, unsigned long *pulCounterPbuffer, BOOL bBlock);
|
||||
typedef BOOL (WINAPI * PFNWGLGETVIDEOINFONVPROC) (HPVIDEODEV hpVideoDevice, unsigned long *pulCounterOutputPbuffer, unsigned long *pulCounterOutputVideo);
|
||||
#endif
|
||||
|
||||
#ifndef WGL_NV_swap_group
|
||||
#define WGL_NV_swap_group 1
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
extern BOOL WINAPI wglJoinSwapGroupNV (HDC hDC, GLuint group);
|
||||
extern BOOL WINAPI wglBindSwapBarrierNV (GLuint group, GLuint barrier);
|
||||
extern BOOL WINAPI wglQuerySwapGroupNV (HDC hDC, GLuint *group, GLuint *barrier);
|
||||
extern BOOL WINAPI wglQueryMaxSwapGroupsNV (HDC hDC, GLuint *maxGroups, GLuint *maxBarriers);
|
||||
extern BOOL WINAPI wglQueryFrameCountNV (HDC hDC, GLuint *count);
|
||||
extern BOOL WINAPI wglResetFrameCountNV (HDC hDC);
|
||||
#endif /* WGL_WGLEXT_PROTOTYPES */
|
||||
typedef BOOL (WINAPI * PFNWGLJOINSWAPGROUPNVPROC) (HDC hDC, GLuint group);
|
||||
typedef BOOL (WINAPI * PFNWGLBINDSWAPBARRIERNVPROC) (GLuint group, GLuint barrier);
|
||||
typedef BOOL (WINAPI * PFNWGLQUERYSWAPGROUPNVPROC) (HDC hDC, GLuint *group, GLuint *barrier);
|
||||
typedef BOOL (WINAPI * PFNWGLQUERYMAXSWAPGROUPSNVPROC) (HDC hDC, GLuint *maxGroups, GLuint *maxBarriers);
|
||||
typedef BOOL (WINAPI * PFNWGLQUERYFRAMECOUNTNVPROC) (HDC hDC, GLuint *count);
|
||||
typedef BOOL (WINAPI * PFNWGLRESETFRAMECOUNTNVPROC) (HDC hDC);
|
||||
#endif
|
||||
|
||||
#ifndef WGL_NV_gpu_affinity
|
||||
#define WGL_NV_gpu_affinity 1
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
extern BOOL WINAPI wglEnumGpusNV (UINT iGpuIndex, HGPUNV *phGpu);
|
||||
extern BOOL WINAPI wglEnumGpuDevicesNV (HGPUNV hGpu, UINT iDeviceIndex, PGPU_DEVICE lpGpuDevice);
|
||||
extern HDC WINAPI wglCreateAffinityDCNV (const HGPUNV *phGpuList);
|
||||
extern BOOL WINAPI wglEnumGpusFromAffinityDCNV (HDC hAffinityDC, UINT iGpuIndex, HGPUNV *hGpu);
|
||||
extern BOOL WINAPI wglDeleteDCNV (HDC hdc);
|
||||
#endif /* WGL_WGLEXT_PROTOTYPES */
|
||||
typedef BOOL (WINAPI * PFNWGLENUMGPUSNVPROC) (UINT iGpuIndex, HGPUNV *phGpu);
|
||||
typedef BOOL (WINAPI * PFNWGLENUMGPUDEVICESNVPROC) (HGPUNV hGpu, UINT iDeviceIndex, PGPU_DEVICE lpGpuDevice);
|
||||
typedef HDC (WINAPI * PFNWGLCREATEAFFINITYDCNVPROC) (const HGPUNV *phGpuList);
|
||||
typedef BOOL (WINAPI * PFNWGLENUMGPUSFROMAFFINITYDCNVPROC) (HDC hAffinityDC, UINT iGpuIndex, HGPUNV *hGpu);
|
||||
typedef BOOL (WINAPI * PFNWGLDELETEDCNVPROC) (HDC hdc);
|
||||
#endif
|
||||
|
||||
#ifndef WGL_AMD_gpu_association
|
||||
#define WGL_AMD_gpu_association 1
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
extern UINT WINAPI wglGetGPUIDsAMD (UINT maxCount, UINT *ids);
|
||||
extern INT WINAPI wglGetGPUInfoAMD (UINT id, int property, GLenum dataType, UINT size, void *data);
|
||||
extern UINT WINAPI wglGetContextGPUIDAMD (HGLRC hglrc);
|
||||
extern HGLRC WINAPI wglCreateAssociatedContextAMD (UINT id);
|
||||
extern HGLRC WINAPI wglCreateAssociatedContextAttribsAMD (UINT id, HGLRC hShareContext, const int *attribList);
|
||||
extern BOOL WINAPI wglDeleteAssociatedContextAMD (HGLRC hglrc);
|
||||
extern BOOL WINAPI wglMakeAssociatedContextCurrentAMD (HGLRC hglrc);
|
||||
extern HGLRC WINAPI wglGetCurrentAssociatedContextAMD (void);
|
||||
extern VOID WINAPI wglBlitContextFramebufferAMD (HGLRC dstCtx, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
|
||||
#endif /* WGL_WGLEXT_PROTOTYPES */
|
||||
typedef UINT (WINAPI * PFNWGLGETGPUIDSAMDPROC) (UINT maxCount, UINT *ids);
|
||||
typedef INT (WINAPI * PFNWGLGETGPUINFOAMDPROC) (UINT id, int property, GLenum dataType, UINT size, void *data);
|
||||
typedef UINT (WINAPI * PFNWGLGETCONTEXTGPUIDAMDPROC) (HGLRC hglrc);
|
||||
typedef HGLRC (WINAPI * PFNWGLCREATEASSOCIATEDCONTEXTAMDPROC) (UINT id);
|
||||
typedef HGLRC (WINAPI * PFNWGLCREATEASSOCIATEDCONTEXTATTRIBSAMDPROC) (UINT id, HGLRC hShareContext, const int *attribList);
|
||||
typedef BOOL (WINAPI * PFNWGLDELETEASSOCIATEDCONTEXTAMDPROC) (HGLRC hglrc);
|
||||
typedef BOOL (WINAPI * PFNWGLMAKEASSOCIATEDCONTEXTCURRENTAMDPROC) (HGLRC hglrc);
|
||||
typedef HGLRC (WINAPI * PFNWGLGETCURRENTASSOCIATEDCONTEXTAMDPROC) (void);
|
||||
typedef VOID (WINAPI * PFNWGLBLITCONTEXTFRAMEBUFFERAMDPROC) (HGLRC dstCtx, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
|
||||
#endif
|
||||
|
||||
#ifndef WGL_NV_video_capture
|
||||
#define WGL_NV_video_capture 1
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
extern BOOL WINAPI wglBindVideoCaptureDeviceNV (UINT uVideoSlot, HVIDEOINPUTDEVICENV hDevice);
|
||||
extern UINT WINAPI wglEnumerateVideoCaptureDevicesNV (HDC hDc, HVIDEOINPUTDEVICENV *phDeviceList);
|
||||
extern BOOL WINAPI wglLockVideoCaptureDeviceNV (HDC hDc, HVIDEOINPUTDEVICENV hDevice);
|
||||
extern BOOL WINAPI wglQueryVideoCaptureDeviceNV (HDC hDc, HVIDEOINPUTDEVICENV hDevice, int iAttribute, int *piValue);
|
||||
extern BOOL WINAPI wglReleaseVideoCaptureDeviceNV (HDC hDc, HVIDEOINPUTDEVICENV hDevice);
|
||||
#endif /* WGL_WGLEXT_PROTOTYPES */
|
||||
typedef BOOL (WINAPI * PFNWGLBINDVIDEOCAPTUREDEVICENVPROC) (UINT uVideoSlot, HVIDEOINPUTDEVICENV hDevice);
|
||||
typedef UINT (WINAPI * PFNWGLENUMERATEVIDEOCAPTUREDEVICESNVPROC) (HDC hDc, HVIDEOINPUTDEVICENV *phDeviceList);
|
||||
typedef BOOL (WINAPI * PFNWGLLOCKVIDEOCAPTUREDEVICENVPROC) (HDC hDc, HVIDEOINPUTDEVICENV hDevice);
|
||||
typedef BOOL (WINAPI * PFNWGLQUERYVIDEOCAPTUREDEVICENVPROC) (HDC hDc, HVIDEOINPUTDEVICENV hDevice, int iAttribute, int *piValue);
|
||||
typedef BOOL (WINAPI * PFNWGLRELEASEVIDEOCAPTUREDEVICENVPROC) (HDC hDc, HVIDEOINPUTDEVICENV hDevice);
|
||||
#endif
|
||||
|
||||
#ifndef WGL_NV_copy_image
|
||||
#define WGL_NV_copy_image 1
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
extern BOOL WINAPI wglCopyImageSubDataNV (HGLRC hSrcRC, GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, HGLRC hDstRC, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei width, GLsizei height, GLsizei depth);
|
||||
#endif /* WGL_WGLEXT_PROTOTYPES */
|
||||
typedef BOOL (WINAPI * PFNWGLCOPYIMAGESUBDATANVPROC) (HGLRC hSrcRC, GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, HGLRC hDstRC, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei width, GLsizei height, GLsizei depth);
|
||||
#endif
|
||||
|
||||
#ifndef WGL_NV_multisample_coverage
|
||||
#define WGL_NV_multisample_coverage 1
|
||||
#endif
|
||||
|
||||
#ifndef WGL_NV_DX_interop
|
||||
#define WGL_NV_DX_interop 1
|
||||
#ifdef WGL_WGLEXT_PROTOTYPES
|
||||
extern BOOL WINAPI wglDXSetResourceShareHandleNV (void *dxObject, HANDLE shareHandle);
|
||||
extern HANDLE WINAPI wglDXOpenDeviceNV (void *dxDevice);
|
||||
extern BOOL WINAPI wglDXCloseDeviceNV (HANDLE hDevice);
|
||||
extern HANDLE WINAPI wglDXRegisterObjectNV (HANDLE hDevice, void *dxObject, GLuint name, GLenum type, GLenum access);
|
||||
extern BOOL WINAPI wglDXUnregisterObjectNV (HANDLE hDevice, HANDLE hObject);
|
||||
extern BOOL WINAPI wglDXObjectAccessNV (HANDLE hObject, GLenum access);
|
||||
extern BOOL WINAPI wglDXLockObjectsNV (HANDLE hDevice, GLint count, HANDLE *hObjects);
|
||||
extern BOOL WINAPI wglDXUnlockObjectsNV (HANDLE hDevice, GLint count, HANDLE *hObjects);
|
||||
#endif /* WGL_WGLEXT_PROTOTYPES */
|
||||
typedef BOOL (WINAPI * PFNWGLDXSETRESOURCESHAREHANDLENVPROC) (void *dxObject, HANDLE shareHandle);
|
||||
typedef HANDLE (WINAPI * PFNWGLDXOPENDEVICENVPROC) (void *dxDevice);
|
||||
typedef BOOL (WINAPI * PFNWGLDXCLOSEDEVICENVPROC) (HANDLE hDevice);
|
||||
typedef HANDLE (WINAPI * PFNWGLDXREGISTEROBJECTNVPROC) (HANDLE hDevice, void *dxObject, GLuint name, GLenum type, GLenum access);
|
||||
typedef BOOL (WINAPI * PFNWGLDXUNREGISTEROBJECTNVPROC) (HANDLE hDevice, HANDLE hObject);
|
||||
typedef BOOL (WINAPI * PFNWGLDXOBJECTACCESSNVPROC) (HANDLE hObject, GLenum access);
|
||||
typedef BOOL (WINAPI * PFNWGLDXLOCKOBJECTSNVPROC) (HANDLE hDevice, GLint count, HANDLE *hObjects);
|
||||
typedef BOOL (WINAPI * PFNWGLDXUNLOCKOBJECTSNVPROC) (HANDLE hDevice, GLint count, HANDLE *hObjects);
|
||||
#endif
|
||||
|
||||
#ifndef WGL_NV_DX_interop2
|
||||
#define WGL_NV_DX_interop2 1
|
||||
#endif
|
||||
|
||||
#ifndef WGL_EXT_swap_control_tear
|
||||
#define WGL_EXT_swap_control_tear 1
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user