-
Notifications
You must be signed in to change notification settings - Fork 106
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
17 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,24 @@ | ||
"""Common code for accelerated modules""" | ||
import logging | ||
from OpenGL import _configflags | ||
needed_version = (3,1,5) | ||
_log = logging.getLogger( 'OpenGL.acceleratesupport' ) | ||
|
||
needed_version = (3, 1, 6) | ||
_log = logging.getLogger("OpenGL.acceleratesupport") | ||
try: | ||
import OpenGL_accelerate | ||
|
||
if _configflags.USE_ACCELERATE: | ||
if OpenGL_accelerate.__version_tuple__ < needed_version: | ||
_log.warning( """Incompatible version of OpenGL_accelerate found, need at least %s found %s""", needed_version, OpenGL_accelerate.__version_tuple__) | ||
raise ImportError( """Old version of OpenGL_accelerate""" ) | ||
if OpenGL_accelerate.__version_tuple__ < needed_version: | ||
_log.warning( | ||
"""Incompatible version of OpenGL_accelerate found, need at least %s found %s""", | ||
needed_version, | ||
OpenGL_accelerate.__version_tuple__, | ||
) | ||
raise ImportError("""Old version of OpenGL_accelerate""") | ||
ACCELERATE_AVAILABLE = True | ||
_log.info( """OpenGL_accelerate module loaded""" ) | ||
_log.info("""OpenGL_accelerate module loaded""") | ||
else: | ||
raise ImportError( """Acceleration disabled""" ) | ||
raise ImportError("""Acceleration disabled""") | ||
except ImportError as err: | ||
_log.info( """No OpenGL_accelerate module loaded: %s""", err ) | ||
_log.info("""No OpenGL_accelerate module loaded: %s""", err) | ||
ACCELERATE_AVAILABLE = False |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters