mirror of
https://github.com/id-Software/DOOM-3-BFG.git
synced 2024-12-02 08:51:57 +00:00
Replaced QGL with GLEW.
This commit is contained in:
parent
99166faf71
commit
ff531907c7
34 changed files with 49102 additions and 16665 deletions
|
@ -651,7 +651,6 @@ set(WIN32_SOURCES
|
|||
sys/win32/win_localuser.cpp
|
||||
sys/win32/win_main.cpp
|
||||
sys/win32/win_net.cpp
|
||||
sys/win32/win_qgl.cpp
|
||||
sys/win32/win_savegame.cpp
|
||||
sys/win32/win_session_local.cpp
|
||||
sys/win32/win_shared.cpp
|
||||
|
@ -906,7 +905,7 @@ set(RBDOOM3_SOURCES
|
|||
${JPEG_INCLUDES} ${JPEG_SOURCES}
|
||||
#${PNG_INCLUDES} ${PNG_SOURCES}
|
||||
${ZLIB_INCLUDES} ${ZLIB_SOURCES}
|
||||
#${GLEW_INCLUDES} ${GLEW_SOURCES}
|
||||
${GLEW_INCLUDES} ${GLEW_SOURCES}
|
||||
#${FREETYPE_SOURCES}
|
||||
${SOUND_INCLUDES} ${SOUND_SOURCES}
|
||||
#${OGGVORBIS_INCLUDES} ${OGGVORBIS_SOURCES}
|
||||
|
@ -921,7 +920,7 @@ set(RBDOOM3_SOURCES
|
|||
)
|
||||
|
||||
add_definitions(-D__DOOM__
|
||||
#-DGLEW_STATIC
|
||||
-DGLEW_STATIC
|
||||
#-DBUILD_FREETYPE
|
||||
#-DFT2_BUILD_LIBRARY
|
||||
)
|
||||
|
@ -943,7 +942,7 @@ include_directories(
|
|||
.
|
||||
#libs/curl/include
|
||||
#libs/openal/include
|
||||
#libs/glew/include
|
||||
libs/glew/include
|
||||
#libs/freetype/include
|
||||
libs/zlib)
|
||||
|
||||
|
|
|
@ -81,7 +81,10 @@ const int MAX_EXPRESSION_OPS = 4096;
|
|||
const int MAX_EXPRESSION_REGISTERS = 4096;
|
||||
|
||||
// renderer
|
||||
#include "../renderer/OpenGL/qgl.h"
|
||||
|
||||
// RB: replaced QGL with GLEW
|
||||
#include "../libs/glew/include/GL/glew.h"
|
||||
// RB end
|
||||
#include "../renderer/Cinematic.h"
|
||||
#include "../renderer/Material.h"
|
||||
#include "../renderer/BufferObject.h"
|
||||
|
|
|
@ -107,7 +107,7 @@ If you have questions concerning this license or the applicable additional terms
|
|||
#pragma warning(disable : 4996) // unsafe string operations
|
||||
#endif // _MSC_VER
|
||||
|
||||
#include <windows.h> // for qgl.h
|
||||
#include <windows.h> // for gl.h
|
||||
|
||||
#elif defined(__linux__)
|
||||
|
||||
|
|
73
neo/libs/glew/LICENSE.txt
Normal file
73
neo/libs/glew/LICENSE.txt
Normal file
|
@ -0,0 +1,73 @@
|
|||
The OpenGL Extension Wrangler Library
|
||||
Copyright (C) 2002-2007, Milan Ikits <milan ikits[]ieee org>
|
||||
Copyright (C) 2002-2007, Marcelo E. Magallon <mmagallo[]debian org>
|
||||
Copyright (C) 2002, Lev Povalahev
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
* The name of the author may be used to endorse or promote products
|
||||
derived from this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
|
||||
THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
|
||||
Mesa 3-D graphics library
|
||||
Version: 7.0
|
||||
|
||||
Copyright (C) 1999-2007 Brian Paul All Rights Reserved.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a
|
||||
copy of this software and associated documentation files (the "Software"),
|
||||
to deal in the Software without restriction, including without limitation
|
||||
the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
and/or sell copies of the Software, and to permit persons to whom the
|
||||
Software is 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 Software.
|
||||
|
||||
THE SOFTWARE IS 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
|
||||
BRIAN PAUL 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
|
||||
Copyright (c) 2007 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.
|
18
neo/libs/glew/README.txt
Normal file
18
neo/libs/glew/README.txt
Normal file
|
@ -0,0 +1,18 @@
|
|||
See doc/index.html for more information.
|
||||
|
||||
If you downloaded the tarball from the GLEW website, you just need to:
|
||||
|
||||
Unix:
|
||||
|
||||
make
|
||||
|
||||
Windows:
|
||||
|
||||
use the project file in build/vc6/
|
||||
|
||||
If you wish to build GLEW from scratch (update the extension data from
|
||||
the net or add your own extension information), you need a Unix
|
||||
environment (including wget, perl, and GNU make). The extension data
|
||||
is regenerated from the top level source directory with:
|
||||
|
||||
make extensions
|
12
neo/libs/glew/TODO.txt
Normal file
12
neo/libs/glew/TODO.txt
Normal file
|
@ -0,0 +1,12 @@
|
|||
Major:
|
||||
- add support for windows mini-client drivers
|
||||
- add windows installer (msi)
|
||||
- separate build of static and shared object files (for mingw and
|
||||
cygwin)
|
||||
- start designing GLEW 2.0
|
||||
|
||||
Minor:
|
||||
- make auto scripts work with text mode cygwin mounts
|
||||
- add support for all SUN, MTX, and OML extensions
|
||||
- make auto/Makefile more robust against auto/core/*~ mistakes
|
||||
- web poll on separating glew, glxew and wglew
|
17132
neo/libs/glew/include/GL/glew.h
Normal file
17132
neo/libs/glew/include/GL/glew.h
Normal file
File diff suppressed because it is too large
Load diff
1637
neo/libs/glew/include/GL/glxew.h
Normal file
1637
neo/libs/glew/include/GL/glxew.h
Normal file
File diff suppressed because it is too large
Load diff
1397
neo/libs/glew/include/GL/wglew.h
Normal file
1397
neo/libs/glew/include/GL/wglew.h
Normal file
File diff suppressed because it is too large
Load diff
16972
neo/libs/glew/src/glew.c
Normal file
16972
neo/libs/glew/src/glew.c
Normal file
File diff suppressed because it is too large
Load diff
9984
neo/libs/glew/src/glewinfo.c
Normal file
9984
neo/libs/glew/src/glewinfo.c
Normal file
File diff suppressed because it is too large
Load diff
1178
neo/libs/glew/src/visualinfo.c
Normal file
1178
neo/libs/glew/src/visualinfo.c
Normal file
File diff suppressed because it is too large
Load diff
|
@ -75,8 +75,8 @@ UnbindBufferObjects
|
|||
*/
|
||||
void UnbindBufferObjects()
|
||||
{
|
||||
qglBindBufferARB( GL_ARRAY_BUFFER_ARB, 0 );
|
||||
qglBindBufferARB( GL_ELEMENT_ARRAY_BUFFER_ARB, 0 );
|
||||
glBindBufferARB( GL_ARRAY_BUFFER_ARB, 0 );
|
||||
glBindBufferARB( GL_ELEMENT_ARRAY_BUFFER_ARB, 0 );
|
||||
}
|
||||
|
||||
|
||||
|
@ -176,21 +176,21 @@ bool idVertexBuffer::AllocBufferObject( const void* data, int allocSize )
|
|||
|
||||
|
||||
// clear out any previous error
|
||||
qglGetError();
|
||||
glGetError();
|
||||
|
||||
GLuint bufferObject = 0xFFFF;
|
||||
qglGenBuffersARB( 1, & bufferObject );
|
||||
glGenBuffersARB( 1, & bufferObject );
|
||||
if( bufferObject == 0xFFFF )
|
||||
{
|
||||
idLib::FatalError( "idVertexBuffer::AllocBufferObject: failed" );
|
||||
}
|
||||
qglBindBufferARB( GL_ARRAY_BUFFER_ARB, bufferObject );
|
||||
glBindBufferARB( GL_ARRAY_BUFFER_ARB, bufferObject );
|
||||
|
||||
// these are rewritten every frame
|
||||
qglBufferDataARB( GL_ARRAY_BUFFER_ARB, numBytes, NULL, bufferUsage );
|
||||
glBufferDataARB( GL_ARRAY_BUFFER_ARB, numBytes, NULL, bufferUsage );
|
||||
apiObject = reinterpret_cast< void* >( bufferObject );
|
||||
|
||||
GLenum err = qglGetError();
|
||||
GLenum err = glGetError();
|
||||
if( err == GL_OUT_OF_MEMORY )
|
||||
{
|
||||
idLib::Warning( "idVertexBuffer::AllocBufferObject: allocation failed" );
|
||||
|
@ -243,7 +243,7 @@ void idVertexBuffer::FreeBufferObject()
|
|||
|
||||
// RB: 64 bit fixes, changed GLuint to GLintptrARB
|
||||
GLintptrARB bufferObject = reinterpret_cast< GLintptrARB >( apiObject );
|
||||
qglDeleteBuffersARB( 1, ( const unsigned int* ) & bufferObject );
|
||||
glDeleteBuffersARB( 1, ( const unsigned int* ) & bufferObject );
|
||||
// RB end
|
||||
|
||||
ClearWithoutFreeing();
|
||||
|
@ -312,8 +312,8 @@ void idVertexBuffer::Update( const void* data, int updateSize ) const
|
|||
GLintptrARB bufferObject = reinterpret_cast< GLintptrARB >( apiObject );
|
||||
// RB end
|
||||
|
||||
qglBindBufferARB( GL_ARRAY_BUFFER_ARB, bufferObject );
|
||||
qglBufferSubDataARB( GL_ARRAY_BUFFER_ARB, GetOffset(), ( GLsizeiptrARB )numBytes, data );
|
||||
glBindBufferARB( GL_ARRAY_BUFFER_ARB, bufferObject );
|
||||
glBufferSubDataARB( GL_ARRAY_BUFFER_ARB, GetOffset(), ( GLsizeiptrARB )numBytes, data );
|
||||
/*
|
||||
void * buffer = MapBuffer( BM_WRITE );
|
||||
CopyBuffer( (byte *)buffer + GetOffset(), (byte *)data, numBytes );
|
||||
|
@ -337,11 +337,11 @@ void* idVertexBuffer::MapBuffer( bufferMapType_t mapType ) const
|
|||
GLintptrARB bufferObject = reinterpret_cast< GLintptrARB >( apiObject );
|
||||
// RB end
|
||||
|
||||
qglBindBufferARB( GL_ARRAY_BUFFER_ARB, bufferObject );
|
||||
glBindBufferARB( GL_ARRAY_BUFFER_ARB, bufferObject );
|
||||
if( mapType == BM_READ )
|
||||
{
|
||||
//buffer = qglMapBufferARB( GL_ARRAY_BUFFER_ARB, GL_READ_ONLY_ARB );
|
||||
buffer = qglMapBufferRange( GL_ARRAY_BUFFER_ARB, 0, GetAllocedSize(), GL_MAP_READ_BIT | GL_MAP_INVALIDATE_RANGE_BIT | GL_MAP_UNSYNCHRONIZED_BIT );
|
||||
//buffer = glMapBufferARB( GL_ARRAY_BUFFER_ARB, GL_READ_ONLY_ARB );
|
||||
buffer = glMapBufferRange( GL_ARRAY_BUFFER_ARB, 0, GetAllocedSize(), GL_MAP_READ_BIT | GL_MAP_INVALIDATE_RANGE_BIT | GL_MAP_UNSYNCHRONIZED_BIT );
|
||||
if( buffer != NULL )
|
||||
{
|
||||
buffer = ( byte* )buffer + GetOffset();
|
||||
|
@ -349,8 +349,8 @@ void* idVertexBuffer::MapBuffer( bufferMapType_t mapType ) const
|
|||
}
|
||||
else if( mapType == BM_WRITE )
|
||||
{
|
||||
//buffer = qglMapBufferARB( GL_ARRAY_BUFFER_ARB, GL_WRITE_ONLY_ARB );
|
||||
buffer = qglMapBufferRange( GL_ARRAY_BUFFER_ARB, 0, GetAllocedSize(), GL_MAP_WRITE_BIT | GL_MAP_INVALIDATE_RANGE_BIT | GL_MAP_UNSYNCHRONIZED_BIT );
|
||||
//buffer = glMapBufferARB( GL_ARRAY_BUFFER_ARB, GL_WRITE_ONLY_ARB );
|
||||
buffer = glMapBufferRange( GL_ARRAY_BUFFER_ARB, 0, GetAllocedSize(), GL_MAP_WRITE_BIT | GL_MAP_INVALIDATE_RANGE_BIT | GL_MAP_UNSYNCHRONIZED_BIT );
|
||||
if( buffer != NULL )
|
||||
{
|
||||
buffer = ( byte* )buffer + GetOffset();
|
||||
|
@ -385,8 +385,8 @@ void idVertexBuffer::UnmapBuffer() const
|
|||
GLintptrARB bufferObject = reinterpret_cast< GLintptrARB >( apiObject );
|
||||
// RB end
|
||||
|
||||
qglBindBufferARB( GL_ARRAY_BUFFER_ARB, bufferObject );
|
||||
if( !qglUnmapBufferARB( GL_ARRAY_BUFFER_ARB ) )
|
||||
glBindBufferARB( GL_ARRAY_BUFFER_ARB, bufferObject );
|
||||
if( !glUnmapBufferARB( GL_ARRAY_BUFFER_ARB ) )
|
||||
{
|
||||
idLib::Printf( "idVertexBuffer::UnmapBuffer failed\n" );
|
||||
}
|
||||
|
@ -460,22 +460,22 @@ bool idIndexBuffer::AllocBufferObject( const void* data, int allocSize )
|
|||
|
||||
|
||||
// clear out any previous error
|
||||
qglGetError();
|
||||
glGetError();
|
||||
|
||||
GLuint bufferObject = 0xFFFF;
|
||||
qglGenBuffersARB( 1, & bufferObject );
|
||||
glGenBuffersARB( 1, & bufferObject );
|
||||
if( bufferObject == 0xFFFF )
|
||||
{
|
||||
GLenum error = qglGetError();
|
||||
GLenum error = glGetError();
|
||||
idLib::FatalError( "idIndexBuffer::AllocBufferObject: failed - GL_Error %d", error );
|
||||
}
|
||||
qglBindBufferARB( GL_ELEMENT_ARRAY_BUFFER_ARB, bufferObject );
|
||||
glBindBufferARB( GL_ELEMENT_ARRAY_BUFFER_ARB, bufferObject );
|
||||
|
||||
// these are rewritten every frame
|
||||
qglBufferDataARB( GL_ELEMENT_ARRAY_BUFFER_ARB, numBytes, NULL, bufferUsage );
|
||||
glBufferDataARB( GL_ELEMENT_ARRAY_BUFFER_ARB, numBytes, NULL, bufferUsage );
|
||||
apiObject = reinterpret_cast< void* >( bufferObject );
|
||||
|
||||
GLenum err = qglGetError();
|
||||
GLenum err = glGetError();
|
||||
if( err == GL_OUT_OF_MEMORY )
|
||||
{
|
||||
idLib::Warning( "idIndexBuffer:AllocBufferObject: allocation failed" );
|
||||
|
@ -528,7 +528,7 @@ void idIndexBuffer::FreeBufferObject()
|
|||
|
||||
// RB: 64 bit fixes, changed GLuint to GLintptrARB
|
||||
GLintptrARB bufferObject = reinterpret_cast< GLintptrARB >( apiObject );
|
||||
qglDeleteBuffersARB( 1, ( const unsigned int* )& bufferObject );
|
||||
glDeleteBuffersARB( 1, ( const unsigned int* )& bufferObject );
|
||||
// RB end
|
||||
|
||||
ClearWithoutFreeing();
|
||||
|
@ -598,8 +598,8 @@ void idIndexBuffer::Update( const void* data, int updateSize ) const
|
|||
GLintptrARB bufferObject = reinterpret_cast< GLintptrARB >( apiObject );
|
||||
// RB end
|
||||
|
||||
qglBindBufferARB( GL_ELEMENT_ARRAY_BUFFER_ARB, bufferObject );
|
||||
qglBufferSubDataARB( GL_ELEMENT_ARRAY_BUFFER_ARB, GetOffset(), ( GLsizeiptrARB )numBytes, data );
|
||||
glBindBufferARB( GL_ELEMENT_ARRAY_BUFFER_ARB, bufferObject );
|
||||
glBufferSubDataARB( GL_ELEMENT_ARRAY_BUFFER_ARB, GetOffset(), ( GLsizeiptrARB )numBytes, data );
|
||||
/*
|
||||
void * buffer = MapBuffer( BM_WRITE );
|
||||
CopyBuffer( (byte *)buffer + GetOffset(), (byte *)data, numBytes );
|
||||
|
@ -624,11 +624,11 @@ void* idIndexBuffer::MapBuffer( bufferMapType_t mapType ) const
|
|||
GLintptrARB bufferObject = reinterpret_cast< GLintptrARB >( apiObject );
|
||||
// RB end
|
||||
|
||||
qglBindBufferARB( GL_ELEMENT_ARRAY_BUFFER_ARB, bufferObject );
|
||||
glBindBufferARB( GL_ELEMENT_ARRAY_BUFFER_ARB, bufferObject );
|
||||
if( mapType == BM_READ )
|
||||
{
|
||||
//buffer = qglMapBufferARB( GL_ELEMENT_ARRAY_BUFFER_ARB, GL_READ_ONLY_ARB );
|
||||
buffer = qglMapBufferRange( GL_ELEMENT_ARRAY_BUFFER_ARB, 0, GetAllocedSize(), GL_MAP_READ_BIT | GL_MAP_INVALIDATE_RANGE_BIT | GL_MAP_UNSYNCHRONIZED_BIT );
|
||||
//buffer = glMapBufferARB( GL_ELEMENT_ARRAY_BUFFER_ARB, GL_READ_ONLY_ARB );
|
||||
buffer = glMapBufferRange( GL_ELEMENT_ARRAY_BUFFER_ARB, 0, GetAllocedSize(), GL_MAP_READ_BIT | GL_MAP_INVALIDATE_RANGE_BIT | GL_MAP_UNSYNCHRONIZED_BIT );
|
||||
if( buffer != NULL )
|
||||
{
|
||||
buffer = ( byte* )buffer + GetOffset();
|
||||
|
@ -636,8 +636,8 @@ void* idIndexBuffer::MapBuffer( bufferMapType_t mapType ) const
|
|||
}
|
||||
else if( mapType == BM_WRITE )
|
||||
{
|
||||
//buffer = qglMapBufferARB( GL_ELEMENT_ARRAY_BUFFER_ARB, GL_WRITE_ONLY_ARB );
|
||||
buffer = qglMapBufferRange( GL_ELEMENT_ARRAY_BUFFER_ARB, 0, GetAllocedSize(), GL_MAP_WRITE_BIT | GL_MAP_INVALIDATE_RANGE_BIT | GL_MAP_UNSYNCHRONIZED_BIT );
|
||||
//buffer = glMapBufferARB( GL_ELEMENT_ARRAY_BUFFER_ARB, GL_WRITE_ONLY_ARB );
|
||||
buffer = glMapBufferRange( GL_ELEMENT_ARRAY_BUFFER_ARB, 0, GetAllocedSize(), GL_MAP_WRITE_BIT | GL_MAP_INVALIDATE_RANGE_BIT | GL_MAP_UNSYNCHRONIZED_BIT );
|
||||
if( buffer != NULL )
|
||||
{
|
||||
buffer = ( byte* )buffer + GetOffset();
|
||||
|
@ -672,8 +672,8 @@ void idIndexBuffer::UnmapBuffer() const
|
|||
GLintptrARB bufferObject = reinterpret_cast< GLintptrARB >( apiObject );
|
||||
// RB end
|
||||
|
||||
qglBindBufferARB( GL_ELEMENT_ARRAY_BUFFER_ARB, bufferObject );
|
||||
if( !qglUnmapBufferARB( GL_ELEMENT_ARRAY_BUFFER_ARB ) )
|
||||
glBindBufferARB( GL_ELEMENT_ARRAY_BUFFER_ARB, bufferObject );
|
||||
if( !glUnmapBufferARB( GL_ELEMENT_ARRAY_BUFFER_ARB ) )
|
||||
{
|
||||
idLib::Printf( "idIndexBuffer::UnmapBuffer failed\n" );
|
||||
}
|
||||
|
@ -746,10 +746,10 @@ bool idJointBuffer::AllocBufferObject( const float* joints, int numAllocJoints )
|
|||
const int numBytes = GetAllocedSize();
|
||||
|
||||
GLuint buffer = 0;
|
||||
qglGenBuffersARB( 1, &buffer );
|
||||
qglBindBufferARB( GL_UNIFORM_BUFFER, buffer );
|
||||
qglBufferDataARB( GL_UNIFORM_BUFFER, numBytes, NULL, GL_STREAM_DRAW_ARB );
|
||||
qglBindBufferARB( GL_UNIFORM_BUFFER, 0 );
|
||||
glGenBuffersARB( 1, &buffer );
|
||||
glBindBufferARB( GL_UNIFORM_BUFFER, buffer );
|
||||
glBufferDataARB( GL_UNIFORM_BUFFER, numBytes, NULL, GL_STREAM_DRAW_ARB );
|
||||
glBindBufferARB( GL_UNIFORM_BUFFER, 0 );
|
||||
apiObject = reinterpret_cast< void* >( buffer );
|
||||
|
||||
if( r_showBuffers.GetBool() )
|
||||
|
@ -798,8 +798,8 @@ void idJointBuffer::FreeBufferObject()
|
|||
// RB: 64 bit fixes, changed GLuint to GLintptrARB
|
||||
GLintptrARB buffer = reinterpret_cast< GLintptrARB >( apiObject );
|
||||
|
||||
qglBindBufferARB( GL_UNIFORM_BUFFER, 0 );
|
||||
qglDeleteBuffersARB( 1, ( const GLuint* )& buffer );
|
||||
glBindBufferARB( GL_UNIFORM_BUFFER, 0 );
|
||||
glDeleteBuffersARB( 1, ( const GLuint* )& buffer );
|
||||
// RB end
|
||||
|
||||
ClearWithoutFreeing();
|
||||
|
@ -866,10 +866,10 @@ void idJointBuffer::Update( const float* joints, int numUpdateJoints ) const
|
|||
const int numBytes = numUpdateJoints * 3 * 4 * sizeof( float );
|
||||
|
||||
// RB: 64 bit fixes, changed GLuint to GLintptrARB
|
||||
qglBindBufferARB( GL_UNIFORM_BUFFER, reinterpret_cast< GLintptrARB >( apiObject ) );
|
||||
glBindBufferARB( GL_UNIFORM_BUFFER, reinterpret_cast< GLintptrARB >( apiObject ) );
|
||||
// RB end
|
||||
|
||||
qglBufferSubDataARB( GL_UNIFORM_BUFFER, GetOffset(), ( GLsizeiptrARB )numBytes, joints );
|
||||
glBufferSubDataARB( GL_UNIFORM_BUFFER, GetOffset(), ( GLsizeiptrARB )numBytes, joints );
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -888,13 +888,13 @@ float* idJointBuffer::MapBuffer( bufferMapType_t mapType ) const
|
|||
void* buffer = NULL;
|
||||
|
||||
// RB: 64 bit fixes, changed GLuint to GLintptrARB
|
||||
qglBindBufferARB( GL_UNIFORM_BUFFER, reinterpret_cast< GLintptrARB >( apiObject ) );
|
||||
glBindBufferARB( GL_UNIFORM_BUFFER, reinterpret_cast< GLintptrARB >( apiObject ) );
|
||||
// RB end
|
||||
|
||||
numBytes = numBytes;
|
||||
assert( GetOffset() == 0 );
|
||||
//buffer = qglMapBufferARB( GL_UNIFORM_BUFFER, GL_WRITE_ONLY_ARB );
|
||||
buffer = qglMapBufferRange( GL_UNIFORM_BUFFER, 0, GetAllocedSize(), GL_MAP_WRITE_BIT | GL_MAP_INVALIDATE_RANGE_BIT | GL_MAP_UNSYNCHRONIZED_BIT );
|
||||
//buffer = glMapBufferARB( GL_UNIFORM_BUFFER, GL_WRITE_ONLY_ARB );
|
||||
buffer = glMapBufferRange( GL_UNIFORM_BUFFER, 0, GetAllocedSize(), GL_MAP_WRITE_BIT | GL_MAP_INVALIDATE_RANGE_BIT | GL_MAP_UNSYNCHRONIZED_BIT );
|
||||
if( buffer != NULL )
|
||||
{
|
||||
buffer = ( byte* )buffer + GetOffset();
|
||||
|
@ -920,10 +920,10 @@ void idJointBuffer::UnmapBuffer() const
|
|||
assert( IsMapped() );
|
||||
|
||||
// RB: 64 bit fixes, changed GLuint to GLintptrARB
|
||||
qglBindBufferARB( GL_UNIFORM_BUFFER, reinterpret_cast< GLintptrARB >( apiObject ) );
|
||||
glBindBufferARB( GL_UNIFORM_BUFFER, reinterpret_cast< GLintptrARB >( apiObject ) );
|
||||
// RB end
|
||||
|
||||
if( !qglUnmapBufferARB( GL_UNIFORM_BUFFER ) )
|
||||
if( !glUnmapBufferARB( GL_UNIFORM_BUFFER ) )
|
||||
{
|
||||
idLib::Printf( "idJointBuffer::UnmapBuffer failed\n" );
|
||||
}
|
||||
|
|
|
@ -517,7 +517,18 @@ void idImage::Bind()
|
|||
if( tmu->current2DMap != texnum )
|
||||
{
|
||||
tmu->current2DMap = texnum;
|
||||
qglBindMultiTextureEXT( GL_TEXTURE0_ARB + texUnit, GL_TEXTURE_2D, texnum );
|
||||
|
||||
// RB begin
|
||||
if( glConfig.directStateAccess )
|
||||
{
|
||||
glBindMultiTextureEXT( GL_TEXTURE0_ARB + texUnit, GL_TEXTURE_2D, texnum );
|
||||
}
|
||||
else
|
||||
{
|
||||
glActiveTextureARB( GL_TEXTURE0_ARB + texUnit );
|
||||
glBindTexture( GL_TEXTURE_2D, texnum );
|
||||
}
|
||||
// RB end
|
||||
}
|
||||
}
|
||||
else if( opts.textureType == TT_CUBIC )
|
||||
|
@ -525,7 +536,18 @@ void idImage::Bind()
|
|||
if( tmu->currentCubeMap != texnum )
|
||||
{
|
||||
tmu->currentCubeMap = texnum;
|
||||
qglBindMultiTextureEXT( GL_TEXTURE0_ARB + texUnit, GL_TEXTURE_CUBE_MAP_EXT, texnum );
|
||||
|
||||
// RB begin
|
||||
if( glConfig.directStateAccess )
|
||||
{
|
||||
glBindMultiTextureEXT( GL_TEXTURE0_ARB + texUnit, GL_TEXTURE_CUBE_MAP_EXT, texnum );
|
||||
}
|
||||
else
|
||||
{
|
||||
glActiveTextureARB( GL_TEXTURE0_ARB + texUnit );
|
||||
glBindTexture( GL_TEXTURE_CUBE_MAP_EXT, texnum );
|
||||
}
|
||||
// RB end
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -554,20 +576,20 @@ void idImage::CopyFramebuffer( int x, int y, int imageWidth, int imageHeight )
|
|||
{
|
||||
|
||||
|
||||
qglBindTexture( ( opts.textureType == TT_CUBIC ) ? GL_TEXTURE_CUBE_MAP_EXT : GL_TEXTURE_2D, texnum );
|
||||
glBindTexture( ( opts.textureType == TT_CUBIC ) ? GL_TEXTURE_CUBE_MAP_EXT : GL_TEXTURE_2D, texnum );
|
||||
|
||||
qglReadBuffer( GL_BACK );
|
||||
glReadBuffer( GL_BACK );
|
||||
|
||||
opts.width = imageWidth;
|
||||
opts.height = imageHeight;
|
||||
qglCopyTexImage2D( GL_TEXTURE_2D, 0, GL_RGBA8, x, y, imageWidth, imageHeight, 0 );
|
||||
glCopyTexImage2D( GL_TEXTURE_2D, 0, GL_RGBA8, x, y, imageWidth, imageHeight, 0 );
|
||||
|
||||
// these shouldn't be necessary if the image was initialized properly
|
||||
qglTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR );
|
||||
qglTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR );
|
||||
glTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR );
|
||||
glTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR );
|
||||
|
||||
qglTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE );
|
||||
qglTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE );
|
||||
glTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE );
|
||||
glTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE );
|
||||
|
||||
backEnd.pc.c_copyFrameBuffer++;
|
||||
}
|
||||
|
@ -579,11 +601,11 @@ CopyDepthbuffer
|
|||
*/
|
||||
void idImage::CopyDepthbuffer( int x, int y, int imageWidth, int imageHeight )
|
||||
{
|
||||
qglBindTexture( ( opts.textureType == TT_CUBIC ) ? GL_TEXTURE_CUBE_MAP_EXT : GL_TEXTURE_2D, texnum );
|
||||
glBindTexture( ( opts.textureType == TT_CUBIC ) ? GL_TEXTURE_CUBE_MAP_EXT : GL_TEXTURE_2D, texnum );
|
||||
|
||||
opts.width = imageWidth;
|
||||
opts.height = imageHeight;
|
||||
qglCopyTexImage2D( GL_TEXTURE_2D, 0, GL_DEPTH_COMPONENT, x, y, imageWidth, imageHeight, 0 );
|
||||
glCopyTexImage2D( GL_TEXTURE_2D, 0, GL_DEPTH_COMPONENT, x, y, imageWidth, imageHeight, 0 );
|
||||
|
||||
backEnd.pc.c_copyFrameBuffer++;
|
||||
}
|
||||
|
@ -814,6 +836,6 @@ void idImage::SetSamplerState( textureFilter_t tf, textureRepeat_t tr )
|
|||
}
|
||||
filter = tf;
|
||||
repeat = tr;
|
||||
qglBindTexture( ( opts.textureType == TT_CUBIC ) ? GL_TEXTURE_CUBE_MAP_EXT : GL_TEXTURE_2D, texnum );
|
||||
glBindTexture( ( opts.textureType == TT_CUBIC ) ? GL_TEXTURE_CUBE_MAP_EXT : GL_TEXTURE_2D, texnum );
|
||||
SetTexParameters();
|
||||
}
|
||||
|
|
|
@ -71,35 +71,35 @@ void GL_Cull( int cullType )
|
|||
|
||||
if( cullType == CT_TWO_SIDED )
|
||||
{
|
||||
qglDisable( GL_CULL_FACE );
|
||||
glDisable( GL_CULL_FACE );
|
||||
}
|
||||
else
|
||||
{
|
||||
if( backEnd.glState.faceCulling == CT_TWO_SIDED )
|
||||
{
|
||||
qglEnable( GL_CULL_FACE );
|
||||
glEnable( GL_CULL_FACE );
|
||||
}
|
||||
|
||||
if( cullType == CT_BACK_SIDED )
|
||||
{
|
||||
if( backEnd.viewDef->isMirror )
|
||||
{
|
||||
qglCullFace( GL_FRONT );
|
||||
glCullFace( GL_FRONT );
|
||||
}
|
||||
else
|
||||
{
|
||||
qglCullFace( GL_BACK );
|
||||
glCullFace( GL_BACK );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if( backEnd.viewDef->isMirror )
|
||||
{
|
||||
qglCullFace( GL_BACK );
|
||||
glCullFace( GL_BACK );
|
||||
}
|
||||
else
|
||||
{
|
||||
qglCullFace( GL_FRONT );
|
||||
glCullFace( GL_FRONT );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -114,7 +114,7 @@ GL_Scissor
|
|||
*/
|
||||
void GL_Scissor( int x /* left*/, int y /* bottom */, int w, int h )
|
||||
{
|
||||
qglScissor( x, y, w, h );
|
||||
glScissor( x, y, w, h );
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -124,7 +124,7 @@ GL_Viewport
|
|||
*/
|
||||
void GL_Viewport( int x /* left */, int y /* bottom */, int w, int h )
|
||||
{
|
||||
qglViewport( x, y, w, h );
|
||||
glViewport( x, y, w, h );
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -138,7 +138,7 @@ void GL_PolygonOffset( float scale, float bias )
|
|||
backEnd.glState.polyOfsBias = bias;
|
||||
if( backEnd.glState.glStateBits & GLS_POLYGON_OFFSET )
|
||||
{
|
||||
qglPolygonOffset( scale, bias );
|
||||
glPolygonOffset( scale, bias );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -156,12 +156,12 @@ void GL_DepthBoundsTest( const float zmin, const float zmax )
|
|||
|
||||
if( zmin == 0.0f && zmax == 0.0f )
|
||||
{
|
||||
qglDisable( GL_DEPTH_BOUNDS_TEST_EXT );
|
||||
glDisable( GL_DEPTH_BOUNDS_TEST_EXT );
|
||||
}
|
||||
else
|
||||
{
|
||||
qglEnable( GL_DEPTH_BOUNDS_TEST_EXT );
|
||||
qglDepthBoundsEXT( zmin, zmax );
|
||||
glEnable( GL_DEPTH_BOUNDS_TEST_EXT );
|
||||
glDepthBoundsEXT( zmin, zmax );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -242,7 +242,7 @@ void GL_Clear( bool color, bool depth, bool stencil, byte stencilValue, float r,
|
|||
int clearFlags = 0;
|
||||
if( color )
|
||||
{
|
||||
qglClearColor( r, g, b, a );
|
||||
glClearColor( r, g, b, a );
|
||||
clearFlags |= GL_COLOR_BUFFER_BIT;
|
||||
}
|
||||
if( depth )
|
||||
|
@ -251,10 +251,10 @@ void GL_Clear( bool color, bool depth, bool stencil, byte stencilValue, float r,
|
|||
}
|
||||
if( stencil )
|
||||
{
|
||||
qglClearStencil( stencilValue );
|
||||
glClearStencil( stencilValue );
|
||||
clearFlags |= GL_STENCIL_BUFFER_BIT;
|
||||
}
|
||||
qglClear( clearFlags );
|
||||
glClear( clearFlags );
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -269,39 +269,39 @@ void GL_SetDefaultState()
|
|||
{
|
||||
RENDERLOG_PRINTF( "--- GL_SetDefaultState ---\n" );
|
||||
|
||||
qglClearDepth( 1.0f );
|
||||
glClearDepth( 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 );
|
||||
glCullFace( GL_FRONT_AND_BACK );
|
||||
glEnable( 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 );
|
||||
glColorMask( GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE );
|
||||
glBlendFunc( GL_ONE, GL_ZERO );
|
||||
glDepthMask( GL_TRUE );
|
||||
glDepthFunc( GL_LESS );
|
||||
glDisable( GL_STENCIL_TEST );
|
||||
glDisable( GL_POLYGON_OFFSET_FILL );
|
||||
glDisable( GL_POLYGON_OFFSET_LINE );
|
||||
glPolygonMode( GL_FRONT_AND_BACK, GL_FILL );
|
||||
|
||||
// These should never be changed
|
||||
// DG: deprecated in opengl 3.2 and not needed because we don't do fixed function pipeline
|
||||
// qglShadeModel( GL_SMOOTH );
|
||||
// glShadeModel( GL_SMOOTH );
|
||||
// DG end
|
||||
qglEnable( GL_DEPTH_TEST );
|
||||
qglEnable( GL_BLEND );
|
||||
qglEnable( GL_SCISSOR_TEST );
|
||||
qglDrawBuffer( GL_BACK );
|
||||
qglReadBuffer( GL_BACK );
|
||||
glEnable( GL_DEPTH_TEST );
|
||||
glEnable( GL_BLEND );
|
||||
glEnable( GL_SCISSOR_TEST );
|
||||
glDrawBuffer( GL_BACK );
|
||||
glReadBuffer( GL_BACK );
|
||||
|
||||
if( r_useScissor.GetBool() )
|
||||
{
|
||||
qglScissor( 0, 0, renderSystem->GetWidth(), renderSystem->GetHeight() );
|
||||
glScissor( 0, 0, renderSystem->GetWidth(), renderSystem->GetHeight() );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -335,16 +335,16 @@ void GL_State( uint64 stateBits, bool forceGlState )
|
|||
switch( stateBits & GLS_DEPTHFUNC_BITS )
|
||||
{
|
||||
case GLS_DEPTHFUNC_EQUAL:
|
||||
qglDepthFunc( GL_EQUAL );
|
||||
glDepthFunc( GL_EQUAL );
|
||||
break;
|
||||
case GLS_DEPTHFUNC_ALWAYS:
|
||||
qglDepthFunc( GL_ALWAYS );
|
||||
glDepthFunc( GL_ALWAYS );
|
||||
break;
|
||||
case GLS_DEPTHFUNC_LESS:
|
||||
qglDepthFunc( GL_LEQUAL );
|
||||
glDepthFunc( GL_LEQUAL );
|
||||
break;
|
||||
case GLS_DEPTHFUNC_GREATER:
|
||||
qglDepthFunc( GL_GEQUAL );
|
||||
glDepthFunc( GL_GEQUAL );
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -422,12 +422,12 @@ void GL_State( uint64 stateBits, bool forceGlState )
|
|||
// Only actually update GL's blend func if blending is enabled.
|
||||
if( srcFactor == GL_ONE && dstFactor == GL_ZERO )
|
||||
{
|
||||
qglDisable( GL_BLEND );
|
||||
glDisable( GL_BLEND );
|
||||
}
|
||||
else
|
||||
{
|
||||
qglEnable( GL_BLEND );
|
||||
qglBlendFunc( srcFactor, dstFactor );
|
||||
glEnable( GL_BLEND );
|
||||
glBlendFunc( srcFactor, dstFactor );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -438,11 +438,11 @@ void GL_State( uint64 stateBits, bool forceGlState )
|
|||
{
|
||||
if( stateBits & GLS_DEPTHMASK )
|
||||
{
|
||||
qglDepthMask( GL_FALSE );
|
||||
glDepthMask( GL_FALSE );
|
||||
}
|
||||
else
|
||||
{
|
||||
qglDepthMask( GL_TRUE );
|
||||
glDepthMask( GL_TRUE );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -455,7 +455,7 @@ void GL_State( uint64 stateBits, bool forceGlState )
|
|||
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 );
|
||||
glColorMask( r, g, b, a );
|
||||
}
|
||||
|
||||
//
|
||||
|
@ -465,11 +465,11 @@ void GL_State( uint64 stateBits, bool forceGlState )
|
|||
{
|
||||
if( stateBits & GLS_POLYMODE_LINE )
|
||||
{
|
||||
qglPolygonMode( GL_FRONT_AND_BACK, GL_LINE );
|
||||
glPolygonMode( GL_FRONT_AND_BACK, GL_LINE );
|
||||
}
|
||||
else
|
||||
{
|
||||
qglPolygonMode( GL_FRONT_AND_BACK, GL_FILL );
|
||||
glPolygonMode( GL_FRONT_AND_BACK, GL_FILL );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -480,14 +480,14 @@ void GL_State( uint64 stateBits, bool forceGlState )
|
|||
{
|
||||
if( stateBits & GLS_POLYGON_OFFSET )
|
||||
{
|
||||
qglPolygonOffset( backEnd.glState.polyOfsScale, backEnd.glState.polyOfsBias );
|
||||
qglEnable( GL_POLYGON_OFFSET_FILL );
|
||||
qglEnable( GL_POLYGON_OFFSET_LINE );
|
||||
glPolygonOffset( backEnd.glState.polyOfsScale, backEnd.glState.polyOfsBias );
|
||||
glEnable( GL_POLYGON_OFFSET_FILL );
|
||||
glEnable( GL_POLYGON_OFFSET_LINE );
|
||||
}
|
||||
else
|
||||
{
|
||||
qglDisable( GL_POLYGON_OFFSET_FILL );
|
||||
qglDisable( GL_POLYGON_OFFSET_LINE );
|
||||
glDisable( GL_POLYGON_OFFSET_FILL );
|
||||
glDisable( GL_POLYGON_OFFSET_LINE );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -499,7 +499,7 @@ void GL_State( uint64 stateBits, bool forceGlState )
|
|||
{
|
||||
if( ( stateBits & GLS_ALPHATEST_FUNC_BITS ) != 0 )
|
||||
{
|
||||
qglEnable( GL_ALPHA_TEST );
|
||||
glEnable( GL_ALPHA_TEST );
|
||||
|
||||
GLenum func = GL_ALWAYS;
|
||||
switch( stateBits & GLS_ALPHATEST_FUNC_BITS )
|
||||
|
@ -517,11 +517,11 @@ void GL_State( uint64 stateBits, bool forceGlState )
|
|||
assert( false );
|
||||
}
|
||||
GLclampf ref = ( ( stateBits & GLS_ALPHATEST_FUNC_REF_BITS ) >> GLS_ALPHATEST_FUNC_REF_SHIFT ) / ( float )0xFF;
|
||||
qglAlphaFunc( func, ref );
|
||||
glAlphaFunc( func, ref );
|
||||
}
|
||||
else
|
||||
{
|
||||
qglDisable( GL_ALPHA_TEST );
|
||||
glDisable( GL_ALPHA_TEST );
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
@ -533,11 +533,11 @@ void GL_State( uint64 stateBits, bool forceGlState )
|
|||
{
|
||||
if( ( stateBits & ( GLS_STENCIL_FUNC_BITS | GLS_STENCIL_OP_BITS ) ) != 0 )
|
||||
{
|
||||
qglEnable( GL_STENCIL_TEST );
|
||||
glEnable( GL_STENCIL_TEST );
|
||||
}
|
||||
else
|
||||
{
|
||||
qglDisable( GL_STENCIL_TEST );
|
||||
glDisable( GL_STENCIL_TEST );
|
||||
}
|
||||
}
|
||||
if( diff & ( GLS_STENCIL_FUNC_BITS | GLS_STENCIL_FUNC_REF_BITS | GLS_STENCIL_FUNC_MASK_BITS ) )
|
||||
|
@ -573,7 +573,7 @@ void GL_State( uint64 stateBits, bool forceGlState )
|
|||
func = GL_ALWAYS;
|
||||
break;
|
||||
}
|
||||
qglStencilFunc( func, ref, mask );
|
||||
glStencilFunc( func, ref, mask );
|
||||
}
|
||||
if( diff & ( GLS_STENCIL_OP_FAIL_BITS | GLS_STENCIL_OP_ZFAIL_BITS | GLS_STENCIL_OP_PASS_BITS ) )
|
||||
{
|
||||
|
@ -662,7 +662,7 @@ void GL_State( uint64 stateBits, bool forceGlState )
|
|||
pass = GL_DECR_WRAP;
|
||||
break;
|
||||
}
|
||||
qglStencilOp( sFail, zFail, pass );
|
||||
glStencilOp( sFail, zFail, pass );
|
||||
}
|
||||
|
||||
backEnd.glState.glStateBits = stateBits;
|
||||
|
|
|
@ -96,11 +96,11 @@ void idImage::SubImageUpload( int mipLevel, int x, int y, int z, int width, int
|
|||
uploadTarget = GL_TEXTURE_2D;
|
||||
}
|
||||
|
||||
qglBindTexture( target, texnum );
|
||||
glBindTexture( target, texnum );
|
||||
|
||||
if( pixelPitch != 0 )
|
||||
{
|
||||
qglPixelStorei( GL_UNPACK_ROW_LENGTH, pixelPitch );
|
||||
glPixelStorei( GL_UNPACK_ROW_LENGTH, pixelPitch );
|
||||
}
|
||||
if( opts.format == FMT_RGB565 )
|
||||
{
|
||||
|
@ -111,7 +111,7 @@ void idImage::SubImageUpload( int mipLevel, int x, int y, int z, int width, int
|
|||
#endif
|
||||
if( IsCompressed() )
|
||||
{
|
||||
qglCompressedTexSubImage2DARB( uploadTarget, mipLevel, x, y, width, height, internalFormat, compressedSize, pic );
|
||||
glCompressedTexSubImage2DARB( uploadTarget, mipLevel, x, y, width, height, internalFormat, compressedSize, pic );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -122,14 +122,14 @@ void idImage::SubImageUpload( int mipLevel, int x, int y, int z, int width, int
|
|||
int unpackAlignment = width * BitsForFormat( ( textureFormat_t )opts.format ) / 8;
|
||||
if( ( unpackAlignment & 3 ) == 0 )
|
||||
{
|
||||
qglPixelStorei( GL_UNPACK_ALIGNMENT, 4 );
|
||||
glPixelStorei( GL_UNPACK_ALIGNMENT, 4 );
|
||||
}
|
||||
else
|
||||
{
|
||||
qglPixelStorei( GL_UNPACK_ALIGNMENT, 1 );
|
||||
glPixelStorei( GL_UNPACK_ALIGNMENT, 1 );
|
||||
}
|
||||
|
||||
qglTexSubImage2D( uploadTarget, mipLevel, x, y, width, height, dataFormat, dataType, pic );
|
||||
glTexSubImage2D( uploadTarget, mipLevel, x, y, width, height, dataFormat, dataType, pic );
|
||||
}
|
||||
#ifdef DEBUG
|
||||
GL_CheckErrors();
|
||||
|
@ -140,7 +140,7 @@ void idImage::SubImageUpload( int mipLevel, int x, int y, int z, int width, int
|
|||
}
|
||||
if( pixelPitch != 0 )
|
||||
{
|
||||
qglPixelStorei( GL_UNPACK_ROW_LENGTH, 0 );
|
||||
glPixelStorei( GL_UNPACK_ROW_LENGTH, 0 );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -180,60 +180,60 @@ void idImage::SetTexParameters()
|
|||
#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 );
|
||||
glTexParameteri( target, GL_TEXTURE_SWIZZLE_R, GL_ONE );
|
||||
glTexParameteri( target, GL_TEXTURE_SWIZZLE_G, GL_ONE );
|
||||
glTexParameteri( target, GL_TEXTURE_SWIZZLE_B, GL_ONE );
|
||||
glTexParameteri( 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 );
|
||||
glTexParameteri( target, GL_TEXTURE_SWIZZLE_R, GL_RED );
|
||||
glTexParameteri( target, GL_TEXTURE_SWIZZLE_G, GL_RED );
|
||||
glTexParameteri( target, GL_TEXTURE_SWIZZLE_B, GL_RED );
|
||||
glTexParameteri( 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 );
|
||||
glTexParameteri( target, GL_TEXTURE_SWIZZLE_R, GL_RED );
|
||||
glTexParameteri( target, GL_TEXTURE_SWIZZLE_G, GL_RED );
|
||||
glTexParameteri( target, GL_TEXTURE_SWIZZLE_B, GL_RED );
|
||||
glTexParameteri( 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 );
|
||||
glTexParameteri( target, GL_TEXTURE_SWIZZLE_R, GL_ONE );
|
||||
glTexParameteri( target, GL_TEXTURE_SWIZZLE_G, GL_ONE );
|
||||
glTexParameteri( target, GL_TEXTURE_SWIZZLE_B, GL_ONE );
|
||||
glTexParameteri( 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 );
|
||||
glTexParameteri( target, GL_TEXTURE_SWIZZLE_R, GL_RED );
|
||||
glTexParameteri( target, GL_TEXTURE_SWIZZLE_G, GL_RED );
|
||||
glTexParameteri( target, GL_TEXTURE_SWIZZLE_B, GL_RED );
|
||||
glTexParameteri( 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 );
|
||||
glTexParameteri( target, GL_TEXTURE_SWIZZLE_R, GL_RED );
|
||||
glTexParameteri( target, GL_TEXTURE_SWIZZLE_G, GL_GREEN );
|
||||
glTexParameteri( target, GL_TEXTURE_SWIZZLE_B, GL_BLUE );
|
||||
glTexParameteri( 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 );
|
||||
glTexParameteri( target, GL_TEXTURE_SWIZZLE_R, GL_ONE );
|
||||
glTexParameteri( target, GL_TEXTURE_SWIZZLE_G, GL_ONE );
|
||||
glTexParameteri( target, GL_TEXTURE_SWIZZLE_B, GL_ONE );
|
||||
glTexParameteri( 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 );
|
||||
glTexParameteri( target, GL_TEXTURE_SWIZZLE_R, GL_ONE );
|
||||
glTexParameteri( target, GL_TEXTURE_SWIZZLE_G, GL_ONE );
|
||||
glTexParameteri( target, GL_TEXTURE_SWIZZLE_B, GL_ONE );
|
||||
glTexParameteri( target, GL_TEXTURE_SWIZZLE_A, GL_RED );
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -242,21 +242,21 @@ void idImage::SetTexParameters()
|
|||
case TF_DEFAULT:
|
||||
if( r_useTrilinearFiltering.GetBool() )
|
||||
{
|
||||
qglTexParameterf( target, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR );
|
||||
glTexParameterf( target, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR );
|
||||
}
|
||||
else
|
||||
{
|
||||
qglTexParameterf( target, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_NEAREST );
|
||||
glTexParameterf( target, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_NEAREST );
|
||||
}
|
||||
qglTexParameterf( target, GL_TEXTURE_MAG_FILTER, GL_LINEAR );
|
||||
glTexParameterf( 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 );
|
||||
glTexParameterf( target, GL_TEXTURE_MIN_FILTER, GL_LINEAR );
|
||||
glTexParameterf( 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 );
|
||||
glTexParameterf( target, GL_TEXTURE_MIN_FILTER, GL_NEAREST );
|
||||
glTexParameterf( target, GL_TEXTURE_MAG_FILTER, GL_NEAREST );
|
||||
break;
|
||||
default:
|
||||
common->FatalError( "%s: bad texture filter %d", GetName(), filter );
|
||||
|
@ -276,45 +276,45 @@ void idImage::SetTexParameters()
|
|||
{
|
||||
aniso = 0;
|
||||
}
|
||||
qglTexParameterf( target, GL_TEXTURE_MAX_ANISOTROPY_EXT, aniso );
|
||||
glTexParameterf( target, GL_TEXTURE_MAX_ANISOTROPY_EXT, aniso );
|
||||
}
|
||||
else
|
||||
{
|
||||
qglTexParameterf( target, GL_TEXTURE_MAX_ANISOTROPY_EXT, 1 );
|
||||
glTexParameterf( 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() );
|
||||
glTexParameterf( 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 );
|
||||
glTexParameterf( target, GL_TEXTURE_WRAP_S, GL_REPEAT );
|
||||
glTexParameterf( 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 );
|
||||
glTexParameterfv( target, GL_TEXTURE_BORDER_COLOR, color );
|
||||
glTexParameterf( target, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_BORDER );
|
||||
glTexParameterf( 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 );
|
||||
glTexParameterfv( target, GL_TEXTURE_BORDER_COLOR, color );
|
||||
glTexParameterf( target, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_BORDER );
|
||||
glTexParameterf( 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 );
|
||||
glTexParameterf( target, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE );
|
||||
glTexParameterf( target, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE );
|
||||
break;
|
||||
default:
|
||||
common->FatalError( "%s: bad texture repeat %d", GetName(), repeat );
|
||||
|
@ -432,7 +432,7 @@ void idImage::AllocImage()
|
|||
}
|
||||
|
||||
// generate the texture number
|
||||
qglGenTextures( 1, ( GLuint* )&texnum );
|
||||
glGenTextures( 1, ( GLuint* )&texnum );
|
||||
assert( texnum != TEXTURE_NOT_LOADED );
|
||||
|
||||
//----------------------------------------------------
|
||||
|
@ -460,7 +460,7 @@ void idImage::AllocImage()
|
|||
numSides = 1;
|
||||
}
|
||||
|
||||
qglBindTexture( target, texnum );
|
||||
glBindTexture( target, texnum );
|
||||
|
||||
for( int side = 0; side < numSides; side++ )
|
||||
{
|
||||
|
@ -492,14 +492,14 @@ void idImage::AllocImage()
|
|||
// RB begin
|
||||
#if defined(_WIN32)
|
||||
void* data = HeapAlloc( GetProcessHeap(), 0, compressedSize );
|
||||
qglCompressedTexImage2DARB( uploadTarget + side, level, internalFormat, w, h, 0, compressedSize, data );
|
||||
glCompressedTexImage2DARB( uploadTarget + side, level, internalFormat, w, h, 0, compressedSize, data );
|
||||
if( data != NULL )
|
||||
{
|
||||
HeapFree( GetProcessHeap(), 0, data );
|
||||
}
|
||||
#else
|
||||
byte* data = ( byte* )Mem_Alloc( compressedSize, TAG_TEMP );
|
||||
qglCompressedTexImage2DARB( uploadTarget + side, level, internalFormat, w, h, 0, compressedSize, data );
|
||||
glCompressedTexImage2DARB( uploadTarget + side, level, internalFormat, w, h, 0, compressedSize, data );
|
||||
if( data != NULL )
|
||||
{
|
||||
Mem_Free( data );
|
||||
|
@ -509,7 +509,7 @@ void idImage::AllocImage()
|
|||
}
|
||||
else
|
||||
{
|
||||
qglTexImage2D( uploadTarget + side, level, internalFormat, w, h, 0, dataFormat, dataType, NULL );
|
||||
glTexImage2D( uploadTarget + side, level, internalFormat, w, h, 0, dataFormat, dataType, NULL );
|
||||
}
|
||||
|
||||
GL_CheckErrors();
|
||||
|
@ -519,7 +519,7 @@ void idImage::AllocImage()
|
|||
}
|
||||
}
|
||||
|
||||
qglTexParameteri( target, GL_TEXTURE_MAX_LEVEL, opts.numLevels - 1 );
|
||||
glTexParameteri( target, GL_TEXTURE_MAX_LEVEL, opts.numLevels - 1 );
|
||||
|
||||
// see if we messed anything up
|
||||
GL_CheckErrors();
|
||||
|
@ -538,7 +538,7 @@ void idImage::PurgeImage()
|
|||
{
|
||||
if( texnum != TEXTURE_NOT_LOADED )
|
||||
{
|
||||
qglDeleteTextures( 1, ( GLuint* )&texnum ); // this should be the ONLY place it is ever called!
|
||||
glDeleteTextures( 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
|
||||
|
|
|
@ -72,14 +72,14 @@ static void RB_DrawFlickerBox()
|
|||
}
|
||||
if( tr.frameCount & 1 )
|
||||
{
|
||||
qglClearColor( 1, 0, 0, 1 );
|
||||
glClearColor( 1, 0, 0, 1 );
|
||||
}
|
||||
else
|
||||
{
|
||||
qglClearColor( 0, 1, 0, 1 );
|
||||
glClearColor( 0, 1, 0, 1 );
|
||||
}
|
||||
qglScissor( 0, 0, 256, 256 );
|
||||
qglClear( GL_COLOR_BUFFER_BIT );
|
||||
glScissor( 0, 0, 256, 256 );
|
||||
glClear( GL_COLOR_BUFFER_BIT );
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -158,16 +158,16 @@ const void GL_BlockingSwapBuffers()
|
|||
{
|
||||
swapIndex ^= 1;
|
||||
|
||||
if( qglIsSync( renderSync[swapIndex] ) )
|
||||
if( glIsSync( renderSync[swapIndex] ) )
|
||||
{
|
||||
qglDeleteSync( renderSync[swapIndex] );
|
||||
glDeleteSync( 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 );
|
||||
glScissor( 0, 0, 1, 1 );
|
||||
glEnable( GL_SCISSOR_TEST );
|
||||
glClear( GL_COLOR_BUFFER_BIT );
|
||||
renderSync[swapIndex] = glFenceSync( GL_SYNC_GPU_COMMANDS_COMPLETE, 0 );
|
||||
const int end = Sys_Milliseconds();
|
||||
if( r_showSwapBuffers.GetBool() && end - start > 1 )
|
||||
{
|
||||
|
@ -184,11 +184,11 @@ const void GL_BlockingSwapBuffers()
|
|||
syncToWaitOn = renderSync[!swapIndex];
|
||||
}
|
||||
|
||||
if( qglIsSync( syncToWaitOn ) )
|
||||
if( glIsSync( syncToWaitOn ) )
|
||||
{
|
||||
for( GLenum r = GL_TIMEOUT_EXPIRED; r == GL_TIMEOUT_EXPIRED; )
|
||||
{
|
||||
r = qglClientWaitSync( syncToWaitOn, GL_SYNC_FLUSH_COMMANDS_BIT, 1000 * 1000 );
|
||||
r = glClientWaitSync( syncToWaitOn, GL_SYNC_FLUSH_COMMANDS_BIT, 1000 * 1000 );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -243,7 +243,7 @@ void RB_StereoRenderExecuteBackEndCommands( const emptyCommand_t* const allCmds
|
|||
// 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 );
|
||||
glDrawBuffer( GL_BACK_LEFT );
|
||||
|
||||
// create the stereoRenderImage if we haven't already
|
||||
static idImage* stereoRenderImages[2];
|
||||
|
@ -440,8 +440,8 @@ void RB_StereoRenderExecuteBackEndCommands( const emptyCommand_t* const allCmds
|
|||
|
||||
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 );
|
||||
glTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_BORDER );
|
||||
glTexParameterf( 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() );
|
||||
|
@ -455,8 +455,8 @@ void RB_StereoRenderExecuteBackEndCommands( const emptyCommand_t* const allCmds
|
|||
|
||||
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 );
|
||||
glTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_BORDER );
|
||||
glTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_BORDER );
|
||||
RB_DrawElementsWithCounters( &backEnd.unitSquareSurface );
|
||||
break;
|
||||
}
|
||||
|
@ -498,25 +498,25 @@ void RB_StereoRenderExecuteBackEndCommands( const emptyCommand_t* const allCmds
|
|||
// 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 );
|
||||
glTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST );
|
||||
glTexParameterf( 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 );
|
||||
glTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST );
|
||||
glTexParameterf( 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 );
|
||||
glTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR );
|
||||
glTexParameterf( 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 );
|
||||
glTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR );
|
||||
glTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR );
|
||||
|
||||
break;
|
||||
}
|
||||
|
@ -525,7 +525,7 @@ void RB_StereoRenderExecuteBackEndCommands( const emptyCommand_t* const allCmds
|
|||
RB_DrawFlickerBox();
|
||||
|
||||
// make sure the drawing is actually started
|
||||
qglFlush();
|
||||
glFlush();
|
||||
|
||||
// we may choose to sync to the swapbuffers before the next frame
|
||||
|
||||
|
@ -574,7 +574,7 @@ void RB_ExecuteBackEndCommands( const emptyCommand_t* cmds )
|
|||
// 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 );
|
||||
glDrawBuffer( GL_BACK );
|
||||
|
||||
for( ; cmds != NULL; cmds = ( const emptyCommand_t* )cmds->next )
|
||||
{
|
||||
|
@ -613,9 +613,9 @@ void RB_ExecuteBackEndCommands( const emptyCommand_t* cmds )
|
|||
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 );
|
||||
glColorMask( 1, 1, 1, 1 );
|
||||
|
||||
qglFlush();
|
||||
glFlush();
|
||||
|
||||
// stop rendering on this thread
|
||||
uint64 backEndFinishTime = Sys_Microseconds();
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,554 +0,0 @@
|
|||
/*
|
||||
===========================================================================
|
||||
|
||||
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 );
|
||||
// DG: deprecated in opengl 3.2 and not needed because we don't do fixed function pipeline
|
||||
// extern void ( APIENTRY* qglShadeModel )( GLenum mode );
|
||||
// DG end
|
||||
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 );
|
||||
|
||||
|
||||
// RB begin
|
||||
#if defined(_WIN32)
|
||||
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
|
||||
// RB end
|
||||
|
||||
|
||||
#endif // hardlinlk vs dlopen
|
||||
|
||||
#endif
|
|
@ -1,375 +0,0 @@
|
|||
/*
|
||||
===========================================================================
|
||||
|
||||
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
|
||||
// DG: deprecated in opengl 3.2 and not needed because we don't do fixed function pipeline
|
||||
// #define qglShadeModel glShadeModel
|
||||
// DG: deprecated in opengl 3.2 and not needed because we don't do fixed function pipeline
|
||||
#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
|
|
@ -1,944 +0,0 @@
|
|||
#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
|
|
@ -119,7 +119,7 @@ void PC_BeginNamedEvent( const char* szName, ... )
|
|||
{
|
||||
return; // only get top level timing information
|
||||
}
|
||||
if( !qglGetQueryObjectui64vEXT )
|
||||
if( !glGetQueryObjectui64vEXT )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
@ -127,10 +127,10 @@ void PC_BeginNamedEvent( const char* szName, ... )
|
|||
GL_CheckErrors();
|
||||
if( timeQueryIds[0] == 0 )
|
||||
{
|
||||
qglGenQueriesARB( MAX_PIX_EVENTS, timeQueryIds );
|
||||
glGenQueriesARB( MAX_PIX_EVENTS, timeQueryIds );
|
||||
}
|
||||
qglFinish();
|
||||
qglBeginQueryARB( GL_TIME_ELAPSED_EXT, timeQueryIds[numPixEvents] );
|
||||
glFinish();
|
||||
glBeginQueryARB( GL_TIME_ELAPSED_EXT, timeQueryIds[numPixEvents] );
|
||||
GL_CheckErrors();
|
||||
|
||||
pixEvent_t* ev = &pixEvents[numPixEvents++];
|
||||
|
@ -160,7 +160,7 @@ void PC_EndNamedEvent()
|
|||
// only do timing on top level events
|
||||
return;
|
||||
}
|
||||
if( !qglGetQueryObjectui64vEXT )
|
||||
if( !glGetQueryObjectui64vEXT )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
@ -169,7 +169,7 @@ void PC_EndNamedEvent()
|
|||
ev->cpuTime = Sys_Microseconds() - ev->cpuTime;
|
||||
|
||||
GL_CheckErrors();
|
||||
qglEndQueryARB( GL_TIME_ELAPSED_EXT );
|
||||
glEndQueryARB( GL_TIME_ELAPSED_EXT );
|
||||
GL_CheckErrors();
|
||||
#endif
|
||||
}
|
||||
|
@ -196,7 +196,7 @@ void PC_EndFrame()
|
|||
pixEvent_t* ev = &pixEvents[i];
|
||||
|
||||
int64 gpuTime = 0;
|
||||
qglGetQueryObjectui64vEXT( timeQueryIds[i], GL_QUERY_RESULT, ( GLuint64EXT* )&gpuTime );
|
||||
glGetQueryObjectui64vEXT( timeQueryIds[i], GL_QUERY_RESULT, ( GLuint64EXT* )&gpuTime );
|
||||
ev->gpuTime = gpuTime;
|
||||
|
||||
idLib::Printf( "%2d: %1.2f (GPU) %1.3f (CPU) = %s\n", i, ev->gpuTime / 1000000.0f, ev->cpuTime / 1000.0f, ev->name );
|
||||
|
|
|
@ -190,7 +190,7 @@ void idRenderProgManager::KillAllShaders()
|
|||
{
|
||||
if( vertexShaders[i].progId != INVALID_PROGID )
|
||||
{
|
||||
qglDeleteShader( vertexShaders[i].progId );
|
||||
glDeleteShader( vertexShaders[i].progId );
|
||||
vertexShaders[i].progId = INVALID_PROGID;
|
||||
}
|
||||
}
|
||||
|
@ -198,7 +198,7 @@ void idRenderProgManager::KillAllShaders()
|
|||
{
|
||||
if( fragmentShaders[i].progId != INVALID_PROGID )
|
||||
{
|
||||
qglDeleteShader( fragmentShaders[i].progId );
|
||||
glDeleteShader( fragmentShaders[i].progId );
|
||||
fragmentShaders[i].progId = INVALID_PROGID;
|
||||
}
|
||||
}
|
||||
|
@ -206,7 +206,7 @@ void idRenderProgManager::KillAllShaders()
|
|||
{
|
||||
if( glslPrograms[i].progId != INVALID_PROGID )
|
||||
{
|
||||
qglDeleteProgram( glslPrograms[i].progId );
|
||||
glDeleteProgram( glslPrograms[i].progId );
|
||||
glslPrograms[i].progId = INVALID_PROGID;
|
||||
}
|
||||
}
|
||||
|
@ -361,21 +361,21 @@ GLuint idRenderProgManager::LoadShader( GLenum target, const char* name, const c
|
|||
program.Replace( "vertex.texcoord", "vertex.attrib[8]" );
|
||||
|
||||
GLuint progId;
|
||||
qglGenProgramsARB( 1, &progId );
|
||||
glGenProgramsARB( 1, &progId );
|
||||
|
||||
qglBindProgramARB( target, progId );
|
||||
qglGetError();
|
||||
glBindProgramARB( target, progId );
|
||||
glGetError();
|
||||
|
||||
qglProgramStringARB( target, GL_PROGRAM_FORMAT_ASCII_ARB, program.Length(), program.c_str() );
|
||||
GLenum err = qglGetError();
|
||||
glProgramStringARB( target, GL_PROGRAM_FORMAT_ASCII_ARB, program.Length(), program.c_str() );
|
||||
GLenum err = glGetError();
|
||||
|
||||
GLint ofs = -1;
|
||||
qglGetIntegerv( GL_PROGRAM_ERROR_POSITION_ARB, &ofs );
|
||||
glGetIntegerv( GL_PROGRAM_ERROR_POSITION_ARB, &ofs );
|
||||
if( ( err == GL_INVALID_OPERATION ) || ( ofs != -1 ) )
|
||||
{
|
||||
if( err == GL_INVALID_OPERATION )
|
||||
{
|
||||
const GLubyte* str = qglGetString( GL_PROGRAM_ERROR_STRING_ARB );
|
||||
const GLubyte* str = glGetString( GL_PROGRAM_ERROR_STRING_ARB );
|
||||
common->Printf( "\nGL_PROGRAM_ERROR_STRING_ARB: %s\n", str );
|
||||
}
|
||||
else
|
||||
|
@ -394,7 +394,7 @@ GLuint idRenderProgManager::LoadShader( GLenum target, const char* name, const c
|
|||
{
|
||||
common->Printf( "error at %i:\n%s", ofs, program.c_str() + ofs );
|
||||
}
|
||||
qglDeleteProgramsARB( 1, &progId );
|
||||
glDeleteProgramsARB( 1, &progId );
|
||||
fileSystem->FreeFile( fileBuffer );
|
||||
return INVALID_PROGID;
|
||||
}
|
||||
|
@ -421,7 +421,7 @@ void idRenderProgManager::BindShader( int vIndex, int fIndex )
|
|||
{
|
||||
currentRenderProgram = vIndex;
|
||||
RENDERLOG_PRINTF( "Binding GLSL Program %s\n", glslPrograms[vIndex].name.c_str() );
|
||||
qglUseProgram( glslPrograms[vIndex].progId );
|
||||
glUseProgram( glslPrograms[vIndex].progId );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -435,7 +435,7 @@ void idRenderProgManager::Unbind()
|
|||
currentVertexShader = -1;
|
||||
currentFragmentShader = -1;
|
||||
|
||||
qglUseProgram( 0 );
|
||||
glUseProgram( 0 );
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -1168,21 +1168,21 @@ GLuint idRenderProgManager::LoadGLSLShader( GLenum target, const char* name, idL
|
|||
}
|
||||
|
||||
// create and compile the shader
|
||||
const GLuint shader = qglCreateShader( target );
|
||||
const GLuint shader = glCreateShader( target );
|
||||
if( shader )
|
||||
{
|
||||
const char* source[1] = { programGLSL.c_str() };
|
||||
|
||||
qglShaderSource( shader, 1, source, NULL );
|
||||
qglCompileShader( shader );
|
||||
glShaderSource( shader, 1, source, NULL );
|
||||
glCompileShader( shader );
|
||||
|
||||
int infologLength = 0;
|
||||
qglGetShaderiv( shader, GL_INFO_LOG_LENGTH, &infologLength );
|
||||
glGetShaderiv( shader, GL_INFO_LOG_LENGTH, &infologLength );
|
||||
if( infologLength > 1 )
|
||||
{
|
||||
idTempArray<char> infoLog( infologLength );
|
||||
int charsWritten = 0;
|
||||
qglGetShaderInfoLog( shader, infologLength, &charsWritten, infoLog.Ptr() );
|
||||
glGetShaderInfoLog( shader, infologLength, &charsWritten, infoLog.Ptr() );
|
||||
|
||||
// catch the strings the ATI and Intel drivers output on success
|
||||
if( strstr( infoLog.Ptr(), "successfully compiled to run on hardware" ) != NULL ||
|
||||
|
@ -1217,10 +1217,10 @@ GLuint idRenderProgManager::LoadGLSLShader( GLenum target, const char* name, idL
|
|||
}
|
||||
|
||||
GLint compiled = GL_FALSE;
|
||||
qglGetShaderiv( shader, GL_COMPILE_STATUS, &compiled );
|
||||
glGetShaderiv( shader, GL_COMPILE_STATUS, &compiled );
|
||||
if( compiled == GL_FALSE )
|
||||
{
|
||||
qglDeleteShader( shader );
|
||||
glDeleteShader( shader );
|
||||
return INVALID_PROGID;
|
||||
}
|
||||
}
|
||||
|
@ -1303,7 +1303,7 @@ void idRenderProgManager::CommitUniforms()
|
|||
{
|
||||
localVectors[i] = glslUniforms[vertexUniforms[i]];
|
||||
}
|
||||
qglUniform4fv( prog.vertexUniformArray, vertexUniforms.Num(), localVectors->ToFloatPtr() );
|
||||
glUniform4fv( prog.vertexUniformArray, vertexUniforms.Num(), localVectors->ToFloatPtr() );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1316,7 +1316,7 @@ void idRenderProgManager::CommitUniforms()
|
|||
{
|
||||
localVectors[i] = glslUniforms[fragmentUniforms[i]];
|
||||
}
|
||||
qglUniform4fv( prog.fragmentUniformArray, fragmentUniforms.Num(), localVectors->ToFloatPtr() );
|
||||
glUniform4fv( prog.fragmentUniformArray, fragmentUniforms.Num(), localVectors->ToFloatPtr() );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1325,7 +1325,7 @@ void idRenderProgManager::CommitUniforms()
|
|||
for( int i = 0; i < prog.uniformLocations.Num(); i++ )
|
||||
{
|
||||
const glslUniformLocation_t& uniformLocation = prog.uniformLocations[i];
|
||||
qglUniform4fv( uniformLocation.uniformIndex, 1, glslUniforms[uniformLocation.parmIndex].ToFloatPtr() );
|
||||
glUniform4fv( uniformLocation.uniformIndex, 1, glslUniforms[uniformLocation.parmIndex].ToFloatPtr() );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1356,18 +1356,18 @@ void idRenderProgManager::LoadGLSLProgram( const int programIndex, const int ver
|
|||
GLuint vertexProgID = ( vertexShaderIndex != -1 ) ? vertexShaders[ vertexShaderIndex ].progId : INVALID_PROGID;
|
||||
GLuint fragmentProgID = ( fragmentShaderIndex != -1 ) ? fragmentShaders[ fragmentShaderIndex ].progId : INVALID_PROGID;
|
||||
|
||||
const GLuint program = qglCreateProgram();
|
||||
const GLuint program = glCreateProgram();
|
||||
if( program )
|
||||
{
|
||||
|
||||
if( vertexProgID != INVALID_PROGID )
|
||||
{
|
||||
qglAttachShader( program, vertexProgID );
|
||||
glAttachShader( program, vertexProgID );
|
||||
}
|
||||
|
||||
if( fragmentProgID != INVALID_PROGID )
|
||||
{
|
||||
qglAttachShader( program, fragmentProgID );
|
||||
glAttachShader( program, fragmentProgID );
|
||||
}
|
||||
|
||||
// bind vertex attribute locations
|
||||
|
@ -1375,19 +1375,19 @@ void idRenderProgManager::LoadGLSLProgram( const int programIndex, const int ver
|
|||
{
|
||||
if( ( attribsPC[i].flags & AT_VS_IN ) != 0 )
|
||||
{
|
||||
qglBindAttribLocation( program, attribsPC[i].bind, attribsPC[i].glsl );
|
||||
glBindAttribLocation( program, attribsPC[i].bind, attribsPC[i].glsl );
|
||||
}
|
||||
}
|
||||
|
||||
qglLinkProgram( program );
|
||||
glLinkProgram( program );
|
||||
|
||||
int infologLength = 0;
|
||||
qglGetProgramiv( program, GL_INFO_LOG_LENGTH, &infologLength );
|
||||
glGetProgramiv( program, GL_INFO_LOG_LENGTH, &infologLength );
|
||||
if( infologLength > 1 )
|
||||
{
|
||||
char* infoLog = ( char* )malloc( infologLength );
|
||||
int charsWritten = 0;
|
||||
qglGetProgramInfoLog( program, infologLength, &charsWritten, infoLog );
|
||||
glGetProgramInfoLog( program, infologLength, &charsWritten, infoLog );
|
||||
|
||||
// catch the strings the ATI and Intel drivers output on success
|
||||
if( strstr( infoLog, "Vertex shader(s) linked, fragment shader(s) linked." ) != NULL || strstr( infoLog, "No errors." ) != NULL )
|
||||
|
@ -1408,10 +1408,10 @@ void idRenderProgManager::LoadGLSLProgram( const int programIndex, const int ver
|
|||
}
|
||||
|
||||
int linked = GL_FALSE;
|
||||
qglGetProgramiv( program, GL_LINK_STATUS, &linked );
|
||||
glGetProgramiv( program, GL_LINK_STATUS, &linked );
|
||||
if( linked == GL_FALSE )
|
||||
{
|
||||
qglDeleteProgram( program );
|
||||
glDeleteProgram( program );
|
||||
idLib::Error( "While linking GLSL program %d with vertexShader %s and fragmentShader %s\n",
|
||||
programIndex,
|
||||
( vertexShaderIndex >= 0 ) ? vertexShaders[vertexShaderIndex].name.c_str() : "<Invalid>",
|
||||
|
@ -1421,8 +1421,8 @@ void idRenderProgManager::LoadGLSLProgram( const int programIndex, const int ver
|
|||
|
||||
if( r_useUniformArrays.GetBool() )
|
||||
{
|
||||
prog.vertexUniformArray = qglGetUniformLocation( program, VERTEX_UNIFORM_ARRAY_NAME );
|
||||
prog.fragmentUniformArray = qglGetUniformLocation( program, FRAGMENT_UNIFORM_ARRAY_NAME );
|
||||
prog.vertexUniformArray = glGetUniformLocation( program, VERTEX_UNIFORM_ARRAY_NAME );
|
||||
prog.fragmentUniformArray = glGetUniformLocation( program, FRAGMENT_UNIFORM_ARRAY_NAME );
|
||||
|
||||
assert( prog.vertexUniformArray != -1 || vertexShaderIndex < 0 || vertexShaders[vertexShaderIndex].uniforms.Num() == 0 );
|
||||
assert( prog.fragmentUniformArray != -1 || fragmentShaderIndex < 0 || fragmentShaders[fragmentShaderIndex].uniforms.Num() == 0 );
|
||||
|
@ -1434,7 +1434,7 @@ void idRenderProgManager::LoadGLSLProgram( const int programIndex, const int ver
|
|||
for( int i = 0; i < RENDERPARM_TOTAL; i++ )
|
||||
{
|
||||
const char* parmName = GetGLSLParmName( i );
|
||||
GLint loc = qglGetUniformLocation( program, parmName );
|
||||
GLint loc = glGetUniformLocation( program, parmName );
|
||||
if( loc != -1 )
|
||||
{
|
||||
glslUniformLocation_t uniformLocation;
|
||||
|
@ -1448,7 +1448,7 @@ void idRenderProgManager::LoadGLSLProgram( const int programIndex, const int ver
|
|||
for( int i = 0; i < MAX_GLSL_USER_PARMS; i++ )
|
||||
{
|
||||
const char* parmName = GetGLSLParmName( RENDERPARM_USER + i );
|
||||
GLint loc = qglGetUniformLocation( program, parmName );
|
||||
GLint loc = glGetUniformLocation( program, parmName );
|
||||
if( loc != -1 )
|
||||
{
|
||||
glslUniformLocation_t uniformLocation;
|
||||
|
@ -1463,20 +1463,20 @@ void idRenderProgManager::LoadGLSLProgram( const int programIndex, const int ver
|
|||
}
|
||||
|
||||
// get the uniform buffer binding for skinning joint matrices
|
||||
GLint blockIndex = qglGetUniformBlockIndex( program, "matrices_ubo" );
|
||||
GLint blockIndex = glGetUniformBlockIndex( program, "matrices_ubo" );
|
||||
if( blockIndex != -1 )
|
||||
{
|
||||
qglUniformBlockBinding( program, blockIndex, 0 );
|
||||
glUniformBlockBinding( program, blockIndex, 0 );
|
||||
}
|
||||
|
||||
// set the texture unit locations once for the render program. We only need to do this once since we only link the program once
|
||||
qglUseProgram( program );
|
||||
glUseProgram( program );
|
||||
for( int i = 0; i < MAX_PROG_TEXTURE_PARMS; ++i )
|
||||
{
|
||||
GLint loc = qglGetUniformLocation( program, va( "samp%d", i ) );
|
||||
GLint loc = glGetUniformLocation( program, va( "samp%d", i ) );
|
||||
if( loc != -1 )
|
||||
{
|
||||
qglUniform1i( loc, i );
|
||||
glUniform1i( loc, i );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -130,12 +130,12 @@ void idRenderSystemLocal::RenderCommandBuffers( const emptyCommand_t* const cmdH
|
|||
{
|
||||
if( tr.timerQueryId == 0 )
|
||||
{
|
||||
qglGenQueriesARB( 1, & tr.timerQueryId );
|
||||
glGenQueriesARB( 1, & tr.timerQueryId );
|
||||
}
|
||||
qglBeginQueryARB( GL_TIME_ELAPSED_EXT, tr.timerQueryId );
|
||||
glBeginQueryARB( GL_TIME_ELAPSED_EXT, tr.timerQueryId );
|
||||
RB_ExecuteBackEndCommands( cmdHead );
|
||||
qglEndQueryARB( GL_TIME_ELAPSED_EXT );
|
||||
qglFlush();
|
||||
glEndQueryARB( GL_TIME_ELAPSED_EXT );
|
||||
glFlush();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -267,11 +267,11 @@ static void R_CheckCvars()
|
|||
{
|
||||
if( r_useSeamlessCubeMap.GetBool() )
|
||||
{
|
||||
qglEnable( GL_TEXTURE_CUBE_MAP_SEAMLESS );
|
||||
glEnable( GL_TEXTURE_CUBE_MAP_SEAMLESS );
|
||||
}
|
||||
else
|
||||
{
|
||||
qglDisable( GL_TEXTURE_CUBE_MAP_SEAMLESS );
|
||||
glDisable( GL_TEXTURE_CUBE_MAP_SEAMLESS );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -284,30 +284,26 @@ static void R_CheckCvars()
|
|||
{
|
||||
if( r_useSRGB.GetBool() )
|
||||
{
|
||||
qglEnable( GL_FRAMEBUFFER_SRGB );
|
||||
glEnable( GL_FRAMEBUFFER_SRGB );
|
||||
}
|
||||
else
|
||||
{
|
||||
qglDisable( GL_FRAMEBUFFER_SRGB );
|
||||
glDisable( GL_FRAMEBUFFER_SRGB );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if( r_multiSamples.IsModified() )
|
||||
{
|
||||
if( r_multiSamples.GetInteger() > 0 )
|
||||
{
|
||||
qglEnable( GL_MULTISAMPLE_ARB );
|
||||
glEnable( GL_MULTISAMPLE_ARB );
|
||||
}
|
||||
else
|
||||
{
|
||||
qglDisable( GL_MULTISAMPLE_ARB );
|
||||
glDisable( GL_MULTISAMPLE_ARB );
|
||||
}
|
||||
}
|
||||
|
||||
// check for changes to logging state
|
||||
GLimp_EnableLogging( r_logFile.GetInteger() != 0 );
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -739,7 +735,7 @@ void idRenderSystemLocal::SwapCommandBuffers_FinishRendering(
|
|||
|
||||
if( tr.timerQueryId != 0 )
|
||||
{
|
||||
qglGetQueryObjectui64vEXT( tr.timerQueryId, GL_QUERY_RESULT, &drawingTimeNanoseconds );
|
||||
glGetQueryObjectui64vEXT( tr.timerQueryId, GL_QUERY_RESULT, &drawingTimeNanoseconds );
|
||||
}
|
||||
if( gpuMicroSec != NULL )
|
||||
{
|
||||
|
@ -1060,13 +1056,13 @@ void idRenderSystemLocal::CaptureRenderToFile( const char* fileName, bool fixAlp
|
|||
guiModel->Clear();
|
||||
RenderCommandBuffers( frameData->cmdHead );
|
||||
|
||||
qglReadBuffer( GL_BACK );
|
||||
glReadBuffer( GL_BACK );
|
||||
|
||||
// include extra space for OpenGL padding to word boundaries
|
||||
int c = ( rc.GetWidth() + 3 ) * rc.GetHeight();
|
||||
byte* data = ( byte* )R_StaticAlloc( c * 3 );
|
||||
|
||||
qglReadPixels( rc.x1, rc.y1, rc.GetWidth(), rc.GetHeight(), GL_RGB, GL_UNSIGNED_BYTE, data );
|
||||
glReadPixels( rc.x1, rc.y1, rc.GetWidth(), rc.GetHeight(), GL_RGB, GL_UNSIGNED_BYTE, data );
|
||||
|
||||
byte* data2 = ( byte* )R_StaticAlloc( c * 4 );
|
||||
|
||||
|
|
|
@ -201,115 +201,6 @@ idCVar stereoRender_swapEyes( "stereoRender_swapEyes", "0", CVAR_BOOL | CVAR_ARC
|
|||
idCVar stereoRender_deGhost( "stereoRender_deGhost", "0.05", CVAR_FLOAT | CVAR_ARCHIVE, "subtract from opposite eye to reduce ghosting" );
|
||||
|
||||
|
||||
// GL_ARB_multitexture
|
||||
PFNGLACTIVETEXTUREPROC qglActiveTextureARB;
|
||||
// RB: deprecated
|
||||
//PFNGLCLIENTACTIVETEXTUREPROC qglClientActiveTextureARB;
|
||||
// RB end
|
||||
|
||||
// GL_EXT_direct_state_access
|
||||
PFNGLBINDMULTITEXTUREEXTPROC qglBindMultiTextureEXT;
|
||||
|
||||
// GL_ARB_texture_compression
|
||||
PFNGLCOMPRESSEDTEXIMAGE2DARBPROC qglCompressedTexImage2DARB;
|
||||
PFNGLCOMPRESSEDTEXSUBIMAGE2DARBPROC qglCompressedTexSubImage2DARB;
|
||||
PFNGLGETCOMPRESSEDTEXIMAGEARBPROC qglGetCompressedTexImageARB;
|
||||
|
||||
// GL_ARB_vertex_buffer_object
|
||||
PFNGLBINDBUFFERARBPROC qglBindBufferARB;
|
||||
PFNGLBINDBUFFERRANGEPROC qglBindBufferRange;
|
||||
PFNGLDELETEBUFFERSARBPROC qglDeleteBuffersARB;
|
||||
PFNGLGENBUFFERSARBPROC qglGenBuffersARB;
|
||||
PFNGLISBUFFERARBPROC qglIsBufferARB;
|
||||
PFNGLBUFFERDATAARBPROC qglBufferDataARB;
|
||||
PFNGLBUFFERSUBDATAARBPROC qglBufferSubDataARB;
|
||||
PFNGLGETBUFFERSUBDATAARBPROC qglGetBufferSubDataARB;
|
||||
PFNGLMAPBUFFERARBPROC qglMapBufferARB;
|
||||
PFNGLUNMAPBUFFERARBPROC qglUnmapBufferARB;
|
||||
PFNGLGETBUFFERPARAMETERIVARBPROC qglGetBufferParameterivARB;
|
||||
PFNGLGETBUFFERPOINTERVARBPROC qglGetBufferPointervARB;
|
||||
|
||||
// GL_ARB_map_buffer_range
|
||||
PFNGLMAPBUFFERRANGEPROC qglMapBufferRange;
|
||||
|
||||
// GL_ARB_draw_elements_base_vertex
|
||||
PFNGLDRAWELEMENTSBASEVERTEXPROC qglDrawElementsBaseVertex;
|
||||
|
||||
// GL_ARB_vertex_array_object
|
||||
PFNGLGENVERTEXARRAYSPROC qglGenVertexArrays;
|
||||
PFNGLBINDVERTEXARRAYPROC qglBindVertexArray;
|
||||
PFNGLDELETEVERTEXARRAYSPROC qglDeleteVertexArrays;
|
||||
|
||||
// GL_ARB_vertex_program / GL_ARB_fragment_program
|
||||
PFNGLVERTEXATTRIBPOINTERARBPROC qglVertexAttribPointerARB;
|
||||
PFNGLENABLEVERTEXATTRIBARRAYARBPROC qglEnableVertexAttribArrayARB;
|
||||
PFNGLDISABLEVERTEXATTRIBARRAYARBPROC qglDisableVertexAttribArrayARB;
|
||||
PFNGLPROGRAMSTRINGARBPROC qglProgramStringARB;
|
||||
PFNGLBINDPROGRAMARBPROC qglBindProgramARB;
|
||||
PFNGLGENPROGRAMSARBPROC qglGenProgramsARB;
|
||||
PFNGLDELETEPROGRAMSARBPROC qglDeleteProgramsARB;
|
||||
PFNGLPROGRAMENVPARAMETER4FVARBPROC qglProgramEnvParameter4fvARB;
|
||||
PFNGLPROGRAMLOCALPARAMETER4FVARBPROC qglProgramLocalParameter4fvARB;
|
||||
|
||||
// GLSL / OpenGL 2.0
|
||||
PFNGLCREATESHADERPROC qglCreateShader;
|
||||
PFNGLDELETESHADERPROC qglDeleteShader;
|
||||
PFNGLSHADERSOURCEPROC qglShaderSource;
|
||||
PFNGLCOMPILESHADERPROC qglCompileShader;
|
||||
PFNGLGETSHADERIVPROC qglGetShaderiv;
|
||||
PFNGLGETSHADERINFOLOGPROC qglGetShaderInfoLog;
|
||||
PFNGLCREATEPROGRAMPROC qglCreateProgram;
|
||||
PFNGLDELETEPROGRAMPROC qglDeleteProgram;
|
||||
PFNGLATTACHSHADERPROC qglAttachShader;
|
||||
PFNGLDETACHSHADERPROC qglDetachShader;
|
||||
PFNGLLINKPROGRAMPROC qglLinkProgram;
|
||||
PFNGLUSEPROGRAMPROC qglUseProgram;
|
||||
PFNGLGETPROGRAMIVPROC qglGetProgramiv;
|
||||
PFNGLGETPROGRAMINFOLOGPROC qglGetProgramInfoLog;
|
||||
PFNGLPROGRAMPARAMETERIPROC qglProgramParameteri;
|
||||
PFNGLBINDATTRIBLOCATIONPROC qglBindAttribLocation;
|
||||
PFNGLGETUNIFORMLOCATIONPROC qglGetUniformLocation;
|
||||
PFNGLUNIFORM1IPROC qglUniform1i;
|
||||
PFNGLUNIFORM4FVPROC qglUniform4fv;
|
||||
|
||||
// GL_ARB_uniform_buffer_object
|
||||
PFNGLGETUNIFORMBLOCKINDEXPROC qglGetUniformBlockIndex;
|
||||
PFNGLUNIFORMBLOCKBINDINGPROC qglUniformBlockBinding;
|
||||
|
||||
// GL_ATI_separate_stencil / OpenGL 2.0
|
||||
PFNGLSTENCILOPSEPARATEATIPROC qglStencilOpSeparate;
|
||||
PFNGLSTENCILFUNCSEPARATEATIPROC qglStencilFuncSeparate;
|
||||
|
||||
// GL_EXT_depth_bounds_test
|
||||
PFNGLDEPTHBOUNDSEXTPROC qglDepthBoundsEXT;
|
||||
|
||||
// GL_ARB_sync
|
||||
PFNGLFENCESYNCPROC qglFenceSync;
|
||||
PFNGLISSYNCPROC qglIsSync;
|
||||
PFNGLCLIENTWAITSYNCPROC qglClientWaitSync;
|
||||
PFNGLDELETESYNCPROC qglDeleteSync;
|
||||
|
||||
// GL_ARB_occlusion_query
|
||||
PFNGLGENQUERIESARBPROC qglGenQueriesARB;
|
||||
PFNGLDELETEQUERIESARBPROC qglDeleteQueriesARB;
|
||||
PFNGLISQUERYARBPROC qglIsQueryARB;
|
||||
PFNGLBEGINQUERYARBPROC qglBeginQueryARB;
|
||||
PFNGLENDQUERYARBPROC qglEndQueryARB;
|
||||
PFNGLGETQUERYIVARBPROC qglGetQueryivARB;
|
||||
PFNGLGETQUERYOBJECTIVARBPROC qglGetQueryObjectivARB;
|
||||
PFNGLGETQUERYOBJECTUIVARBPROC qglGetQueryObjectuivARB;
|
||||
|
||||
// GL_ARB_timer_query / GL_EXT_timer_query
|
||||
PFNGLGETQUERYOBJECTUI64VEXTPROC qglGetQueryObjectui64vEXT;
|
||||
|
||||
// GL_ARB_debug_output
|
||||
PFNGLDEBUGMESSAGECONTROLARBPROC qglDebugMessageControlARB;
|
||||
PFNGLDEBUGMESSAGEINSERTARBPROC qglDebugMessageInsertARB;
|
||||
PFNGLDEBUGMESSAGECALLBACKARBPROC qglDebugMessageCallbackARB;
|
||||
PFNGLGETDEBUGMESSAGELOGARBPROC qglGetDebugMessageLogARB;
|
||||
|
||||
PFNGLGETSTRINGIPROC qglGetStringi;
|
||||
|
||||
/*
|
||||
========================
|
||||
glBindMultiTextureEXT
|
||||
|
@ -317,12 +208,13 @@ glBindMultiTextureEXT
|
|||
As of 2011/09/16 the Intel drivers for "Sandy Bridge" and "Ivy Bridge" integrated graphics do not support this extension.
|
||||
========================
|
||||
*/
|
||||
/*
|
||||
void APIENTRY glBindMultiTextureEXT( GLenum texunit, GLenum target, GLuint texture )
|
||||
{
|
||||
qglActiveTextureARB( texunit );
|
||||
qglBindTexture( target, texture );
|
||||
glActiveTextureARB( texunit );
|
||||
glBindTexture( target, texture );
|
||||
}
|
||||
|
||||
*/
|
||||
|
||||
/*
|
||||
=================
|
||||
|
@ -371,6 +263,7 @@ static void CALLBACK DebugCallback( unsigned int source, unsigned int type,
|
|||
R_CheckPortableExtensions
|
||||
==================
|
||||
*/
|
||||
// RB: replaced QGL with GLEW
|
||||
static void R_CheckPortableExtensions()
|
||||
{
|
||||
glConfig.glVersion = atof( glConfig.version_string );
|
||||
|
@ -394,41 +287,21 @@ static void R_CheckPortableExtensions()
|
|||
}
|
||||
|
||||
// GL_ARB_multitexture
|
||||
glConfig.multitextureAvailable = R_CheckExtension( "GL_ARB_multitexture" );
|
||||
if( glConfig.multitextureAvailable )
|
||||
{
|
||||
qglActiveTextureARB = ( void( APIENTRY* )( GLenum ) )GLimp_ExtensionPointer( "glActiveTextureARB" );
|
||||
// RB: deprecated
|
||||
//qglClientActiveTextureARB = ( void( APIENTRY* )( GLenum ) )GLimp_ExtensionPointer( "glClientActiveTextureARB" );
|
||||
// RB end
|
||||
}
|
||||
glConfig.multitextureAvailable = GLEW_ARB_multitexture != 0;
|
||||
|
||||
// GL_EXT_direct_state_access
|
||||
glConfig.directStateAccess = R_CheckExtension( "GL_EXT_direct_state_access" );
|
||||
if( glConfig.directStateAccess )
|
||||
{
|
||||
qglBindMultiTextureEXT = ( PFNGLBINDMULTITEXTUREEXTPROC )GLimp_ExtensionPointer( "glBindMultiTextureEXT" );
|
||||
}
|
||||
else
|
||||
{
|
||||
qglBindMultiTextureEXT = glBindMultiTextureEXT;
|
||||
}
|
||||
glConfig.directStateAccess = GLEW_EXT_direct_state_access != 0;
|
||||
|
||||
|
||||
// GL_ARB_texture_compression + GL_S3_s3tc
|
||||
// DRI drivers may have GL_ARB_texture_compression but no GL_EXT_texture_compression_s3tc
|
||||
glConfig.textureCompressionAvailable = R_CheckExtension( "GL_ARB_texture_compression" ) && R_CheckExtension( "GL_EXT_texture_compression_s3tc" );
|
||||
if( glConfig.textureCompressionAvailable )
|
||||
{
|
||||
qglCompressedTexImage2DARB = ( PFNGLCOMPRESSEDTEXIMAGE2DARBPROC )GLimp_ExtensionPointer( "glCompressedTexImage2DARB" );
|
||||
qglCompressedTexSubImage2DARB = ( PFNGLCOMPRESSEDTEXSUBIMAGE2DARBPROC )GLimp_ExtensionPointer( "glCompressedTexSubImage2DARB" );
|
||||
qglGetCompressedTexImageARB = ( PFNGLGETCOMPRESSEDTEXIMAGEARBPROC )GLimp_ExtensionPointer( "glGetCompressedTexImageARB" );
|
||||
}
|
||||
glConfig.textureCompressionAvailable = GLEW_ARB_texture_compression != 0 && GLEW_EXT_texture_compression_s3tc != 0;
|
||||
|
||||
// GL_EXT_texture_filter_anisotropic
|
||||
glConfig.anisotropicFilterAvailable = R_CheckExtension( "GL_EXT_texture_filter_anisotropic" );
|
||||
glConfig.anisotropicFilterAvailable = GLEW_EXT_texture_filter_anisotropic != 0;
|
||||
if( glConfig.anisotropicFilterAvailable )
|
||||
{
|
||||
qglGetFloatv( GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT, &glConfig.maxTextureAnisotropy );
|
||||
glGetFloatv( GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT, &glConfig.maxTextureAnisotropy );
|
||||
common->Printf( " maxTextureAnisotropy: %f\n", glConfig.maxTextureAnisotropy );
|
||||
}
|
||||
else
|
||||
|
@ -439,7 +312,7 @@ static void R_CheckPortableExtensions()
|
|||
// GL_EXT_texture_lod_bias
|
||||
// The actual extension is broken as specificed, storing the state in the texture unit instead
|
||||
// of the texture object. The behavior in GL 1.4 is the behavior we use.
|
||||
glConfig.textureLODBiasAvailable = ( glConfig.glVersion >= 1.4 || R_CheckExtension( "GL_EXT_texture_lod_bias" ) );
|
||||
glConfig.textureLODBiasAvailable = ( glConfig.glVersion >= 1.4 || GLEW_EXT_texture_lod_bias != 0 );
|
||||
if( glConfig.textureLODBiasAvailable )
|
||||
{
|
||||
common->Printf( "...using %s\n", "GL_EXT_texture_lod_bias" );
|
||||
|
@ -450,104 +323,41 @@ static void R_CheckPortableExtensions()
|
|||
}
|
||||
|
||||
// GL_ARB_seamless_cube_map
|
||||
glConfig.seamlessCubeMapAvailable = R_CheckExtension( "GL_ARB_seamless_cube_map" );
|
||||
glConfig.seamlessCubeMapAvailable = GLEW_ARB_seamless_cube_map != 0;
|
||||
r_useSeamlessCubeMap.SetModified(); // the CheckCvars() next frame will enable / disable it
|
||||
|
||||
// GL_ARB_framebuffer_sRGB
|
||||
glConfig.sRGBFramebufferAvailable = R_CheckExtension( "GL_ARB_framebuffer_sRGB" );
|
||||
glConfig.sRGBFramebufferAvailable = GLEW_ARB_framebuffer_sRGB != 0;
|
||||
r_useSRGB.SetModified(); // the CheckCvars() next frame will enable / disable it
|
||||
|
||||
// GL_ARB_vertex_buffer_object
|
||||
glConfig.vertexBufferObjectAvailable = R_CheckExtension( "GL_ARB_vertex_buffer_object" );
|
||||
if( glConfig.vertexBufferObjectAvailable )
|
||||
{
|
||||
qglBindBufferARB = ( PFNGLBINDBUFFERARBPROC )GLimp_ExtensionPointer( "glBindBufferARB" );
|
||||
qglBindBufferRange = ( PFNGLBINDBUFFERRANGEPROC )GLimp_ExtensionPointer( "glBindBufferRange" );
|
||||
qglDeleteBuffersARB = ( PFNGLDELETEBUFFERSARBPROC )GLimp_ExtensionPointer( "glDeleteBuffersARB" );
|
||||
qglGenBuffersARB = ( PFNGLGENBUFFERSARBPROC )GLimp_ExtensionPointer( "glGenBuffersARB" );
|
||||
qglIsBufferARB = ( PFNGLISBUFFERARBPROC )GLimp_ExtensionPointer( "glIsBufferARB" );
|
||||
qglBufferDataARB = ( PFNGLBUFFERDATAARBPROC )GLimp_ExtensionPointer( "glBufferDataARB" );
|
||||
qglBufferSubDataARB = ( PFNGLBUFFERSUBDATAARBPROC )GLimp_ExtensionPointer( "glBufferSubDataARB" );
|
||||
qglGetBufferSubDataARB = ( PFNGLGETBUFFERSUBDATAARBPROC )GLimp_ExtensionPointer( "glGetBufferSubDataARB" );
|
||||
qglMapBufferARB = ( PFNGLMAPBUFFERARBPROC )GLimp_ExtensionPointer( "glMapBufferARB" );
|
||||
qglUnmapBufferARB = ( PFNGLUNMAPBUFFERARBPROC )GLimp_ExtensionPointer( "glUnmapBufferARB" );
|
||||
qglGetBufferParameterivARB = ( PFNGLGETBUFFERPARAMETERIVARBPROC )GLimp_ExtensionPointer( "glGetBufferParameterivARB" );
|
||||
qglGetBufferPointervARB = ( PFNGLGETBUFFERPOINTERVARBPROC )GLimp_ExtensionPointer( "glGetBufferPointervARB" );
|
||||
}
|
||||
glConfig.vertexBufferObjectAvailable = GLEW_ARB_vertex_buffer_object != 0;
|
||||
|
||||
// GL_ARB_map_buffer_range, map a section of a buffer object's data store
|
||||
glConfig.mapBufferRangeAvailable = R_CheckExtension( "GL_ARB_map_buffer_range" );
|
||||
if( glConfig.mapBufferRangeAvailable )
|
||||
{
|
||||
qglMapBufferRange = ( PFNGLMAPBUFFERRANGEPROC )GLimp_ExtensionPointer( "glMapBufferRange" );
|
||||
}
|
||||
glConfig.mapBufferRangeAvailable = GLEW_ARB_map_buffer_range != 0;
|
||||
|
||||
// GL_ARB_vertex_array_object
|
||||
glConfig.vertexArrayObjectAvailable = R_CheckExtension( "GL_ARB_vertex_array_object" );
|
||||
if( glConfig.vertexArrayObjectAvailable )
|
||||
{
|
||||
qglGenVertexArrays = ( PFNGLGENVERTEXARRAYSPROC )GLimp_ExtensionPointer( "glGenVertexArrays" );
|
||||
qglBindVertexArray = ( PFNGLBINDVERTEXARRAYPROC )GLimp_ExtensionPointer( "glBindVertexArray" );
|
||||
qglDeleteVertexArrays = ( PFNGLDELETEVERTEXARRAYSPROC )GLimp_ExtensionPointer( "glDeleteVertexArrays" );
|
||||
}
|
||||
glConfig.vertexArrayObjectAvailable = GLEW_ARB_vertex_array_object != 0;
|
||||
|
||||
// GL_ARB_draw_elements_base_vertex
|
||||
glConfig.drawElementsBaseVertexAvailable = R_CheckExtension( "GL_ARB_draw_elements_base_vertex" );
|
||||
if( glConfig.drawElementsBaseVertexAvailable )
|
||||
{
|
||||
qglDrawElementsBaseVertex = ( PFNGLDRAWELEMENTSBASEVERTEXPROC )GLimp_ExtensionPointer( "glDrawElementsBaseVertex" );
|
||||
}
|
||||
glConfig.drawElementsBaseVertexAvailable = GLEW_ARB_draw_elements_base_vertex != 0;
|
||||
|
||||
// GL_ARB_vertex_program / GL_ARB_fragment_program
|
||||
glConfig.fragmentProgramAvailable = R_CheckExtension( "GL_ARB_fragment_program" );
|
||||
glConfig.fragmentProgramAvailable = GLEW_ARB_fragment_program != 0;
|
||||
if( glConfig.fragmentProgramAvailable )
|
||||
{
|
||||
qglVertexAttribPointerARB = ( PFNGLVERTEXATTRIBPOINTERARBPROC )GLimp_ExtensionPointer( "glVertexAttribPointerARB" );
|
||||
qglEnableVertexAttribArrayARB = ( PFNGLENABLEVERTEXATTRIBARRAYARBPROC )GLimp_ExtensionPointer( "glEnableVertexAttribArrayARB" );
|
||||
qglDisableVertexAttribArrayARB = ( PFNGLDISABLEVERTEXATTRIBARRAYARBPROC )GLimp_ExtensionPointer( "glDisableVertexAttribArrayARB" );
|
||||
qglProgramStringARB = ( PFNGLPROGRAMSTRINGARBPROC )GLimp_ExtensionPointer( "glProgramStringARB" );
|
||||
qglBindProgramARB = ( PFNGLBINDPROGRAMARBPROC )GLimp_ExtensionPointer( "glBindProgramARB" );
|
||||
qglGenProgramsARB = ( PFNGLGENPROGRAMSARBPROC )GLimp_ExtensionPointer( "glGenProgramsARB" );
|
||||
qglDeleteProgramsARB = ( PFNGLDELETEPROGRAMSARBPROC )GLimp_ExtensionPointer( "glDeleteProgramsARB" );
|
||||
qglProgramEnvParameter4fvARB = ( PFNGLPROGRAMENVPARAMETER4FVARBPROC )GLimp_ExtensionPointer( "glProgramEnvParameter4fvARB" );
|
||||
qglProgramLocalParameter4fvARB = ( PFNGLPROGRAMLOCALPARAMETER4FVARBPROC )GLimp_ExtensionPointer( "glProgramLocalParameter4fvARB" );
|
||||
|
||||
qglGetIntegerv( GL_MAX_TEXTURE_COORDS_ARB, ( GLint* )&glConfig.maxTextureCoords );
|
||||
qglGetIntegerv( GL_MAX_TEXTURE_IMAGE_UNITS_ARB, ( GLint* )&glConfig.maxTextureImageUnits );
|
||||
glGetIntegerv( GL_MAX_TEXTURE_COORDS_ARB, ( GLint* )&glConfig.maxTextureCoords );
|
||||
glGetIntegerv( GL_MAX_TEXTURE_IMAGE_UNITS_ARB, ( GLint* )&glConfig.maxTextureImageUnits );
|
||||
}
|
||||
|
||||
// GLSL, core in OpenGL > 2.0
|
||||
glConfig.glslAvailable = ( glConfig.glVersion >= 2.0f );
|
||||
if( glConfig.glslAvailable )
|
||||
{
|
||||
qglCreateShader = ( PFNGLCREATESHADERPROC )GLimp_ExtensionPointer( "glCreateShader" );
|
||||
qglDeleteShader = ( PFNGLDELETESHADERPROC )GLimp_ExtensionPointer( "glDeleteShader" );
|
||||
qglShaderSource = ( PFNGLSHADERSOURCEPROC )GLimp_ExtensionPointer( "glShaderSource" );
|
||||
qglCompileShader = ( PFNGLCOMPILESHADERPROC )GLimp_ExtensionPointer( "glCompileShader" );
|
||||
qglGetShaderiv = ( PFNGLGETSHADERIVPROC )GLimp_ExtensionPointer( "glGetShaderiv" );
|
||||
qglGetShaderInfoLog = ( PFNGLGETSHADERINFOLOGPROC )GLimp_ExtensionPointer( "glGetShaderInfoLog" );
|
||||
qglCreateProgram = ( PFNGLCREATEPROGRAMPROC )GLimp_ExtensionPointer( "glCreateProgram" );
|
||||
qglDeleteProgram = ( PFNGLDELETEPROGRAMPROC )GLimp_ExtensionPointer( "glDeleteProgram" );
|
||||
qglAttachShader = ( PFNGLATTACHSHADERPROC )GLimp_ExtensionPointer( "glAttachShader" );
|
||||
qglDetachShader = ( PFNGLDETACHSHADERPROC )GLimp_ExtensionPointer( "glDetachShader" );
|
||||
qglLinkProgram = ( PFNGLLINKPROGRAMPROC )GLimp_ExtensionPointer( "glLinkProgram" );
|
||||
qglUseProgram = ( PFNGLUSEPROGRAMPROC )GLimp_ExtensionPointer( "glUseProgram" );
|
||||
qglGetProgramiv = ( PFNGLGETPROGRAMIVPROC )GLimp_ExtensionPointer( "glGetProgramiv" );
|
||||
qglGetProgramInfoLog = ( PFNGLGETPROGRAMINFOLOGPROC )GLimp_ExtensionPointer( "glGetProgramInfoLog" );
|
||||
qglBindAttribLocation = ( PFNGLBINDATTRIBLOCATIONPROC )GLimp_ExtensionPointer( "glBindAttribLocation" );
|
||||
qglGetUniformLocation = ( PFNGLGETUNIFORMLOCATIONPROC )GLimp_ExtensionPointer( "glGetUniformLocation" );
|
||||
qglUniform1i = ( PFNGLUNIFORM1IPROC )GLimp_ExtensionPointer( "glUniform1i" );
|
||||
qglUniform4fv = ( PFNGLUNIFORM4FVPROC )GLimp_ExtensionPointer( "glUniform4fv" );
|
||||
}
|
||||
|
||||
// GL_ARB_uniform_buffer_object
|
||||
glConfig.uniformBufferAvailable = R_CheckExtension( "GL_ARB_uniform_buffer_object" );
|
||||
glConfig.uniformBufferAvailable = GLEW_ARB_uniform_buffer_object != 0;
|
||||
if( glConfig.uniformBufferAvailable )
|
||||
{
|
||||
qglGetUniformBlockIndex = ( PFNGLGETUNIFORMBLOCKINDEXPROC )GLimp_ExtensionPointer( "glGetUniformBlockIndex" );
|
||||
qglUniformBlockBinding = ( PFNGLUNIFORMBLOCKBINDINGPROC )GLimp_ExtensionPointer( "glUniformBlockBinding" );
|
||||
|
||||
qglGetIntegerv( GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT, ( GLint* )&glConfig.uniformBufferOffsetAlignment );
|
||||
glGetIntegerv( GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT, ( GLint* )&glConfig.uniformBufferOffsetAlignment );
|
||||
if( glConfig.uniformBufferOffsetAlignment < 256 )
|
||||
{
|
||||
glConfig.uniformBufferOffsetAlignment = 256;
|
||||
|
@ -555,71 +365,30 @@ static void R_CheckPortableExtensions()
|
|||
}
|
||||
|
||||
// ATI_separate_stencil / OpenGL 2.0 separate stencil
|
||||
glConfig.twoSidedStencilAvailable = ( glConfig.glVersion >= 2.0f ) || R_CheckExtension( "GL_ATI_separate_stencil" );
|
||||
if( glConfig.twoSidedStencilAvailable )
|
||||
{
|
||||
qglStencilOpSeparate = ( PFNGLSTENCILOPSEPARATEATIPROC )GLimp_ExtensionPointer( "glStencilOpSeparate" );
|
||||
qglStencilFuncSeparate = ( PFNGLSTENCILFUNCSEPARATEATIPROC )GLimp_ExtensionPointer( "glStencilFuncSeparate" );
|
||||
}
|
||||
glConfig.twoSidedStencilAvailable = ( glConfig.glVersion >= 2.0f ) || GLEW_ATI_separate_stencil != 0;
|
||||
|
||||
// GL_EXT_depth_bounds_test
|
||||
glConfig.depthBoundsTestAvailable = R_CheckExtension( "GL_EXT_depth_bounds_test" );
|
||||
if( glConfig.depthBoundsTestAvailable )
|
||||
{
|
||||
qglDepthBoundsEXT = ( PFNGLDEPTHBOUNDSEXTPROC )GLimp_ExtensionPointer( "glDepthBoundsEXT" );
|
||||
}
|
||||
glConfig.depthBoundsTestAvailable = GLEW_EXT_depth_bounds_test != 0;
|
||||
|
||||
// GL_ARB_sync
|
||||
glConfig.syncAvailable = R_CheckExtension( "GL_ARB_sync" ) &&
|
||||
glConfig.syncAvailable = GLEW_ARB_sync &&
|
||||
// as of 5/24/2012 (driver version 15.26.12.64.2761) sync objects
|
||||
// do not appear to work for the Intel HD 4000 graphics
|
||||
( glConfig.vendor != VENDOR_INTEL || r_skipIntelWorkarounds.GetBool() );
|
||||
if( glConfig.syncAvailable )
|
||||
{
|
||||
qglFenceSync = ( PFNGLFENCESYNCPROC )GLimp_ExtensionPointer( "glFenceSync" );
|
||||
qglIsSync = ( PFNGLISSYNCPROC )GLimp_ExtensionPointer( "glIsSync" );
|
||||
qglClientWaitSync = ( PFNGLCLIENTWAITSYNCPROC )GLimp_ExtensionPointer( "glClientWaitSync" );
|
||||
qglDeleteSync = ( PFNGLDELETESYNCPROC )GLimp_ExtensionPointer( "glDeleteSync" );
|
||||
}
|
||||
|
||||
|
||||
// GL_ARB_occlusion_query
|
||||
glConfig.occlusionQueryAvailable = R_CheckExtension( "GL_ARB_occlusion_query" );
|
||||
if( glConfig.occlusionQueryAvailable )
|
||||
{
|
||||
// defined in GL_ARB_occlusion_query, which is required for GL_EXT_timer_query
|
||||
qglGenQueriesARB = ( PFNGLGENQUERIESARBPROC )GLimp_ExtensionPointer( "glGenQueriesARB" );
|
||||
qglDeleteQueriesARB = ( PFNGLDELETEQUERIESARBPROC )GLimp_ExtensionPointer( "glDeleteQueriesARB" );
|
||||
qglIsQueryARB = ( PFNGLISQUERYARBPROC )GLimp_ExtensionPointer( "glIsQueryARB" );
|
||||
qglBeginQueryARB = ( PFNGLBEGINQUERYARBPROC )GLimp_ExtensionPointer( "glBeginQueryARB" );
|
||||
qglEndQueryARB = ( PFNGLENDQUERYARBPROC )GLimp_ExtensionPointer( "glEndQueryARB" );
|
||||
qglGetQueryivARB = ( PFNGLGETQUERYIVARBPROC )GLimp_ExtensionPointer( "glGetQueryivARB" );
|
||||
qglGetQueryObjectivARB = ( PFNGLGETQUERYOBJECTIVARBPROC )GLimp_ExtensionPointer( "glGetQueryObjectivARB" );
|
||||
qglGetQueryObjectuivARB = ( PFNGLGETQUERYOBJECTUIVARBPROC )GLimp_ExtensionPointer( "glGetQueryObjectuivARB" );
|
||||
}
|
||||
glConfig.occlusionQueryAvailable = GLEW_ARB_occlusion_query != 0;
|
||||
|
||||
// GL_ARB_timer_query
|
||||
glConfig.timerQueryAvailable = R_CheckExtension( "GL_ARB_timer_query" ) || R_CheckExtension( "GL_EXT_timer_query" );
|
||||
if( glConfig.timerQueryAvailable )
|
||||
{
|
||||
qglGetQueryObjectui64vEXT = ( PFNGLGETQUERYOBJECTUI64VEXTPROC )GLimp_ExtensionPointer( "glGetQueryObjectui64vARB" );
|
||||
if( qglGetQueryObjectui64vEXT == NULL )
|
||||
{
|
||||
qglGetQueryObjectui64vEXT = ( PFNGLGETQUERYOBJECTUI64VEXTPROC )GLimp_ExtensionPointer( "glGetQueryObjectui64vEXT" );
|
||||
}
|
||||
}
|
||||
glConfig.timerQueryAvailable = GLEW_ARB_timer_query != 0 || GLEW_EXT_timer_query != 0;
|
||||
|
||||
// GL_ARB_debug_output
|
||||
glConfig.debugOutputAvailable = R_CheckExtension( "GL_ARB_debug_output" );
|
||||
glConfig.debugOutputAvailable = GLEW_ARB_debug_output != 0;
|
||||
if( glConfig.debugOutputAvailable )
|
||||
{
|
||||
qglDebugMessageControlARB = ( PFNGLDEBUGMESSAGECONTROLARBPROC )GLimp_ExtensionPointer( "glDebugMessageControlARB" );
|
||||
qglDebugMessageInsertARB = ( PFNGLDEBUGMESSAGEINSERTARBPROC )GLimp_ExtensionPointer( "glDebugMessageInsertARB" );
|
||||
qglDebugMessageCallbackARB = ( PFNGLDEBUGMESSAGECALLBACKARBPROC )GLimp_ExtensionPointer( "glDebugMessageCallbackARB" );
|
||||
qglGetDebugMessageLogARB = ( PFNGLGETDEBUGMESSAGELOGARBPROC )GLimp_ExtensionPointer( "glGetDebugMessageLogARB" );
|
||||
|
||||
if( r_debugContext.GetInteger() >= 1 )
|
||||
{
|
||||
qglDebugMessageCallbackARB( DebugCallback, NULL );
|
||||
glDebugMessageCallbackARB( DebugCallback, NULL );
|
||||
}
|
||||
if( r_debugContext.GetInteger() >= 2 )
|
||||
{
|
||||
|
@ -629,10 +398,10 @@ static void R_CheckPortableExtensions()
|
|||
if( r_debugContext.GetInteger() >= 3 )
|
||||
{
|
||||
// enable all the low priority messages
|
||||
qglDebugMessageControlARB( GL_DONT_CARE,
|
||||
GL_DONT_CARE,
|
||||
GL_DEBUG_SEVERITY_LOW_ARB,
|
||||
0, NULL, true );
|
||||
glDebugMessageControlARB( GL_DONT_CARE,
|
||||
GL_DONT_CARE,
|
||||
GL_DEBUG_SEVERITY_LOW_ARB,
|
||||
0, NULL, true );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -688,10 +457,10 @@ static void R_CheckPortableExtensions()
|
|||
}
|
||||
|
||||
// generate one global Vertex Array Object (VAO)
|
||||
qglGenVertexArrays( 1, &glConfig.global_vao );
|
||||
qglBindVertexArray( glConfig.global_vao );
|
||||
|
||||
glGenVertexArrays( 1, &glConfig.global_vao );
|
||||
glBindVertexArray( glConfig.global_vao );
|
||||
}
|
||||
// RB end
|
||||
|
||||
|
||||
|
||||
|
@ -881,24 +650,24 @@ void R_InitOpenGL()
|
|||
Sys_InitInput();
|
||||
|
||||
// get our config strings
|
||||
glConfig.vendor_string = ( const char* )qglGetString( GL_VENDOR );
|
||||
glConfig.renderer_string = ( const char* )qglGetString( GL_RENDERER );
|
||||
glConfig.version_string = ( const char* )qglGetString( GL_VERSION );
|
||||
glConfig.shading_language_string = ( const char* )qglGetString( GL_SHADING_LANGUAGE_VERSION );
|
||||
glConfig.extensions_string = ( const char* )qglGetString( GL_EXTENSIONS );
|
||||
glConfig.vendor_string = ( const char* )glGetString( GL_VENDOR );
|
||||
glConfig.renderer_string = ( const char* )glGetString( GL_RENDERER );
|
||||
glConfig.version_string = ( const char* )glGetString( GL_VERSION );
|
||||
glConfig.shading_language_string = ( const char* )glGetString( GL_SHADING_LANGUAGE_VERSION );
|
||||
glConfig.extensions_string = ( const char* )glGetString( GL_EXTENSIONS );
|
||||
|
||||
if( glConfig.extensions_string == NULL )
|
||||
{
|
||||
// As of OpenGL 3.2, glGetStringi is required to obtain the available extensions
|
||||
qglGetStringi = ( PFNGLGETSTRINGIPROC )GLimp_ExtensionPointer( "glGetStringi" );
|
||||
//glGetStringi = ( PFNGLGETSTRINGIPROC )GLimp_ExtensionPointer( "glGetStringi" );
|
||||
|
||||
// Build the extensions string
|
||||
GLint numExtensions;
|
||||
qglGetIntegerv( GL_NUM_EXTENSIONS, &numExtensions );
|
||||
glGetIntegerv( GL_NUM_EXTENSIONS, &numExtensions );
|
||||
extensions_string.Clear();
|
||||
for( int i = 0; i < numExtensions; i++ )
|
||||
{
|
||||
extensions_string.Append( ( const char* )qglGetStringi( GL_EXTENSIONS, i ) );
|
||||
extensions_string.Append( ( const char* )glGetStringi( GL_EXTENSIONS, i ) );
|
||||
// the now deprecated glGetString method usaed to create a single string with each extension separated by a space
|
||||
if( i < numExtensions - 1 )
|
||||
{
|
||||
|
@ -917,7 +686,7 @@ void R_InitOpenGL()
|
|||
|
||||
// OpenGL driver constants
|
||||
GLint temp;
|
||||
qglGetIntegerv( GL_MAX_TEXTURE_SIZE, &temp );
|
||||
glGetIntegerv( GL_MAX_TEXTURE_SIZE, &temp );
|
||||
glConfig.maxTextureSize = temp;
|
||||
|
||||
// stubbed or broken drivers may have reported 0...
|
||||
|
@ -988,7 +757,7 @@ void GL_CheckErrors()
|
|||
// check for up to 10 errors pending
|
||||
for( i = 0 ; i < 10 ; i++ )
|
||||
{
|
||||
err = qglGetError();
|
||||
err = glGetError();
|
||||
if( err == GL_NO_ERROR )
|
||||
{
|
||||
return;
|
||||
|
@ -1312,8 +1081,8 @@ void R_ReadTiledPixels( int width, int height, byte* buffer, renderView_t* ref =
|
|||
h = height - yo;
|
||||
}
|
||||
|
||||
qglReadBuffer( GL_FRONT );
|
||||
qglReadPixels( 0, 0, w, h, GL_RGB, GL_UNSIGNED_BYTE, temp );
|
||||
glReadBuffer( GL_FRONT );
|
||||
glReadPixels( 0, 0, w, h, GL_RGB, GL_UNSIGNED_BYTE, temp );
|
||||
|
||||
int row = ( w * 3 + 3 ) & ~3; // OpenGL pads to dword boundaries
|
||||
|
||||
|
@ -1386,7 +1155,7 @@ void idRenderSystemLocal::TakeScreenshot( int width, int height, const char* fil
|
|||
r_jitter.SetBool( false );
|
||||
}
|
||||
|
||||
// fill in the header (this is vertically flipped, which qglReadPixels emits)
|
||||
// fill in the header (this is vertically flipped, which glReadPixels emits)
|
||||
buffer[2] = 2; // uncompressed type
|
||||
buffer[12] = width & 255;
|
||||
buffer[13] = width >> 8;
|
||||
|
@ -1549,7 +1318,7 @@ void R_StencilShot()
|
|||
|
||||
idTempArray< byte > byteBuffer( pix );
|
||||
|
||||
qglReadPixels( 0, 0, width, height, GL_STENCIL_INDEX , GL_UNSIGNED_BYTE, byteBuffer.Ptr() );
|
||||
glReadPixels( 0, 0, width, height, GL_STENCIL_INDEX , GL_UNSIGNED_BYTE, byteBuffer.Ptr() );
|
||||
|
||||
for( i = 0 ; i < pix ; i++ )
|
||||
{
|
||||
|
@ -1559,7 +1328,7 @@ void R_StencilShot()
|
|||
buffer[18 + i * 3 + 2] = byteBuffer[i];
|
||||
}
|
||||
|
||||
// fill in the header (this is vertically flipped, which qglReadPixels emits)
|
||||
// fill in the header (this is vertically flipped, which glReadPixels emits)
|
||||
buffer[2] = 2; // uncompressed type
|
||||
buffer[12] = width & 255;
|
||||
buffer[13] = width >> 8;
|
||||
|
@ -2042,7 +1811,7 @@ void R_VidRestart_f( const idCmdArgs& args )
|
|||
tr.viewDef = NULL;
|
||||
|
||||
// check for problems
|
||||
int err = qglGetError();
|
||||
int err = glGetError();
|
||||
if( err != GL_NO_ERROR )
|
||||
{
|
||||
common->Printf( "glGetError() = 0x%x\n", err );
|
||||
|
@ -2667,7 +2436,7 @@ void idRenderSystemLocal::InitOpenGL()
|
|||
// Reloading images here causes the rendertargets to get deleted. Figure out how to handle this properly on 360
|
||||
globalImages->ReloadImages( true );
|
||||
|
||||
int err = qglGetError();
|
||||
int err = glGetError();
|
||||
if( err != GL_NO_ERROR )
|
||||
{
|
||||
common->Printf( "glGetError() = 0x%x\n", err );
|
||||
|
|
|
@ -1197,12 +1197,12 @@ void idRenderWorldLocal::ShowPortals()
|
|||
GL_Color( 0, 1, 0 );
|
||||
}
|
||||
|
||||
qglBegin( GL_LINE_LOOP );
|
||||
glBegin( GL_LINE_LOOP );
|
||||
for( j = 0; j < w->GetNumPoints(); j++ )
|
||||
{
|
||||
qglVertex3fv( ( *w )[j].ToFloatPtr() );
|
||||
glVertex3fv( ( *w )[j].ToFloatPtr() );
|
||||
}
|
||||
qglEnd();
|
||||
glEnd();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -373,8 +373,8 @@ void idVertexCache::BeginBackEnd()
|
|||
|
||||
#if 0
|
||||
const int startBind = Sys_Milliseconds();
|
||||
qglBindBufferARB( GL_ARRAY_BUFFER_ARB, ( GLuint )frameData[drawListNum].vertexBuffer.GetAPIObject() );
|
||||
qglBindBufferARB( GL_ELEMENT_ARRAY_BUFFER_ARB, ( GLuint )frameData[drawListNum].indexBuffer.GetAPIObject() );
|
||||
glBindBufferARB( GL_ARRAY_BUFFER_ARB, ( GLuint )frameData[drawListNum].vertexBuffer.GetAPIObject() );
|
||||
glBindBufferARB( GL_ELEMENT_ARRAY_BUFFER_ARB, ( GLuint )frameData[drawListNum].indexBuffer.GetAPIObject() );
|
||||
const int endBind = Sys_Milliseconds();
|
||||
if( endBind - startBind > 1 )
|
||||
{
|
||||
|
|
|
@ -206,7 +206,7 @@ void RB_DrawElementsWithCounters( const drawSurf_t* surf )
|
|||
const GLintptrARB ubo = reinterpret_cast< GLintptrARB >( jointBuffer.GetAPIObject() );
|
||||
// RB end
|
||||
|
||||
qglBindBufferRange( GL_UNIFORM_BUFFER, 0, ubo, jointBuffer.GetOffset(), jointBuffer.GetNumJoints() * sizeof( idJointMat ) );
|
||||
glBindBufferRange( GL_UNIFORM_BUFFER, 0, ubo, jointBuffer.GetOffset(), jointBuffer.GetNumJoints() * sizeof( idJointMat ) );
|
||||
}
|
||||
|
||||
renderProgManager.CommitUniforms();
|
||||
|
@ -214,40 +214,40 @@ void RB_DrawElementsWithCounters( const drawSurf_t* surf )
|
|||
// RB: 64 bit fixes, changed GLuint to GLintptrARB
|
||||
if( backEnd.glState.currentIndexBuffer != ( GLintptrARB )indexBuffer->GetAPIObject() || !r_useStateCaching.GetBool() )
|
||||
{
|
||||
qglBindBufferARB( GL_ELEMENT_ARRAY_BUFFER_ARB, ( GLintptrARB )indexBuffer->GetAPIObject() );
|
||||
glBindBufferARB( GL_ELEMENT_ARRAY_BUFFER_ARB, ( GLintptrARB )indexBuffer->GetAPIObject() );
|
||||
backEnd.glState.currentIndexBuffer = ( GLintptrARB )indexBuffer->GetAPIObject();
|
||||
}
|
||||
|
||||
if( ( backEnd.glState.vertexLayout != LAYOUT_DRAW_VERT ) || ( backEnd.glState.currentVertexBuffer != ( GLintptrARB )vertexBuffer->GetAPIObject() ) || !r_useStateCaching.GetBool() )
|
||||
{
|
||||
qglBindBufferARB( GL_ARRAY_BUFFER_ARB, ( GLintptrARB )vertexBuffer->GetAPIObject() );
|
||||
glBindBufferARB( GL_ARRAY_BUFFER_ARB, ( GLintptrARB )vertexBuffer->GetAPIObject() );
|
||||
backEnd.glState.currentVertexBuffer = ( GLintptrARB )vertexBuffer->GetAPIObject();
|
||||
|
||||
qglEnableVertexAttribArrayARB( PC_ATTRIB_INDEX_VERTEX );
|
||||
qglEnableVertexAttribArrayARB( PC_ATTRIB_INDEX_NORMAL );
|
||||
qglEnableVertexAttribArrayARB( PC_ATTRIB_INDEX_COLOR );
|
||||
qglEnableVertexAttribArrayARB( PC_ATTRIB_INDEX_COLOR2 );
|
||||
qglEnableVertexAttribArrayARB( PC_ATTRIB_INDEX_ST );
|
||||
qglEnableVertexAttribArrayARB( PC_ATTRIB_INDEX_TANGENT );
|
||||
glEnableVertexAttribArrayARB( PC_ATTRIB_INDEX_VERTEX );
|
||||
glEnableVertexAttribArrayARB( PC_ATTRIB_INDEX_NORMAL );
|
||||
glEnableVertexAttribArrayARB( PC_ATTRIB_INDEX_COLOR );
|
||||
glEnableVertexAttribArrayARB( PC_ATTRIB_INDEX_COLOR2 );
|
||||
glEnableVertexAttribArrayARB( PC_ATTRIB_INDEX_ST );
|
||||
glEnableVertexAttribArrayARB( PC_ATTRIB_INDEX_TANGENT );
|
||||
|
||||
qglVertexAttribPointerARB( PC_ATTRIB_INDEX_VERTEX, 3, GL_FLOAT, GL_FALSE, sizeof( idDrawVert ), ( void* )( DRAWVERT_XYZ_OFFSET ) );
|
||||
qglVertexAttribPointerARB( PC_ATTRIB_INDEX_NORMAL, 4, GL_UNSIGNED_BYTE, GL_TRUE, sizeof( idDrawVert ), ( void* )( DRAWVERT_NORMAL_OFFSET ) );
|
||||
qglVertexAttribPointerARB( PC_ATTRIB_INDEX_COLOR, 4, GL_UNSIGNED_BYTE, GL_TRUE, sizeof( idDrawVert ), ( void* )( DRAWVERT_COLOR_OFFSET ) );
|
||||
qglVertexAttribPointerARB( PC_ATTRIB_INDEX_COLOR2, 4, GL_UNSIGNED_BYTE, GL_TRUE, sizeof( idDrawVert ), ( void* )( DRAWVERT_COLOR2_OFFSET ) );
|
||||
qglVertexAttribPointerARB( PC_ATTRIB_INDEX_ST, 2, GL_HALF_FLOAT, GL_TRUE, sizeof( idDrawVert ), ( void* )( DRAWVERT_ST_OFFSET ) );
|
||||
qglVertexAttribPointerARB( PC_ATTRIB_INDEX_TANGENT, 4, GL_UNSIGNED_BYTE, GL_TRUE, sizeof( idDrawVert ), ( void* )( DRAWVERT_TANGENT_OFFSET ) );
|
||||
glVertexAttribPointerARB( PC_ATTRIB_INDEX_VERTEX, 3, GL_FLOAT, GL_FALSE, sizeof( idDrawVert ), ( void* )( DRAWVERT_XYZ_OFFSET ) );
|
||||
glVertexAttribPointerARB( PC_ATTRIB_INDEX_NORMAL, 4, GL_UNSIGNED_BYTE, GL_TRUE, sizeof( idDrawVert ), ( void* )( DRAWVERT_NORMAL_OFFSET ) );
|
||||
glVertexAttribPointerARB( PC_ATTRIB_INDEX_COLOR, 4, GL_UNSIGNED_BYTE, GL_TRUE, sizeof( idDrawVert ), ( void* )( DRAWVERT_COLOR_OFFSET ) );
|
||||
glVertexAttribPointerARB( PC_ATTRIB_INDEX_COLOR2, 4, GL_UNSIGNED_BYTE, GL_TRUE, sizeof( idDrawVert ), ( void* )( DRAWVERT_COLOR2_OFFSET ) );
|
||||
glVertexAttribPointerARB( PC_ATTRIB_INDEX_ST, 2, GL_HALF_FLOAT, GL_TRUE, sizeof( idDrawVert ), ( void* )( DRAWVERT_ST_OFFSET ) );
|
||||
glVertexAttribPointerARB( PC_ATTRIB_INDEX_TANGENT, 4, GL_UNSIGNED_BYTE, GL_TRUE, sizeof( idDrawVert ), ( void* )( DRAWVERT_TANGENT_OFFSET ) );
|
||||
|
||||
backEnd.glState.vertexLayout = LAYOUT_DRAW_VERT;
|
||||
}
|
||||
// RB end
|
||||
|
||||
qglDrawElementsBaseVertex( GL_TRIANGLES,
|
||||
r_singleTriangle.GetBool() ? 3 : surf->numIndexes,
|
||||
GL_INDEX_TYPE,
|
||||
( triIndex_t* )indexOffset,
|
||||
vertOffset / sizeof( idDrawVert ) );
|
||||
|
||||
|
||||
glDrawElementsBaseVertex( GL_TRIANGLES,
|
||||
r_singleTriangle.GetBool() ? 3 : surf->numIndexes,
|
||||
GL_INDEX_TYPE,
|
||||
( triIndex_t* )indexOffset,
|
||||
vertOffset / sizeof( idDrawVert ) );
|
||||
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1665,14 +1665,14 @@ static void RB_StencilShadowPass( const drawSurf_t* drawSurfs, const viewLight_t
|
|||
if( renderZPass )
|
||||
{
|
||||
// Z-pass
|
||||
qglStencilOpSeparate( GL_FRONT, GL_KEEP, GL_KEEP, GL_INCR );
|
||||
qglStencilOpSeparate( GL_BACK, GL_KEEP, GL_KEEP, GL_DECR );
|
||||
glStencilOpSeparate( GL_FRONT, GL_KEEP, GL_KEEP, GL_INCR );
|
||||
glStencilOpSeparate( GL_BACK, GL_KEEP, GL_KEEP, GL_DECR );
|
||||
}
|
||||
else if( r_useStencilShadowPreload.GetBool() )
|
||||
{
|
||||
// preload + Z-pass
|
||||
qglStencilOpSeparate( GL_FRONT, GL_KEEP, GL_DECR, GL_DECR );
|
||||
qglStencilOpSeparate( GL_BACK, GL_KEEP, GL_INCR, GL_INCR );
|
||||
glStencilOpSeparate( GL_FRONT, GL_KEEP, GL_DECR, GL_DECR );
|
||||
glStencilOpSeparate( GL_BACK, GL_KEEP, GL_INCR, GL_INCR );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1723,7 +1723,7 @@ static void RB_StencilShadowPass( const drawSurf_t* drawSurfs, const viewLight_t
|
|||
// RB: 64 bit fixes, changed GLuint to GLintptrARB
|
||||
if( backEnd.glState.currentIndexBuffer != ( GLintptrARB )indexBuffer->GetAPIObject() || !r_useStateCaching.GetBool() )
|
||||
{
|
||||
qglBindBufferARB( GL_ELEMENT_ARRAY_BUFFER_ARB, ( GLintptrARB )indexBuffer->GetAPIObject() );
|
||||
glBindBufferARB( GL_ELEMENT_ARRAY_BUFFER_ARB, ( GLintptrARB )indexBuffer->GetAPIObject() );
|
||||
backEnd.glState.currentIndexBuffer = ( GLintptrARB )indexBuffer->GetAPIObject();
|
||||
}
|
||||
|
||||
|
@ -1740,23 +1740,23 @@ static void RB_StencilShadowPass( const drawSurf_t* drawSurfs, const viewLight_t
|
|||
assert( ( jointBuffer.GetOffset() & ( glConfig.uniformBufferOffsetAlignment - 1 ) ) == 0 );
|
||||
|
||||
const GLintptrARB ubo = reinterpret_cast< GLintptrARB >( jointBuffer.GetAPIObject() );
|
||||
qglBindBufferRange( GL_UNIFORM_BUFFER, 0, ubo, jointBuffer.GetOffset(), jointBuffer.GetNumJoints() * sizeof( idJointMat ) );
|
||||
glBindBufferRange( GL_UNIFORM_BUFFER, 0, ubo, jointBuffer.GetOffset(), jointBuffer.GetNumJoints() * sizeof( idJointMat ) );
|
||||
|
||||
if( ( backEnd.glState.vertexLayout != LAYOUT_DRAW_SHADOW_VERT_SKINNED ) || ( backEnd.glState.currentVertexBuffer != ( GLintptrARB )vertexBuffer->GetAPIObject() ) || !r_useStateCaching.GetBool() )
|
||||
{
|
||||
qglBindBufferARB( GL_ARRAY_BUFFER_ARB, ( GLintptrARB )vertexBuffer->GetAPIObject() );
|
||||
glBindBufferARB( GL_ARRAY_BUFFER_ARB, ( GLintptrARB )vertexBuffer->GetAPIObject() );
|
||||
backEnd.glState.currentVertexBuffer = ( GLintptrARB )vertexBuffer->GetAPIObject();
|
||||
|
||||
qglEnableVertexAttribArrayARB( PC_ATTRIB_INDEX_VERTEX );
|
||||
qglDisableVertexAttribArrayARB( PC_ATTRIB_INDEX_NORMAL );
|
||||
qglEnableVertexAttribArrayARB( PC_ATTRIB_INDEX_COLOR );
|
||||
qglEnableVertexAttribArrayARB( PC_ATTRIB_INDEX_COLOR2 );
|
||||
qglDisableVertexAttribArrayARB( PC_ATTRIB_INDEX_ST );
|
||||
qglDisableVertexAttribArrayARB( PC_ATTRIB_INDEX_TANGENT );
|
||||
glEnableVertexAttribArrayARB( PC_ATTRIB_INDEX_VERTEX );
|
||||
glDisableVertexAttribArrayARB( PC_ATTRIB_INDEX_NORMAL );
|
||||
glEnableVertexAttribArrayARB( PC_ATTRIB_INDEX_COLOR );
|
||||
glEnableVertexAttribArrayARB( PC_ATTRIB_INDEX_COLOR2 );
|
||||
glDisableVertexAttribArrayARB( PC_ATTRIB_INDEX_ST );
|
||||
glDisableVertexAttribArrayARB( PC_ATTRIB_INDEX_TANGENT );
|
||||
|
||||
qglVertexAttribPointerARB( PC_ATTRIB_INDEX_VERTEX, 4, GL_FLOAT, GL_FALSE, sizeof( idShadowVertSkinned ), ( void* )( SHADOWVERTSKINNED_XYZW_OFFSET ) );
|
||||
qglVertexAttribPointerARB( PC_ATTRIB_INDEX_COLOR, 4, GL_UNSIGNED_BYTE, GL_TRUE, sizeof( idShadowVertSkinned ), ( void* )( SHADOWVERTSKINNED_COLOR_OFFSET ) );
|
||||
qglVertexAttribPointerARB( PC_ATTRIB_INDEX_COLOR2, 4, GL_UNSIGNED_BYTE, GL_TRUE, sizeof( idShadowVertSkinned ), ( void* )( SHADOWVERTSKINNED_COLOR2_OFFSET ) );
|
||||
glVertexAttribPointerARB( PC_ATTRIB_INDEX_VERTEX, 4, GL_FLOAT, GL_FALSE, sizeof( idShadowVertSkinned ), ( void* )( SHADOWVERTSKINNED_XYZW_OFFSET ) );
|
||||
glVertexAttribPointerARB( PC_ATTRIB_INDEX_COLOR, 4, GL_UNSIGNED_BYTE, GL_TRUE, sizeof( idShadowVertSkinned ), ( void* )( SHADOWVERTSKINNED_COLOR_OFFSET ) );
|
||||
glVertexAttribPointerARB( PC_ATTRIB_INDEX_COLOR2, 4, GL_UNSIGNED_BYTE, GL_TRUE, sizeof( idShadowVertSkinned ), ( void* )( SHADOWVERTSKINNED_COLOR2_OFFSET ) );
|
||||
|
||||
backEnd.glState.vertexLayout = LAYOUT_DRAW_SHADOW_VERT_SKINNED;
|
||||
}
|
||||
|
@ -1767,17 +1767,17 @@ static void RB_StencilShadowPass( const drawSurf_t* drawSurfs, const viewLight_t
|
|||
|
||||
if( ( backEnd.glState.vertexLayout != LAYOUT_DRAW_SHADOW_VERT ) || ( backEnd.glState.currentVertexBuffer != ( GLintptrARB )vertexBuffer->GetAPIObject() ) || !r_useStateCaching.GetBool() )
|
||||
{
|
||||
qglBindBufferARB( GL_ARRAY_BUFFER_ARB, ( GLintptrARB )vertexBuffer->GetAPIObject() );
|
||||
glBindBufferARB( GL_ARRAY_BUFFER_ARB, ( GLintptrARB )vertexBuffer->GetAPIObject() );
|
||||
backEnd.glState.currentVertexBuffer = ( GLintptrARB )vertexBuffer->GetAPIObject();
|
||||
|
||||
qglEnableVertexAttribArrayARB( PC_ATTRIB_INDEX_VERTEX );
|
||||
qglDisableVertexAttribArrayARB( PC_ATTRIB_INDEX_NORMAL );
|
||||
qglDisableVertexAttribArrayARB( PC_ATTRIB_INDEX_COLOR );
|
||||
qglDisableVertexAttribArrayARB( PC_ATTRIB_INDEX_COLOR2 );
|
||||
qglDisableVertexAttribArrayARB( PC_ATTRIB_INDEX_ST );
|
||||
qglDisableVertexAttribArrayARB( PC_ATTRIB_INDEX_TANGENT );
|
||||
glEnableVertexAttribArrayARB( PC_ATTRIB_INDEX_VERTEX );
|
||||
glDisableVertexAttribArrayARB( PC_ATTRIB_INDEX_NORMAL );
|
||||
glDisableVertexAttribArrayARB( PC_ATTRIB_INDEX_COLOR );
|
||||
glDisableVertexAttribArrayARB( PC_ATTRIB_INDEX_COLOR2 );
|
||||
glDisableVertexAttribArrayARB( PC_ATTRIB_INDEX_ST );
|
||||
glDisableVertexAttribArrayARB( PC_ATTRIB_INDEX_TANGENT );
|
||||
|
||||
qglVertexAttribPointerARB( PC_ATTRIB_INDEX_VERTEX, 4, GL_FLOAT, GL_FALSE, sizeof( idShadowVert ), ( void* )( SHADOWVERT_XYZW_OFFSET ) );
|
||||
glVertexAttribPointerARB( PC_ATTRIB_INDEX_VERTEX, 4, GL_FLOAT, GL_FALSE, sizeof( idShadowVert ), ( void* )( SHADOWVERT_XYZW_OFFSET ) );
|
||||
|
||||
backEnd.glState.vertexLayout = LAYOUT_DRAW_SHADOW_VERT;
|
||||
}
|
||||
|
@ -1788,26 +1788,26 @@ static void RB_StencilShadowPass( const drawSurf_t* drawSurfs, const viewLight_t
|
|||
|
||||
if( drawSurf->jointCache )
|
||||
{
|
||||
qglDrawElementsBaseVertex( GL_TRIANGLES, r_singleTriangle.GetBool() ? 3 : drawSurf->numIndexes, GL_INDEX_TYPE, ( triIndex_t* )indexOffset, vertOffset / sizeof( idShadowVertSkinned ) );
|
||||
glDrawElementsBaseVertex( GL_TRIANGLES, r_singleTriangle.GetBool() ? 3 : drawSurf->numIndexes, GL_INDEX_TYPE, ( triIndex_t* )indexOffset, vertOffset / sizeof( idShadowVertSkinned ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
qglDrawElementsBaseVertex( GL_TRIANGLES, r_singleTriangle.GetBool() ? 3 : drawSurf->numIndexes, GL_INDEX_TYPE, ( triIndex_t* )indexOffset, vertOffset / sizeof( idShadowVert ) );
|
||||
glDrawElementsBaseVertex( GL_TRIANGLES, r_singleTriangle.GetBool() ? 3 : drawSurf->numIndexes, GL_INDEX_TYPE, ( triIndex_t* )indexOffset, vertOffset / sizeof( idShadowVert ) );
|
||||
}
|
||||
|
||||
if( !renderZPass && r_useStencilShadowPreload.GetBool() )
|
||||
{
|
||||
// render again with Z-pass
|
||||
qglStencilOpSeparate( GL_FRONT, GL_KEEP, GL_KEEP, GL_INCR );
|
||||
qglStencilOpSeparate( GL_BACK, GL_KEEP, GL_KEEP, GL_DECR );
|
||||
glStencilOpSeparate( GL_FRONT, GL_KEEP, GL_KEEP, GL_INCR );
|
||||
glStencilOpSeparate( GL_BACK, GL_KEEP, GL_KEEP, GL_DECR );
|
||||
|
||||
if( drawSurf->jointCache )
|
||||
{
|
||||
qglDrawElementsBaseVertex( GL_TRIANGLES, r_singleTriangle.GetBool() ? 3 : drawSurf->numIndexes, GL_INDEX_TYPE, ( triIndex_t* )indexOffset, vertOffset / sizeof( idShadowVertSkinned ) );
|
||||
glDrawElementsBaseVertex( GL_TRIANGLES, r_singleTriangle.GetBool() ? 3 : drawSurf->numIndexes, GL_INDEX_TYPE, ( triIndex_t* )indexOffset, vertOffset / sizeof( idShadowVertSkinned ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
qglDrawElementsBaseVertex( GL_TRIANGLES, r_singleTriangle.GetBool() ? 3 : drawSurf->numIndexes, GL_INDEX_TYPE, ( triIndex_t* )indexOffset, vertOffset / sizeof( idShadowVert ) );
|
||||
glDrawElementsBaseVertex( GL_TRIANGLES, r_singleTriangle.GetBool() ? 3 : drawSurf->numIndexes, GL_INDEX_TYPE, ( triIndex_t* )indexOffset, vertOffset / sizeof( idShadowVert ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1873,8 +1873,8 @@ static void RB_StencilSelectLight( const viewLight_t* vLight )
|
|||
RB_SetMVP( invProjectMVPMatrix );
|
||||
|
||||
// two-sided stencil test
|
||||
qglStencilOpSeparate( GL_FRONT, GL_KEEP, GL_REPLACE, GL_ZERO );
|
||||
qglStencilOpSeparate( GL_BACK, GL_KEEP, GL_ZERO, GL_REPLACE );
|
||||
glStencilOpSeparate( GL_FRONT, GL_KEEP, GL_REPLACE, GL_ZERO );
|
||||
glStencilOpSeparate( GL_BACK, GL_KEEP, GL_ZERO, GL_REPLACE );
|
||||
|
||||
RB_DrawElementsWithCounters( &backEnd.zeroOneCubeSurface );
|
||||
|
||||
|
@ -2870,7 +2870,7 @@ void RB_DrawViewInternal( const viewDef_t* viewDef, const int stereoEye )
|
|||
|
||||
#ifdef USE_CORE_PROFILE
|
||||
// bind one global Vertex Array Object (VAO)
|
||||
qglBindVertexArray( glConfig.global_vao );
|
||||
glBindVertexArray( glConfig.global_vao );
|
||||
#endif
|
||||
|
||||
//------------------------------------
|
||||
|
@ -3030,9 +3030,9 @@ void RB_MotionBlur()
|
|||
|
||||
// clear the alpha buffer and draw only the hands + weapon into it so
|
||||
// we can avoid blurring them
|
||||
qglClearColor( 0, 0, 0, 1 );
|
||||
glClearColor( 0, 0, 0, 1 );
|
||||
GL_State( GLS_COLORMASK | GLS_DEPTHMASK );
|
||||
qglClear( GL_COLOR_BUFFER_BIT );
|
||||
glClear( GL_COLOR_BUFFER_BIT );
|
||||
GL_Color( 0, 0, 0, 0 );
|
||||
GL_SelectTexture( 0 );
|
||||
globalImages->blackImage->Bind();
|
||||
|
|
|
@ -97,32 +97,32 @@ void RB_DrawBounds( const idBounds& bounds )
|
|||
{
|
||||
return;
|
||||
}
|
||||
qglBegin( GL_LINE_LOOP );
|
||||
qglVertex3f( bounds[0][0], bounds[0][1], bounds[0][2] );
|
||||
qglVertex3f( bounds[0][0], bounds[1][1], bounds[0][2] );
|
||||
qglVertex3f( bounds[1][0], bounds[1][1], bounds[0][2] );
|
||||
qglVertex3f( bounds[1][0], bounds[0][1], bounds[0][2] );
|
||||
qglEnd();
|
||||
qglBegin( GL_LINE_LOOP );
|
||||
qglVertex3f( bounds[0][0], bounds[0][1], bounds[1][2] );
|
||||
qglVertex3f( bounds[0][0], bounds[1][1], bounds[1][2] );
|
||||
qglVertex3f( bounds[1][0], bounds[1][1], bounds[1][2] );
|
||||
qglVertex3f( bounds[1][0], bounds[0][1], bounds[1][2] );
|
||||
qglEnd();
|
||||
glBegin( GL_LINE_LOOP );
|
||||
glVertex3f( bounds[0][0], bounds[0][1], bounds[0][2] );
|
||||
glVertex3f( bounds[0][0], bounds[1][1], bounds[0][2] );
|
||||
glVertex3f( bounds[1][0], bounds[1][1], bounds[0][2] );
|
||||
glVertex3f( bounds[1][0], bounds[0][1], bounds[0][2] );
|
||||
glEnd();
|
||||
glBegin( GL_LINE_LOOP );
|
||||
glVertex3f( bounds[0][0], bounds[0][1], bounds[1][2] );
|
||||
glVertex3f( bounds[0][0], bounds[1][1], bounds[1][2] );
|
||||
glVertex3f( bounds[1][0], bounds[1][1], bounds[1][2] );
|
||||
glVertex3f( bounds[1][0], bounds[0][1], bounds[1][2] );
|
||||
glEnd();
|
||||
|
||||
qglBegin( GL_LINES );
|
||||
qglVertex3f( bounds[0][0], bounds[0][1], bounds[0][2] );
|
||||
qglVertex3f( bounds[0][0], bounds[0][1], bounds[1][2] );
|
||||
glBegin( GL_LINES );
|
||||
glVertex3f( bounds[0][0], bounds[0][1], bounds[0][2] );
|
||||
glVertex3f( bounds[0][0], bounds[0][1], bounds[1][2] );
|
||||
|
||||
qglVertex3f( bounds[0][0], bounds[1][1], bounds[0][2] );
|
||||
qglVertex3f( bounds[0][0], bounds[1][1], bounds[1][2] );
|
||||
glVertex3f( bounds[0][0], bounds[1][1], bounds[0][2] );
|
||||
glVertex3f( bounds[0][0], bounds[1][1], bounds[1][2] );
|
||||
|
||||
qglVertex3f( bounds[1][0], bounds[0][1], bounds[0][2] );
|
||||
qglVertex3f( bounds[1][0], bounds[0][1], bounds[1][2] );
|
||||
glVertex3f( bounds[1][0], bounds[0][1], bounds[0][2] );
|
||||
glVertex3f( bounds[1][0], bounds[0][1], bounds[1][2] );
|
||||
|
||||
qglVertex3f( bounds[1][0], bounds[1][1], bounds[0][2] );
|
||||
qglVertex3f( bounds[1][0], bounds[1][1], bounds[1][2] );
|
||||
qglEnd();
|
||||
glVertex3f( bounds[1][0], bounds[1][1], bounds[0][2] );
|
||||
glVertex3f( bounds[1][0], bounds[1][1], bounds[1][2] );
|
||||
glEnd();
|
||||
}
|
||||
|
||||
|
||||
|
@ -136,7 +136,7 @@ static void RB_SimpleSurfaceSetup( const drawSurf_t* drawSurf )
|
|||
// change the matrix if needed
|
||||
if( drawSurf->space != backEnd.currentSpace )
|
||||
{
|
||||
qglLoadMatrixf( drawSurf->space->modelViewMatrix );
|
||||
glLoadMatrixf( drawSurf->space->modelViewMatrix );
|
||||
backEnd.currentSpace = drawSurf->space;
|
||||
}
|
||||
|
||||
|
@ -161,7 +161,7 @@ static void RB_SimpleWorldSetup()
|
|||
backEnd.currentSpace = &backEnd.viewDef->worldSpace;
|
||||
|
||||
|
||||
qglLoadMatrixf( backEnd.viewDef->worldSpace.modelViewMatrix );
|
||||
glLoadMatrixf( backEnd.viewDef->worldSpace.modelViewMatrix );
|
||||
|
||||
GL_Scissor( backEnd.viewDef->viewport.x1 + backEnd.viewDef->scissor.x1,
|
||||
backEnd.viewDef->viewport.y1 + backEnd.viewDef->scissor.y1,
|
||||
|
@ -182,21 +182,21 @@ stenciling will matter.
|
|||
*/
|
||||
void RB_PolygonClear()
|
||||
{
|
||||
qglPushMatrix();
|
||||
qglPushAttrib( GL_ALL_ATTRIB_BITS );
|
||||
qglLoadIdentity();
|
||||
qglDisable( GL_TEXTURE_2D );
|
||||
qglDisable( GL_DEPTH_TEST );
|
||||
qglDisable( GL_CULL_FACE );
|
||||
qglDisable( GL_SCISSOR_TEST );
|
||||
qglBegin( GL_POLYGON );
|
||||
qglVertex3f( -20, -20, -10 );
|
||||
qglVertex3f( 20, -20, -10 );
|
||||
qglVertex3f( 20, 20, -10 );
|
||||
qglVertex3f( -20, 20, -10 );
|
||||
qglEnd();
|
||||
qglPopAttrib();
|
||||
qglPopMatrix();
|
||||
glPushMatrix();
|
||||
glPushAttrib( GL_ALL_ATTRIB_BITS );
|
||||
glLoadIdentity();
|
||||
glDisable( GL_TEXTURE_2D );
|
||||
glDisable( GL_DEPTH_TEST );
|
||||
glDisable( GL_CULL_FACE );
|
||||
glDisable( GL_SCISSOR_TEST );
|
||||
glBegin( GL_POLYGON );
|
||||
glVertex3f( -20, -20, -10 );
|
||||
glVertex3f( 20, -20, -10 );
|
||||
glVertex3f( 20, 20, -10 );
|
||||
glVertex3f( -20, 20, -10 );
|
||||
glEnd();
|
||||
glPopAttrib();
|
||||
glPopMatrix();
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -227,7 +227,7 @@ void RB_ScanStencilBuffer()
|
|||
memset( counts, 0, sizeof( counts ) );
|
||||
|
||||
stencilReadback = ( byte* )R_StaticAlloc( renderSystem->GetWidth() * renderSystem->GetHeight(), TAG_RENDER_TOOLS );
|
||||
qglReadPixels( 0, 0, renderSystem->GetWidth(), renderSystem->GetHeight(), GL_STENCIL_INDEX, GL_UNSIGNED_BYTE, stencilReadback );
|
||||
glReadPixels( 0, 0, renderSystem->GetWidth(), renderSystem->GetHeight(), GL_STENCIL_INDEX, GL_UNSIGNED_BYTE, stencilReadback );
|
||||
|
||||
for( i = 0; i < renderSystem->GetWidth() * renderSystem->GetHeight(); i++ )
|
||||
{
|
||||
|
@ -263,7 +263,7 @@ static void RB_CountStencilBuffer()
|
|||
|
||||
|
||||
stencilReadback = ( byte* )R_StaticAlloc( renderSystem->GetWidth() * renderSystem->GetHeight(), TAG_RENDER_TOOLS );
|
||||
qglReadPixels( 0, 0, renderSystem->GetWidth(), renderSystem->GetHeight(), GL_STENCIL_INDEX, GL_UNSIGNED_BYTE, stencilReadback );
|
||||
glReadPixels( 0, 0, renderSystem->GetWidth(), renderSystem->GetHeight(), GL_STENCIL_INDEX, GL_UNSIGNED_BYTE, stencilReadback );
|
||||
|
||||
count = 0;
|
||||
for( i = 0; i < renderSystem->GetWidth() * renderSystem->GetHeight(); i++ )
|
||||
|
@ -305,16 +305,16 @@ static void R_ColorByStencilBuffer()
|
|||
GL_Clear( true, false, false, 0, 1.0f, 1.0f, 1.0f, 1.0f );
|
||||
|
||||
// now draw color for each stencil value
|
||||
qglStencilOp( GL_KEEP, GL_KEEP, GL_KEEP );
|
||||
glStencilOp( GL_KEEP, GL_KEEP, GL_KEEP );
|
||||
for( i = 0; i < 6; i++ )
|
||||
{
|
||||
GL_Color( colors[i] );
|
||||
renderProgManager.BindShader_Color();
|
||||
qglStencilFunc( GL_EQUAL, i, 255 );
|
||||
glStencilFunc( GL_EQUAL, i, 255 );
|
||||
RB_PolygonClear();
|
||||
}
|
||||
|
||||
qglStencilFunc( GL_ALWAYS, 0, 255 );
|
||||
glStencilFunc( GL_ALWAYS, 0, 255 );
|
||||
}
|
||||
|
||||
//======================================================================
|
||||
|
@ -426,7 +426,7 @@ static void RB_ShowIntensity()
|
|||
}
|
||||
|
||||
colorReadback = ( byte* )R_StaticAlloc( renderSystem->GetWidth() * renderSystem->GetHeight() * 4, TAG_RENDER_TOOLS );
|
||||
qglReadPixels( 0, 0, renderSystem->GetWidth(), renderSystem->GetHeight(), GL_RGBA, GL_UNSIGNED_BYTE, colorReadback );
|
||||
glReadPixels( 0, 0, renderSystem->GetWidth(), renderSystem->GetHeight(), GL_RGBA, GL_UNSIGNED_BYTE, colorReadback );
|
||||
|
||||
c = renderSystem->GetWidth() * renderSystem->GetHeight() * 4;
|
||||
for( i = 0; i < c; i += 4 )
|
||||
|
@ -455,19 +455,19 @@ static void RB_ShowIntensity()
|
|||
}
|
||||
|
||||
// draw it back to the screen
|
||||
qglLoadIdentity();
|
||||
qglMatrixMode( GL_PROJECTION );
|
||||
glLoadIdentity();
|
||||
glMatrixMode( GL_PROJECTION );
|
||||
GL_State( GLS_DEPTHFUNC_ALWAYS );
|
||||
qglPushMatrix();
|
||||
qglLoadIdentity();
|
||||
qglOrtho( 0, 1, 0, 1, -1, 1 );
|
||||
qglRasterPos2f( 0, 0 );
|
||||
qglPopMatrix();
|
||||
glPushMatrix();
|
||||
glLoadIdentity();
|
||||
glOrtho( 0, 1, 0, 1, -1, 1 );
|
||||
glRasterPos2f( 0, 0 );
|
||||
glPopMatrix();
|
||||
GL_Color( 1, 1, 1 );
|
||||
globalImages->BindNull();
|
||||
qglMatrixMode( GL_MODELVIEW );
|
||||
glMatrixMode( GL_MODELVIEW );
|
||||
|
||||
qglDrawPixels( renderSystem->GetWidth(), renderSystem->GetHeight(), GL_RGBA , GL_UNSIGNED_BYTE, colorReadback );
|
||||
glDrawPixels( renderSystem->GetWidth(), renderSystem->GetHeight(), GL_RGBA , GL_UNSIGNED_BYTE, colorReadback );
|
||||
|
||||
R_StaticFree( colorReadback );
|
||||
}
|
||||
|
@ -489,16 +489,16 @@ static void RB_ShowDepthBuffer()
|
|||
return;
|
||||
}
|
||||
|
||||
qglPushMatrix();
|
||||
qglLoadIdentity();
|
||||
qglMatrixMode( GL_PROJECTION );
|
||||
qglPushMatrix();
|
||||
qglLoadIdentity();
|
||||
qglOrtho( 0, 1, 0, 1, -1, 1 );
|
||||
qglRasterPos2f( 0, 0 );
|
||||
qglPopMatrix();
|
||||
qglMatrixMode( GL_MODELVIEW );
|
||||
qglPopMatrix();
|
||||
glPushMatrix();
|
||||
glLoadIdentity();
|
||||
glMatrixMode( GL_PROJECTION );
|
||||
glPushMatrix();
|
||||
glLoadIdentity();
|
||||
glOrtho( 0, 1, 0, 1, -1, 1 );
|
||||
glRasterPos2f( 0, 0 );
|
||||
glPopMatrix();
|
||||
glMatrixMode( GL_MODELVIEW );
|
||||
glPopMatrix();
|
||||
|
||||
GL_State( GLS_DEPTHFUNC_ALWAYS );
|
||||
GL_Color( 1, 1, 1 );
|
||||
|
@ -507,7 +507,7 @@ static void RB_ShowDepthBuffer()
|
|||
depthReadback = R_StaticAlloc( renderSystem->GetWidth() * renderSystem->GetHeight() * 4, TAG_RENDER_TOOLS );
|
||||
memset( depthReadback, 0, renderSystem->GetWidth() * renderSystem->GetHeight() * 4 );
|
||||
|
||||
qglReadPixels( 0, 0, renderSystem->GetWidth(), renderSystem->GetHeight(), GL_DEPTH_COMPONENT , GL_FLOAT, depthReadback );
|
||||
glReadPixels( 0, 0, renderSystem->GetWidth(), renderSystem->GetHeight(), GL_DEPTH_COMPONENT , GL_FLOAT, depthReadback );
|
||||
|
||||
#if 0
|
||||
for( i = 0; i < renderSystem->GetWidth() * renderSystem->GetHeight(); i++ )
|
||||
|
@ -519,7 +519,7 @@ static void RB_ShowDepthBuffer()
|
|||
}
|
||||
#endif
|
||||
|
||||
qglDrawPixels( renderSystem->GetWidth(), renderSystem->GetHeight(), GL_RGBA , GL_UNSIGNED_BYTE, depthReadback );
|
||||
glDrawPixels( renderSystem->GetWidth(), renderSystem->GetHeight(), GL_RGBA , GL_UNSIGNED_BYTE, depthReadback );
|
||||
R_StaticFree( depthReadback );
|
||||
}
|
||||
|
||||
|
@ -614,9 +614,9 @@ static void RB_EnterWeaponDepthHack()
|
|||
matrix[10] *= modelDepthHack;
|
||||
matrix[14] *= modelDepthHack;
|
||||
|
||||
qglMatrixMode( GL_PROJECTION );
|
||||
qglLoadMatrixf( matrix );
|
||||
qglMatrixMode( GL_MODELVIEW );
|
||||
glMatrixMode( GL_PROJECTION );
|
||||
glLoadMatrixf( matrix );
|
||||
glMatrixMode( GL_MODELVIEW );
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -632,9 +632,9 @@ static void RB_EnterModelDepthHack( float depth )
|
|||
|
||||
matrix[14] -= depth;
|
||||
|
||||
qglMatrixMode( GL_PROJECTION );
|
||||
qglLoadMatrixf( matrix );
|
||||
qglMatrixMode( GL_MODELVIEW );
|
||||
glMatrixMode( GL_PROJECTION );
|
||||
glLoadMatrixf( matrix );
|
||||
glMatrixMode( GL_MODELVIEW );
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -644,9 +644,9 @@ RB_LeaveDepthHack
|
|||
*/
|
||||
static void RB_LeaveDepthHack()
|
||||
{
|
||||
qglMatrixMode( GL_PROJECTION );
|
||||
qglLoadMatrixf( backEnd.viewDef->projectionMatrix );
|
||||
qglMatrixMode( GL_MODELVIEW );
|
||||
glMatrixMode( GL_PROJECTION );
|
||||
glLoadMatrixf( backEnd.viewDef->projectionMatrix );
|
||||
glMatrixMode( GL_MODELVIEW );
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -760,7 +760,7 @@ static void RB_ShowSilhouette()
|
|||
// clear all triangle edges to black
|
||||
//
|
||||
globalImages->BindNull();
|
||||
qglDisable( GL_TEXTURE_2D );
|
||||
glDisable( GL_TEXTURE_2D );
|
||||
|
||||
GL_Color( 0, 0, 0 );
|
||||
|
||||
|
@ -797,12 +797,12 @@ static void RB_ShowSilhouette()
|
|||
}
|
||||
|
||||
// RB: 64 bit fixes, changed GLuint to GLintptrARB
|
||||
qglBindBufferARB( GL_ARRAY_BUFFER_ARB, ( GLintptrARB )vertexBuffer.GetAPIObject() );
|
||||
glBindBufferARB( GL_ARRAY_BUFFER_ARB, ( GLintptrARB )vertexBuffer.GetAPIObject() );
|
||||
GLintptrARB vertOffset = vertexBuffer.GetOffset();
|
||||
// RB end
|
||||
|
||||
qglVertexPointer( 3, GL_FLOAT, sizeof( idShadowVert ), ( void* )vertOffset );
|
||||
qglBegin( GL_LINES );
|
||||
glVertexPointer( 3, GL_FLOAT, sizeof( idShadowVert ), ( void* )vertOffset );
|
||||
glBegin( GL_LINES );
|
||||
|
||||
for( int j = 0; j < tri->numIndexes; j += 3 )
|
||||
{
|
||||
|
@ -814,17 +814,17 @@ static void RB_ShowSilhouette()
|
|||
{
|
||||
if( ( i1 & 1 ) + ( i2 & 1 ) == 0 )
|
||||
{
|
||||
qglArrayElement( i1 );
|
||||
qglArrayElement( i2 );
|
||||
glArrayElement( i1 );
|
||||
glArrayElement( i2 );
|
||||
}
|
||||
else if( ( i1 & 1 ) + ( i3 & 1 ) == 0 )
|
||||
{
|
||||
qglArrayElement( i1 );
|
||||
qglArrayElement( i3 );
|
||||
glArrayElement( i1 );
|
||||
glArrayElement( i3 );
|
||||
}
|
||||
}
|
||||
}
|
||||
qglEnd();
|
||||
glEnd();
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -914,7 +914,7 @@ static void RB_ShowSurfaceInfo( drawSurf_t** drawSurfs, int numDrawSurfs )
|
|||
}
|
||||
|
||||
globalImages->BindNull();
|
||||
qglDisable( GL_TEXTURE_2D );
|
||||
glDisable( GL_TEXTURE_2D );
|
||||
|
||||
GL_Color( 1, 1, 1 );
|
||||
|
||||
|
@ -978,7 +978,7 @@ static void RB_ShowViewEntitys( viewEntity_t* vModels )
|
|||
{
|
||||
idBounds b;
|
||||
|
||||
qglLoadMatrixf( vModel->modelViewMatrix );
|
||||
glLoadMatrixf( vModel->modelViewMatrix );
|
||||
|
||||
const idRenderEntityLocal* edef = vModel->entityDef;
|
||||
if( !edef )
|
||||
|
@ -1069,7 +1069,7 @@ static void RB_ShowTexturePolarity( drawSurf_t** drawSurfs, int numDrawSurfs )
|
|||
|
||||
RB_SimpleSurfaceSetup( drawSurf );
|
||||
|
||||
qglBegin( GL_TRIANGLES );
|
||||
glBegin( GL_TRIANGLES );
|
||||
for( j = 0; j < tri->numIndexes; j += 3 )
|
||||
{
|
||||
idDrawVert* a, *b, *c;
|
||||
|
@ -1104,11 +1104,11 @@ static void RB_ShowTexturePolarity( drawSurf_t** drawSurfs, int numDrawSurfs )
|
|||
{
|
||||
GL_Color( 0, 1, 0, 0.5 );
|
||||
}
|
||||
qglVertex3fv( a->xyz.ToFloatPtr() );
|
||||
qglVertex3fv( b->xyz.ToFloatPtr() );
|
||||
qglVertex3fv( c->xyz.ToFloatPtr() );
|
||||
glVertex3fv( a->xyz.ToFloatPtr() );
|
||||
glVertex3fv( b->xyz.ToFloatPtr() );
|
||||
glVertex3fv( c->xyz.ToFloatPtr() );
|
||||
}
|
||||
qglEnd();
|
||||
glEnd();
|
||||
}
|
||||
|
||||
GL_State( GLS_DEFAULT );
|
||||
|
@ -1149,7 +1149,7 @@ static void RB_ShowUnsmoothedTangents( drawSurf_t** drawSurfs, int numDrawSurfs
|
|||
RB_SimpleSurfaceSetup( drawSurf );
|
||||
|
||||
tri = drawSurf->frontEndGeo;
|
||||
qglBegin( GL_TRIANGLES );
|
||||
glBegin( GL_TRIANGLES );
|
||||
for( j = 0; j < tri->numIndexes; j += 3 )
|
||||
{
|
||||
idDrawVert* a, *b, *c;
|
||||
|
@ -1158,11 +1158,11 @@ static void RB_ShowUnsmoothedTangents( drawSurf_t** drawSurfs, int numDrawSurfs
|
|||
b = tri->verts + tri->indexes[j + 1];
|
||||
c = tri->verts + tri->indexes[j + 2];
|
||||
|
||||
qglVertex3fv( a->xyz.ToFloatPtr() );
|
||||
qglVertex3fv( b->xyz.ToFloatPtr() );
|
||||
qglVertex3fv( c->xyz.ToFloatPtr() );
|
||||
glVertex3fv( a->xyz.ToFloatPtr() );
|
||||
glVertex3fv( b->xyz.ToFloatPtr() );
|
||||
glVertex3fv( c->xyz.ToFloatPtr() );
|
||||
}
|
||||
qglEnd();
|
||||
glEnd();
|
||||
}
|
||||
|
||||
GL_State( GLS_DEFAULT );
|
||||
|
@ -1203,7 +1203,7 @@ static void RB_ShowTangentSpace( drawSurf_t** drawSurfs, int numDrawSurfs )
|
|||
{
|
||||
continue;
|
||||
}
|
||||
qglBegin( GL_TRIANGLES );
|
||||
glBegin( GL_TRIANGLES );
|
||||
for( j = 0; j < tri->numIndexes; j++ )
|
||||
{
|
||||
const idDrawVert* v;
|
||||
|
@ -1228,9 +1228,9 @@ static void RB_ShowTangentSpace( drawSurf_t** drawSurfs, int numDrawSurfs )
|
|||
GL_Color( 0.5 + 0.5 * vertexNormal[0], 0.5 + 0.5 * vertexNormal[1],
|
||||
0.5 + 0.5 * vertexNormal[2], 0.5 );
|
||||
}
|
||||
qglVertex3fv( v->xyz.ToFloatPtr() );
|
||||
glVertex3fv( v->xyz.ToFloatPtr() );
|
||||
}
|
||||
qglEnd();
|
||||
glEnd();
|
||||
}
|
||||
|
||||
GL_State( GLS_DEFAULT );
|
||||
|
@ -1268,16 +1268,16 @@ static void RB_ShowVertexColor( drawSurf_t** drawSurfs, int numDrawSurfs )
|
|||
{
|
||||
continue;
|
||||
}
|
||||
qglBegin( GL_TRIANGLES );
|
||||
glBegin( GL_TRIANGLES );
|
||||
for( j = 0; j < tri->numIndexes; j++ )
|
||||
{
|
||||
const idDrawVert* v;
|
||||
|
||||
v = &tri->verts[tri->indexes[j]];
|
||||
qglColor4ubv( v->color );
|
||||
qglVertex3fv( v->xyz.ToFloatPtr() );
|
||||
glColor4ubv( v->color );
|
||||
glVertex3fv( v->xyz.ToFloatPtr() );
|
||||
}
|
||||
qglEnd();
|
||||
glEnd();
|
||||
}
|
||||
|
||||
GL_State( GLS_DEFAULT );
|
||||
|
@ -1339,28 +1339,28 @@ static void RB_ShowNormals( drawSurf_t** drawSurfs, int numDrawSurfs )
|
|||
continue;
|
||||
}
|
||||
|
||||
qglBegin( GL_LINES );
|
||||
glBegin( GL_LINES );
|
||||
for( j = 0; j < tri->numVerts; j++ )
|
||||
{
|
||||
const idVec3 normal = tri->verts[j].GetNormal();
|
||||
const idVec3 tangent = tri->verts[j].GetTangent();
|
||||
const idVec3 bitangent = tri->verts[j].GetBiTangent();
|
||||
GL_Color( 0, 0, 1 );
|
||||
qglVertex3fv( tri->verts[j].xyz.ToFloatPtr() );
|
||||
glVertex3fv( tri->verts[j].xyz.ToFloatPtr() );
|
||||
VectorMA( tri->verts[j].xyz, size, normal, end );
|
||||
qglVertex3fv( end.ToFloatPtr() );
|
||||
glVertex3fv( end.ToFloatPtr() );
|
||||
|
||||
GL_Color( 1, 0, 0 );
|
||||
qglVertex3fv( tri->verts[j].xyz.ToFloatPtr() );
|
||||
glVertex3fv( tri->verts[j].xyz.ToFloatPtr() );
|
||||
VectorMA( tri->verts[j].xyz, size, tangent, end );
|
||||
qglVertex3fv( end.ToFloatPtr() );
|
||||
glVertex3fv( end.ToFloatPtr() );
|
||||
|
||||
GL_Color( 0, 1, 0 );
|
||||
qglVertex3fv( tri->verts[j].xyz.ToFloatPtr() );
|
||||
glVertex3fv( tri->verts[j].xyz.ToFloatPtr() );
|
||||
VectorMA( tri->verts[j].xyz, size, bitangent, end );
|
||||
qglVertex3fv( end.ToFloatPtr() );
|
||||
glVertex3fv( end.ToFloatPtr() );
|
||||
}
|
||||
qglEnd();
|
||||
glEnd();
|
||||
}
|
||||
|
||||
if( showNumbers )
|
||||
|
@ -1421,7 +1421,7 @@ static void RB_AltShowNormals( drawSurf_t** drawSurfs, int numDrawSurfs )
|
|||
|
||||
const srfTriangles_t* tri = drawSurf->geo;
|
||||
|
||||
qglBegin( GL_LINES );
|
||||
glBegin( GL_LINES );
|
||||
for( int j = 0; j < tri->numIndexes; j += 3 )
|
||||
{
|
||||
const idDrawVert* v[3] =
|
||||
|
@ -1442,26 +1442,26 @@ static void RB_AltShowNormals( drawSurf_t** drawSurfs, int numDrawSurfs )
|
|||
idVec3 end;
|
||||
|
||||
GL_Color( 0, 0, 1 );
|
||||
qglVertex3fv( pos.ToFloatPtr() );
|
||||
glVertex3fv( pos.ToFloatPtr() );
|
||||
VectorMA( pos, r_showNormals.GetFloat(), v[k]->normal, end );
|
||||
qglVertex3fv( end.ToFloatPtr() );
|
||||
glVertex3fv( end.ToFloatPtr() );
|
||||
|
||||
GL_Color( 1, 0, 0 );
|
||||
qglVertex3fv( pos.ToFloatPtr() );
|
||||
glVertex3fv( pos.ToFloatPtr() );
|
||||
VectorMA( pos, r_showNormals.GetFloat(), v[k]->tangents[0], end );
|
||||
qglVertex3fv( end.ToFloatPtr() );
|
||||
glVertex3fv( end.ToFloatPtr() );
|
||||
|
||||
GL_Color( 0, 1, 0 );
|
||||
qglVertex3fv( pos.ToFloatPtr() );
|
||||
glVertex3fv( pos.ToFloatPtr() );
|
||||
VectorMA( pos, r_showNormals.GetFloat(), v[k]->tangents[1], end );
|
||||
qglVertex3fv( end.ToFloatPtr() );
|
||||
glVertex3fv( end.ToFloatPtr() );
|
||||
|
||||
GL_Color( 1, 1, 1 );
|
||||
qglVertex3fv( pos.ToFloatPtr() );
|
||||
qglVertex3fv( v[k]->xyz.ToFloatPtr() );
|
||||
glVertex3fv( pos.ToFloatPtr() );
|
||||
glVertex3fv( v[k]->xyz.ToFloatPtr() );
|
||||
}
|
||||
}
|
||||
qglEnd();
|
||||
glEnd();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1499,7 +1499,7 @@ static void RB_ShowTextureVectors( drawSurf_t** drawSurfs, int numDrawSurfs )
|
|||
RB_SimpleSurfaceSetup( drawSurf );
|
||||
|
||||
// draw non-shared edges in yellow
|
||||
qglBegin( GL_LINES );
|
||||
glBegin( GL_LINES );
|
||||
|
||||
for( int j = 0; j < tri->numIndexes; j += 3 )
|
||||
{
|
||||
|
@ -1557,15 +1557,15 @@ static void RB_ShowTextureVectors( drawSurf_t** drawSurfs, int numDrawSurfs )
|
|||
tangents[1] = mid + tangents[1] * r_showTextureVectors.GetFloat();
|
||||
|
||||
GL_Color( 1, 0, 0 );
|
||||
qglVertex3fv( mid.ToFloatPtr() );
|
||||
qglVertex3fv( tangents[0].ToFloatPtr() );
|
||||
glVertex3fv( mid.ToFloatPtr() );
|
||||
glVertex3fv( tangents[0].ToFloatPtr() );
|
||||
|
||||
GL_Color( 0, 1, 0 );
|
||||
qglVertex3fv( mid.ToFloatPtr() );
|
||||
qglVertex3fv( tangents[1].ToFloatPtr() );
|
||||
glVertex3fv( mid.ToFloatPtr() );
|
||||
glVertex3fv( tangents[1].ToFloatPtr() );
|
||||
}
|
||||
|
||||
qglEnd();
|
||||
glEnd();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1590,7 +1590,7 @@ static void RB_ShowDominantTris( drawSurf_t** drawSurfs, int numDrawSurfs )
|
|||
GL_State( GLS_DEPTHFUNC_LESS );
|
||||
|
||||
GL_PolygonOffset( -1, -2 );
|
||||
qglEnable( GL_POLYGON_OFFSET_LINE );
|
||||
glEnable( GL_POLYGON_OFFSET_LINE );
|
||||
|
||||
globalImages->BindNull();
|
||||
|
||||
|
@ -1611,7 +1611,7 @@ static void RB_ShowDominantTris( drawSurf_t** drawSurfs, int numDrawSurfs )
|
|||
RB_SimpleSurfaceSetup( drawSurf );
|
||||
|
||||
GL_Color( 1, 1, 0 );
|
||||
qglBegin( GL_LINES );
|
||||
glBegin( GL_LINES );
|
||||
|
||||
for( j = 0; j < tri->numVerts; j++ )
|
||||
{
|
||||
|
@ -1626,13 +1626,13 @@ static void RB_ShowDominantTris( drawSurf_t** drawSurfs, int numDrawSurfs )
|
|||
|
||||
mid = ( a->xyz + b->xyz + c->xyz ) * ( 1.0f / 3.0f );
|
||||
|
||||
qglVertex3fv( mid.ToFloatPtr() );
|
||||
qglVertex3fv( a->xyz.ToFloatPtr() );
|
||||
glVertex3fv( mid.ToFloatPtr() );
|
||||
glVertex3fv( a->xyz.ToFloatPtr() );
|
||||
}
|
||||
|
||||
qglEnd();
|
||||
glEnd();
|
||||
}
|
||||
qglDisable( GL_POLYGON_OFFSET_LINE );
|
||||
glDisable( GL_POLYGON_OFFSET_LINE );
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1675,7 +1675,7 @@ static void RB_ShowEdges( drawSurf_t** drawSurfs, int numDrawSurfs )
|
|||
|
||||
// draw non-shared edges in yellow
|
||||
GL_Color( 1, 1, 0 );
|
||||
qglBegin( GL_LINES );
|
||||
glBegin( GL_LINES );
|
||||
|
||||
for( j = 0; j < tri->numIndexes; j += 3 )
|
||||
{
|
||||
|
@ -1706,14 +1706,14 @@ static void RB_ShowEdges( drawSurf_t** drawSurfs, int numDrawSurfs )
|
|||
// if we didn't find a backwards listing, draw it in yellow
|
||||
if( m == tri->numIndexes )
|
||||
{
|
||||
qglVertex3fv( ac[ i1 ].xyz.ToFloatPtr() );
|
||||
qglVertex3fv( ac[ i2 ].xyz.ToFloatPtr() );
|
||||
glVertex3fv( ac[ i1 ].xyz.ToFloatPtr() );
|
||||
glVertex3fv( ac[ i2 ].xyz.ToFloatPtr() );
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
qglEnd();
|
||||
glEnd();
|
||||
|
||||
// draw dangling sil edges in red
|
||||
if( !tri->silEdges )
|
||||
|
@ -1727,7 +1727,7 @@ static void RB_ShowEdges( drawSurf_t** drawSurfs, int numDrawSurfs )
|
|||
|
||||
GL_Color( 1, 0, 0 );
|
||||
|
||||
qglBegin( GL_LINES );
|
||||
glBegin( GL_LINES );
|
||||
for( j = 0; j < tri->numSilEdges; j++ )
|
||||
{
|
||||
edge = tri->silEdges + j;
|
||||
|
@ -1737,10 +1737,10 @@ static void RB_ShowEdges( drawSurf_t** drawSurfs, int numDrawSurfs )
|
|||
continue;
|
||||
}
|
||||
|
||||
qglVertex3fv( ac[ edge->v1 ].xyz.ToFloatPtr() );
|
||||
qglVertex3fv( ac[ edge->v2 ].xyz.ToFloatPtr() );
|
||||
glVertex3fv( ac[ edge->v1 ].xyz.ToFloatPtr() );
|
||||
glVertex3fv( ac[ edge->v2 ].xyz.ToFloatPtr() );
|
||||
}
|
||||
qglEnd();
|
||||
glEnd();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1764,8 +1764,8 @@ static void RB_ShowLights()
|
|||
GL_State( GLS_DEFAULT );
|
||||
|
||||
// we use the 'vLight->invProjectMVPMatrix'
|
||||
qglMatrixMode( GL_PROJECTION );
|
||||
qglLoadIdentity();
|
||||
glMatrixMode( GL_PROJECTION );
|
||||
glLoadIdentity();
|
||||
|
||||
globalImages->BindNull();
|
||||
|
||||
|
@ -1808,10 +1808,10 @@ static void RB_ShowLights()
|
|||
common->Printf( " = %i total\n", count );
|
||||
|
||||
// set back the default projection matrix
|
||||
qglMatrixMode( GL_PROJECTION );
|
||||
qglLoadMatrixf( backEnd.viewDef->projectionMatrix );
|
||||
qglMatrixMode( GL_MODELVIEW );
|
||||
qglLoadIdentity();
|
||||
glMatrixMode( GL_PROJECTION );
|
||||
glLoadMatrixf( backEnd.viewDef->projectionMatrix );
|
||||
glMatrixMode( GL_MODELVIEW );
|
||||
glLoadIdentity();
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1972,8 +1972,8 @@ static void RB_DrawText( const char* text, const idVec3& origin, float scale, co
|
|||
|
||||
if( text && *text )
|
||||
{
|
||||
qglBegin( GL_LINES );
|
||||
qglColor3fv( color.ToFloatPtr() );
|
||||
glBegin( GL_LINES );
|
||||
glColor3fv( color.ToFloatPtr() );
|
||||
|
||||
if( text[0] == '\n' )
|
||||
{
|
||||
|
@ -2040,13 +2040,13 @@ static void RB_DrawText( const char* text, const idVec3& origin, float scale, co
|
|||
}
|
||||
p2 = org + scale * simplex[charIndex][index] * -viewAxis[1] + scale * simplex[charIndex][index + 1] * viewAxis[2];
|
||||
|
||||
qglVertex3fv( p1.ToFloatPtr() );
|
||||
qglVertex3fv( p2.ToFloatPtr() );
|
||||
glVertex3fv( p1.ToFloatPtr() );
|
||||
glVertex3fv( p2.ToFloatPtr() );
|
||||
}
|
||||
org -= viewAxis[1] * ( spacing * scale );
|
||||
}
|
||||
|
||||
qglEnd();
|
||||
glEnd();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2082,7 +2082,7 @@ void RB_ShowDebugText()
|
|||
}
|
||||
|
||||
// draw lines
|
||||
qglLineWidth( width );
|
||||
glLineWidth( width );
|
||||
|
||||
|
||||
if( !r_debugLineDepthTest.GetBool() )
|
||||
|
@ -2117,7 +2117,7 @@ void RB_ShowDebugText()
|
|||
}
|
||||
}
|
||||
|
||||
qglLineWidth( 1 );
|
||||
glLineWidth( 1 );
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -2208,7 +2208,7 @@ void RB_ShowDebugLines()
|
|||
}
|
||||
|
||||
// draw lines
|
||||
qglLineWidth( width );
|
||||
glLineWidth( width );
|
||||
|
||||
if( !r_debugLineDepthTest.GetBool() )
|
||||
{
|
||||
|
@ -2219,41 +2219,41 @@ void RB_ShowDebugLines()
|
|||
GL_State( GLS_POLYMODE_LINE );
|
||||
}
|
||||
|
||||
qglBegin( GL_LINES );
|
||||
glBegin( GL_LINES );
|
||||
|
||||
line = rb_debugLines;
|
||||
for( i = 0; i < rb_numDebugLines; i++, line++ )
|
||||
{
|
||||
if( !line->depthTest )
|
||||
{
|
||||
qglColor3fv( line->rgb.ToFloatPtr() );
|
||||
qglVertex3fv( line->start.ToFloatPtr() );
|
||||
qglVertex3fv( line->end.ToFloatPtr() );
|
||||
glColor3fv( line->rgb.ToFloatPtr() );
|
||||
glVertex3fv( line->start.ToFloatPtr() );
|
||||
glVertex3fv( line->end.ToFloatPtr() );
|
||||
}
|
||||
}
|
||||
qglEnd();
|
||||
glEnd();
|
||||
|
||||
if( !r_debugLineDepthTest.GetBool() )
|
||||
{
|
||||
GL_State( GLS_POLYMODE_LINE );
|
||||
}
|
||||
|
||||
qglBegin( GL_LINES );
|
||||
glBegin( GL_LINES );
|
||||
|
||||
line = rb_debugLines;
|
||||
for( i = 0; i < rb_numDebugLines; i++, line++ )
|
||||
{
|
||||
if( line->depthTest )
|
||||
{
|
||||
qglColor4fv( line->rgb.ToFloatPtr() );
|
||||
qglVertex3fv( line->start.ToFloatPtr() );
|
||||
qglVertex3fv( line->end.ToFloatPtr() );
|
||||
glColor4fv( line->rgb.ToFloatPtr() );
|
||||
glVertex3fv( line->start.ToFloatPtr() );
|
||||
glVertex3fv( line->end.ToFloatPtr() );
|
||||
}
|
||||
}
|
||||
|
||||
qglEnd();
|
||||
glEnd();
|
||||
|
||||
qglLineWidth( 1 );
|
||||
glLineWidth( 1 );
|
||||
GL_State( GLS_DEFAULT );
|
||||
}
|
||||
|
||||
|
@ -2333,7 +2333,7 @@ void RB_ShowDebugPolygons()
|
|||
|
||||
globalImages->BindNull();
|
||||
|
||||
qglDisable( GL_TEXTURE_2D );
|
||||
glDisable( GL_TEXTURE_2D );
|
||||
|
||||
if( r_debugPolygonFilled.GetBool() )
|
||||
{
|
||||
|
@ -2351,16 +2351,16 @@ void RB_ShowDebugPolygons()
|
|||
{
|
||||
// if ( !poly->depthTest ) {
|
||||
|
||||
qglColor4fv( poly->rgb.ToFloatPtr() );
|
||||
glColor4fv( poly->rgb.ToFloatPtr() );
|
||||
|
||||
qglBegin( GL_POLYGON );
|
||||
glBegin( GL_POLYGON );
|
||||
|
||||
for( j = 0; j < poly->winding.GetNumPoints(); j++ )
|
||||
{
|
||||
qglVertex3fv( poly->winding[j].ToFloatPtr() );
|
||||
glVertex3fv( poly->winding[j].ToFloatPtr() );
|
||||
}
|
||||
|
||||
qglEnd();
|
||||
glEnd();
|
||||
// }
|
||||
}
|
||||
|
||||
|
@ -2368,11 +2368,11 @@ void RB_ShowDebugPolygons()
|
|||
|
||||
if( r_debugPolygonFilled.GetBool() )
|
||||
{
|
||||
qglDisable( GL_POLYGON_OFFSET_FILL );
|
||||
glDisable( GL_POLYGON_OFFSET_FILL );
|
||||
}
|
||||
else
|
||||
{
|
||||
qglDisable( GL_POLYGON_OFFSET_LINE );
|
||||
glDisable( GL_POLYGON_OFFSET_LINE );
|
||||
}
|
||||
|
||||
GL_State( GLS_DEFAULT );
|
||||
|
@ -2392,22 +2392,22 @@ void RB_ShowCenterOfProjection()
|
|||
|
||||
const int w = backEnd.viewDef->scissor.GetWidth();
|
||||
const int h = backEnd.viewDef->scissor.GetHeight();
|
||||
qglClearColor( 1, 0, 0, 1 );
|
||||
glClearColor( 1, 0, 0, 1 );
|
||||
for( float f = 0.0f ; f <= 1.0f ; f += 0.125f )
|
||||
{
|
||||
qglScissor( w * f - 1 , 0, 3, h );
|
||||
qglClear( GL_COLOR_BUFFER_BIT );
|
||||
qglScissor( 0, h * f - 1 , w, 3 );
|
||||
qglClear( GL_COLOR_BUFFER_BIT );
|
||||
glScissor( w * f - 1 , 0, 3, h );
|
||||
glClear( GL_COLOR_BUFFER_BIT );
|
||||
glScissor( 0, h * f - 1 , w, 3 );
|
||||
glClear( GL_COLOR_BUFFER_BIT );
|
||||
}
|
||||
qglClearColor( 0, 1, 0, 1 );
|
||||
glClearColor( 0, 1, 0, 1 );
|
||||
float f = 0.5f;
|
||||
qglScissor( w * f - 1 , 0, 3, h );
|
||||
qglClear( GL_COLOR_BUFFER_BIT );
|
||||
qglScissor( 0, h * f - 1 , w, 3 );
|
||||
qglClear( GL_COLOR_BUFFER_BIT );
|
||||
glScissor( w * f - 1 , 0, 3, h );
|
||||
glClear( GL_COLOR_BUFFER_BIT );
|
||||
glScissor( 0, h * f - 1 , w, 3 );
|
||||
glClear( GL_COLOR_BUFFER_BIT );
|
||||
|
||||
qglScissor( 0, 0, w, h );
|
||||
glScissor( 0, 0, w, h );
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -2556,20 +2556,20 @@ void RB_TestGamma()
|
|||
}
|
||||
}
|
||||
|
||||
qglLoadIdentity();
|
||||
glLoadIdentity();
|
||||
|
||||
qglMatrixMode( GL_PROJECTION );
|
||||
glMatrixMode( GL_PROJECTION );
|
||||
GL_State( GLS_DEPTHFUNC_ALWAYS );
|
||||
GL_Color( 1, 1, 1 );
|
||||
qglPushMatrix();
|
||||
qglLoadIdentity();
|
||||
qglDisable( GL_TEXTURE_2D );
|
||||
qglOrtho( 0, 1, 0, 1, -1, 1 );
|
||||
qglRasterPos2f( 0.01f, 0.01f );
|
||||
qglDrawPixels( G_WIDTH, G_HEIGHT, GL_RGBA, GL_UNSIGNED_BYTE, image );
|
||||
qglPopMatrix();
|
||||
qglEnable( GL_TEXTURE_2D );
|
||||
qglMatrixMode( GL_MODELVIEW );
|
||||
glPushMatrix();
|
||||
glLoadIdentity();
|
||||
glDisable( GL_TEXTURE_2D );
|
||||
glOrtho( 0, 1, 0, 1, -1, 1 );
|
||||
glRasterPos2f( 0.01f, 0.01f );
|
||||
glDrawPixels( G_WIDTH, G_HEIGHT, GL_RGBA, GL_UNSIGNED_BYTE, image );
|
||||
glPopMatrix();
|
||||
glEnable( GL_TEXTURE_2D );
|
||||
glMatrixMode( GL_MODELVIEW );
|
||||
}
|
||||
|
||||
|
||||
|
@ -2615,19 +2615,19 @@ static void RB_TestGammaBias()
|
|||
}
|
||||
}
|
||||
|
||||
qglLoadIdentity();
|
||||
qglMatrixMode( GL_PROJECTION );
|
||||
glLoadIdentity();
|
||||
glMatrixMode( GL_PROJECTION );
|
||||
GL_State( GLS_DEPTHFUNC_ALWAYS );
|
||||
GL_Color( 1, 1, 1 );
|
||||
qglPushMatrix();
|
||||
qglLoadIdentity();
|
||||
qglDisable( GL_TEXTURE_2D );
|
||||
qglOrtho( 0, 1, 0, 1, -1, 1 );
|
||||
qglRasterPos2f( 0.01f, 0.01f );
|
||||
qglDrawPixels( G_WIDTH, G_HEIGHT, GL_RGBA, GL_UNSIGNED_BYTE, image );
|
||||
qglPopMatrix();
|
||||
qglEnable( GL_TEXTURE_2D );
|
||||
qglMatrixMode( GL_MODELVIEW );
|
||||
glPushMatrix();
|
||||
glLoadIdentity();
|
||||
glDisable( GL_TEXTURE_2D );
|
||||
glOrtho( 0, 1, 0, 1, -1, 1 );
|
||||
glRasterPos2f( 0.01f, 0.01f );
|
||||
glDrawPixels( G_WIDTH, G_HEIGHT, GL_RGBA, GL_UNSIGNED_BYTE, image );
|
||||
glPopMatrix();
|
||||
glEnable( GL_TEXTURE_2D );
|
||||
glMatrixMode( GL_MODELVIEW );
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -2721,10 +2721,10 @@ void RB_TestImage()
|
|||
float projMatrixTranspose[16];
|
||||
R_MatrixTranspose( finalOrtho, projMatrixTranspose );
|
||||
renderProgManager.SetRenderParms( RENDERPARM_MVPMATRIX_X, projMatrixTranspose, 4 );
|
||||
qglMatrixMode( GL_PROJECTION );
|
||||
qglLoadMatrixf( finalOrtho );
|
||||
qglMatrixMode( GL_MODELVIEW );
|
||||
qglLoadIdentity();
|
||||
glMatrixMode( GL_PROJECTION );
|
||||
glLoadMatrixf( finalOrtho );
|
||||
glMatrixMode( GL_MODELVIEW );
|
||||
glLoadIdentity();
|
||||
|
||||
// Set Color
|
||||
GL_Color( 1, 1, 1, 1 );
|
||||
|
@ -2786,7 +2786,7 @@ void RB_DrawExpandedTriangles( const srfTriangles_t* tri, const float radius, co
|
|||
dir[1].Normalize();
|
||||
dir[2].Normalize();
|
||||
|
||||
qglBegin( GL_LINE_LOOP );
|
||||
glBegin( GL_LINE_LOOP );
|
||||
|
||||
for( j = 0; j < 3; j++ )
|
||||
{
|
||||
|
@ -2802,22 +2802,22 @@ void RB_DrawExpandedTriangles( const srfTriangles_t* tri, const float radius, co
|
|||
dir[5].Normalize();
|
||||
|
||||
point = p[k] + dir[j] * radius;
|
||||
qglVertex3f( point[0], point[1], point[2] );
|
||||
glVertex3f( point[0], point[1], point[2] );
|
||||
|
||||
point = p[k] + dir[3] * radius;
|
||||
qglVertex3f( point[0], point[1], point[2] );
|
||||
glVertex3f( point[0], point[1], point[2] );
|
||||
|
||||
point = p[k] + dir[4] * radius;
|
||||
qglVertex3f( point[0], point[1], point[2] );
|
||||
glVertex3f( point[0], point[1], point[2] );
|
||||
|
||||
point = p[k] + dir[5] * radius;
|
||||
qglVertex3f( point[0], point[1], point[2] );
|
||||
glVertex3f( point[0], point[1], point[2] );
|
||||
|
||||
point = p[k] + dir[k] * radius;
|
||||
qglVertex3f( point[0], point[1], point[2] );
|
||||
glVertex3f( point[0], point[1], point[2] );
|
||||
}
|
||||
|
||||
qglEnd();
|
||||
glEnd();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2882,7 +2882,7 @@ void RB_ShowTrace( drawSurf_t** drawSurfs, int numDrawSurfs )
|
|||
continue;
|
||||
}
|
||||
|
||||
qglLoadMatrixf( surf->space->modelViewMatrix );
|
||||
glLoadMatrixf( surf->space->modelViewMatrix );
|
||||
|
||||
// highlight the surface
|
||||
GL_State( GLS_SRCBLEND_SRC_ALPHA | GLS_DSTBLEND_ONE_MINUS_SRC_ALPHA );
|
||||
|
|
|
@ -1113,8 +1113,6 @@ void GLimp_DeactivateContext();
|
|||
// being immediate returns, which lets us guage how much time is
|
||||
// being spent inside OpenGL.
|
||||
|
||||
void GLimp_EnableLogging( bool enable );
|
||||
|
||||
|
||||
/*
|
||||
============================================================
|
||||
|
|
|
@ -47,6 +47,7 @@ If you have questions concerning this license or the applicable additional terms
|
|||
#include "rc/doom_resource.h"
|
||||
#include "../../renderer/tr_local.h"
|
||||
|
||||
/*
|
||||
// WGL_ARB_extensions_string
|
||||
PFNWGLGETEXTENSIONSSTRINGARBPROC wglGetExtensionsStringARB;
|
||||
|
||||
|
@ -60,15 +61,12 @@ PFNWGLCHOOSEPIXELFORMATARBPROC wglChoosePixelFormatARB;
|
|||
|
||||
// WGL_ARB_create_context
|
||||
PFNWGLCREATECONTEXTATTRIBSARBPROC wglCreateContextAttribsARB;
|
||||
*/
|
||||
|
||||
|
||||
idCVar r_useOpenGL32( "r_useOpenGL32", "1", CVAR_INTEGER, "0 = OpenGL 2.0, 1 = OpenGL 3.2 compatibility profile, 2 = OpenGL 3.2 core profile", 0, 2 );
|
||||
|
||||
//
|
||||
// function declaration
|
||||
//
|
||||
bool QGL_Init( const char* dllname );
|
||||
void QGL_Shutdown();
|
||||
|
||||
|
||||
|
||||
/*
|
||||
|
@ -81,7 +79,7 @@ void GLimp_TestSwapBuffers( const idCmdArgs& args )
|
|||
idLib::Printf( "GLimp_TimeSwapBuffers\n" );
|
||||
static const int MAX_FRAMES = 5;
|
||||
uint64 timestamps[MAX_FRAMES];
|
||||
qglDisable( GL_SCISSOR_TEST );
|
||||
glDisable( GL_SCISSOR_TEST );
|
||||
|
||||
int frameMilliseconds = 16;
|
||||
for( int swapInterval = 2 ; swapInterval >= -1 ; swapInterval-- )
|
||||
|
@ -95,15 +93,15 @@ void GLimp_TestSwapBuffers( const idCmdArgs& args )
|
|||
}
|
||||
if( i & 1 )
|
||||
{
|
||||
qglClearColor( 0, 1, 0, 1 );
|
||||
glClearColor( 0, 1, 0, 1 );
|
||||
}
|
||||
else
|
||||
{
|
||||
qglClearColor( 1, 0, 0, 1 );
|
||||
glClearColor( 1, 0, 0, 1 );
|
||||
}
|
||||
qglClear( GL_COLOR_BUFFER_BIT );
|
||||
qwglSwapBuffers( win32.hDC );
|
||||
qglFinish();
|
||||
glClear( GL_COLOR_BUFFER_BIT );
|
||||
SwapBuffers( win32.hDC );
|
||||
glFinish();
|
||||
timestamps[i] = Sys_Microseconds();
|
||||
}
|
||||
|
||||
|
@ -195,25 +193,6 @@ This is gross -- creating a window just to get a context to get the wgl extensio
|
|||
=============================================================================
|
||||
*/
|
||||
|
||||
/*
|
||||
========================
|
||||
R_CheckWinExtension
|
||||
========================
|
||||
*/
|
||||
bool R_CheckWinExtension( const char* name )
|
||||
{
|
||||
|
||||
if( !strstr( glConfig.wgl_extensions_string, name ) )
|
||||
{
|
||||
idLib::Printf( "X..%s not found\n", name );
|
||||
return false;
|
||||
}
|
||||
|
||||
idLib::Printf( "...using %s\n", name );
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
====================
|
||||
FakeWndProc
|
||||
|
@ -265,8 +244,8 @@ LONG WINAPI FakeWndProc(
|
|||
// Set up OpenGL
|
||||
pixelFormat = ChoosePixelFormat( hDC, &pfd );
|
||||
SetPixelFormat( hDC, pixelFormat, &pfd );
|
||||
hGLRC = qwglCreateContext( hDC );
|
||||
qwglMakeCurrent( hDC, hGLRC );
|
||||
hGLRC = wglCreateContext( hDC );
|
||||
wglMakeCurrent( hDC, hGLRC );
|
||||
|
||||
// free things
|
||||
wglMakeCurrent( NULL, NULL );
|
||||
|
@ -282,11 +261,21 @@ LONG WINAPI FakeWndProc(
|
|||
GLW_GetWGLExtensionsWithFakeWindow
|
||||
==================
|
||||
*/
|
||||
// RB: replaced WGL with GLEW WGL
|
||||
void GLW_CheckWGLExtensions( HDC hDC )
|
||||
{
|
||||
wglGetExtensionsStringARB = ( PFNWGLGETEXTENSIONSSTRINGARBPROC )
|
||||
GLimp_ExtensionPointer( "wglGetExtensionsStringARB" );
|
||||
if( wglGetExtensionsStringARB )
|
||||
GLenum glewResult = glewInit();
|
||||
if( GLEW_OK != glewResult )
|
||||
{
|
||||
// glewInit failed, something is seriously wrong
|
||||
common->Printf( "^GLW_CheckWGLExtensions() - GLEW could not load OpenGL subsystem: %s", glewGetErrorString( glewResult ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
common->Printf( "Using GLEW %s\n", glewGetString( GLEW_VERSION ) );
|
||||
}
|
||||
|
||||
if( WGLEW_ARB_extensions_string )
|
||||
{
|
||||
glConfig.wgl_extensions_string = ( const char* ) wglGetExtensionsStringARB( hDC );
|
||||
}
|
||||
|
@ -296,20 +285,21 @@ void GLW_CheckWGLExtensions( HDC hDC )
|
|||
}
|
||||
|
||||
// WGL_EXT_swap_control
|
||||
wglSwapIntervalEXT = ( PFNWGLSWAPINTERVALEXTPROC ) GLimp_ExtensionPointer( "wglSwapIntervalEXT" );
|
||||
//wglSwapIntervalEXT = ( PFNWGLSWAPINTERVALEXTPROC ) GLimp_ExtensionPointer( "wglSwapIntervalEXT" );
|
||||
r_swapInterval.SetModified(); // force a set next frame
|
||||
|
||||
// WGL_EXT_swap_control_tear
|
||||
glConfig.swapControlTearAvailable = R_CheckWinExtension( "WGL_EXT_swap_control_tear" );
|
||||
glConfig.swapControlTearAvailable = WGLEW_EXT_swap_control_tear != 0;
|
||||
|
||||
// WGL_ARB_pixel_format
|
||||
wglGetPixelFormatAttribivARB = ( PFNWGLGETPIXELFORMATATTRIBIVARBPROC )GLimp_ExtensionPointer( "wglGetPixelFormatAttribivARB" );
|
||||
wglGetPixelFormatAttribfvARB = ( PFNWGLGETPIXELFORMATATTRIBFVARBPROC )GLimp_ExtensionPointer( "wglGetPixelFormatAttribfvARB" );
|
||||
wglChoosePixelFormatARB = ( PFNWGLCHOOSEPIXELFORMATARBPROC )GLimp_ExtensionPointer( "wglChoosePixelFormatARB" );
|
||||
//wglGetPixelFormatAttribivARB = ( PFNWGLGETPIXELFORMATATTRIBIVARBPROC )GLimp_ExtensionPointer( "wglGetPixelFormatAttribivARB" );
|
||||
//wglGetPixelFormatAttribfvARB = ( PFNWGLGETPIXELFORMATATTRIBFVARBPROC )GLimp_ExtensionPointer( "wglGetPixelFormatAttribfvARB" );
|
||||
//wglChoosePixelFormatARB = ( PFNWGLCHOOSEPIXELFORMATARBPROC )GLimp_ExtensionPointer( "wglChoosePixelFormatARB" );
|
||||
|
||||
// wglCreateContextAttribsARB
|
||||
wglCreateContextAttribsARB = ( PFNWGLCREATECONTEXTATTRIBSARBPROC )wglGetProcAddress( "wglCreateContextAttribsARB" );
|
||||
//wglCreateContextAttribsARB = ( PFNWGLCREATECONTEXTATTRIBSARBPROC )wglGetProcAddress( "wglCreateContextAttribsARB" );
|
||||
}
|
||||
// RB end
|
||||
|
||||
/*
|
||||
==================
|
||||
|
@ -502,7 +492,7 @@ static bool GLW_InitDriver( glimpParms_t parms )
|
|||
}
|
||||
|
||||
// the multisample path uses the wgl
|
||||
if( wglChoosePixelFormatARB )
|
||||
if( WGLEW_ARB_pixel_format )
|
||||
{
|
||||
win32.pixelformat = GLW_ChoosePixelFormat( win32.hDC, parms.multiSamples, parms.stereo );
|
||||
}
|
||||
|
@ -564,9 +554,9 @@ static bool GLW_InitDriver( glimpParms_t parms )
|
|||
common->Printf( "succeeded\n" );
|
||||
|
||||
common->Printf( "...making context current: " );
|
||||
if( !qwglMakeCurrent( win32.hDC, win32.hGLRC ) )
|
||||
if( !wglMakeCurrent( win32.hDC, win32.hGLRC ) )
|
||||
{
|
||||
qwglDeleteContext( win32.hGLRC );
|
||||
wglDeleteContext( win32.hGLRC );
|
||||
win32.hGLRC = NULL;
|
||||
common->Printf( "^3failed^0\n" );
|
||||
return false;
|
||||
|
@ -1304,19 +1294,9 @@ bool GLimp_Init( glimpParms_t parms )
|
|||
// create our window classes if we haven't already
|
||||
GLW_CreateWindowClasses();
|
||||
|
||||
// this will load the dll and set all our qgl* function pointers,
|
||||
// this will load the dll and set all our gl* function pointers,
|
||||
// but doesn't create a window
|
||||
|
||||
// r_glDriver is only intended for using instrumented OpenGL
|
||||
// dlls. Normal users should never have to use it, and it is
|
||||
// not archived.
|
||||
driverName = r_glDriver.GetString()[0] ? r_glDriver.GetString() : "opengl32";
|
||||
if( !QGL_Init( driverName ) )
|
||||
{
|
||||
common->Printf( "^3GLimp_Init() could not load r_glDriver \"%s\"^0\n", driverName );
|
||||
return false;
|
||||
}
|
||||
|
||||
// getting the wgl extensions involves creating a fake window to get a context,
|
||||
// which is pretty disgusting, and seems to mess with the AGP VAR allocation
|
||||
GLW_GetWGLExtensionsWithFakeWindow();
|
||||
|
@ -1365,13 +1345,22 @@ bool GLimp_Init( glimpParms_t parms )
|
|||
glConfig.physicalScreenWidthInCentimeters = 0.1f * mmWide;
|
||||
}
|
||||
|
||||
// RB begin
|
||||
GLenum glewResult = glewInit();
|
||||
if( GLEW_OK != glewResult )
|
||||
{
|
||||
// glewInit failed, something is seriously wrong
|
||||
common->Printf( "^3GLimp_Init() - GLEW could not load OpenGL subsystem: %s", glewGetErrorString( glewResult ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
common->Printf( "Using GLEW %s\n", glewGetString( GLEW_VERSION ) );
|
||||
}
|
||||
// RB end
|
||||
|
||||
// wglSwapinterval, etc
|
||||
GLW_CheckWGLExtensions( win32.hDC );
|
||||
|
||||
// check logging
|
||||
GLimp_EnableLogging( ( r_logFile.GetInteger() != 0 ) );
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -1440,16 +1429,16 @@ void GLimp_Shutdown()
|
|||
common->Printf( "Shutting down OpenGL subsystem\n" );
|
||||
|
||||
// set current context to NULL
|
||||
if( qwglMakeCurrent )
|
||||
//if( wglMakeCurrent )
|
||||
{
|
||||
retVal = qwglMakeCurrent( NULL, NULL ) != 0;
|
||||
retVal = wglMakeCurrent( NULL, NULL ) != 0;
|
||||
common->Printf( "...wglMakeCurrent( NULL, NULL ): %s\n", success[retVal] );
|
||||
}
|
||||
|
||||
// delete HGLRC
|
||||
if( win32.hGLRC )
|
||||
{
|
||||
retVal = qwglDeleteContext( win32.hGLRC ) != 0;
|
||||
retVal = wglDeleteContext( win32.hGLRC ) != 0;
|
||||
common->Printf( "...deleting GL context: %s\n", success[retVal] );
|
||||
win32.hGLRC = NULL;
|
||||
}
|
||||
|
@ -1489,9 +1478,6 @@ void GLimp_Shutdown()
|
|||
|
||||
// restore gamma
|
||||
GLimp_RestoreGamma();
|
||||
|
||||
// shutdown QGL subsystem
|
||||
QGL_Shutdown();
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1499,6 +1485,7 @@ void GLimp_Shutdown()
|
|||
GLimp_SwapBuffers
|
||||
=====================
|
||||
*/
|
||||
// RB: use GLEW for V-Sync
|
||||
void GLimp_SwapBuffers()
|
||||
{
|
||||
if( r_swapInterval.IsModified() )
|
||||
|
@ -1515,14 +1502,15 @@ void GLimp_SwapBuffers()
|
|||
interval = 1;
|
||||
}
|
||||
|
||||
if( wglSwapIntervalEXT )
|
||||
if( WGLEW_EXT_swap_control )
|
||||
{
|
||||
wglSwapIntervalEXT( interval );
|
||||
}
|
||||
}
|
||||
|
||||
qwglSwapBuffers( win32.hDC );
|
||||
SwapBuffers( win32.hDC );
|
||||
}
|
||||
// RB end
|
||||
|
||||
/*
|
||||
===========================================================
|
||||
|
@ -1539,7 +1527,7 @@ GLimp_ActivateContext
|
|||
*/
|
||||
void GLimp_ActivateContext()
|
||||
{
|
||||
if( !qwglMakeCurrent( win32.hDC, win32.hGLRC ) )
|
||||
if( !wglMakeCurrent( win32.hDC, win32.hGLRC ) )
|
||||
{
|
||||
win32.wglErrors++;
|
||||
}
|
||||
|
@ -1552,8 +1540,8 @@ GLimp_DeactivateContext
|
|||
*/
|
||||
void GLimp_DeactivateContext()
|
||||
{
|
||||
qglFinish();
|
||||
if( !qwglMakeCurrent( win32.hDC, NULL ) )
|
||||
glFinish();
|
||||
if( !wglMakeCurrent( win32.hDC, NULL ) )
|
||||
{
|
||||
win32.wglErrors++;
|
||||
}
|
||||
|
@ -1569,7 +1557,7 @@ static void GLimp_RenderThreadWrapper()
|
|||
win32.glimpRenderThread();
|
||||
|
||||
// unbind the context before we die
|
||||
qwglMakeCurrent( win32.hDC, NULL );
|
||||
wglMakeCurrent( win32.hDC, NULL );
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1721,23 +1709,4 @@ void GLimp_WakeBackEnd( void* data )
|
|||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
===================
|
||||
GLimp_ExtensionPointer
|
||||
|
||||
Returns a function pointer for an OpenGL extension entry point
|
||||
===================
|
||||
*/
|
||||
GLExtension_t GLimp_ExtensionPointer( const char* name )
|
||||
{
|
||||
void ( *proc )();
|
||||
|
||||
proc = ( GLExtension_t )qwglGetProcAddress( name );
|
||||
|
||||
if( !proc )
|
||||
{
|
||||
common->Printf( "Couldn't find proc address for: %s\n", name );
|
||||
}
|
||||
|
||||
return proc;
|
||||
}
|
||||
|
|
|
@ -30,31 +30,13 @@ If you have questions concerning this license or the applicable additional terms
|
|||
#define __WIN_LOCAL_H__
|
||||
|
||||
#include <windows.h>
|
||||
#include "../../renderer/OpenGL/wglext.h" // windows OpenGL extensions
|
||||
|
||||
// RB: replaced QGL with GLEW
|
||||
#include "../../libs/glew/include/GL/wglew.h" // windows OpenGL extensions
|
||||
// RB end
|
||||
|
||||
#include "win_input.h"
|
||||
|
||||
// WGL_ARB_extensions_string
|
||||
extern PFNWGLGETEXTENSIONSSTRINGARBPROC wglGetExtensionsStringARB;
|
||||
|
||||
// WGL_EXT_swap_interval
|
||||
extern PFNWGLSWAPINTERVALEXTPROC wglSwapIntervalEXT;
|
||||
|
||||
// WGL_ARB_pixel_format
|
||||
extern PFNWGLGETPIXELFORMATATTRIBIVARBPROC wglGetPixelFormatAttribivARB;
|
||||
extern PFNWGLGETPIXELFORMATATTRIBFVARBPROC wglGetPixelFormatAttribfvARB;
|
||||
extern PFNWGLCHOOSEPIXELFORMATARBPROC wglChoosePixelFormatARB;
|
||||
|
||||
// WGL_ARB_pbuffer
|
||||
extern PFNWGLCREATEPBUFFERARBPROC wglCreatePbufferARB;
|
||||
extern PFNWGLGETPBUFFERDCARBPROC wglGetPbufferDCARB;
|
||||
extern PFNWGLRELEASEPBUFFERDCARBPROC wglReleasePbufferDCARB;
|
||||
extern PFNWGLDESTROYPBUFFERARBPROC wglDestroyPbufferARB;
|
||||
extern PFNWGLQUERYPBUFFERARBPROC wglQueryPbufferARB;
|
||||
|
||||
// WGL_ARB_render_texture
|
||||
extern PFNWGLBINDTEXIMAGEARBPROC wglBindTexImageARB;
|
||||
extern PFNWGLRELEASETEXIMAGEARBPROC wglReleaseTexImageARB;
|
||||
extern PFNWGLSETPBUFFERATTRIBARBPROC wglSetPbufferAttribARB;
|
||||
|
||||
#define WINDOW_STYLE (WS_OVERLAPPED|WS_BORDER|WS_CAPTION|WS_VISIBLE | WS_THICKFRAME)
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue