void scissor_pop() { assert(S.depth > 0); shader_flush(); --S.depth; if (S.depth == 0) { glDisable(GL_SCISSOR_TEST); return; } struct box * s = &S.s[S.depth]; screen_scissor(s->x,s->y,s->width,s->height); }
void scissor_pop() { assert(S.depth > 0); sl_shader_flush(); --S.depth; if (S.depth == 0) { sl_shader_scissortest(0); return; } struct box * s = &S.s[S.depth-1]; screen_scissor(s->x,s->y,s->width,s->height); }
void scissor_push(int x, int y, int w, int h) { assert(S.depth < SCISSOR_MAX); shader_flush(); if (S.depth == 0) { glEnable(GL_SCISSOR_TEST); } struct box * s = &S.s[S.depth++]; s->x = x; s->y = y; s->width = w; s->height = h; screen_scissor(s->x,s->y,s->width,s->height); }
void scissor_push(int x, int y, int w, int h) { assert(S.depth < SCISSOR_MAX); sl_shader_flush(); if (S.depth == 0) { sl_shader_scissortest(1); } if (S.depth >= 1) { intersection(&S.s[S.depth-1], &x, &y, &w, &h); } struct box * s = &S.s[S.depth++]; s->x = x; s->y = y; s->width = w; s->height = h; screen_scissor(s->x,s->y,s->width,s->height); }