<< Previous | Home

Lifting deprecated OpenGL code to modern equivalent

OpenGL 3.0 to OpenGL 3.3+

OpenGL has been around a long time. This has necessitated some pretty aggressive, or we could call it, slightly odd, deprecation over time. This was necessary to keep API relevant.

Until version 3.0, all versions of OpenGL were fully backwards compatible with earlier ones.

OpenGL 3.1 is just awkward and short-lived, it is probably not worth explaining; we'll ignore it.

In 3.2, OpenGL was effectively split into two profiles, core and compatibility. An implementation was only required to define core, so compatibility is not guaranteed to be available.

On some platforms, like Windows, developers will find that they have access to the compatibility profile and they can gracefully or incrementally move functionality towards the new standard. On other platforms, like Apple OSX there is a hard cut. They chose to support OpenGL 2.1, and the pretty much ignored the in-between, and then, made the jump to OpenGL 3.3. Apple also chose to only implement OpenGL 3.3 core. This means there is no graceful support of older functionality.

Developers finding themselves having to lift OpenGL code in their title or package may benefit from the reference table below. It roughly details the mapping between OpenGL 2.1 era functionality and how to replace it in OpenGL 3.3 core and higher.

Hopefully useful for others as well as us!

Deprecated functionalityReplaceable by (in OpenGL 3.3)
Fixed function pipelineShaders
/glMatrixMode/glLoadMatrix/glMultMatrix etc.
Use you own matrix math or known open source libraries. Did you really use it anyway?
glTexEnvfTexture blending should now be done in fragment shaders.
gluBuild2DMipmaps Use the GL_GENERATE_MIPMAP texture parameter or the glGenerateMipmap function. Set the max mipmap level and the base mipmap level using

glEnable(GL_POINT_SMOOTH)Emulate this in a shader if you miss it
glEnable(GL_TEXTURE_2D)No longer. Ue glActiveTexture(GL_TEXTUREn) and bind the texture to the n-th texture unit.
glVertex*/glColor*/glNormal*/glTexCoord*Use vertex buffer objects (VBO) and vertex attribute objects (VAO) to control vertices. Draw using the glDraw{Arrays, Elements, RangeElements, InterleavedElements} family of functions.
glPolygonMode(GL_FRONT, GL_LINE) or glPolygonMode(GL_BACK, GL_LINE) In OpenGL 3.0 or above, core profile, only the combined front and back face enumerant is valid, offering a single mode enumerant GL_FRONT or GL_BACK results in an INVALID_OPERATION. Therefore the only valid call is glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);

Planetoid Pioneers is a GO for launch

Planetoid Pioneers has officially launched

Planetoid Pioneers has finally, officially, released. The effort slithered into pre-production at the beginning of 2010 with experiments on ideas, art direction and gameplay. It was initially available through Steam 'Early Access' from 21 July 2017, and as of 8 February 2018 it was tentatively freed into the wild.

It has been a labour of love and commitment to maintaining creative control over almost every part of the development and creative process. The bulk of the subsystems in Planetoid Pioneers have been built from the ground up in c++ and lua. The graphics engine, the physics engine, the animation system, the toolchain and the game editors all built by the team. The team's dna is stamped all over the game for better or for worse.

There is for now a moment to dwell on a deep sense of satisfaction and the ability to take a very short breath. Then begins the watch to see how the market responds, and the nose will again hit the grindstone as the first bugs surface and hotfixes must be written, tested and released. When things settle down we move to work on the next stage of the roadmap, localisation and porting to additional systems.

For now, enjoy the official Planetoid Pioneers launch trailer and we hope you buy our game!

You can buy the game on Steam right now.

p.s. Check out the first review at Kotaku.

Planetoid Pioneers: Game-Only Edition, Launched!

After over eight years of development, Planetoid Pioneers was released onto Steam Early Access on the 21 July 2017. Check it out!