aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJack Jamison <jackqjamison@gmail.com>2025-10-20 17:42:39 -0400
committerJack Jamison <jackqjamison@gmail.com>2025-10-20 17:42:39 -0400
commit533fbc682948d6a90fba656bf5a245a3443bb4e6 (patch)
tree630046c9bbf6b781d126ff6a79302307ed049285
parent7741fa25a23f2bd38fdb093c201726c4b04bfa75 (diff)
fix cursor alpha
-rw-r--r--graphics.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/graphics.c b/graphics.c
index b223daa..2850d3b 100644
--- a/graphics.c
+++ b/graphics.c
@@ -173,7 +173,9 @@ void render_frame(client_state *state) {
glViewport(0, 0, state->width, state->height);
glScissor(0, 0, state->width, state->height);
glClearColor(background_color.r,background_color.g,background_color.b,background_color.a);
+ glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE); // allow alpha channel set by background
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
+ glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_FALSE); // don't allow alpha channel to be set after
// bind shader and texture
glUseProgram(state->text_shader);