Commit ea4db326 authored by Jan Möbius's avatar Jan Möbius

Merge branch 'featureRemoveExtensions' into 'master'

Replaced aliased OpenGLExtension calls

See merge request !3
parents 67dffa0a a0dee223
......@@ -607,7 +607,7 @@ void SplatCloudNode::createVBO()
// create new VBO (if *not* already existing)
if( vboGlId_ == 0 )
{
glGenBuffersARB( 1, &vboGlId_ );
glGenBuffers( 1, &vboGlId_ );
vboNumSplats_ = 0;
vboData_ = 0;
......@@ -624,7 +624,7 @@ void SplatCloudNode::destroyVBO()
// delete VBO (if existing)
if( vboGlId_ != 0 )
{
glDeleteBuffersARB( 1, &vboGlId_ );
glDeleteBuffers( 1, &vboGlId_ );
vboGlId_ = 0;
vboNumSplats_ = 0;
vboData_ = 0;
......@@ -666,15 +666,15 @@ void SplatCloudNode::rebuildVBO( GLState &_state )
/* has pick colors is true */ { pickColorsOffset = stride; stride += 4; }
// tell GL that we are seldomly updating the VBO but are often drawing it
glBufferDataARB( GL_ARRAY_BUFFER_ARB, static_cast<GLsizei>(stride * numSplats), 0, GL_STATIC_DRAW_ARB );
glBufferData( GL_ARRAY_BUFFER_ARB, static_cast<GLsizei>(stride * numSplats), 0, GL_STATIC_DRAW_ARB );
// get pointer to VBO memory
unsigned char *data = (unsigned char *) glMapBufferARB( GL_ARRAY_BUFFER_ARB, GL_WRITE_ONLY_ARB );
unsigned char *data = (unsigned char *) glMapBuffer( GL_ARRAY_BUFFER_ARB, GL_WRITE_ONLY_ARB );
// check if something went wrong during VBO mapping
if( data == 0 )
{
std::cout << "SplatCloudNode::rebuildVBO() : glMapBufferARB() failed." << std::endl;
std::cout << "SplatCloudNode::rebuildVBO() : glMapBuffer() failed." << std::endl;
vboData_ = 0;
}
else
......@@ -725,9 +725,9 @@ void SplatCloudNode::rebuildVBO( GLState &_state )
pickColorsModified_ = false;
// release pointer to VBO memory. if something went wrong, make VBO invalid and abort
if( !glUnmapBufferARB( GL_ARRAY_BUFFER_ARB ) )
if( !glUnmapBuffer( GL_ARRAY_BUFFER_ARB ) )
{
std::cout << "SplatCloudNode::rebuildVBO() : glUnmapBufferARB() failed." << std::endl;
std::cout << "SplatCloudNode::rebuildVBO() : glUnmapBuffer() failed." << std::endl;
vboData_ = 0;
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment