Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 08 Jul 2012
Offline Last Active Private

Posts I've Made

In Topic: Beginners: Fixed-Function vs. Shaders

09 July 2012 - 04:12 PM

I think rnlf makes the shader route sound more daunting than it really is. There is no need to try to create a pure opengl 3.0 non-deprecated demo on the first try.

There is a natural progression you can take to go from pure fixed pipeline to pure non-deprecated functionality e.g.:

  • Start with a simple opengl "Hello world" style program
  • Change it so that it uses the programmable pipeline using trivial shaders.
  • Convert it to use vertex arrays.
  • Convert it to using vertex buffer objects
  • Create your own matrix management routines along side the fixed pipeline ones (this allows you to verify your routines)
    E.g. Using glLoadMatrix to easily switch between the matrices used.
  • Modify the shader so that you upload the matrix using something like glUniformMatrix* and only use your matrices*
  • etc.
* If you are aiming for pure non-deprecated.

There are some basics you'll want to learn regardless of which route you choose: colors, normals, textures, transformations, etc.
Whether you learn these basics using the fixed function pipeline or shaders won't matter, it is a small step to go from one to the other.

This being said, once you understand the basics there is no reason to deal with the fixed function pipeline.
Beyond the basics, IMO, effects become more complicated to implement using the fixed function pipeline, and sometimes require dealing with opengl extensions (not a big deal, but more annoying than not having to do it.)

Thanks for the the responses everyone.

I do have a grasp on 3D vector math and basic linear algebra, but is there some intermediary skill I'm supposed to learn about before jumping into OpenGL? I guess what I mean is if I'm pretty well-versed in C++ and those maths, are there any other bodies of knowledge that would be considered prerequisite to being successful in OpenGL? I won't say I'm an expert in C++, but I do know my way around it. Should I hold off on OpenGL until I have measurable experience with C (as I understand it, GLSL is essentially C-like), or is C++ knowledge enough to get me started in OpenGL?