OpenGL + NGD?

A place to discuss everything related to Newton Dynamics.

Moderators: Sascha Willems, walaber

OpenGL + NGD?

Postby OpenProgrammer » Sun Nov 02, 2008 4:30 pm

Hi,
How can I use Newton Game Dynamics with OpenGL? I refer to create graphics with OpenGL and use the physical (gravity, collisions, etc ...) with Newton Game Dynamics

A million of millions of thanks
OpenProgrammer
 
Posts: 6
Joined: Sun Nov 02, 2008 4:25 pm

Re: OpenGL + NGD?

Postby Stucuk » Sun Nov 02, 2008 7:27 pm

Its just the same as with Direct X. You just need to store the Matrix's newton gives you when an object's position/orientation changes and use that with glmultmatrix() to set the objects position/orientation.

Code: Select all
glPushMatrix;
 glMultMatrixf(@Matrix);
 // Render Code goes here!
glPopMatrix;
User avatar
Stucuk
 
Posts: 801
Joined: Sat Mar 12, 2005 3:54 pm
Location: Scotland

Re: OpenGL + NGD?

Postby agi_shi » Sun Nov 02, 2008 9:05 pm

Check out the Newton demos, they use OpenGL.
agi_shi
 
Posts: 263
Joined: Fri Aug 17, 2007 6:54 pm


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 26 guests

cron