summaryrefslogtreecommitdiff
path: root/src/graphics_x11.h
diff options
context:
space:
mode:
authorepoch <epoch@hacking.allowed.org>2017-01-03 00:30:28 -0600
committerepoch <epoch@hacking.allowed.org>2017-01-03 00:30:28 -0600
commitebde46bc82bebf478db67abef5b7dc88c014706b (patch)
tree77121f0c18b1845b8c3cfdfec962e9c5b2ec7e67 /src/graphics_x11.h
parentf7353ec277198b295c6c842a4a4a07b403b2a572 (diff)
downloadhackvr-ebde46bc82bebf478db67abef5b7dc88c014706b.tar.gz
hackvr-ebde46bc82bebf478db67abef5b7dc88c014706b.zip
lots and lots of shit. opengl shit is barely worked on. new pl script to obj2hackvr using more than just triangles.http://hackaday.com/blog/http://hackaday.com/blog/
Diffstat (limited to 'src/graphics_x11.h')
-rw-r--r--src/graphics_x11.h35
1 files changed, 35 insertions, 0 deletions
diff --git a/src/graphics_x11.h b/src/graphics_x11.h
new file mode 100644
index 0000000..8924b61
--- /dev/null
+++ b/src/graphics_x11.h
@@ -0,0 +1,35 @@
+#ifndef _HACKVR_GRAPHICS_X11_H_
+#define _HACKVR_GRAPHICS_X11_H_
+
+#include <X11/Xlib.h>
+
+struct x11_global {//stores global variables for the x11 *specific* shit.
+ XColor colors[256];
+ XColor green;
+ XColor red;
+ XColor blue;
+ XColor redblue[2];
+ Colormap color_map;
+ Display *dpy;
+ Window w;
+ Pixmap backbuffer;
+ Pixmap cleanbackbuffer;
+ GC gc;
+ GC backgc;
+ int root_window;
+};
+
+void draw_cs_line(cs_t p1,cs_t p2);
+void draw_cs_text(cs_t p,char *text);
+void draw_cs_shape(cs_s_t s);
+void set_aspect_ratio();
+void flipscreen();
+void set_color();
+void clear_backbuffer();
+int keypress_handler(int sym);
+int graphics_init();
+int graphics_event_handler();
+void set_clipping_rectangle(int x,int y,int width,int height);
+void red_and_blue_magic();
+
+#endif