From 56501911055f24d1b06f2847c55e6d359dbd1760 Mon Sep 17 00:00:00 2001 From: Alex Schmidt Date: Tue, 19 Feb 2013 10:03:26 +0100 Subject: [PATCH] ... --- culooks.cpp | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) 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; -- 2.39.5