Source code for nukescripts.opengl
# Copyright (c) 2024 The Foundry Visionmongers Ltd. All Rights Reserved.
[docs]def setupPyOpenGL(): # noqa: N802
"""
Configure PyOpenGL for use with Nuke.
On most platforms this has no effect, however, on MacOS it is necessary
to call this method before importing OpenGL.platform in order to ensure
PyOpenGL uses FoundryGL rather than the system OpenGL libraries.
"""
try:
import fngl # noqa: F401
except ModuleNotFoundError:
# This is allowed to fail for platforms that do not use FoundryGL
pass