Skip to content

Commit ce81d23

Browse files
author
Jonathan Wright
committed
for mint machine- hopefully works elsewhere
1 parent 2971288 commit ce81d23

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

pyopengltk.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -171,11 +171,11 @@ def tkSwapBuffers( self ):
171171

172172
if sys.platform.startswith( 'linux' ):
173173

174-
from ctypes import c_int, c_char_p, c_void_p, cdll, POINTER
174+
from ctypes import c_int, c_char_p, c_void_p, cdll, POINTER, util
175175
from OpenGL import GLX
176176
from OpenGL.raw._GLX import Display
177-
178-
_x11lib = cdll.LoadLibrary('libX11.so' )
177+
178+
_x11lib = cdll.LoadLibrary(util.find_library( "X11" ) )
179179
XOpenDisplay = _x11lib.XOpenDisplay
180180
XOpenDisplay.argtypes = [c_char_p]
181181
XOpenDisplay.restype = POINTER(Display)
@@ -206,6 +206,8 @@ def tkCreateContext( self ):
206206
self.__context = GLX.glXCreateContext(self.__window, visual,
207207
None,
208208
GL.GL_TRUE)
209+
# This generally gets a 3.0 version even if the setup is newer
210+
# ... needs ARB stuff ?
209211
GLX.glXMakeCurrent(self.__window, self._wid, self.__context)
210212

211213
def tkMakeCurrent( self ):

0 commit comments

Comments
 (0)