pioneerspacesim/pioneer — pull request #3265 by fluffyfreak (2014-11-29 12:00:04+00:00)
Title: Remove GLEW, use glLoadGen

# Description 1:

Removing the GLEW library in favour of a header/cpp combo generated by glLoadGen.

This was generated with the command: `lua LoadGen.lua -style=pointer_c -spec=gl -version=3.1 -profile=core core_3_x -stdext=gl_ubiquitous.txt -stdext=gl_core_post_3_3.txt -ext ARB_seamless_cube_map ARB_seamless_cubemap_per_texture`

Which gives us a custom C-style set of OpenGL functions and enums.

# Description 2:

This also drops support for `GL_GEOMETRY_SHADER` and brings us down to OpenGL 3.1 with GLSL `version 140` which will both run on a wider range of machines and hopefully have better damned driver support (see #3251, #3250, #3262, #3255, etc).

# Motivation:

GLEW has problems that it doesn't look like they're ever going to bother fixing. It also includes everything in a single library which means that even though we're only targetting OpenGL 3.1 right now we still get all of the functions and baggage from every other version.

As an example of why this is a monumentally bad see the change in RendererGL.cpp line 602 where I didn't realise I had left in a call to glNormalPointer! Who the hell knows what that's been doing under the hood since it's deprecated given the way we use the glVertexAttribPointer instead now.

By using these generated files we get only what we ask for, and we can probably cut down what I've currently got selected already.

Andy