]> git.treefish.org Git - phys/latlib.git/blob - culooks.h
32e36a814872ca585ec9f7ad7ecec9de6889dc76
[phys/latlib.git] / culooks.h
1 #ifndef CULOOKS_H
2 #define CULOOKS_H
3
4 #include <pthread.h>
5 #include <vector>
6 #include <GL/glut.h>
7 #include <GL/glx.h>
8 #include <GL/gl.h>
9 #include <X11/Xlib.h>
10 #include <X11/Xutil.h>
11 #include <string>
12
13 #include "culooks_cube.h"
14
15 using namespace std;
16
17 class culooks
18 {
19  public:
20   struct window {
21     int layout[2];
22     double aspect;
23     vector<cube> cubes;
24     int w, h;
25     int gwinid;
26     bool initialized;
27     string name;
28   };
29
30   culooks (const char* name, const int& xcubes, const int& ycubes, const int& l, int *argc, char **argv);
31
32   static vector< pair<int,window*> > Windows;
33
34   struct wincontext {
35     GLXDrawable gDrawable;
36     Display *gDisplay;
37     GLXContext gContext;
38   };
39
40  private:
41   static pthread_t glThreadId;
42   static int windowid;
43   int mywid;
44   
45 };
46
47 #endif