|
|
@ -280,6 +280,35 @@ PFNGLSHADERSOURCEPROC nglShaderSource;
|
|
|
|
PFNGLUSEPROGRAMPROC nglUseProgram;
|
|
|
|
PFNGLUSEPROGRAMPROC nglUseProgram;
|
|
|
|
PFNGLVALIDATEPROGRAMPROC nglValidateProgram;
|
|
|
|
PFNGLVALIDATEPROGRAMPROC nglValidateProgram;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
PFNGLUNIFORM1FPROC nglUniform1f;
|
|
|
|
|
|
|
|
PFNGLUNIFORM2FPROC nglUniform2f;
|
|
|
|
|
|
|
|
PFNGLUNIFORM3FPROC nglUniform3f;
|
|
|
|
|
|
|
|
PFNGLUNIFORM4FPROC nglUniform4f;
|
|
|
|
|
|
|
|
PFNGLUNIFORM1IPROC nglUniform1i;
|
|
|
|
|
|
|
|
PFNGLUNIFORM2IPROC nglUniform2i;
|
|
|
|
|
|
|
|
PFNGLUNIFORM3IPROC nglUniform3i;
|
|
|
|
|
|
|
|
PFNGLUNIFORM4IPROC nglUniform4i;
|
|
|
|
|
|
|
|
PFNGLUNIFORM1FVPROC nglUniform1fv;
|
|
|
|
|
|
|
|
PFNGLUNIFORM2FVPROC nglUniform2fv;
|
|
|
|
|
|
|
|
PFNGLUNIFORM3FVPROC nglUniform3fv;
|
|
|
|
|
|
|
|
PFNGLUNIFORM4FVPROC nglUniform4fv;
|
|
|
|
|
|
|
|
PFNGLUNIFORM1IVPROC nglUniform1iv;
|
|
|
|
|
|
|
|
PFNGLUNIFORM2IVPROC nglUniform2iv;
|
|
|
|
|
|
|
|
PFNGLUNIFORM3IVPROC nglUniform3iv;
|
|
|
|
|
|
|
|
PFNGLUNIFORM4IVPROC nglUniform4iv;
|
|
|
|
|
|
|
|
PFNGLUNIFORMMATRIX2FVPROC nglUniformMatrix2fv;
|
|
|
|
|
|
|
|
PFNGLUNIFORMMATRIX3FVPROC nglUniformMatrix3fv;
|
|
|
|
|
|
|
|
PFNGLUNIFORMMATRIX4FVPROC nglUniformMatrix4fv;
|
|
|
|
|
|
|
|
PFNGLVERTEXATTRIBPOINTERPROC nglVertexAttribPointer;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
PFNGLUNIFORM1UIPROC nglUniform1ui;
|
|
|
|
|
|
|
|
PFNGLUNIFORM2UIPROC nglUniform2ui;
|
|
|
|
|
|
|
|
PFNGLUNIFORM3UIPROC nglUniform3ui;
|
|
|
|
|
|
|
|
PFNGLUNIFORM4UIPROC nglUniform4ui;
|
|
|
|
|
|
|
|
PFNGLUNIFORM1UIVPROC nglUniform1uiv;
|
|
|
|
|
|
|
|
PFNGLUNIFORM2UIVPROC nglUniform2uiv;
|
|
|
|
|
|
|
|
PFNGLUNIFORM3UIVPROC nglUniform3uiv;
|
|
|
|
|
|
|
|
PFNGLUNIFORM4UIVPROC nglUniform4uiv;
|
|
|
|
|
|
|
|
|
|
|
|
// NV_occlusion_query
|
|
|
|
// NV_occlusion_query
|
|
|
|
NEL_PFNGLGENOCCLUSIONQUERIESNVPROC nglGenOcclusionQueriesNV;
|
|
|
|
NEL_PFNGLGENOCCLUSIONQUERIESNVPROC nglGenOcclusionQueriesNV;
|
|
|
@ -887,8 +916,10 @@ static bool setupPackedDepthStencil(const char *glext)
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static bool setupGLSL()
|
|
|
|
static bool setupGLSL( const char *glext )
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
CHECK_EXT( "GL_ARB_shader_objects" );
|
|
|
|
|
|
|
|
|
|
|
|
CHECK_ADDRESS( PFNGLATTACHSHADERPROC, glAttachShader );
|
|
|
|
CHECK_ADDRESS( PFNGLATTACHSHADERPROC, glAttachShader );
|
|
|
|
CHECK_ADDRESS( PFNGLCOMPILESHADERPROC, glCompileShader );
|
|
|
|
CHECK_ADDRESS( PFNGLCOMPILESHADERPROC, glCompileShader );
|
|
|
|
CHECK_ADDRESS( PFNGLCREATEPROGRAMPROC, glCreateProgram );
|
|
|
|
CHECK_ADDRESS( PFNGLCREATEPROGRAMPROC, glCreateProgram );
|
|
|
@ -909,6 +940,34 @@ static bool setupGLSL()
|
|
|
|
CHECK_ADDRESS( PFNGLSHADERSOURCEPROC, glShaderSource );
|
|
|
|
CHECK_ADDRESS( PFNGLSHADERSOURCEPROC, glShaderSource );
|
|
|
|
CHECK_ADDRESS( PFNGLUSEPROGRAMPROC, glUseProgram );
|
|
|
|
CHECK_ADDRESS( PFNGLUSEPROGRAMPROC, glUseProgram );
|
|
|
|
CHECK_ADDRESS( PFNGLVALIDATEPROGRAMPROC, glValidateProgram );
|
|
|
|
CHECK_ADDRESS( PFNGLVALIDATEPROGRAMPROC, glValidateProgram );
|
|
|
|
|
|
|
|
CHECK_ADDRESS( PFNGLUNIFORM1FPROC, glUniform1f );
|
|
|
|
|
|
|
|
CHECK_ADDRESS( PFNGLUNIFORM2FPROC, glUniform2f );
|
|
|
|
|
|
|
|
CHECK_ADDRESS( PFNGLUNIFORM3FPROC, glUniform3f );
|
|
|
|
|
|
|
|
CHECK_ADDRESS( PFNGLUNIFORM4FPROC, glUniform4f );
|
|
|
|
|
|
|
|
CHECK_ADDRESS( PFNGLUNIFORM1IPROC, glUniform1i );
|
|
|
|
|
|
|
|
CHECK_ADDRESS( PFNGLUNIFORM2IPROC, glUniform2i );
|
|
|
|
|
|
|
|
CHECK_ADDRESS( PFNGLUNIFORM3IPROC, glUniform3i );
|
|
|
|
|
|
|
|
CHECK_ADDRESS( PFNGLUNIFORM4IPROC, glUniform4i );
|
|
|
|
|
|
|
|
CHECK_ADDRESS( PFNGLUNIFORM1FVPROC, glUniform1fv );
|
|
|
|
|
|
|
|
CHECK_ADDRESS( PFNGLUNIFORM2FVPROC, glUniform2fv );
|
|
|
|
|
|
|
|
CHECK_ADDRESS( PFNGLUNIFORM3FVPROC, glUniform3fv );
|
|
|
|
|
|
|
|
CHECK_ADDRESS( PFNGLUNIFORM4FVPROC, glUniform4fv );
|
|
|
|
|
|
|
|
CHECK_ADDRESS( PFNGLUNIFORM1IVPROC, glUniform1iv );
|
|
|
|
|
|
|
|
CHECK_ADDRESS( PFNGLUNIFORM2IVPROC, glUniform2iv );
|
|
|
|
|
|
|
|
CHECK_ADDRESS( PFNGLUNIFORM3IVPROC, glUniform3iv );
|
|
|
|
|
|
|
|
CHECK_ADDRESS( PFNGLUNIFORM4IVPROC, glUniform4iv );
|
|
|
|
|
|
|
|
CHECK_ADDRESS( PFNGLUNIFORMMATRIX2FVPROC, glUniformMatrix2fv );
|
|
|
|
|
|
|
|
CHECK_ADDRESS( PFNGLUNIFORMMATRIX3FVPROC, glUniformMatrix3fv );
|
|
|
|
|
|
|
|
CHECK_ADDRESS( PFNGLUNIFORMMATRIX4FVPROC, glUniformMatrix4fv );
|
|
|
|
|
|
|
|
CHECK_ADDRESS( PFNGLVERTEXATTRIBPOINTERPROC, glVertexAttribPointer );
|
|
|
|
|
|
|
|
CHECK_ADDRESS( PFNGLUNIFORM1UIPROC, glUniform1ui );
|
|
|
|
|
|
|
|
CHECK_ADDRESS( PFNGLUNIFORM2UIPROC, glUniform2ui );
|
|
|
|
|
|
|
|
CHECK_ADDRESS( PFNGLUNIFORM3UIPROC, glUniform3ui );
|
|
|
|
|
|
|
|
CHECK_ADDRESS( PFNGLUNIFORM4UIPROC, glUniform4ui );
|
|
|
|
|
|
|
|
CHECK_ADDRESS( PFNGLUNIFORM1UIVPROC, glUniform1uiv );
|
|
|
|
|
|
|
|
CHECK_ADDRESS( PFNGLUNIFORM2UIVPROC, glUniform2uiv );
|
|
|
|
|
|
|
|
CHECK_ADDRESS( PFNGLUNIFORM3UIVPROC, glUniform3uiv );
|
|
|
|
|
|
|
|
CHECK_ADDRESS( PFNGLUNIFORM4UIVPROC, glUniform4uiv );
|
|
|
|
|
|
|
|
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -1038,7 +1097,7 @@ void registerGlExtensions(CGlExtensions &ext)
|
|
|
|
|
|
|
|
|
|
|
|
setupARBVertexBufferObject(glext);
|
|
|
|
setupARBVertexBufferObject(glext);
|
|
|
|
|
|
|
|
|
|
|
|
if( !setupGLSL() )
|
|
|
|
if( !setupGLSL( glext ) )
|
|
|
|
{
|
|
|
|
{
|
|
|
|
nlinfo( "Failed to set up GLSL related calls!" );
|
|
|
|
nlinfo( "Failed to set up GLSL related calls!" );
|
|
|
|
nlassert( false );
|
|
|
|
nlassert( false );
|
|
|
|