- rewrote vertex buffer code to require GL_ARB_BUFFER_STORAGE extension.

This means it won't work anymore on anything that doesn't support OpenGL 4.0, but I don't think this is a problem. On older NVidia cards performance gains could not be seen and on older AMDs using the vertex buffer was even worse as long as it got mixed with immediate mode rendering.
- add vertex buffer based drawing for all walls and flats.
Merge branch 'master' into Glew_Version_For_Real
Ok, it had to be done: Removed shader support for pre GLSL 1.3/GL 3.0 hardware. The compromises needed to accomodate these are just too bad and would block any attempt at streamlining the code.
Merge branch 'master' into Glew_Version_For_Real
remove special texture creation for fullscreen colormaps.

On GL 3.x+ this isn't needed at all and on older hardware it causes performance issues, in particular with hires textures due to impossibility of precaching.
In addition it forces some really awkward handling of lighting for things that have their own color, like stenciled sprites or particles.

With this special case gone it will be possible to handle this case in a saner manner than it is right now.

As compensation for older hardware a fullscreen blend will be drawn over the entire screen. This won't be 100% accurate but it's preferable to keeping the current method.
- added objectcolor uniform. This will be used to hold the thingcolor for shader based rendering.
- changed handling of DynLight in shader to serve as a global dynamic light color for all lighting modes.
-looks like we still need this...
- bad copy.
Further cleanup of lighting code.

- remove thing color from lighting calculations.
- implement alpha textures and inverse sprites for infrared as texture modes. This still requires some handling for the alpha texture mode for non-shader rendering because there is no way in the fixed pipeline to do it. The inverted texture effect can be done with a texture combiner.
- fixed: ThingColor for sprites was set in the wrong place. It must be in the Process function, not in the lighting calculation.
- added functions for isolated calculation of sprites' dynlight color.
- remove colormap from texture generation parameters. The one remaining special case, alpha texture on old hardware is now handled by the currently set texture mode at the time of use.
- use the cleaned up decal lighting code from the first GLEW branch.
- removed all code that mixes together the different lighting methods. Now everything goes through the 3 different light parameters in the render state.
- removed cm parameter from many functions.
- route all glColor calls through render state.
- add sector links to dynamic lights.
allow brightmaps and fullbright objects in fog. The reasons why they were disabled no longer exist.
Do not use the shader to handle STYLEF_RedIsAlpha.

Turns out that the name doesn't accurately describe what it does.
It is correct for images that come with their own palette or are true color.
But for images using the game palette it doesn't use the red channel to determine translucency but the palette index! Ugh...

This means it cannot be done with a simple operation in the shader because it won't get a proper source image. The only solution is to create a separate texture.
pass softlightlevel through render state.
shader rework

All those special shaders have been merged together.
Mostly working but the non-shader lighting seems a bit broken.
- fixed: fog density calculation for fixed function was not correct.
- reactivated texture warping.