#include "culooks.h"
+#include <iostream>
#include <math.h>
vector< pair<int,culooks::window*> > culooks::Windows;
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();
Windows.push_back( pair<int,culooks::window*>(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;