Open GL and objects (newbie question)
I'm intersted in starting a simple Open GL app but I don't know much about supported objects. Now I know that Open GL doesn't have standard object type like QuickDraw 3D's 3DMF format.
What I wanna do is make simple objects (like the cars in the game Spectre Supreme) and use those to move and rotate in a 3D world.
I'm not too focused on the 3D world now, but I am more concerned about the object. Can I hard code them, and if I can is the drawing procedure similiar to Cocoas NSBezierPath (like, join points to get lines). Or am I better importing a pre made 3D object in some format.
Also, once I have my objects drawn, how do I animate them?
Thanks for your time
What I wanna do is make simple objects (like the cars in the game Spectre Supreme) and use those to move and rotate in a 3D world.
I'm not too focused on the 3D world now, but I am more concerned about the object. Can I hard code them, and if I can is the drawing procedure similiar to Cocoas NSBezierPath (like, join points to get lines). Or am I better importing a pre made 3D object in some format.
Also, once I have my objects drawn, how do I animate them?
Thanks for your time
"When you dream, there are no rules..."
It's probably best to load the models from a file of some kind. Meshwork files are easy to load and can be created with the program of the same name (http://www.codenautics.com/meshwork). There's some sample code here on iDevGames for loading and drawing models in that format.
For animation, there are a few ways to do it. For a simple way, you have each frame as a separate mode. Then, when you draw it, you interpolate between the poses. For example, if the character is in pose 1 at the beginning of the animation, and in pose 2 after 0.5 seconds, you do this to get the vertices that you actually draw:
For animation, there are a few ways to do it. For a simple way, you have each frame as a separate mode. Then, when you draw it, you interpolate between the poses. For example, if the character is in pose 1 at the beginning of the animation, and in pose 2 after 0.5 seconds, you do this to get the vertices that you actually draw:
Code:
(pseudocode)
t = time / 0.5
for all vertices in pose1 and pose2
drawnvertex = pose1vertex * (1-t) + pose2vertex * t
Possibly Related Threads...
| Thread: | Author | Replies: | Views: | Last Post | |
| Newbie question regarding Resources folder | antester | 2 | 2,303 |
Dec 5, 2007 09:21 PM Last Post: antester |
|
| Another newbie OSX question - SDL | Jesse | 1 | 2,304 |
Jul 15, 2004 02:53 PM Last Post: IBethune |
|
| newbie question: agl vs cgl | GioFX | 3 | 2,682 |
Jul 1, 2004 12:16 AM Last Post: GioFX |
|
| Newbie to Open GL | BlueAvian | 5 | 2,525 |
Jun 13, 2003 07:09 PM Last Post: Iceman |
|
| drawing objects in openGL, plane question. | xDexx | 7 | 4,537 |
Apr 28, 2003 01:06 PM Last Post: OneSadCookie |
|

