Merge pull request #612 from thopiekar/2.1-alternative-nvidia-fix

Alternative fix for NVidia graphic cards
This commit is contained in:
Jaime van Kessel 2016-02-02 10:53:16 +01:00
commit f068f569d3

View File

@ -57,8 +57,10 @@ numpy.seterr(all="ignore")
if platform.system() == "Linux": # Needed for platform.linux_distribution, which is not available on Windows and OSX
# For Ubuntu: https://bugs.launchpad.net/ubuntu/+source/python-qt4/+bug/941826
if platform.linux_distribution()[0] in ("Ubuntu", ): # Just in case it also happens on Debian, so it can be added
from OpenGL import GL
if platform.linux_distribution()[0] in ("Ubuntu", ): # TODO: Needs a "if X11_GFX == 'nvidia'" here. The workaround is only needed on Ubuntu+NVidia drivers. Other drivers are not affected, but fine with this fix.
import ctypes
from ctypes.util import find_library
ctypes.CDLL(find_library('GL'), ctypes.RTLD_GLOBAL)
try:
from cura.CuraVersion import CuraVersion