Gl 3 best way to handle matrices

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Gl 3 best way to handle matrices

blizzard
Hello guys

Two years ago I wrote a application by using jogl an GL 2, it worked well :-)
Now I have to write another application and I decide to use a newer OGL version - 3.3.
A lot of things changed and I try to find out what is the best way to go without using a compability mode.

I searched for examples but the most examples use GL 2..
My question is, what is the best way to handle the Matrices and to tranfer them to the vertex shader ?
Is it a good way to use PMVMatrix ?
Or is it better to write it from scratch..

Are there some examples available ?

Thank you very much
Reply | Threaded
Open this post in threaded view
|

Re: Gl 3 best way to handle matrices

jmaasing
Personally I use Kenji Hiranabes implementation of javax.vecmath http://objectclub.jp/download/vecmath_e
Then I have some utility code to convert from vecmath-classes into float[] or buffers.

PMVMatrix is more optimized for speed and memory reuse but I like the vecmath documentation and the extra math-methods in that library.
Reply | Threaded
Open this post in threaded view
|

Re: Gl 3 best way to handle matrices

blizzard
Ok thank you ..I will check  it
I also search for  good examples which use gl 3 ..
Can your give me a tip or a link where I can find some ?
(independent of the way the matrices are handled )

Thank you
Reply | Threaded
Open this post in threaded view
|

Re: Gl 3 best way to handle matrices

jmaasing
I learned from this tutorial:
http://www.arcsynthesis.org/gltut/