fix glScissor coords bug
parent
cf17ea8755
commit
5594e4d642
|
@ -360911,11 +360911,12 @@ void gui_panel_id(int id, vec4 rect, const char *skin) {
|
||||||
(void)id;
|
(void)id;
|
||||||
vec4 scissor={0, 0, window_width(), window_height()};
|
vec4 scissor={0, 0, window_width(), window_height()};
|
||||||
if (last_skin->drawrect) last_skin->drawrect(last_skin->userdata, skin, NULL, rect);
|
if (last_skin->drawrect) last_skin->drawrect(last_skin->userdata, skin, NULL, rect);
|
||||||
scissor = gui_getscissorrect(skin, NULL, rect);
|
// scissor = gui_getscissorrect(skin, NULL, rect);
|
||||||
|
scissor = rect;
|
||||||
|
|
||||||
if (!array_count(scissor_rects))
|
if (!array_count(scissor_rects))
|
||||||
glEnable(GL_SCISSOR_TEST);
|
glEnable(GL_SCISSOR_TEST);
|
||||||
glScissor(scissor.x, scissor.y, scissor.z, scissor.w);
|
glScissor(scissor.x, window_height()-scissor.w-scissor.y, scissor.z, scissor.w);
|
||||||
array_push(scissor_rects, scissor);
|
array_push(scissor_rects, scissor);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -145,11 +145,12 @@ void gui_panel_id(int id, vec4 rect, const char *skin) {
|
||||||
(void)id;
|
(void)id;
|
||||||
vec4 scissor={0, 0, window_width(), window_height()};
|
vec4 scissor={0, 0, window_width(), window_height()};
|
||||||
if (last_skin->drawrect) last_skin->drawrect(last_skin->userdata, skin, NULL, rect);
|
if (last_skin->drawrect) last_skin->drawrect(last_skin->userdata, skin, NULL, rect);
|
||||||
scissor = gui_getscissorrect(skin, NULL, rect);
|
// scissor = gui_getscissorrect(skin, NULL, rect);
|
||||||
|
scissor = rect;
|
||||||
|
|
||||||
if (!array_count(scissor_rects))
|
if (!array_count(scissor_rects))
|
||||||
glEnable(GL_SCISSOR_TEST);
|
glEnable(GL_SCISSOR_TEST);
|
||||||
glScissor(scissor.x, scissor.y, scissor.z, scissor.w);
|
glScissor(scissor.x, window_height()-scissor.w-scissor.y, scissor.z, scissor.w);
|
||||||
array_push(scissor_rects, scissor);
|
array_push(scissor_rects, scissor);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -11231,11 +11231,12 @@ void gui_panel_id(int id, vec4 rect, const char *skin) {
|
||||||
(void)id;
|
(void)id;
|
||||||
vec4 scissor={0, 0, window_width(), window_height()};
|
vec4 scissor={0, 0, window_width(), window_height()};
|
||||||
if (last_skin->drawrect) last_skin->drawrect(last_skin->userdata, skin, NULL, rect);
|
if (last_skin->drawrect) last_skin->drawrect(last_skin->userdata, skin, NULL, rect);
|
||||||
scissor = gui_getscissorrect(skin, NULL, rect);
|
// scissor = gui_getscissorrect(skin, NULL, rect);
|
||||||
|
scissor = rect;
|
||||||
|
|
||||||
if (!array_count(scissor_rects))
|
if (!array_count(scissor_rects))
|
||||||
glEnable(GL_SCISSOR_TEST);
|
glEnable(GL_SCISSOR_TEST);
|
||||||
glScissor(scissor.x, scissor.y, scissor.z, scissor.w);
|
glScissor(scissor.x, window_height()-scissor.w-scissor.y, scissor.z, scissor.w);
|
||||||
array_push(scissor_rects, scissor);
|
array_push(scissor_rects, scissor);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue