How to convert OpenGL code to Irrlicht?

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
Post Reply
jhr1021
Posts: 8
Joined: Fri Apr 10, 2009 11:48 pm

How to convert OpenGL code to Irrlicht?

Post by jhr1021 »

Hi everyone,

I have a problem in converting OpenGL code to Irrlicht. This code is to draw a character based on motion capture data and composed with several links such as fore arms, tights, feets, etc. However, I don't know how to convert this code to Irrlicht. If you have any idea, let me know, please.

glPushMatrix();
glTranslatef(t[0], t[1], t[2]);
glRotatef( len( rv )*180/M_PI, axis[0], axis[1], axis[2] );
// draw
glPopMatrix();
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

translate needs to go through quaternion and euler into setRotation, Translate can be used via setPosition. At least if there are separate meshes. Otherwise you either need to use a skeleton, or move mesh buffers. However, the latter won't have parent/child hierarchies, so calculation of positions needs to take this into consideration.
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post by BlindSide »

translate needs to go through quaternion and euler into setRotation
I'm pretty sure he means rotate. :P
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Oh yeah, had my eyes on the original code, but wanted to start with the interesting part :wink:
Post Reply