Skip to main content
gamedev.net
🔒 Locked

vertex buffer for animated objects

Started by guvidu Feb 25, 2008 at 2:51 PM 0 replies 650+ views
Original Post
guvidu
guvidu
Hi guys! Im trying to make a vertex buffer for an animated model. Its a model imported from 3ds max with skeleton animation. If i do a static vertex buffer i get performance (340 fps for 8 models). If i do a stream buffer (animated) i get no performance.Its the same as rendering the model glBegin(GL_TRIANGLES)...glEnd() (30 fps for 8 models). The code below is how i do the buffer: glGenBuffersARB(1, &vertexBuffer); glBindBufferARB(GL_ARRAY_BUFFER_ARB, vertexBuffer); glBufferDataARB(GL_ARRAY_BUFFER_ARB, pObject->numOfVerts*3*sizeof(float),animatedVerts, GL_STREAM_DRAW_ARB); glVertexPointer(3,GL_FLOAT,0,(char*)NULL); glDrawArrays(GL_TRIANGLES,0, noOfVertex); Pls point me in the write direction. Thanks alot!
LtJax
LtJax
Try using indexed primitives (via glDrawElements or glDrawRangeElements).

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.