]> git.treefish.org Git - phys/latlib.git/blobdiff - culooks.h
...
[phys/latlib.git] / culooks.h
diff --git a/culooks.h b/culooks.h
new file mode 100644 (file)
index 0000000..45fa319
--- /dev/null
+++ b/culooks.h
@@ -0,0 +1,61 @@
+#ifndef CULOOKS_H
+#define CULOOKS_H
+
+#include <pthread.h>
+#include <vector>
+#include <GL/glut.h>
+#include <GL/glx.h>
+#include <GL/gl.h>
+#include <X11/Xlib.h>
+#include <X11/Xutil.h>
+#include <string>
+
+using namespace std;
+
+class culooks
+{
+ public:
+  class cube {
+  public:
+    cube(int l);
+    void draw();
+    int id;
+    float az, alt;
+    float zoom;
+  private:
+    void drawAll();
+    void drawBox();
+    static int allid;
+    float *plaq;
+    float *link;
+    int l;
+  };
+  
+  struct window {
+    int layout[2];
+    double aspect;
+    vector<cube> cubes;
+    int w, h;
+    int gwinid;
+    bool initialized;
+    string name;
+  };
+
+  culooks (const char* name, const int& xcubes, const int& ycubes, const int& l, int *argc, char **argv);
+
+  static vector< pair<int,window*> > Windows;
+
+  struct wincontext {
+    GLXDrawable gDrawable;
+    Display *gDisplay;
+    GLXContext gContext;
+  };
+
+ private:
+  static pthread_t glThreadId;
+  static int windowid;
+  int mywid;
+  
+};
+
+#endif