   Tried using VBOs but all I got was this stupid "Assertion failed." t-shirt
  So, I was trying to use VBOs but failed instantly. I tried:float *verts = new float[6*lines.size()];int j = 0;for(std::vector<Line>::iterator i = lines.begin();i!=lines.end();++i){   verts[j++] = vertices[i->first].x;   verts[j++] = vertices[i->first].y;   verts[j++] = 0;   verts[j++] = vertices[i->second].x;   verts[j++] = vertices[i->second].y;   verts[j++] = 0;}glGenBuffersARB(1, &vboID);glBindBufferARB(GL_ARRAY_BUFFER_ARB, vboID);glBufferDataARB(GL_ARRAY_BUFFER_ARB, 6*lines.size()*sizeof(float), verts, GL_STATIC_DRAW_ARB);delete[] verts;//and later...glBindBufferARB(GL_ARRAY_BUFFER_ARB, vboID);glEnableClientState(GL_VERTEX_ARRAY);    glVertexPointer(3, GL_FLOAT, 0, 0);  glDrawArrays(GL_LINES, 0, 2*lines.size()); //<- it happens here glDisableClientState(GL_VERTEX_ARRAY);    glBindBufferARB(GL_ARRAY_BUFFER_ARB, 0);This compiles fine but when I run it, it aborts at glDrawArrays with:Quote:tnl/t_draw.c:232: bind_inputs: Assertion `inputs->BufferObj->Pointer' failed.Searching for the error message gives me only lots of bug reports from other programs having similar errors without any explanation what causes it.   
  According to the error message it doesn't fail on the line you think.Look in "tnl/t_draw.c" on line 232. Look inside a function called "bind_inputs" . Look for a line like "assert(inputs->BufferObj->Pointer)"Then work out why your changes make inputs->BufferObj->Pointer == NULL.;Quote:Original post by mrbastardAccording to the error message it doesn't fail on the line you think.Look in "tnl/t_draw.c" on line 232. Look inside a function called "bind_inputs" . Look for a line like "assert(inputs->BufferObj->Pointer)"Then work out why your changes make inputs->BufferObj->Pointer == NULL.Well, i sort of know that, but that t_draw file isn't part of my project (it isn't even present on my hard drive). It is probably part of the mesa implementation. so I have to assume the error originates from me using the library wrong.   ;  In that case, maybe download the mesa source code so you can see what it's trying to do?   