From 14e3617736c63bd22b0785ad418acef825db221f Mon Sep 17 00:00:00 2001 From: dec05eba Date: Thu, 28 Oct 2021 17:10:41 +0200 Subject: Use a separate glx context for every window Fix vertex buffer causing crash on render if update is called with an empty list. --- include/mgl/mgl.h | 1 - include/mgl/window/window.h | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'include/mgl') diff --git a/include/mgl/mgl.h b/include/mgl/mgl.h index 15020e9..8e5e2a4 100644 --- a/include/mgl/mgl.h +++ b/include/mgl/mgl.h @@ -9,7 +9,6 @@ typedef struct mgl_context mgl_context; struct mgl_context { mgl_connection connection; - GLXContext glx_context; _XVisualInfo *visual_info; mgl_gl gl; }; diff --git a/include/mgl/window/window.h b/include/mgl/window/window.h index c1542b4..b30583b 100644 --- a/include/mgl/window/window.h +++ b/include/mgl/window/window.h @@ -5,6 +5,7 @@ #include "../system/vec.h" #include +typedef struct __GLXcontextRec *GLXContext; typedef struct mgl_event mgl_event; /* x11 window handle. TODO: Add others when wayland, etc is added */ typedef unsigned long mgl_window_handle; @@ -13,6 +14,7 @@ typedef struct mgl_window mgl_window; struct mgl_window { mgl_window_handle window; + GLXContext glx_context; mgl_vec2i size; mgl_vec2i cursor_position; }; -- cgit v1.2.3