|
|
@ -280,7 +280,6 @@ PFNGLLINKPROGRAMPROC nglLinkProgram;
|
|
|
|
PFNGLSHADERSOURCEPROC nglShaderSource;
|
|
|
|
PFNGLSHADERSOURCEPROC nglShaderSource;
|
|
|
|
PFNGLUSEPROGRAMPROC nglUseProgram;
|
|
|
|
PFNGLUSEPROGRAMPROC nglUseProgram;
|
|
|
|
PFNGLVALIDATEPROGRAMPROC nglValidateProgram;
|
|
|
|
PFNGLVALIDATEPROGRAMPROC nglValidateProgram;
|
|
|
|
|
|
|
|
|
|
|
|
PFNGLUNIFORM1FPROC nglUniform1f;
|
|
|
|
PFNGLUNIFORM1FPROC nglUniform1f;
|
|
|
|
PFNGLUNIFORM2FPROC nglUniform2f;
|
|
|
|
PFNGLUNIFORM2FPROC nglUniform2f;
|
|
|
|
PFNGLUNIFORM3FPROC nglUniform3f;
|
|
|
|
PFNGLUNIFORM3FPROC nglUniform3f;
|
|
|
@ -301,7 +300,6 @@ PFNGLUNIFORMMATRIX2FVPROC nglUniformMatrix2fv;
|
|
|
|
PFNGLUNIFORMMATRIX3FVPROC nglUniformMatrix3fv;
|
|
|
|
PFNGLUNIFORMMATRIX3FVPROC nglUniformMatrix3fv;
|
|
|
|
PFNGLUNIFORMMATRIX4FVPROC nglUniformMatrix4fv;
|
|
|
|
PFNGLUNIFORMMATRIX4FVPROC nglUniformMatrix4fv;
|
|
|
|
PFNGLVERTEXATTRIBPOINTERPROC nglVertexAttribPointer;
|
|
|
|
PFNGLVERTEXATTRIBPOINTERPROC nglVertexAttribPointer;
|
|
|
|
|
|
|
|
|
|
|
|
PFNGLUNIFORM1UIPROC nglUniform1ui;
|
|
|
|
PFNGLUNIFORM1UIPROC nglUniform1ui;
|
|
|
|
PFNGLUNIFORM2UIPROC nglUniform2ui;
|
|
|
|
PFNGLUNIFORM2UIPROC nglUniform2ui;
|
|
|
|
PFNGLUNIFORM3UIPROC nglUniform3ui;
|
|
|
|
PFNGLUNIFORM3UIPROC nglUniform3ui;
|
|
|
@ -311,6 +309,68 @@ PFNGLUNIFORM2UIVPROC nglUniform2uiv;
|
|
|
|
PFNGLUNIFORM3UIVPROC nglUniform3uiv;
|
|
|
|
PFNGLUNIFORM3UIVPROC nglUniform3uiv;
|
|
|
|
PFNGLUNIFORM4UIVPROC nglUniform4uiv;
|
|
|
|
PFNGLUNIFORM4UIVPROC nglUniform4uiv;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// GL_ARB_separate_shader_objects
|
|
|
|
|
|
|
|
PFNGLUSEPROGRAMSTAGESPROC nglUseProgramStages;
|
|
|
|
|
|
|
|
PFNGLACTIVESHADERPROGRAMPROC nglActiveShaderProgram;
|
|
|
|
|
|
|
|
PFNGLCREATESHADERPROGRAMVPROC nglCreateShaderProgramv;
|
|
|
|
|
|
|
|
PFNGLBINDPROGRAMPIPELINEPROC nglBindProgramPipeline;
|
|
|
|
|
|
|
|
PFNGLDELETEPROGRAMPIPELINESPROC nglDeleteProgramPipelines;
|
|
|
|
|
|
|
|
PFNGLGENPROGRAMPIPELINESPROC nglGenProgramPipelines;
|
|
|
|
|
|
|
|
PFNGLISPROGRAMPIPELINEPROC nglIsProgramPipeline;
|
|
|
|
|
|
|
|
PFNGLGETPROGRAMPIPELINEIVPROC nglGetProgramPipelineiv;
|
|
|
|
|
|
|
|
PFNGLPROGRAMUNIFORM1IPROC nglProgramUniform1i;
|
|
|
|
|
|
|
|
PFNGLPROGRAMUNIFORM1IVPROC nglProgramUniform1iv;
|
|
|
|
|
|
|
|
PFNGLPROGRAMUNIFORM1FPROC nglProgramUniform1f;
|
|
|
|
|
|
|
|
PFNGLPROGRAMUNIFORM1FVPROC nglProgramUniform1fv;
|
|
|
|
|
|
|
|
PFNGLPROGRAMUNIFORM1DPROC nglProgramUniform1d;
|
|
|
|
|
|
|
|
PFNGLPROGRAMUNIFORM1DVPROC nglProgramUniform1dv;
|
|
|
|
|
|
|
|
PFNGLPROGRAMUNIFORM1UIPROC nglProgramUniform1ui;
|
|
|
|
|
|
|
|
PFNGLPROGRAMUNIFORM1UIVPROC nglProgramUniform1uiv;
|
|
|
|
|
|
|
|
PFNGLPROGRAMUNIFORM2IPROC nglProgramUniform2i;
|
|
|
|
|
|
|
|
PFNGLPROGRAMUNIFORM2IVPROC nglProgramUniform2iv;
|
|
|
|
|
|
|
|
PFNGLPROGRAMUNIFORM2FPROC nglProgramUniform2f;
|
|
|
|
|
|
|
|
PFNGLPROGRAMUNIFORM2FVPROC nglProgramUniform2fv;
|
|
|
|
|
|
|
|
PFNGLPROGRAMUNIFORM2DPROC nglProgramUniform2d;
|
|
|
|
|
|
|
|
PFNGLPROGRAMUNIFORM2DVPROC nglProgramUniform2dv;
|
|
|
|
|
|
|
|
PFNGLPROGRAMUNIFORM2UIPROC nglProgramUniform2ui;
|
|
|
|
|
|
|
|
PFNGLPROGRAMUNIFORM2UIVPROC nglProgramUniform2uiv;
|
|
|
|
|
|
|
|
PFNGLPROGRAMUNIFORM3IPROC nglProgramUniform3i;
|
|
|
|
|
|
|
|
PFNGLPROGRAMUNIFORM3IVPROC nglProgramUniform3iv;
|
|
|
|
|
|
|
|
PFNGLPROGRAMUNIFORM3FPROC nglProgramUniform3f;
|
|
|
|
|
|
|
|
PFNGLPROGRAMUNIFORM3FVPROC nglProgramUniform3fv;
|
|
|
|
|
|
|
|
PFNGLPROGRAMUNIFORM3DPROC nglProgramUniform3d;
|
|
|
|
|
|
|
|
PFNGLPROGRAMUNIFORM3DVPROC nglProgramUniform3dv;
|
|
|
|
|
|
|
|
PFNGLPROGRAMUNIFORM3UIPROC nglProgramUniform3ui;
|
|
|
|
|
|
|
|
PFNGLPROGRAMUNIFORM3UIVPROC nglProgramUniform3uiv;
|
|
|
|
|
|
|
|
PFNGLPROGRAMUNIFORM4IPROC nglProgramUniform4i;
|
|
|
|
|
|
|
|
PFNGLPROGRAMUNIFORM4IVPROC nglProgramUniform4iv;
|
|
|
|
|
|
|
|
PFNGLPROGRAMUNIFORM4FPROC nglProgramUniform4f;
|
|
|
|
|
|
|
|
PFNGLPROGRAMUNIFORM4FVPROC nglProgramUniform4fv;
|
|
|
|
|
|
|
|
PFNGLPROGRAMUNIFORM4DPROC nglProgramUniform4d;
|
|
|
|
|
|
|
|
PFNGLPROGRAMUNIFORM4DVPROC nglProgramUniform4dv;
|
|
|
|
|
|
|
|
PFNGLPROGRAMUNIFORM4UIPROC nglProgramUniform4ui;
|
|
|
|
|
|
|
|
PFNGLPROGRAMUNIFORM4UIVPROC nglProgramUniform4uiv;
|
|
|
|
|
|
|
|
PFNGLPROGRAMUNIFORMMATRIX2FVPROC nglProgramUniformMatrix2fv;
|
|
|
|
|
|
|
|
PFNGLPROGRAMUNIFORMMATRIX3FVPROC nglProgramUniformMatrix3fv;
|
|
|
|
|
|
|
|
PFNGLPROGRAMUNIFORMMATRIX4FVPROC nglProgramUniformMatrix4fv;
|
|
|
|
|
|
|
|
PFNGLPROGRAMUNIFORMMATRIX2DVPROC nglProgramUniformMatrix2dv;
|
|
|
|
|
|
|
|
PFNGLPROGRAMUNIFORMMATRIX3DVPROC nglProgramUniformMatrix3dv;
|
|
|
|
|
|
|
|
PFNGLPROGRAMUNIFORMMATRIX4DVPROC nglProgramUniformMatrix4dv;
|
|
|
|
|
|
|
|
PFNGLPROGRAMUNIFORMMATRIX2X3FVPROC nglProgramUniformMatrix2x3fv;
|
|
|
|
|
|
|
|
PFNGLPROGRAMUNIFORMMATRIX3X2FVPROC nglProgramUniformMatrix3x2fv;
|
|
|
|
|
|
|
|
PFNGLPROGRAMUNIFORMMATRIX2X4FVPROC nglProgramUniformMatrix2x4fv;
|
|
|
|
|
|
|
|
PFNGLPROGRAMUNIFORMMATRIX4X2FVPROC nglProgramUniformMatrix4x2fv;
|
|
|
|
|
|
|
|
PFNGLPROGRAMUNIFORMMATRIX3X4FVPROC nglProgramUniformMatrix3x4fv;
|
|
|
|
|
|
|
|
PFNGLPROGRAMUNIFORMMATRIX4X3FVPROC nglProgramUniformMatrix4x3fv;
|
|
|
|
|
|
|
|
PFNGLPROGRAMUNIFORMMATRIX2X3DVPROC nglProgramUniformMatrix2x3dv;
|
|
|
|
|
|
|
|
PFNGLPROGRAMUNIFORMMATRIX3X2DVPROC nglProgramUniformMatrix3x2dv;
|
|
|
|
|
|
|
|
PFNGLPROGRAMUNIFORMMATRIX2X4DVPROC nglProgramUniformMatrix2x4dv;
|
|
|
|
|
|
|
|
PFNGLPROGRAMUNIFORMMATRIX4X2DVPROC nglProgramUniformMatrix4x2dv;
|
|
|
|
|
|
|
|
PFNGLPROGRAMUNIFORMMATRIX3X4DVPROC nglProgramUniformMatrix3x4dv;
|
|
|
|
|
|
|
|
PFNGLPROGRAMUNIFORMMATRIX4X3DVPROC nglProgramUniformMatrix4x3dv;
|
|
|
|
|
|
|
|
PFNGLVALIDATEPROGRAMPIPELINEPROC nglValidateProgramPipeline;
|
|
|
|
|
|
|
|
PFNGLGETPROGRAMPIPELINEINFOLOGPROC nglGetProgramPipelineInfoLog;
|
|
|
|
|
|
|
|
|
|
|
|
// NV_occlusion_query
|
|
|
|
// NV_occlusion_query
|
|
|
|
NEL_PFNGLGENOCCLUSIONQUERIESNVPROC nglGenOcclusionQueriesNV;
|
|
|
|
NEL_PFNGLGENOCCLUSIONQUERIESNVPROC nglGenOcclusionQueriesNV;
|
|
|
|
NEL_PFNGLDELETEOCCLUSIONQUERIESNVPROC nglDeleteOcclusionQueriesNV;
|
|
|
|
NEL_PFNGLDELETEOCCLUSIONQUERIESNVPROC nglDeleteOcclusionQueriesNV;
|
|
|
@ -974,6 +1034,74 @@ static bool setupGLSL( const char *glext )
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static bool setupSeparateShaderObjects( const char *glext )
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
CHECK_EXT( "GL_ARB_separate_shader_objects" );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CHECK_ADDRESS( PFNGLUSEPROGRAMSTAGESPROC, glUseProgramStages );
|
|
|
|
|
|
|
|
CHECK_ADDRESS( PFNGLACTIVESHADERPROGRAMPROC, glActiveShaderProgram );
|
|
|
|
|
|
|
|
CHECK_ADDRESS( PFNGLCREATESHADERPROGRAMVPROC, glCreateShaderProgramv );
|
|
|
|
|
|
|
|
CHECK_ADDRESS( PFNGLBINDPROGRAMPIPELINEPROC, glBindProgramPipeline );
|
|
|
|
|
|
|
|
CHECK_ADDRESS( PFNGLDELETEPROGRAMPIPELINESPROC, glDeleteProgramPipelines );
|
|
|
|
|
|
|
|
CHECK_ADDRESS( PFNGLGENPROGRAMPIPELINESPROC, glGenProgramPipelines );
|
|
|
|
|
|
|
|
CHECK_ADDRESS( PFNGLISPROGRAMPIPELINEPROC, glIsProgramPipeline );
|
|
|
|
|
|
|
|
CHECK_ADDRESS( PFNGLGETPROGRAMPIPELINEIVPROC, glGetProgramPipelineiv );
|
|
|
|
|
|
|
|
CHECK_ADDRESS( PFNGLPROGRAMUNIFORM1IPROC, glProgramUniform1i );
|
|
|
|
|
|
|
|
CHECK_ADDRESS( PFNGLPROGRAMUNIFORM1IVPROC, glProgramUniform1iv );
|
|
|
|
|
|
|
|
CHECK_ADDRESS( PFNGLPROGRAMUNIFORM1FPROC, glProgramUniform1f );
|
|
|
|
|
|
|
|
CHECK_ADDRESS( PFNGLPROGRAMUNIFORM1FVPROC, glProgramUniform1fv );
|
|
|
|
|
|
|
|
CHECK_ADDRESS( PFNGLPROGRAMUNIFORM1DPROC, glProgramUniform1d );
|
|
|
|
|
|
|
|
CHECK_ADDRESS( PFNGLPROGRAMUNIFORM1DVPROC, glProgramUniform1dv );
|
|
|
|
|
|
|
|
CHECK_ADDRESS( PFNGLPROGRAMUNIFORM1UIPROC, glProgramUniform1ui );
|
|
|
|
|
|
|
|
CHECK_ADDRESS( PFNGLPROGRAMUNIFORM1UIVPROC, glProgramUniform1uiv );
|
|
|
|
|
|
|
|
CHECK_ADDRESS( PFNGLPROGRAMUNIFORM2IPROC, glProgramUniform2i );
|
|
|
|
|
|
|
|
CHECK_ADDRESS( PFNGLPROGRAMUNIFORM2IVPROC, glProgramUniform2iv );
|
|
|
|
|
|
|
|
CHECK_ADDRESS( PFNGLPROGRAMUNIFORM2FPROC, glProgramUniform2f );
|
|
|
|
|
|
|
|
CHECK_ADDRESS( PFNGLPROGRAMUNIFORM2FVPROC, glProgramUniform2fv );
|
|
|
|
|
|
|
|
CHECK_ADDRESS( PFNGLPROGRAMUNIFORM2DPROC, glProgramUniform2d );
|
|
|
|
|
|
|
|
CHECK_ADDRESS( PFNGLPROGRAMUNIFORM2DVPROC, glProgramUniform2dv );
|
|
|
|
|
|
|
|
CHECK_ADDRESS( PFNGLPROGRAMUNIFORM2UIPROC, glProgramUniform2ui );
|
|
|
|
|
|
|
|
CHECK_ADDRESS( PFNGLPROGRAMUNIFORM2UIVPROC, glProgramUniform2uiv );
|
|
|
|
|
|
|
|
CHECK_ADDRESS( PFNGLPROGRAMUNIFORM3IPROC, glProgramUniform3i );
|
|
|
|
|
|
|
|
CHECK_ADDRESS( PFNGLPROGRAMUNIFORM3IVPROC, glProgramUniform3iv );
|
|
|
|
|
|
|
|
CHECK_ADDRESS( PFNGLPROGRAMUNIFORM3FPROC, glProgramUniform3f );
|
|
|
|
|
|
|
|
CHECK_ADDRESS( PFNGLPROGRAMUNIFORM3FVPROC, glProgramUniform3fv );
|
|
|
|
|
|
|
|
CHECK_ADDRESS( PFNGLPROGRAMUNIFORM3DPROC, glProgramUniform3d );
|
|
|
|
|
|
|
|
CHECK_ADDRESS( PFNGLPROGRAMUNIFORM3DVPROC, glProgramUniform3dv );
|
|
|
|
|
|
|
|
CHECK_ADDRESS( PFNGLPROGRAMUNIFORM3UIPROC, glProgramUniform3ui );
|
|
|
|
|
|
|
|
CHECK_ADDRESS( PFNGLPROGRAMUNIFORM3UIVPROC, glProgramUniform3uiv );
|
|
|
|
|
|
|
|
CHECK_ADDRESS( PFNGLPROGRAMUNIFORM4IPROC, glProgramUniform4i );
|
|
|
|
|
|
|
|
CHECK_ADDRESS( PFNGLPROGRAMUNIFORM4IVPROC, glProgramUniform4iv );
|
|
|
|
|
|
|
|
CHECK_ADDRESS( PFNGLPROGRAMUNIFORM4FPROC, glProgramUniform4f );
|
|
|
|
|
|
|
|
CHECK_ADDRESS( PFNGLPROGRAMUNIFORM4FVPROC, glProgramUniform4fv );
|
|
|
|
|
|
|
|
CHECK_ADDRESS( PFNGLPROGRAMUNIFORM4DPROC, glProgramUniform4d );
|
|
|
|
|
|
|
|
CHECK_ADDRESS( PFNGLPROGRAMUNIFORM4DVPROC, glProgramUniform4dv );
|
|
|
|
|
|
|
|
CHECK_ADDRESS( PFNGLPROGRAMUNIFORM4UIPROC, glProgramUniform4ui );
|
|
|
|
|
|
|
|
CHECK_ADDRESS( PFNGLPROGRAMUNIFORM4UIVPROC, glProgramUniform4uiv );
|
|
|
|
|
|
|
|
CHECK_ADDRESS( PFNGLPROGRAMUNIFORMMATRIX2FVPROC, glProgramUniformMatrix2fv );
|
|
|
|
|
|
|
|
CHECK_ADDRESS( PFNGLPROGRAMUNIFORMMATRIX3FVPROC, glProgramUniformMatrix3fv );
|
|
|
|
|
|
|
|
CHECK_ADDRESS( PFNGLPROGRAMUNIFORMMATRIX4FVPROC, glProgramUniformMatrix4fv );
|
|
|
|
|
|
|
|
CHECK_ADDRESS( PFNGLPROGRAMUNIFORMMATRIX2DVPROC, glProgramUniformMatrix2dv );
|
|
|
|
|
|
|
|
CHECK_ADDRESS( PFNGLPROGRAMUNIFORMMATRIX3DVPROC, glProgramUniformMatrix3dv );
|
|
|
|
|
|
|
|
CHECK_ADDRESS( PFNGLPROGRAMUNIFORMMATRIX4DVPROC, glProgramUniformMatrix4dv );
|
|
|
|
|
|
|
|
CHECK_ADDRESS( PFNGLPROGRAMUNIFORMMATRIX2X3FVPROC, glProgramUniformMatrix2x3fv );
|
|
|
|
|
|
|
|
CHECK_ADDRESS( PFNGLPROGRAMUNIFORMMATRIX3X2FVPROC, glProgramUniformMatrix3x2fv );
|
|
|
|
|
|
|
|
CHECK_ADDRESS( PFNGLPROGRAMUNIFORMMATRIX2X4FVPROC, glProgramUniformMatrix2x4fv );
|
|
|
|
|
|
|
|
CHECK_ADDRESS( PFNGLPROGRAMUNIFORMMATRIX4X2FVPROC, glProgramUniformMatrix4x2fv );
|
|
|
|
|
|
|
|
CHECK_ADDRESS( PFNGLPROGRAMUNIFORMMATRIX3X4FVPROC, glProgramUniformMatrix3x4fv );
|
|
|
|
|
|
|
|
CHECK_ADDRESS( PFNGLPROGRAMUNIFORMMATRIX4X3FVPROC, glProgramUniformMatrix4x3fv );
|
|
|
|
|
|
|
|
CHECK_ADDRESS( PFNGLPROGRAMUNIFORMMATRIX2X3DVPROC, glProgramUniformMatrix2x3dv );
|
|
|
|
|
|
|
|
CHECK_ADDRESS( PFNGLPROGRAMUNIFORMMATRIX3X2DVPROC, glProgramUniformMatrix3x2dv );
|
|
|
|
|
|
|
|
CHECK_ADDRESS( PFNGLPROGRAMUNIFORMMATRIX2X4DVPROC, glProgramUniformMatrix2x4dv );
|
|
|
|
|
|
|
|
CHECK_ADDRESS( PFNGLPROGRAMUNIFORMMATRIX4X2DVPROC, glProgramUniformMatrix4x2dv );
|
|
|
|
|
|
|
|
CHECK_ADDRESS( PFNGLPROGRAMUNIFORMMATRIX3X4DVPROC, glProgramUniformMatrix3x4dv );
|
|
|
|
|
|
|
|
CHECK_ADDRESS( PFNGLPROGRAMUNIFORMMATRIX4X3DVPROC, glProgramUniformMatrix4x3dv );
|
|
|
|
|
|
|
|
CHECK_ADDRESS( PFNGLVALIDATEPROGRAMPIPELINEPROC, glValidateProgramPipeline );
|
|
|
|
|
|
|
|
CHECK_ADDRESS( PFNGLGETPROGRAMPIPELINEINFOLOGPROC, glGetProgramPipelineInfoLog );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return true;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// ***************************************************************************
|
|
|
|
// ***************************************************************************
|
|
|
|
// Extension Check.
|
|
|
|
// Extension Check.
|
|
|
|
void registerGlExtensions(CGlExtensions &ext)
|
|
|
|
void registerGlExtensions(CGlExtensions &ext)
|
|
|
@ -1104,6 +1232,12 @@ void registerGlExtensions(CGlExtensions &ext)
|
|
|
|
nlinfo( "Failed to set up GLSL related calls!" );
|
|
|
|
nlinfo( "Failed to set up GLSL related calls!" );
|
|
|
|
nlassert( false );
|
|
|
|
nlassert( false );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if( !setupSeparateShaderObjects( glext ) )
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
nlinfo( "Failed to set up separate shader object calls!" );
|
|
|
|
|
|
|
|
nlassert( false );
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|