Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 15 Mar 2012
Offline Last Active Apr 17 2012 10:38 AM

#4924596 How to animate a 3ds Max model in my OpenGL program?

Posted by on 23 March 2012 - 06:05 AM

If you don't need boned animation and you are using the fixed function pipeline in OpenGL, you might want to give the following free and open-source Obj Wavefront model library a try.


It can read in basic animation files and simply transforms and rotates the parts making up the model (if it has been exported with objects or groups).

I wrote it for my University dissertation and it tends to be good enough for the majority of my projects so it might help you too if you do decide to go with Wavefront Obj.

#4923343 [SOLVED]Perspective Correct Texture Coordinates (Frag Shader)

Posted by on 19 March 2012 - 10:51 AM

The following is the texture coordinate related code that I use. I have missed off the vertex and normal stuff so not to spam everyone with lots of code.

Does this appear to be correct?

GLuint coodBuffer;
GLuint inTexCoord;
std::vector<float> coords;

inTexCoord = glGetAttribLocation(shaderProgram, "in_tex_coord");
glGenBuffersARB(1, &coordBuffer);

for(int i = 0; faces.size(); i++)



glBindBufferARB(GL_ARRAY_BUFFER_ARB, coordBuffer);
glBufferDataARB(GL_ARRAY_BUFFER_ARB, coords.size() * sizeof(float), &coords[0], GL_STATIC_DRAW_ARB);

glBindBuffer(GL_ARRAY_BUFFER_ARB, coordBuffer);
glVertexAttribPointerARB(inTexCoord, 2, GL_FLOAT, GL_FALSE, 0, 0);
glDrawArrays(GL_TRIANGLES, 0, faces.size() * 3);

I have also attempted to use


But it makes no difference. I assume this hint only has an effect when using fixed functionality?

From Madhed's software rendering suggestion, I tried it on a different machine (with newer gfx card) and it all works perfectly.
I noticed that it ran slower using shaders than just using the fixed function pipeline suggesting that it is indeed doing some sort of software emulation.
The graphics card in question is an intel GMA 945 running on Fedora 15's Xorg.

Hmm, I guess I am forced to stick with the fixed function pipeline with this card? So much for compatibility... lol

Thank you everyone for your help. Really appreciated! I have marked the topic as solved.

Attached Thumbnails

  • working.png