LWJGL
May 22, 2013, 01:39:43
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News
:
LWJGL is now using GitHub
Home
Help
Search
Login
Register
LWJGL
>
Programming
>
Lightweight Java Library Game Development
>
Help with understanding use of Matrix4f
Pages: [
1
]
« previous
next »
Print
Author
Topic: Help with understanding use of Matrix4f (Read 673 times)
blindstone
Newbie
Posts: 1
Help with understanding use of Matrix4f
«
on:
February 29, 2012, 19:10:58 »
Hey everyone, looking for a bit of guidance using matrix4f in a 3d environment.
i acknowledge (I believe so anyways) what matrices are and how to add/sub/multiple them properly, however I am having a hard time understanding how to use them properly.
As in when using matrix's should I ever have to use glTranslatef anymore? or is it all based off of calculating matrix's?
(sorry if this sounds dumb perhaps im not explaining it correctly or getting the full meaning behind them.)
Logged
spasi
Nerdus Imperius
Posts: 752
Re: Help with understanding use of Matrix4f
«
Reply #1 on:
March 17, 2012, 06:08:35 »
In modern OpenGL all functions that manipulate the fixed function matrix stacks have been deprecated. In a core GL context there's no Translatef/Rotatef/MultMatrix/PopMatrix/etc. That means that the recommended way (and only possible way in GL core) is to build the transformation matrix client-side, then doing a single call to UniformMatrix4f to update the bound shader's MVP matrix uniform.
Even if we ignore GL core, it's still the preferred way of doing it. There's less overhead in doing it client-side (less JNI calls) and the GL driver has less state to track and update. In fixed function OpenGL you'd use glLoadMatrix instead of glUniformMatrix.
Logged
Pages: [
1
]
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
Programming
-----------------------------
=> Lightweight Java Library Game Development
=> LWJGL Documentation
=> Bug Reports / RFE
=> OpenGL
=> OpenAL
=> General Java Game Development
-----------------------------
Archive
-----------------------------
=> Resolved Bugs/RFE
=> DirectX
=> DevIL
=> FMOD
Loading...