From: Alex Schmidt Date: Tue, 19 Feb 2013 09:03:26 +0000 (+0100) Subject: ... X-Git-Url: http://git.treefish.org/~alex/phys/latlib.git/commitdiff_plain/56501911055f24d1b06f2847c55e6d359dbd1760 ... --- diff --git a/culooks.cpp b/culooks.cpp index b54eddd..8c41d23 100644 --- a/culooks.cpp +++ b/culooks.cpp @@ -1,5 +1,6 @@ #include "culooks.h" +#include #include vector< pair > culooks::Windows; @@ -239,10 +240,8 @@ namespace mygl initWindow(iwin); } - static void* glutThread(void *_wincon) + static void* glutThread(void *leer) { - culooks::wincontext *wincon = (culooks::wincontext *)_wincon; - glXMakeCurrent( wincon->gDisplay, wincon->gDrawable, wincon->gContext ); initWindow(0); glutIdleFunc(&idleFunc_master); glutMainLoop(); @@ -288,13 +287,8 @@ culooks::culooks (const char* name, const int& xcubes, const int& ycubes, const Windows.push_back( pair(0, Win) ); if (windowid == 0) { - wincon.gContext = glXGetCurrentContext(); - wincon.gDisplay = glXGetCurrentDisplay(); - wincon.gDrawable = glXGetCurrentDrawable(); - glXMakeCurrent(0,0,0); - - pthread_create(&glThreadId, 0, &mygl::glutThread, &wincon); + pthread_create(&glThreadId, 0, &mygl::glutThread, NULL); } mywid = windowid;