osx - cannot use GLSL 330 on mac mavericks -
i'm trying learn opengl , material using #version 330 in shaders. can compile successfully, when try run it, complains version 330 not supported.
in source code, use free glut , opengl framework in xcode. if include these 2 lines of code
glutinitcontextversion(3,1); glutinitcontextflags(glut_core_profile);
it cannot compiled.
my mac macbook pro mid 2012. should support opengl4.1 according apply.
so how can compile version 330 shaders?
os x requires request 3.2 core profile in order receive 3.3 or later context. because 3.2 removed functionally deprecated in 3.0.
so if want use #version 330 shader code should this:
glutinitcontextversion(3,2); glutinitcontextflags(glut_core_profile);
edit apparently x11 doesn't support opengl higher 2.1 on os x. such, suggest switch glfw.
Comments
Post a Comment