So here I am still trudging through learning OpenGL and then using it in LWJGL’s flavor of OpenGL. All of the books I’ve been using and all of the internet searches I’ve been doing as I learn are related to OpenGL not LWJGL because there is very little information about how to use LWJGL out there. For those that don’t know, LWJGL is pretty much OpenGL if someone decided to mash 140 lbs of C code into Java. This conveniently means you can just learn OpenGL and then just learn the extra little bits needed to use it in Java.
I give OpenGL a lot of credit for keeping all of its functionality neatly separated and more or less atomic. The negative side effect of this is that everything you want to do takes 17 steps. This gives you a lot of flexibility in how you use everything when making your own engine, but it also means finding information about the “right” or “best” way to do things can be extremely difficult. This is made even more obnoxious by the fact that there is so much information out there about OpenGL from before everything was powered by shaders (pre-3.2).
I’ve gotten a couple of extremely simple shaders written, compiled, and linked into a shader program. I’ve created a little bit of geometry (a cube of course) in a couple of different ways (raw vertices, indexed vertices, etc.) and loaded them into the video card. I’ve attempted to draw that geometry and nothing shows up. One of the problems is that all of what I’m describing is just plumbing to get anything on the screen with OpenGL and if you have any of it wrong, nothing happens. Because there are so many places that something could have gone wrong before you have a single thing on the screen, it’s very hard to debug which one went wrong.
My hope is that once I get something working I will be able to make it incrementally more awesome. Add textures, add lighting, put lots of cubes on the screen at the same time, and so on. For now, I’m still reading and researching and learning and have nothing to show for it yet… Hopefully soon though.