MD2 Rendering
I was wondering if there is a better way to render MD2 models, other than using glVertex?
Put all your data in vertex array or dynamic VBO. It needs to be modified a bit, but it works much faster. There has been some posts how to do this in the past so I sugest you use the search function (or google if this doesn't work)
You should never let your fears become the boundaries of your dreams.
I found few samples but they only do static models, using display lists and arrays (glDrawArray), but how to do interpolation with such implementation, and I am talknig about OpenGL only
You can either do interpolation on CPU or use vertex program to do it. It depends on where your bottleneck is. And you should be using glDrawElements/glDrawRangeElements.
You should never let your fears become the boundaries of your dreams.
http://www.gamedev.net/community/forums/topic.asp?topic_id=295128
heheheh, notice how i dump everything into a vertex buffer(well its just a vector then, but that gets loaded into a vertex buffer and sent to the video card), once i make sure that none of my frames are getting corrupted ;-), im going to do interpolation in a glsl program, should work out nicely, ill be using glVertexAttrib3f() (maybe thats the wrong function name, i dont have time to look it up atm though) to specify the offset into the vertex buffer, where the second bit of vertex data is, and from there i just load up the change in time (delta time) into a uniform variable, and off i go
hope that helps
-Dan
heheheh, notice how i dump everything into a vertex buffer(well its just a vector then, but that gets loaded into a vertex buffer and sent to the video card), once i make sure that none of my frames are getting corrupted ;-), im going to do interpolation in a glsl program, should work out nicely, ill be using glVertexAttrib3f() (maybe thats the wrong function name, i dont have time to look it up atm though) to specify the offset into the vertex buffer, where the second bit of vertex data is, and from there i just load up the change in time (delta time) into a uniform variable, and off i go
hope that helps
-Dan
When General Patton died after World War 2 he went to the gates of Heaven to talk to St. Peter. The first thing he asked is if there were any Marines in heaven. St. Peter told him no, Marines are too rowdy for heaven. He then asked why Patton wanted to know. Patton told him he was sick of the Marines overshadowing the Army because they did more with less and were all hard-core sons of bitches. St. Peter reassured him there were no Marines so Patton went into Heaven. As he was checking out his new home he rounded a corner and saw someone in Marine Dress Blues. He ran back to St. Peter and yelled "You lied to me! There are Marines in heaven!" St. Peter said "Who him? That's just God. He wishes he were a Marine."
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement