OpenGL Help?

BlitzMax Forums/OpenGL Module/OpenGL Help?

FBEpyon(Posted 2007) [#1]
I have been looking into doing OpenGL threw Blitzmax sometime now, and I was just wondering what math it takes, I just learned some about matrices and I was just trying to get a list of all the styles of math I need to know. I got a good concept of Liner Algebra, and my brother showed me Matrix yesterday, so what am I missing to get started.

I don't want anything about using a wrapper, I'm looking to learn raw OpenGL and making my own Engine.


LAB[au](Posted 2007) [#2]
http://www.amazon.com/Mathematics-Programming-Computer-Graphics-Development/dp/1584500379

Browse the content of this book ;)


FBEpyon(Posted 2007) [#3]
I looked threw this book, I ordered the 2nd Edition... Im planning on making a 3Rd person adventure game, I would need a terrain system, and a good camera system. My question would be what system of math would I need. I know I need Matrices but where would that be applied, and how is vectors used ( are they used for making the polygons or something else ).


LAB[au](Posted 2007) [#4]
Well matrices and vectors can be used to describe anything in a 3d space but to summarize, matrices are used for transformations (anything from rotation of a mesh to perspective or orthographic projection) and vectors mainly for dynamics (physics or simple motion), then there are off course other uses to these.

In openGL you can do basically everything you want with the frustum (on which the camera is relying), off-center projection to name one. You will have to look for a good occlusion system that would be adapted to your 3D "world"/meshes.

Terrain system is a subject in its own right.

For an approach on both I suggest you browse on Wikipedia, that will give you a good overview of the existing methods, and you will get the vocabulary.

Otherwise the OpenGL book (the blue/red and orange-shaders books) is a good start. Look at OpenGL.org


Chris C(Posted 2007) [#5]
Its worth looking at quats too, very good for turning in more than 2 axes and also for slerping ( a kind of smooth turn from one facing to another )

the OpenGL RED books is an essential read!

and you might want to look inside one of the less over bloated engines like irrlicht too

and closer to home, have a look at minib3d, although purely eular and matrix based its still eminently usable and is bound to show you a thing or too...
(and its opengl!)


Ryan Burnside(Posted 2007) [#6]
I hate to piggyback on this thread. Would the first edition of the red book still be good or should I shell out the extra cash for the newest edition?


ImaginaryHuman(Posted 2007) [#7]
I don't see that you really need to know much in the way of math to use OpenGL. I still do not `get` matrices but that's no problem.


Chris C(Posted 2007) [#8]
I cant remember the last time I bought a computer related manual

you have the biggest library in front of you (ie the internet) ok the index is rubbish, but if you persevere you often find stuff thats way more upto date than a paper book could be

the RED book is good, but its only ONE source

I'd say get coding, convert C code into max, abuse it, experiment, ask questions here, post useful snippets for others

You'll probably learn more and faster...

how ever you cant take the internet into the bath so it does have one disadvantage, but then theres always fiction...


FBEpyon(Posted 2007) [#9]
THanks for the help guys, I just wanted to know the math side so that I can understand the insides of the system.. Im going to start working on a engine here in the next few days once I get some time off work...

Code Help:

Camera System
Terrain System