picogl.ui.backend.glut.prefer_apple_glut
Prefer Apple GLUT.framework over Homebrew freeglut on macOS.
Homebrew freeglut installs libglut.dylib (X11 + Mesa). On case-insensitive
APFS, ctypes.util.find_library("GLUT") resolves that to
/opt/homebrew/lib/libGLUT.dylib, so PyOpenGL’s Darwin platform loads
freeglut instead of /System/Library/Frameworks/GLUT.framework.
freeglut then creates an X11 window with no CGL context, and PyOpenGL raises:
Attempt to retrieve context when no valid context on glutDisplayFunc.
Import this module before import OpenGL.GLUT.
Attributes
Functions
|
Make PyOpenGL bind Cocoa GLUT instead of Homebrew freeglut. |
Module Contents
- picogl.ui.backend.glut.prefer_apple_glut._APPLE_GL = '/System/Library/Frameworks/OpenGL.framework/OpenGL'[source]