View Full Version : Open GL tutorial - triangle not showing on OSX

07-27-2017, 11:30 PM
I'm following this tutorial http://www.opengl-tutorial.org/beginners-tutorials/tutorial-2-the-first-triangle/, compiled the code, and saw a window appear but with no triangle. I ended up pulling the code from here https://github.com/opengl-tutorials/ogl/tree/master/tutorial02_red_triangle. I see a window with a dark background, but don't see a triangle.

I'm on OSX 10.12.5 and glfw3. What could be causing this problem?

07-28-2017, 12:53 AM
Any errors reported by OpenGL (glGetError (https://www.khronos.org/registry/OpenGL-Refpages/gl4/html/glGetError.xhtml)) ? Or reported by the compilation/linking (https://www.khronos.org/opengl/wiki/Example/GLSL_Program_Link_Error_Testing) of the shaders ?

What hardware do you have ? What version of OpenGL (https://www.khronos.org/opengl/wiki/Get_Context_Info) are you using ?

Finally, from what I know, depending on your OSX version, supported OpenGL version might differ and can stuck to some specific version only. Read this (https://apple.stackexchange.com/questions/148098/how-to-check-opengl-version-the-version-is-the-same-as-if-i-install-windows) for example. If that does not match your version, investigate further (maybe someone else here will give more targeted clues/solutions).