OpenGL ES 2.0 dropped a *small* section of the fixed function pipeline....
jpaana said:
Well, OpenGL ES 2.0 dropped the whole fixed function pipeline for both vertex and pixel processing in favor of shaders.
For a visual picture of what got dropped, see:
http://www.ati.com/developer/gdc/OpenGLShadingLanguage.pdf, slide 15.
(and to actually read what's on that slide, see:
http://www.opengl.org/documentation/specs/version1.1/state.pdf, print out the page large and highlight it yourself.)
There's still a
*lot* of fixed function left before, between, and after vertex and fragment processing. In particular: primitive assembly, clipping and viewport transform, rasterization, texture filtering, and "per-fragment operations" (ownership test, scissor test, alpha test, stencil test, depth test, blending, dithering.)
OpenGL 2.0 defines "built-in" state for the shader environment. This is the fixed function context state that the vertex shader and fragment shader subsumes. (See
http://mew.cx/glsl_quickref.pdf, for Michael Weiblen's excellent two page quick reference.)
OpenGL 2.0 ES drops this "built-in" state entirely.
Back to K.I.L.E.R's questions:
K.I.L.E.R said:
So how is fixed function completely replaced?
Fixed function isn't completely replaced, just a small portion of it. The portions of the fixed function that *are* replaced (vertex transformation and lighting, texture application) now *must* be done by the shader writer if you would like those effects.
K.I.L.E.R said:
Can fixed function commands be used in conjunction with shaders to change parameters?
In OpenGL 2.0, yes. The fixed function commands change the "built-in uniforms."
In OpenGL 2.0 ES, no.
K.I.L.E.R said:
Or should fixed function commands be treated like the devil(stay away from them)?
In OpenGL 2.0, it's generally a personal preference. There *are* some advantages to using some of the fixed function commands. Example - the fixed function matrix state has stacks, and the derived matrix state such as Inverse, Transpose, and InverseTranspose can be efficiently calculated when needed.
In OpenGL 2.0 ES, you have to stay away from some of the fixed function commands. They've been deleted. The savings in context state and the savings from the deleted entry points are substantial.
-mr. bill
----
Disclosure - "-mr. bill" is the nickname of Bill Licea-Kane