gl, glfw, EGL declaration - to the top of the module

This commit is contained in:
Lex Darlog (DRL) 2026-02-22 03:55:28 -03:00
parent caa43d2395
commit d57bf9decb

View File

@ -16,6 +16,11 @@ from utils.install_util import get_missing_requirements_message
logger = logging.getLogger(__name__)
# OpenGL modules - initialized lazily when context is created
gl = None
glfw = None
EGL = None
def _check_opengl_availability():
"""Early check for OpenGL availability. Raises RuntimeError if unlikely to work."""
@ -63,11 +68,6 @@ def _check_opengl_availability():
logger.debug("nodes_glsl: running _check_opengl_availability at import time")
_check_opengl_availability()
# OpenGL modules - initialized lazily when context is created
gl = None
glfw = None
EGL = None
def _import_opengl():
"""Import OpenGL module. Called after context is created."""