diff options
Diffstat (limited to 'src/glfww.h')
-rw-r--r-- | src/glfww.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/glfww.h b/src/glfww.h new file mode 100644 index 0000000..fd784c2 --- /dev/null +++ b/src/glfww.h @@ -0,0 +1,24 @@ +#include <stdio.h> +#include <GLFW/glfw3.h> +#include "util.h" +#include <unistd.h> +#include <stdlib.h> +#include <math.h> +#ifndef __glfww_ +#define __glfww_ +#define win_clean() glfwTerminate(); +#define ab_to_vp(x,y,w,h,x1,y1) float x = 2 * ((float)x1/w) -1;\ + float y = 2 * ((float)y1/h) -1; +GLFWwindow* glfw_init(); +#define glfw_load(w) glfwSwapBuffers(w); +void glfw_loop(GLFWwindow*window); +void glfw_pixel_partial(GLFWwindow*wi,int x, int y); +void glfw_clear(GLFWwindow*w); +void refresh_size(GLFWwindow*); +#define glfw_pixel(wi,x,y)\ + glBegin(GL_POINTS);\ + glfw_pixel_partial(wi,x,y);\ + glEnd(); +void glfw_circle(GLFWwindow* w,int x, int y, int r); +void glfw_circle_partial(GLFWwindow* w,int x, int y, int r); +#endif |