• Content count

  • Joined

  • Last visited

Community Reputation

112 Neutral

About rob_hays

  • Rank
  1. Beginners: Fixed-Function vs. Shaders

    [quote name='scniton' timestamp='1341866658' post='4957408'] 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.:[list] [*]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. [/list] * 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.) [/quote] 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? Thanks
  2. Hello, [size=4][background=transparent]I'm currently going to college for computer science. Although I do plan on utilizing an existing engine at some point to create a small game, my aim right now is towards learning the fundamentals: namely, 3D programming. I've already done some research regarding the choice between DirectX and OpenGL, and the general sentiment that came out of that was that whether you choose OpenGL or DirectX as your training-wheels platform, a lot of the knowledge is transferrable to the other platform. Therefore, since OpenGL is supported by more systems (probably a silly reason to choose what to learn), I decided that I'm going to learn OpenGL first.[/background][/size] [size=4][background=transparent]After I made this decision to learn OpenGL, I did some more research and found out about a dichotomy that I was somehow unaware of all this time: fixed-function OpenGL vs. modern programmable shader-based OpenGL. At first, I thought it was an obvious choice that I should choose to learn shader-based OpenGL since that's what's most commonly used in the industry today. However, I then stumbled upon the very popular [b]Learning Modern 3D Graphics Programming[/b] by Jason L. McKesson, located here: [url=""][/url][/background][/size] [size=4][background=transparent]I read through the introductory bits, and in the "About This Book" section, the author states:[/background][/size] [quote]"First, much of what is learned with this approach must be inevitably abandoned when the user encounters a graphics problem that must be solved with programmability. Programmability wipes out almost all of the fixed function pipeline, so the knowledge does not easily transfer."[/quote] yet at the same time also makes the case that fixed-functionality provides an easier, more immediate learning curve for beginners by stating: [quote]"It is generally considered easiest to teach neophyte graphics programmers using the fixed function pipeline."[/quote] [size=4][background=transparent]Naturally, you can see why I might be conflicted about which paradigm to learn: Do I spend a lot of time learning (and then later unlearning) the ways of fixed-functionality, or do I choose to start out with shaders? My primary concern is that modern programmable shaders somehow require the programmer to already understand the fixed-function pipeline, but I doubt that's the case.[/background][/size] [size=4][background=transparent][b]TL;DR[/b] = As an aspiring game graphics programmer, is it in my best interest to learn 3D programming through fixed-functionality or modern shader-based programming?[/background][/size]