aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2025-03-13 01:55:45 +0100
committerdec05eba <dec05eba@protonmail.com>2025-03-13 01:55:45 +0100
commitb2c7f26283b1740debeff2d06939c05a4a804304 (patch)
treeee6aaf0ecb4cdc2dbfc9ee5c23bd142448e1651f
parent2751d53e3a810c057e0401b2a9be11bbd67a383e (diff)
Set pack alignment to 1
-rw-r--r--include/mgl/gl_macro.h1
-rw-r--r--src/window/window.c1
2 files changed, 2 insertions, 0 deletions
diff --git a/include/mgl/gl_macro.h b/include/mgl/gl_macro.h
index ea2b5e4..07ce1c4 100644
--- a/include/mgl/gl_macro.h
+++ b/include/mgl/gl_macro.h
@@ -86,6 +86,7 @@
#define GL_LINK_STATUS 0x8B82
#define GL_COMPILE_STATUS 0x8B81
+#define GL_PACK_ALIGNMENT 0x0D05
#define GL_UNPACK_ALIGNMENT 0x0CF5
#define GL_FALSE 0
diff --git a/src/window/window.c b/src/window/window.c
index 4b258f9..6dbf3df 100644
--- a/src/window/window.c
+++ b/src/window/window.c
@@ -1018,6 +1018,7 @@ static int mgl_window_init(mgl_window *self, const char *title, const mgl_window
context->gl.glEnableClientState(GL_VERTEX_ARRAY);
context->gl.glEnableClientState(GL_TEXTURE_COORD_ARRAY);
context->gl.glEnableClientState(GL_COLOR_ARRAY);
+ context->gl.glPixelStorei(GL_PACK_ALIGNMENT, 1);
context->gl.glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
Window dummy_w;