Permalink
Browse files

Fix incorrect use of GLEW_ARB_* macros.

  • Loading branch information...
1 parent 895d1f6 commit f12493a050924ec874c41dc94cb33a185f040918 @gimhael gimhael committed Mar 9, 2016
@@ -705,7 +705,7 @@ void GLShaderManager::InitShader( GLShader *shader )
bool GLShaderManager::LoadShaderBinary( GLShader *shader, size_t programNum )
{
-#ifdef GLEW_ARB_get_program_binary
+#ifdef GL_ARB_get_program_binary
GLint success;
const byte *binaryptr;
GLShaderHeader shaderHeader;
@@ -779,7 +779,7 @@ bool GLShaderManager::LoadShaderBinary( GLShader *shader, size_t programNum )
}
void GLShaderManager::SaveShaderBinary( GLShader *shader, size_t programNum )
{
-#ifdef GLEW_ARB_get_program_binary
+#ifdef GL_ARB_get_program_binary
GLint binaryLength;
GLuint binarySize = 0;
byte *binary;
@@ -1008,7 +1008,7 @@ void GLShaderManager::LinkProgram( GLuint program ) const
{
GLint linked;
-#ifdef GLEW_ARB_get_program_binary
+#ifdef GL_ARB_get_program_binary
// Apparently, this is necessary to get the binary program via glGetProgramBinary
if( glConfig2.getProgramBinaryAvailable )
{
@@ -3312,7 +3312,7 @@ static inline void halfToFloat( const f16vec4_t in, vec4_t out )
i16vec4_t texCoords;
};
-#ifdef GLEW_ARB_sync
+#ifdef GL_ARB_sync
struct glRingbuffer_t {
// the BO is logically split into DYN_BUFFER_SEGMENTS
// segments, the active segment is the one the CPU may write
@@ -3375,7 +3375,7 @@ static inline void halfToFloat( const f16vec4_t in, vec4_t out )
shaderVertex_t *vertsBuffer;
glIndex_t *indexesBuffer;
-#ifdef GLEW_ARB_sync
+#ifdef GL_ARB_sync
glRingbuffer_t vertexRB;
glRingbuffer_t indexRB;
#endif
@@ -438,7 +438,7 @@ static void R_CopyVertexData( VBO_t *vbo, byte *outData, vboData_t inData )
}
-#if defined( GLEW_ARB_buffer_storage ) && defined( GLEW_ARB_sync )
+#if defined( GL_ARB_buffer_storage ) && defined( GL_ARB_sync )
/*
============
R_InitRingbuffer
@@ -541,7 +541,7 @@ VBO_t *R_CreateDynamicVBO( const char *name, int numVertexes, uint32_t stateBits
R_BindVBO( vbo );
-#if defined( GLEW_ARB_buffer_storage ) && defined( GLEW_ARB_sync )
+#if defined( GL_ARB_buffer_storage ) && defined( GL_ARB_sync )
if( glConfig2.bufferStorageAvailable &&
glConfig2.syncAvailable ) {
R_InitRingbuffer( GL_ARRAY_BUFFER, sizeof( shaderVertex_t ),
@@ -594,7 +594,7 @@ VBO_t *R_CreateStaticVBO( const char *name, vboData_t data, vboLayout_t layout )
glGenBuffers( 1, &vbo->vertexesVBO );
R_BindVBO( vbo );
-#ifdef GLEW_ARB_buffer_storage
+#ifdef GL_ARB_buffer_storage
if( glConfig2.bufferStorageAvailable ) {
outData = (byte *)ri.Hunk_AllocateTempMemory( vbo->vertexesSize );
R_CopyVertexData( vbo, outData, data );
@@ -657,7 +657,7 @@ VBO_t *R_CreateStaticVBO2( const char *name, int numVertexes, shaderVertex_t *ve
glGenBuffers( 1, &vbo->vertexesVBO );
R_BindVBO( vbo );
-#ifdef GLEW_ARB_buffer_storage
+#ifdef GL_ARB_buffer_storage
if( glConfig2.bufferStorageAvailable ) {
glBufferStorage( GL_ARRAY_BUFFER, vbo->vertexesSize,
verts, 0 );
@@ -703,7 +703,7 @@ IBO_t *R_CreateDynamicIBO( const char *name, int numIndexes )
glGenBuffers( 1, &ibo->indexesVBO );
R_BindIBO( ibo );
-#if defined( GLEW_ARB_buffer_storage ) && defined( GLEW_ARB_sync )
+#if defined( GL_ARB_buffer_storage ) && defined( GL_ARB_sync )
if( glConfig2.bufferStorageAvailable &&
glConfig2.syncAvailable ) {
R_InitRingbuffer( GL_ELEMENT_ARRAY_BUFFER, sizeof( glIndex_t ),
@@ -754,7 +754,7 @@ IBO_t *R_CreateStaticIBO( const char *name, glIndex_t *indexes, int numIndexes )
R_BindIBO( ibo );
-#ifdef GLEW_ARB_buffer_storage
+#ifdef GL_ARB_buffer_storage
if( glConfig2.bufferStorageAvailable ) {
glBufferStorage( GL_ELEMENT_ARRAY_BUFFER, ibo->indexesSize, indexes, 0 );
} else
@@ -796,7 +796,7 @@ IBO_t *R_CreateStaticIBO2( const char *name, int numTriangles, glIndex_t *indexe
glGenBuffers( 1, &ibo->indexesVBO );
R_BindIBO( ibo );
-#ifdef GLEW_ARB_buffer_storage
+#ifdef GL_ARB_buffer_storage
if( glConfig2.bufferStorageAvailable ) {
glBufferStorage( GL_ELEMENT_ARRAY_BUFFER, ibo->indexesSize,
indexes, 0 );
@@ -1049,7 +1049,7 @@ void R_ShutdownVBOs()
if( !glConfig2.mapBufferRangeAvailable ) {
// nothing
}
-#if defined( GLEW_ARB_buffer_storage ) && defined( GLEW_ARB_sync )
+#if defined( GL_ARB_buffer_storage ) && defined( GL_ARB_sync )
else if( glConfig2.bufferStorageAvailable &&
glConfig2.syncAvailable ) {
R_BindVBO( tess.vbo );
@@ -1129,7 +1129,7 @@ void Tess_MapVBOs( bool forceCPU ) {
if( tess.verts == nullptr ) {
R_BindVBO( tess.vbo );
-#if defined( GLEW_ARB_buffer_storage ) && defined( GL_ARB_sync )
+#if defined( GL_ARB_buffer_storage ) && defined( GL_ARB_sync )
if( glConfig2.bufferStorageAvailable &&
glConfig2.syncAvailable ) {
GLsizei segmentEnd = (tess.vertexRB.activeSegment + 1) * tess.vertexRB.segmentElements;
@@ -1156,7 +1156,7 @@ void Tess_MapVBOs( bool forceCPU ) {
if( tess.indexes == nullptr ) {
R_BindIBO( tess.ibo );
-#if defined( GLEW_ARB_buffer_storage ) && defined( GL_ARB_sync )
+#if defined( GL_ARB_buffer_storage ) && defined( GL_ARB_sync )
if( glConfig2.bufferStorageAvailable &&
glConfig2.syncAvailable ) {
GLsizei segmentEnd = (tess.indexRB.activeSegment + 1) * tess.indexRB.segmentElements;
@@ -1105,7 +1105,7 @@ static void GLimp_InitExtensions()
glConfig2.drawBuffersAvailable = true;
}
-#ifdef GLEW_ARB_get_program_binary
+#ifdef GL_ARB_get_program_binary
if( GLEW_ARB_get_program_binary )
{
int formats = 0;
@@ -1130,7 +1130,7 @@ static void GLimp_InitExtensions()
glConfig2.getProgramBinaryAvailable = false;
}
-#ifdef GLEW_ARB_buffer_storage
+#ifdef GL_ARB_buffer_storage
if ( GLEW_ARB_buffer_storage )
{
if ( r_arb_buffer_storage->integer )

0 comments on commit f12493a

Please sign in to comment.