Difficulty Learning

I learn by doing. In that sense, I’d find it relatively easy to learn OpenGL by writing code. Java was a breeze to learn; there are so many good tutorials out there. Java is so well documented, but understanding the OpenGL docs is a nightmare. My problem however is that I cannot find any tutorials for LWJGL that fully explain things (by that I mean go in depth) and don’t just tell you to copy/paste code. I don’t learn that way, nor do I learn by looking at code and re-writing it. In the past few weeks I must have spent tens of hours researching simple functions to find detailed explanations of how they work but I seem to keep forgetting them because I don’t repeatedly use them. The only things I remember are some theory that I’ve researched, the basics of the programmable pipeline, how to create VBOs (though some of the parameters still confuse me) and simple FFP functions.

Something that has always confused me is where to start. I’ve been learning v1.1 at the same time as v2.0. Can someone please give me some guidance on what order to learn things and point to a good set of tutorials which go in depth on how functions work, what their parameters do and how to effectively use them? Hopefully they exist. :wink:

Thanks.

Honestly, there aren’t many. theCodingUniverse really was one of the only resources I could find that actually helped me. The rest of my knowledge came from around half a year of tons of Google searches and stitching together (horrible) code until I could figure out how something worked. In the end it’s worth it though, I haven’t touched Java2D in a year now because I absolutely love plain OpenGL.

The one I use the most: http://www.opengl.org/wiki/Main_Page

If you Google an OpenGL function name, you can find the official OpenGL specifications of that function. You should also keep in mind that OpenGL is simply a specification. There is no official OpenGL driver or layer made by Khronos (but there is one for DirectX, which is made by Microsoft). OpenGL is a specification of a number of functions and how they should work. Exactly how this is implemented underneath is hardware and driver specific. Remember that OpenGL runs on vastly different hardware, from cheap mobile phones to high end gaming computers, so the level of abstraction is pretty high.

Check out thebennybox https://www.youtube.com/user/thebennybox his 3D Game engine development tutorial videos have been really useful.

I don’t really find videos useful. I watch and forget, watch and forget, watch and forget…

I’ve never really actually looked at the wiki much but after reading a couple of pages I have to say that I’ll use it much more often. What I’ve decided to try doing is to fully recap on things like buffer objects (so I can fill in the things I’ve missed) and try and learn one or two functions a day. I’ve set up a new eclipse project where I’m writing test programs and commenting everything specific to the topic I’ve learnt so if I forget something I’ll be able to look back at the notes.

Something I’d find really useful though is a huge list of possible parameters for each and every function, e.g on this page it gives this:

Does anyone know if such a list exists?

The OpenGL pages for each function are usually pretty exhaustive. For example, http://www.opengl.org/sdk/docs/man/xhtml/glBindBuffer.xml lists exactly which values are accepted.

Another great thing is to enable debugging when creating the OpenGL context. This allows you to get callbacks when an error occurs, although it’s stupid enough not to give you any information on where or even which function that crashed (no stack trace), but the error information is much more specific than glGetError().


Display.create(new PixelFormat(), new ContextAttribs().withDebug(true));
if(GLContext.getCapabilities().GL_ARB_debug_output){ //Ensure it's supported
    //glDebugMessageControlARB(GL_DONT_CARE, GL_DEBUG_TYPE_PERFORMANCE_ARB, GL_DONT_CARE, null, false); //Uncomment to ignore performance warnings that are sometimes spammed.
    glDebugMessageCallbackARB(new ARBDebugOutputCallback()); //Attaches the default listener that prints out all information.
}

For example, while glGetError() only said INVALID_VALUE, debug mode explicitly wrote out WHY the value was invalid. In my case it said that minZ > maxZ so even though it didn’t say what line had failed, I could quickly track down the error to glDepthBoundsEXT() since that was the only OpenGL function I used that took two depth values. As another example it’s awesome for tracking down invalid glEnable()s too. The usefulness of debug mode may be extremely vendor specific though. All I know is that Nvidia has pretty good error reporting at least.

Aren’t they? They only tell you where to click, I haven’t seen a single one that actually goes ahead to explain the WHY. With good reason, because explaining that takes time which means you’ll be staring at someone randomly moving around the mouse cursor while basically bringing information in a far slower and harder to absorb manner than a book can. I really don’t understand the current generation of novices who want only videos. Its just so… ineffective! But that’s just me getting older.

This is a two-part session when you’re using videos to learn something new:

  1. You watch a video. Be it a livestream, a video, an online course, an archived segment of something that tells you what to do.
  2. After watching the video, review the session. What did you see? What effects did you notice after it has been shown? Use your free time to gather these bits of information into notes (or just do note-taking) and process it by practicing while you recite your notes. If you want to delve deeper into the knowledge zone, research about it.

Hence, people are starting to look at videos because they give you an outline of the things they wanted to learn. After that, they have to relearn it by reviewing what was taught, and incorporate the usage of Google-fu to find what they needed to know about.

EDIT:
To clarify it even more, let me use a “lesson” at school as an analogy.

The lesson is about to begin. The teacher goes to the board and tells the class it’s time to learn science, so everybody brought their textbook out from their desks. The outline of the lesson you’re about to be taught is what part of science the teacher is about to introduce to everyone. The teacher tells you only the outline of what you need to know about it, and the rest of the lessons are filled in by your textbook. This textbook is analogous to Google, where you can review what you’ve learned at school, and read for more details about the lesson.

Video lessons are practically the same. The lecturer gives you an outline, while you fill in the rest by yourself.

Thanks. I was looking at the docs on khronos.org which seem to be different and have less information.

That’s my exact problem with videos. I learn to type a line of code with little explanation of what it does.

OpenGL is slightly different. When I started learning OpenGL I wasn’t sure what was and wasn’t deprecated. Some videos cover the FFP and some cover the PP. Anyway, I find it much easier to learn from a page of words.

That would be what I called “doing research.” It’s derived from “learning from textbooks”, except that you’re learning from places that provide you more information than textbooks alone. Welcome to asperatology, the science and study of analyzing abstracts/imagination/concepts on a macro scale.