+
+ GLint colorAttrib = this->OpenGLHelper.vglGetAttribLocationARB( this->PointProgram, "Color" );
+ GLint vertexAttrib = this->OpenGLHelper.vglGetAttribLocationARB( this->PointProgram, "Vertex" );
+ GLint diamAttrib = this->OpenGLHelper.vglGetAttribLocationARB( this->PointProgram, "Diameter" );
+
+ GLsizei vertexSize = sizeof(VTK::TVertex);
+
+ this->OpenGLHelper.vglVertexAttribPointerARB( colorAttrib, 4, GL_FLOAT, GL_FALSE, vertexSize, (const GLvoid*)0 );
+ this->OpenGLHelper.vglEnableVertexAttribArrayARB( colorAttrib );
+
+ this->OpenGLHelper.vglVertexAttribPointerARB( vertexAttrib, 3, GL_FLOAT, GL_FALSE, vertexSize, (const GLvoid*)(sizeof(GLfloat) * 4) );
+ this->OpenGLHelper.vglEnableVertexAttribArrayARB( vertexAttrib );
+
+ if(this->BallEnabled) {
+ // Don't use uniform variable.
+ this->OpenGLHelper.vglUniform1iARB( this->myLocations.GeneralPointSize, -1 );
+ this->OpenGLHelper.vglGenBuffersARB( 1, &aDiamsID);
+ this->OpenGLHelper.vglBindBufferARB( GL_ARRAY_BUFFER_ARB, aDiamsID);
+
+ int aDiamsSize = sizeof(TBall)*aNbCells;
+ this->OpenGLHelper.vglBufferDataARB( GL_ARRAY_BUFFER_ARB, aDiamsSize, aBallArray, GL_STATIC_DRAW_ARB);
+
+ delete [] aBallArray;
+
+ this->OpenGLHelper.vglVertexAttribPointerARB( diamAttrib, 1, GL_FLOAT, GL_FALSE, 0, 0 );
+ this->OpenGLHelper.vglEnableVertexAttribArrayARB( diamAttrib );
+ }
+
+ glDrawArrays( GL_POINTS, 0, aTotalConnectivitySize );
+
+ if( this->BallEnabled ) {
+ this->OpenGLHelper.vglDisableVertexAttribArrayARB( diamAttrib );
+ this->OpenGLHelper.vglBindBufferARB( GL_ARRAY_BUFFER_ARB, 0 );
+ this->OpenGLHelper.vglDeleteBuffersARB( 1, &aDiamsID );
+ }
+
+ this->OpenGLHelper.vglDisableVertexAttribArrayARB( colorAttrib );
+ this->OpenGLHelper.vglDisableVertexAttribArrayARB( vertexAttrib );
+ this->OpenGLHelper.vglBindBufferARB( GL_ARRAY_BUFFER_ARB, 0 );
+ this->OpenGLHelper.vglDeleteBuffersARB( 1, &aBufferObjectID );
+ this->OpenGLHelper.vglBindVertexArrayARB( 0 );
+
+ this->OpenGLHelper.vglUseProgramObjectARB( 0 );
+#else
+ GLuint aBufferObjectID, aDiamsID = 0;
+ GLint attribute_diams = -1;
+ glPointSize( std::max( aSize[0], aSize[1] ) );
+ this->OpenGLHelper.vglGenBuffersARB( 1, &aBufferObjectID );
+ this->OpenGLHelper.vglBindBufferARB( GL_ARRAY_BUFFER_ARB, aBufferObjectID );
+
+ int anArrayObjectSize = sizeof( VTK::TVertex ) * aTotalConnectivitySize;
+ this->OpenGLHelper.vglBufferDataARB( GL_ARRAY_BUFFER_ARB, anArrayObjectSize, aVertexArr, GL_STATIC_DRAW_ARB );
+
+ delete [] aVertexArr;
+
+ this->OpenGLHelper.vglBindBufferARB( GL_ARRAY_BUFFER_ARB, 0 );
+ this->OpenGLHelper.vglBindBufferARB( GL_ARRAY_BUFFER_ARB, aBufferObjectID );