Skip to content

Commit

Permalink
gltbx: preserve previous behavior if pyopengl is not available
Browse files Browse the repository at this point in the history
  • Loading branch information
bkpoon authored and ndevenish committed Apr 10, 2024
1 parent 1ace759 commit 35b372e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 11 deletions.
13 changes: 7 additions & 6 deletions gltbx/gl.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
from __future__ import absolute_import, division, print_function
# import boost_adaptbx.boost.python as bp
# ext = bp.import_ext("gltbx_gl_ext")
# from gltbx_gl_ext import *
import OpenGL # implicit import
from OpenGL.GLU import *
from OpenGL.GL import *
try:
import OpenGL # implicit import
from OpenGL.GL import *
except ImportError:
import boost_adaptbx.boost.python as bp
ext = bp.import_ext("gltbx_gl_ext")
from gltbx_gl_ext import *

def __function_taking_transposed_matrix(f):
def wrapper(m):
Expand Down
12 changes: 7 additions & 5 deletions gltbx/glu.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
from __future__ import absolute_import, division, print_function
# import boost_adaptbx.boost.python as bp
# ext = bp.import_ext("gltbx_glu_ext")
# from gltbx_glu_ext import *
import OpenGL # implicit import
from OpenGL.GLU import *
try:
import OpenGL # implicit import
from OpenGL.GLU import *
except ImportError:
import boost_adaptbx.boost.python as bp
ext = bp.import_ext("gltbx_glu_ext")
from gltbx_glu_ext import *

0 comments on commit 35b372e

Please sign in to comment.