Added some more GLSL related calls.

--HG--
branch : gsoc2013-dfighter
hg/feature/gsoc2013-dfighter
dfighter1985 11 years ago
parent 50bb8c5d60
commit c7e8ebcf05

@ -280,6 +280,35 @@ PFNGLSHADERSOURCEPROC nglShaderSource;
PFNGLUSEPROGRAMPROC nglUseProgram;
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
NEL_PFNGLGENOCCLUSIONQUERIESNVPROC nglGenOcclusionQueriesNV;
@ -887,8 +916,10 @@ static bool setupPackedDepthStencil(const char *glext)
return true;
}
static bool setupGLSL()
static bool setupGLSL( const char *glext )
{
CHECK_EXT( "GL_ARB_shader_objects" );
CHECK_ADDRESS( PFNGLATTACHSHADERPROC, glAttachShader );
CHECK_ADDRESS( PFNGLCOMPILESHADERPROC, glCompileShader );
CHECK_ADDRESS( PFNGLCREATEPROGRAMPROC, glCreateProgram );
@ -909,6 +940,34 @@ static bool setupGLSL()
CHECK_ADDRESS( PFNGLSHADERSOURCEPROC, glShaderSource );
CHECK_ADDRESS( PFNGLUSEPROGRAMPROC, glUseProgram );
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;
}
@ -1038,7 +1097,7 @@ void registerGlExtensions(CGlExtensions &ext)
setupARBVertexBufferObject(glext);
if( !setupGLSL() )
if( !setupGLSL( glext ) )
{
nlinfo( "Failed to set up GLSL related calls!" );
nlassert( false );

@ -437,18 +437,48 @@ extern PFNGLDELETEPROGRAMPROC nglDeleteProgram;
extern PFNGLDELETESHADERPROC nglDeleteShader;
extern PFNGLDETACHSHADERPROC nglDetachShader;
extern PFNGLDISABLEVERTEXATTRIBARRAYPROC nglDisableVertexAttribArray;
extern PFNGLENABLEVERTEXATTRIBARRAYPROC nglEnableVertexAttribArray;
extern PFNGLENABLEVERTEXATTRIBARRAYPROC nglEnableVertexAttribArray;
extern PFNGLGETPROGRAMIVPROC nglGetProgramiv;
extern PFNGLGETPROGRAMINFOLOGPROC nglGetProgramInfoLog;
extern PFNGLGETSHADERIVPROC nglGetShaderiv;
extern PFNGLGETSHADERIVPROC nglGetShaderiv;
extern PFNGLGETSHADERINFOLOGPROC nglGetShaderInfoLog;
extern PFNGLGETUNIFORMLOCATIONPROC nglGetUniformLocation;
extern PFNGLISPROGRAMPROC nglIsProgram;
extern PFNGLISSHADERPROC nglIsShader;
extern PFNGLLINKPROGRAMPROC nglLinkProgram;
extern PFNGLLINKPROGRAMPROC nglLinkProgram;
extern PFNGLSHADERSOURCEPROC nglShaderSource;
extern PFNGLUSEPROGRAMPROC nglUseProgram;
extern PFNGLVALIDATEPROGRAMPROC nglValidateProgram;
extern PFNGLVALIDATEPROGRAMPROC nglValidateProgram;
extern PFNGLUNIFORM1FPROC nglUniform1f;
extern PFNGLUNIFORM2FPROC nglUniform2f;
extern PFNGLUNIFORM3FPROC nglUniform3f;
extern PFNGLUNIFORM4FPROC nglUniform4f;
extern PFNGLUNIFORM1IPROC nglUniform1i;
extern PFNGLUNIFORM2IPROC nglUniform2i;
extern PFNGLUNIFORM3IPROC nglUniform3i;
extern PFNGLUNIFORM4IPROC nglUniform4i;
extern PFNGLUNIFORM1FVPROC nglUniform1fv;
extern PFNGLUNIFORM2FVPROC nglUniform2fv;
extern PFNGLUNIFORM3FVPROC nglUniform3fv;
extern PFNGLUNIFORM4FVPROC nglUniform4fv;
extern PFNGLUNIFORM1IVPROC nglUniform1iv;
extern PFNGLUNIFORM2IVPROC nglUniform2iv;
extern PFNGLUNIFORM3IVPROC nglUniform3iv;
extern PFNGLUNIFORM4IVPROC nglUniform4iv;
extern PFNGLUNIFORMMATRIX2FVPROC nglUniformMatrix2fv;
extern PFNGLUNIFORMMATRIX3FVPROC nglUniformMatrix3fv;
extern PFNGLUNIFORMMATRIX4FVPROC nglUniformMatrix4fv;
extern PFNGLVERTEXATTRIBPOINTERPROC nglVertexAttribPointer;
extern PFNGLUNIFORM1UIPROC nglUniform1ui;
extern PFNGLUNIFORM2UIPROC nglUniform2ui;
extern PFNGLUNIFORM3UIPROC nglUniform3ui;
extern PFNGLUNIFORM4UIPROC nglUniform4ui;
extern PFNGLUNIFORM1UIVPROC nglUniform1uiv;
extern PFNGLUNIFORM2UIVPROC nglUniform2uiv;
extern PFNGLUNIFORM3UIVPROC nglUniform3uiv;
extern PFNGLUNIFORM4UIVPROC nglUniform4uiv;
// GL_NV_occlusion_query
//==================================

Loading…
Cancel
Save