OpenGL binding experiences

When it comes to 3D graphics, beginners might start with a comfortable live coding enviroment (such as PolyDraw) for convenience. Sooner or later, you’ll end up wanting to do the real work and set up your own test enviroment, wether you want more power (PolyDraw lacks some bindings), want to experiment with newer OpenGL versions/extensions or just want to mess with the real work of setting up an OpenGL context.

I’ve had quite a struggle with this in the beginning. I have no experience on other devices (OpenGL ES enabled), so all this is about regular desktop OpenGL.

  • C/C++/other binary and linkable languages: this is the very first option you’ll want to consider. It requires some knowledge about the compiler toolchain for library linking, but if you’re already a programmer you’ve probably left it behind a long time ago.
  • Python: PyOpenGL is s a pretty common binding but felt like horror for me. Library horror. Unfortunately it kept me far, far away.
  • Java: JOGL is a common binding for Java, featuring a static API and some abstractions (font drawing and other utilities). LWJGL shares the JOGL static API but features some other common bindings for games: OpenAL and OpenCL. It’s sparsely documentes but JOGL is even worse, so I recommend LWJGL.
  • LUA: I’ve had no experience whatsoever with LUA bindings. LuaGL is the most common one, but it can only deal with OpenGL up to 3.1. Will eventually check it out, of course. LUA is such an interesting language.

Have you tried any other language for OpenGL interfacing? Feel free to share your experiences!


Fellow readers…

A long time since my last post. Winter holidays and a lot of homework got into my way, so I couldn’t update this blog as much as I would’ve wanted to. On the other hand, I spent some time developing an OpenGL framework for Java. It’s far from done, but I think it’s going to be worth it. It’s a full-fledged framework for modern OpenGL that allows for easy operations abstracted in an object-oriented intuitive fashion. It will be published with source code as soon as it reaches an acceptable state.

Not only that. It’s not just an OpenGL framework: it’s part of a full framework oriented to game development in Java, with OpenGL, OpenAL and other common libraries fully abstracted, and common utilities such as configuration management, data loading and caching…

It’s built on top of LWJGL, which reminds me I have to publish a post about OpenGL bindings that I have here laying as a draft. Keep and eye on the blog if you are interested in beginning OpenGL but not sure where to start. I’ll upload it soon (it’s half-done, I wanted to be extensive.)

IQ’s ShaderToy: live shader coding enviroment

Don’t miss this AWESOME online app, IQ’s ShaderToy. Íñigo Quilez made a great use of JavaScript’s canvas and WebGL support (therefore it only works on WebGL enabled browsers.) The ShaderToy is just a little live coding enviroment for shaders: it draws a full-quad on a canvas and applies a shader to it. You can modify this shader on a textarea and press ALT+Enter to watch changes to the shader code immediately (if it compiles, of course.)

You Massive Clod screenshot

You Massive Clod's preset screenshot


Dotted waving shader

The first shader I made. It’s simple, but great for starters. It’s a fragment shader effect that outputs a dotted image and waves it like a flag. Since an image is worth a thousand words, here are some screenshots (and PolyDraw code!) of the effect on a ‘botijo’ picture.


Polydraw: OpenGL and shader live coding tool

Don’t miss this great tool, recently updated by Ken Silverman (EvalDraw‘s author.) Polydraw is a great tool for Windows (yeah, that’s the bad part.) It’s a live coding enviroment evaluating fast enough for graphical programming. OpenGL is bound and supports vertex, geometry and fragment shader live coding too.

The original interface was pretty clunky and had some coding limitations, but Ken Silverman did a great job revamping the app. It comes with pretty neat presets by Tigrou (the original author) and Ken Silverman, don’t miss any of them.

First post

Hello fellow reader. This is the first post of this blog.  Although this started as an assignment, who knows what the future brings.

NoobGP is about game programming. When I first started studying the subject, I was shocked too find only some sparse information here and there, and much of it not suited for beginners, so I thought I could share my two cents as a beginner myself.