#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>
+
using namespace std;
public:
class cube {
public:
- cube();
+ 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 env {
double aspect;
vector<cube> cubes;
int w, h;
+ GLXDrawable gDrawable;
+ Display *gDisplay;
+ GLXContext gContext;
};
- cubelooks(const int& xcubes, const int& ycubes, int *argc, char **argv);
+ cubelooks(const int& xcubes, const int& ycubes, const int& l, int *argc, char **argv);
private:
pthread_t glThreadId;
- env Env;
+ static bool initDone;
+ static GLXDrawable gDrawable;
+ static Display *gDisplay;
};
#endif