just got myself a new retina laptop and am keen to learn shaders. I was hoping I could use GLSL 1.5 as the machine should support it but the below code tells me I only have 1.2? Is there a way around this?
// Get GLSL version
string glslVersion = string((const char *)glGetString(GL_SHADING_LANGUAGE_VERSION));
uint32_t spaceIndex = glslVersion.find_first_of(" ");
if (spaceIndex > 0)
glslVersion = glslVersion.substr(0, spaceIndex);
trace("GLSL version: " + glslVersion);
I’d be happy to change the way I code to use VBOs instead glBegin/End etc but I’m not that keen to move outside of vanilla OF if addons and things will break. Looks like I may just have to learn shaders with GLSL 1.2 instead then.
Oh well, apparently, I’m not using (and can’t use) version 0.8, so that I can’t use “ofGLProgrammableRenderer”. I’m using an older version of OF (0.7.03?), and it would be nice to able to use a shader newer than 2006, so I can use things like integer 1D textures or uniform buffers that can load data from CPU memory and then use it inside a fragment shader.
As I understand it, I can draw to an “ofTexture”, but cannot fill it by copying CPU data, although I’d be happy to stand corrected.