PDA

View Full Version : A 3d library with no matrices or vectors ? wtf?



PompeyBlue
08-11-2004, 10:31 AM
Hello,

So I've started playing with OpenGL running under Fedora Core 2 and I've got a textured, lit polygon being displayed (yay!)

However, I've now looked at doing something more useful and I really can't believe what I'm seeing.

So OpenGL doesn't support any kind of matrix or vector ? I can't just get an object, and set it's matrix directly ?

I.e. I've got an object's points, it's triangle list, and I know it's look at and position. I can't just whack this straight into the object matrix ? I've got to build it up from rotations and translations ? This seems really inefficient, or have I missed something somewhere ?

Also, there is no camera matrix ? So I guess I can just pretend there is, invert it, and concat the inverse camera matrix to my object matrices ? Er, no, it looks like I can't ? So given this, how is it possible to do anything in OpenGL ? How can I have an arbitary camera in an arbitary room with objects placed in arbitary positions ? So far, it doesn't look like it's possible without a LOT of awkward maths.

Please help, I've come so far!

1024
08-11-2004, 11:04 AM
LOL, that was hilarious!

Check out this:
http://www.opengl.org/resources/tutorials/index.html

and this (the opengl tutorials section):
http://nehe.gamedev.net/

ZbuffeR
08-12-2004, 10:45 AM
you do seem to have missed something somewhere :)

glLoadMatrix :
http://pyopengl.sourceforge.net/documentation/manual/glLoadMatrix.3G.xml

Rob The Bloke
08-14-2004, 02:59 AM
www.gametutorials.com (http://www.gametutorials.com) might also be slightly useful.