Sign in to follow this  
xiaowei

Problem with VBO (Vertexbuffer Object) on nVidia

Recommended Posts

Hello, i have a problem with VBO's and NVIDIA cards. But first a code snippet
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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this