Radar's picture

OGL3+

I've learned that it is no longer a good idea to use the built in matrices in shaders.
It's better to send every bit of data by hand.
So... do i have to program something similar to GL.Rotate with my own matrices then too? Or does that still work?
I am a bit confused by all this.
Thanks!


Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
tksuoran's picture

For GL 3+, you should not be using GL.Rotate(). You should be using a Matrix class outside GL. You can use either the class in OpenTK or your own. The Matrix class in OpenTK is does not fully conform to OpenGL handedness, so you might be better off with a custom version that does things the way GL.Rotate() did.

Radar's picture

Aha, the fog clears a bit...

So the functions:
GL.MatrixMode(MatrixMode.Modelview);
GL.MatrixMode(MatrixMode.Projection);
GL.LoadIdentity();
And so on...

Are all no longer needed? Because this is fixed-pipeline?

Where can i find information and resources about all this? Nearly every tutorial is the old fashioned way...

Thnx!

tksuoran's picture

You can look at the quick reference card - Pay extra attention to "Content shown in blue is removed from the OpenGL 4.1 core profile":

http://www.khronos.org/files/opengl41-quick-reference-card.pdf

Or you can go straight to the specification - see appendices E to K:

http://www.opengl.org/registry/doc/glspec41.core.20100725.pdf

Somewhat smaller set to look at is OpenGL ES 2:

http://www.khronos.org/opengles/sdk/docs/reference_cards/OpenGL-ES-2_0-R...

Basically if feature is not in ES 2, you should check if the the feature has been deprecated/removed from recent OpenGL version. Of course there are a whole bunch of advanced features which are not part of OpenGL ES 2, these are not of course deprecated.