applies glEnable(GL_TEXTURE_2D) only to fixed function pipeline calls

glEnable(GL_TEXTURE_*) is not needed anymore with modern openGL

Signed-off-by: tgfrerer <tim@poniesandlight.co.uk>
fixes meshVbo programmableGL GL bug

push/popAttrib is deprecated. we only apply it for the fixed function pipeline.

Signed-off-by: tgfrerer <tim@poniesandlight.co.uk>
fixes a couple if issues re: glLineWidth, finishPrimitiveDraw

* glLineWidth is 'kind of' deprecated. it still remains in GL3.2, but has no effect, only line width of 1 is accepted, everything else would lead to GL errors
* removes unnecessary glDisableVertexAttribArray(0); call.
* adds reference to spec documents in shader section

Signed-off-by: tgfrerer <tim@poniesandlight.co.uk>
check for location in shader before uploading shader uniform

this reduces openGL server errors

Signed-off-by: tgfrerer <tim@poniesandlight.co.uk>
handles texture targets for programmable GL

GL_TEXTURE_ENV has no effect when a fragment shader is bound, it's not needed for programmable GL since there is by definition a fragement shader bound all the time.

Signed-off-by: tgfrerer <tim@poniesandlight.co.uk>
prettification

Signed-off-by: tgfrerer <tim@poniesandlight.co.uk>
implements uniform / attribute location checks for ofShader

prevents GL_ERRORS due to assignments to non-existent shader attributes / shader uniforms.

Signed-off-by: tgfrerer <tim@poniesandlight.co.uk>
fixes built-in shaders

there is a massive weirdness going on in the bitmapstringVertexShader. it needs a placeholder attribute, aptly named 'placeholder' if it is not present, the shader will not render correctly, and glDrawArrays will get you an error. after hours of hunting this down, i am prone to think that this could be an ATI on mac os x driver bug.

I'll check it on linux.

Debugging raw openGL calls on os x is a bloody nightmare.

Signed-off-by: tgfrerer <tim@poniesandlight.co.uk>