Hi everyone,
::) Me again, im new on "new opengl" (>1.5) and my code is mixed, VBO and glBegin, etc..
I want implement shaders version 330 or 400, but context only can compile GLSL 1.2 and on new context mi "old opengl code" dont works.
I tried change context with this:
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 4);
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 1);
glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE);
The question is, it's posible mix both? OldGl & "new" Shaders ?
Thanks guys!
Only, if you are not on Mac OS X and when using the compatibility profile (and not forward compatibility).
So, do the following:
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 4);
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 1);
glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_COMPAT_PROFILE);
SGL: The targeted version of OS X only supports forward-compatible contexts for OpenGL 3.2 and above
:-\
im on mac, so i can't? :'(
I'm afraid, yes. OS X is the only platform that does not support/implement the compatibility profile, which you need when you want to have both legacy OpenGL (immediate mode, client-side vertex arrays, ...) as well as modern OpenGL (i.e. everything starting with version 3.0).
Thanks Kai !
I think I'll pass all code to modern GL :) cry. :'(