Touch up scissor box fix

This commit is contained in:
Allen Webster 2019-12-23 11:54:06 -08:00
parent 5923b82522
commit 1c867f1175
1 changed files with 5 additions and 10 deletions

View File

@ -287,18 +287,13 @@ gl_render(Render_Target *t){
group = group->next){
Rect_i32 box = Ri32(group->clip_box);
Rect_i32 scissor_box =
{
Rect_i32 scissor_box = {
box.x0, height - box.y1, box.x1 - box.x0, box.y1 - box.y0,
};
if (scissor_box.x1 < 0)
{
scissor_box.x1 = 0;
}
if (scissor_box.y1 < 0)
{
scissor_box.y1 = 0;
}
scissor_box.x0 = clamp_bot(0, scissor_box.x0);
scissor_box.y0 = clamp_bot(0, scissor_box.y0);
scissor_box.x1 = clamp_bot(0, scissor_box.x1);
scissor_box.y1 = clamp_bot(0, scissor_box.y1);
glScissor(scissor_box.x0, scissor_box.y0, scissor_box.x1, scissor_box.y1);
i32 vertex_count = group->vertex_list.vertex_count;