mcfletch / pyopengl

Repository for the PyOpenGL Project
Other
315 stars 97 forks source link

maocs opengl version #67

Closed lookcat closed 3 years ago

lookcat commented 3 years ago

MAC OS Big Sur

Version 11.2.3

def _loadLibraryWindows(dllType, name, mode):
    """Load a given library for Windows systems

    returns the ctypes C-module object
    """
    fullName = None
    try:
#        fullName = util.find_library( name )
        if name == 'OpenGL':
            fullName = '/System/Library/Frameworks/OpenGL.framework/OpenGL'
        elif name == 'GLUT':
            fullName = '/System/Library/Frameworks/GLUT.framework/GLUT'
#
        if fullName is not None:
            name = fullName
        elif os.path.isfile( os.path.join( DLL_DIRECTORY, name + '.dll' )):
            name = os.path.join( DLL_DIRECTORY, name + '.dll' )
    except Exception as err:
        _log.info( '''Failed on util.find_library( %r ): %s''', name, err )
        # Should the call fail, we just try to load the base filename...
        pass
    try:
        print("ddlType", name, mode)
        return dllType( name, mode )
    except Exception as err:
        err.args += (name,fullName)
        raise
  1. the macos use the opengl2.0
  2. I want to use the the opengl3.3
  3. how to fix the problem?
lookcat commented 3 years ago

. in macos bug sur

I use the glfw
            glfw.init()
            glfw.window_hint(glfw.CONTEXT_VERSION_MAJOR, 3)
            glfw.window_hint(glfw.CONTEXT_VERSION_MINOR, 3)
            glfw.window_hint(glfw.OPENGL_FORWARD_COMPAT, GL_TRUE)
            glfw.window_hint(glfw.OPENGL_PROFILE, glfw.OPENGL_CORE_PROFILE)
            _glut_window = glfw.create_window(self.width,self.height,"My OpenGL Window", None, None)
            glfw.make_context_current(_glut_window)