Is gluPerspective deprecated?

Started by
10 comments, last by TheChubu 11 years, 4 months ago
In OpenGL 4.0, the entire fixed-function pipeline (used by glu*) is deprecated. This is exactly why I never use helper libraries—the core moves on but the helper libraries don’t.
If you are using shaders as you should be (in OpenGL 4.0, not using shaders is deprecated) then there is no way glu* can help you. The matrices you want to create will be used by you manually in your shaders.

This is actually a good thing honestly because OpenGL was originally not created for games and had some quirks in it that made it more of a nuisance than anything else (for example, lights were originally multiplied by the current model-view matrix, so you had to constantly update their positions every frame and in a very inefficient manner).
With shaders nothing is done for you. You have to write your own shaders and thus, by definition, you have to handle the primitive pipeline manually.

glu* and friends no longer have meaning because they set a bunch of states that you aren’t (shouldn’t be) using.
In OpenGL 4.0, you need to have your own matrix math library, calculate your own model, view, and projection matrices, and send them to your shaders manually.


L. Spiro

I restore Nintendo 64 video-game OST’s into HD! https://www.youtube.com/channel/UCCtX_wedtZ5BoyQBXEhnVZw/playlists?view=1&sort=lad&flow=grid

Advertisement
... like a real programmer :P

[spoiler]Its a joke! Don't cast my post into oblivion :D[/spoiler]

"I AM ZE EMPRAH OPENGL 3.3 THE CORE, I DEMAND FROM THEE ZE SHADERZ AND MATRIXEZ"

My journals: dustArtemis ECS framework and Making a Terrain Generator

This topic is closed to new replies.

Advertisement