There are the fastened operate and programmable shader pipelines.
That is a lot greater than simply lighting, likelihood is you are studying a complete bunch of different outdated stuff. The next are some widespread features that at the moment are deprecated:
- glBegin(…)
- glEnd()
- glVertex*
- glNormal*
- glColor*
- glTextCoord*
- glMultiTexCoord*
- glLoadIdentity*
- glMatrixMode(GL_MODELVIEW/GL_PROJECTION/…)
- glRotate*
- glTranslate*
In case you’re studying the fastened operate stuff you are studying old-fashioned programming strategies. They’re simpler however all of which must be unlearned. I like to recommend you take a look at the way you’re studying OpenGL and search for some fashionable tutorials.
Check out my submit on the gamedev stackexchange. It covers studying the brand new stuff.
Particularly for lighting. Mounted operate is less complicated however has the next issues:
- It is not per-pixel lighting so the standard is far worse.
- It is not supported in any respect in OpenGL ES 2.0/3.0 or WebGL
- No solution to do issues like bump/regular mapping. Specular reflection textures (Making a part of a texture shiny and replicate extra gentle).
- You are in all probability going to want shaders for different results (for instance shadows), as soon as you utilize any shaders you unfastened the fastened performance and should reimplement it anyway.
- No management over the shading algorithms aside from some primary properties.
- It has been deprecated/eliminated within the new variations of OpenGL 3+.
Mainly it is the old-fashioned methodology and ought to be prevented.
About the one use fastened operate has now days is that if you must goal OpenGL variations earlier than 2.0 or OpenGL ES 1.x (for the older iPhones).
Programmable shaders do require extra work and understanding.
-
Firstly you need to perceive the OpenGL shader API. The way to compile and hyperlink shaders (to not onerous).
-
Additionally you need to perceive methods to talk with them. How will you characterize your lights in constructions and add them to the shaders.
-
And you need to be taught the GLSL language (it is C like so to not onerous).
-
Lastly you need to perceive the precise algorithms utilized in shaders.
For vertex shaders it is how a Mannequin, View and Projection matrix mix collectively to show the 3D coordinates you give vertices into the 2D coordinates you see in your flat display screen.
For the fragment/pixel shaders you need to perceive the shading algorithms. Blinn, Phong or no matter. How the angle of the digicam combines with the normals on the floor to provide shading. You are additionally going to must do stuff like texturing.
I feel it is best to simply begin out studying the shader pipeline. You may depend on some deprecated performance however it’s greatest if you happen to simply use the stuff OpenGL does by default relatively than actively studying outdated stuff.
