aboutsummaryrefslogtreecommitdiff
path: root/src/window
diff options
context:
space:
mode:
Diffstat (limited to 'src/window')
-rw-r--r--src/window/window.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/window/window.c b/src/window/window.c
index 64c09f2..1df12e0 100644
--- a/src/window/window.c
+++ b/src/window/window.c
@@ -332,6 +332,7 @@ static int mgl_window_init(mgl_window *self, const char *title, const mgl_window
set_vertical_sync_enabled(self->window, 1);
context->gl.glEnable(GL_TEXTURE_2D);
context->gl.glEnable(GL_BLEND);
+ context->gl.glEnable(GL_SCISSOR_TEST);
context->gl.glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
context->gl.glEnableClientState(GL_VERTEX_ARRAY);
context->gl.glEnableClientState(GL_TEXTURE_COORD_ARRAY);
@@ -725,7 +726,7 @@ void mgl_window_get_view(mgl_window *self, mgl_view *view) {
void mgl_window_set_scissor(mgl_window *self, mgl_scissor *new_scissor) {
mgl_context *context = mgl_get_context();
self->scissor = *new_scissor;
- context->gl.glScissor(self->scissor.position.x, self->scissor.position.y, self->scissor.size.x, self->scissor.size.y);
+ context->gl.glScissor(self->scissor.position.x, self->size.y - self->scissor.position.y - self->scissor.size.y, self->scissor.size.x, self->scissor.size.y);
}
void mgl_window_get_scissor(mgl_window *self, mgl_scissor *scissor) {