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; 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 ) static bool setupSeparateShaderObjects( const char *glext )
{ {
CHECK_EXT( "GL_ARB_separate_shader_objects" ); CHECK_EXT( "GL_ARB_separate_shader_objects" );
@ -1086,8 +1077,6 @@ void registerGlExtensions(CGlExtensions &ext)
setupARBVertexBufferObject(glext); setupARBVertexBufferObject(glext);
setupVA( glext );
if( !setupGLSL( glext ) ) if( !setupGLSL( glext ) )
{ {
nlinfo( "Failed to set up GLSL related calls!" ); nlinfo( "Failed to set up GLSL related calls!" );

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

@ -404,7 +404,7 @@ void CDriverGL3::setupGlArrays(CVertexBufferInfo &vb)
{ {
mustNormalize = ARBVertexProgramMustNormalizeAttrib[value]; 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 else
{ {

Loading…
Cancel
Save