Better errors, surfaces have depth

-Surfaces can now be made having a depth buffer. This is done by an
optional third argument. A surface needs a depth buffer if 3D is
rendered on it. Otherwise there are visible z-issues.
-Added better error reporting for get_uniform() macro. Now uses the
program name.
-Light values in shader are no longer clamped. Noticed that this allows
brighers lights.
Adds everything to GL1 too

-Adds optional depthmap to surfaces to GL1.
-Fixes PR_TRIANGLE_STRIP for GL1 to have correct winding.
-Added d3d_clear_depth() to GL1.
Started caching attributes and matrices

-Added uniform functions for matrices. So they are now cached and no
useless calls are done. Still need to work on it.
-Attribute enabling is now cached, but there is a problem with norma
attribute messing up colors for some reason.
-Removed many deprecated glPush and glPop calls from surface functions.
-Removed glPopAttrib calls from GL3textures.cpp. I don't even know how
they worked, as there is no glPushAttrib anywhere.
Updates GL3 about.ey

More closely reflects the hardware required.
Clean-up of GL3modelstruct

-Readded check for colors. This previously broke AMD, but when I added
attribute caching, then that hack broke colors on Nvidia too. So now
it's again proper, but AMD might be broke again.
-Why do we reset everything at the end of drawing? We should just set
whatever is needed for the drawing itself. So I removed all those resets
and moved them in the code. So now if you render everything with color,
then color attribute will never be reset. Just like it should be. No
real performance benefits, but still, less GL calls the better.
Added proper GL3.3 debug context

-The context created is now GL3.3.
-In debug mode, GL3 debug context is created, together with a callback
function. This crashes on my AMD laptop for now though.
Replaced deprecated glGetString(GL_EXTENSIONS)

-Removed glGetString(GL_EXTENSIONS).
-Added a gl_extension_supported() function. This is how it's done in
>GL3 and could potentially have a speed increase (not in this case
though), as we can cache most needed results, as well as even run things
in parallel. But as we should call it once (when the game starts) all of
these thoughts are useless.
Removed never used draw_get_graphics_error

-draw_get_graphics_error() was not even defined in a header, so it was
actually impossible to be used. With implementation of GL3 debug
context, this function is also quite useless.
-Added default name to default shader.
Fixed some GL errors

-Added compatibility profile until GLEW is updated, because it uses
glGetString(GL_EXTENSIONS).
-Even with compatibility profile we had problems with wrong enums and
wrong function calls. Fixed them. Now no errors while running Project
Mario.
-Fixed uniform matrix functions, which were asking the wrong size to
get_uniform() macro. Didn't break anything, but just f threw false
errors.
Removed more deprecated functions (glAlphaFunc)

-Removed glAlphaFunc() and glEnable(GL_TEXTURE_2D).
-Implemented alpha testing in shader.
Fixes wrong argument to glTexture2D and cleanup

-The internal format parameter for glTexture2D was just 4... nothing
more or less - just the number "4". Dunno who did it or why, but GL spec
requires an enum there. There a lot to choose from (most obvious of
which is GL_RGBA in our case), but none of them actually have the value
4. So the reason the function worked is because when given wrong or
incompatible format, it just chooses one it likes better. It's more of a
"hint".
-Removed deprecated glLight* call.
-Set default ambient to 0,0,0 (c_black) as it's the default one in GM.
Previously we had the default one in GL1 FFP, which is 0.2,0.2,0.2.
Adds new functions to culling

-d3d_set_culling() now just enables or disables culling. This was
required so that it actually makes sense and we don't set invalid
function to glFrontFace. This is also more compatible with GM.
-Now to choose winding of vertices (so what is clockwise and what is
anti-clockwise) can be done via d3d_set_front_face().
-Also added d3d_set_culling_mode() which takes GL_FRONT, GL_BACK and
GL_FRONT_AND_BACK to figure out what side to cull.
Started on profiler and cleanup

-Added basic profiler that returns the number of draw calls and number
of vertices rendered.
-Cleanup. We shouldn't include "using namespace ..." in headers. This
headers are then included in many different places, sometimes even
recursively. So in the end it causes many bugs. I removed "using
namespace enigma_user" from GL3context.h, and it caused problems in
several seemingly unrelated files which I had to fix.
Fixed view_angle

-The code for view rotation was wrong, so it skew'd the image as well as
rotated around the wrong point.
Merge branch 'master' into GL3.3Fixes
Reverts and updates

-Reverted culling changes. GM (or Robert) does something weird (the
reverse of what is should be doing), so for not breaking compatiblity I
will for now leave it as is.
-Fixes view_angle for GL1 and adds an if check for GL3.
-Added some more graphics profiler stuff.
Marged in master and fixed conflicts
Fixes and cleanup

-Removed a deprecated glGetString call.
-Test texture change in modelstruct, but needs a different solution.
-Changed some code to be with our new indent style (two spaces).
Disabled GL compatiblity profile for debugging
Fixed textures and new glew

-texture_set_stage function were not taking -1 properly.  This caused a
segfault in Minecraft example and others were primitives without
textures are drawn (like d3d_draw_block).
-Added a new version of GLEW (1.10) which is the currently newest one.
It's manually modified not to use glGetString(GL_EXTENSIONS) which is
deprecated in >GL3. This is required to use the core GL profile which is
now turned on.