aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2021-10-28 17:10:41 +0200
committerdec05eba <dec05eba@protonmail.com>2021-10-28 17:32:34 +0200
commit14e3617736c63bd22b0785ad418acef825db221f (patch)
treedc18c593a1e74c4218657136772e4409094414af /include
parent1e3df56a5c91bce2ef7b03e31156721e2f76a063 (diff)
Use a separate glx context for every window
Fix vertex buffer causing crash on render if update is called with an empty list.
Diffstat (limited to 'include')
-rw-r--r--include/mgl/mgl.h1
-rw-r--r--include/mgl/window/window.h2
2 files changed, 2 insertions, 1 deletions
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 <stdbool.h>
+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;
};