Replaced ARB VertexAttribArray stuff with the core calls.

--HG--
branch : gsoc2013-dfighter
hg/feature/gsoc2013-dfighter
dfighter1985 11 years ago
parent d37b004372
commit ed885d3df6

@ -890,15 +890,6 @@ static bool setupGLSL( const char *glext )
return true;
}
static bool setupVA( const char *glext )
{
CHECK_ADDRESS(PFNGLENABLEVERTEXATTRIBARRAYARBPROC, glEnableVertexAttribArrayARB);
CHECK_ADDRESS(PFNGLDISABLEVERTEXATTRIBARRAYARBPROC, glDisableVertexAttribArrayARB);
CHECK_ADDRESS(PFNGLVERTEXATTRIBPOINTERARBPROC, glVertexAttribPointerARB);
return true;
}
static bool setupSeparateShaderObjects( const char *glext )
{
CHECK_EXT( "GL_ARB_separate_shader_objects" );
@ -1086,8 +1077,6 @@ void registerGlExtensions(CGlExtensions &ext)
setupARBVertexBufferObject(glext);
setupVA( glext );
if( !setupGLSL( glext ) )
{
nlinfo( "Failed to set up GLSL related calls!" );

@ -657,13 +657,14 @@ void CDriverGLStates3::enableVertexAttribArrayARB(uint glIndex,bool enable)
if(_VertexAttribArrayEnabled[glIndex] != enable)
#endif
{
if(enable)
nglEnableVertexAttribArrayARB(glIndex);
if( enable )
nglEnableVertexAttribArray(glIndex);
else
nglDisableVertexAttribArrayARB(glIndex);
nglDisableVertexAttribArray(glIndex);
_VertexAttribArrayEnabled[glIndex]= enable;
}
}
// ***************************************************************************

@ -404,7 +404,7 @@ void CDriverGL3::setupGlArrays(CVertexBufferInfo &vb)
{
mustNormalize = ARBVertexProgramMustNormalizeAttrib[value];
}
nglVertexAttribPointerARB(glIndex, NumCoordinatesType[type], GLType[type], mustNormalize, vb.VertexSize, vb.ValuePtr[value]);
nglVertexAttribPointer( glIndex, NumCoordinatesType[type], GLType[ type ], mustNormalize, vb.VertexSize, vb.ValuePtr[value] );
}
else
{

Loading…
Cancel
Save