glBindBuffersARB(GL_ARRAY_BUFFER_ARB, m_VBOId);
float* ptr = (float*)glMapBufferARB(GL_ARRAY_BUFFER_ARB, GL_WRITE_ONLY_ARB);
if(ptr)
{
::memcpy(ptr,m_fIntersections,m_uiPlaneNumbers*6*3*sizeof(float));
glUnmapBufferARB(GL_ARRAY_BUFFER_ARB); // unmap it after use
}
//// draw vbo
glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
glColor4f(0.3f,0.3f,0.3f,0.2f);
glBindBuffersARB(GL_ARRAY_BUFFER_ARB, m_VBOId);
glVertexPointer(3,GL_FLOAT, 0, 0);
glEnableClientState(GL_VERTEX_ARRAY); // activate vertex coordinates array
for(GLuint uiPlane = 0; uiPlane < m_uiPlaneNumbers; uiPlane++)
{
glDrawArrays(GL_POLYGON,uiPlane*6,6);
}
glDisableClientState(GL_VERTEX_ARRAY);
And here the problem
http://rapidshare.com/files/208882849/VertexBufferObject_on_ATI.bmp.html
http://rapidshare.com/files/208883479/VertexBufferObject_on_NVIDIA.bmp.html
In my notebook is an ATI graphicscard. The notebook is an older one. 1,7GHz Pentium (single core). Well not the fastest. But the picture shows that it works. The nvidia picture shows the result when it runs on nvidia cards.
I tested on a 9800GTX+ and a 8800GTX.
Both nvidia cards cant handle the vbos correctly.
Is there samething i have to do or something that i forgot to do ?
I mean, i read the white paper from nvidia as well. The introduced the
vbo and i used the commands shown in this white paper.
I dont know what went wrong.
thanks,
xiaowei
Problem with VBO (Vertexbuffer Object) on nVidia
Hello,
i have a problem with VBO's and NVIDIA cards.
But first a code snippet
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement