forgot to ifdef WIN32 in render state toggle function.
gl error handling after glewInit since it generates invalid enum for +3.2 context on ubuntu 11.10
bugfix for text rendering with 3.3 core profile. GL_LUMINANCE_ALPHA is deprecated. nvidia quietly accepts it but ati on ubuntu 11.10 is more strict and refused to render text and generating an invalid enum error. Using GL_RED,GL_R8 and swizzle to make it work with 3.3 profile.