Skip to content

use OpenGL 3.2 and later on Mac OS #7

@GoogleCodeExporter

Description

@GoogleCodeExporter
I'm a newbie in OpenGL programming and i very like this tutorial.

I found that when you want to compile these on a mac os like lion, you should 
use glfw2 because of compatibility of OpenGL just as wrote in the src file. But 
in fact, GLFW_OPENGL_FORWARD_COMPAT wil repair this issue. here are detials:

OpenGL 3.2 and later on OS X

Support for OpenGL 3.2 and above was introduced with OS X 10.7 and even then 
only forward-compatible, core profile contexts are supported. Support for 
OpenGL 4.1 was introduced with OS X 10.9, also limited to forward-compatible, 
core profile contexts. There is also still no mechanism for requesting debug 
contexts. Versions of Mac OS X earlier than 10.7 support at most OpenGL version 
2.1.

Because of this, on OS X 10.7 and later, the GLFW_CONTEXT_VERSION_MAJOR and 
GLFW_CONTEXT_VERSION_MINOR hints will cause glfwCreateWindow to fail if given 
version 3.0 or 3.1, the GLFW_OPENGL_FORWARD_COMPAT hint must be set to non-zero 
and the GLFW_OPENGL_PROFILE hint must be set to GLFW_OPENGL_CORE_PROFILE when 
creating OpenGL 3.2 and later contexts and the GLFW_OPENGL_DEBUG_CONTEXT hint 
is ignored.

Also, on Mac OS X 10.6 and below, the GLFW_CONTEXT_VERSION_MAJOR and 
GLFW_CONTEXT_VERSION_MINOR hints will fail if given a version above 2.1, 
setting the GLFW_OPENGL_PROFILE or GLFW_OPENGL_FORWARD_COMPAT hints to a 
non-default value will cause glfwCreateWindow to fail and the 
GLFW_OPENGL_DEBUG_CONTEXT hint is ignored.  

Original issue reported on code.google.com by kidddddd...@gmail.com on 5 Dec 2014 at 2:57

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions