aboutsummaryrefslogtreecommitdiff
path: root/src/glfww.c
diff options
context:
space:
mode:
authoramy <[email protected]>2023-04-17 11:02:58 +0000
committeramy <[email protected]>2023-04-17 11:02:58 +0000
commiteeb33f80fd96f04b4d19a11dc5fc0a37534f469e (patch)
tree9105add0c71507c1d4bc95f38bdde8ea86239243 /src/glfww.c
parentd769c253e8a6ddc67cf8424da2017d309e93f11b (diff)
idk better rendering
Diffstat (limited to 'src/glfww.c')
-rw-r--r--src/glfww.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/glfww.c b/src/glfww.c
index bfcc8d0..6060835 100644
--- a/src/glfww.c
+++ b/src/glfww.c
@@ -6,8 +6,7 @@
#include <math.h>
#include "glfww.h"
int w,h;
-#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(){
GLFWwindow* window;
@@ -44,6 +43,13 @@ GLFWwindow* glfw_init(){
}
void refresh_size(GLFWwindow*wi){
glfwGetFramebufferSize(wi,&w,&h);
+ //printf("%i,%i\n",w,h);
+}
+int get_w(){
+ return w;
+}
+int get_h(){
+ return h;
}
#define glfw_load(w) glfwSwapBuffers(w);
void glfw_loop(GLFWwindow*window){