|
@@ -1514,10 +1514,9 @@ static void DrawLine(float x1, float y1, float x2, float y2, float thickness,
|
|
gs_vertex2f(x1, y1);
|
|
gs_vertex2f(x1, y1);
|
|
gs_vertex2f(x1 + (xSide * (thickness / scale.x)),
|
|
gs_vertex2f(x1 + (xSide * (thickness / scale.x)),
|
|
y1 + (ySide * (thickness / scale.y)));
|
|
y1 + (ySide * (thickness / scale.y)));
|
|
|
|
+ gs_vertex2f(x2, y2);
|
|
gs_vertex2f(x2 + (xSide * (thickness / scale.x)),
|
|
gs_vertex2f(x2 + (xSide * (thickness / scale.x)),
|
|
y2 + (ySide * (thickness / scale.y)));
|
|
y2 + (ySide * (thickness / scale.y)));
|
|
- gs_vertex2f(x2, y2);
|
|
|
|
- gs_vertex2f(x1, y1);
|
|
|
|
|
|
|
|
gs_vertbuffer_t *line = gs_render_save();
|
|
gs_vertbuffer_t *line = gs_render_save();
|
|
|
|
|
|
@@ -1532,24 +1531,17 @@ static void DrawRect(float thickness, vec2 scale)
|
|
|
|
|
|
gs_vertex2f(0.0f, 0.0f);
|
|
gs_vertex2f(0.0f, 0.0f);
|
|
gs_vertex2f(0.0f + (thickness / scale.x), 0.0f);
|
|
gs_vertex2f(0.0f + (thickness / scale.x), 0.0f);
|
|
- gs_vertex2f(0.0f + (thickness / scale.x), 1.0f);
|
|
|
|
- gs_vertex2f(0.0f, 1.0f);
|
|
|
|
- gs_vertex2f(0.0f, 0.0f);
|
|
|
|
gs_vertex2f(0.0f, 1.0f);
|
|
gs_vertex2f(0.0f, 1.0f);
|
|
|
|
+ gs_vertex2f(0.0f + (thickness / scale.x), 1.0f);
|
|
gs_vertex2f(0.0f, 1.0f - (thickness / scale.y));
|
|
gs_vertex2f(0.0f, 1.0f - (thickness / scale.y));
|
|
- gs_vertex2f(1.0f, 1.0f - (thickness / scale.y));
|
|
|
|
- gs_vertex2f(1.0f, 1.0f);
|
|
|
|
- gs_vertex2f(0.0f, 1.0f);
|
|
|
|
gs_vertex2f(1.0f, 1.0f);
|
|
gs_vertex2f(1.0f, 1.0f);
|
|
|
|
+ gs_vertex2f(1.0f, 1.0f - (thickness / scale.y));
|
|
gs_vertex2f(1.0f - (thickness / scale.x), 1.0f);
|
|
gs_vertex2f(1.0f - (thickness / scale.x), 1.0f);
|
|
- gs_vertex2f(1.0f - (thickness / scale.x), 0.0f);
|
|
|
|
- gs_vertex2f(1.0f, 0.0f);
|
|
|
|
- gs_vertex2f(1.0f, 1.0f);
|
|
|
|
gs_vertex2f(1.0f, 0.0f);
|
|
gs_vertex2f(1.0f, 0.0f);
|
|
|
|
+ gs_vertex2f(1.0f - (thickness / scale.x), 0.0f);
|
|
gs_vertex2f(1.0f, 0.0f + (thickness / scale.y));
|
|
gs_vertex2f(1.0f, 0.0f + (thickness / scale.y));
|
|
- gs_vertex2f(0.0f, 0.0f + (thickness / scale.y));
|
|
|
|
gs_vertex2f(0.0f, 0.0f);
|
|
gs_vertex2f(0.0f, 0.0f);
|
|
- gs_vertex2f(1.0f, 0.0f);
|
|
|
|
|
|
+ gs_vertex2f(0.0f, 0.0f + (thickness / scale.y));
|
|
|
|
|
|
gs_vertbuffer_t *rect = gs_render_save();
|
|
gs_vertbuffer_t *rect = gs_render_save();
|
|
|
|
|
|
@@ -1897,10 +1889,8 @@ void OBSBasicPreview::DrawSceneEditing()
|
|
|
|
|
|
gs_vertex2f(0.0f, 0.0f);
|
|
gs_vertex2f(0.0f, 0.0f);
|
|
gs_vertex2f(1.0f, 0.0f);
|
|
gs_vertex2f(1.0f, 0.0f);
|
|
- gs_vertex2f(1.0f, 1.0f);
|
|
|
|
- gs_vertex2f(1.0f, 1.0f);
|
|
|
|
- gs_vertex2f(0.0f, 0.0f);
|
|
|
|
gs_vertex2f(0.0f, 1.0f);
|
|
gs_vertex2f(0.0f, 1.0f);
|
|
|
|
+ gs_vertex2f(1.0f, 1.0f);
|
|
|
|
|
|
rectFill = gs_render_save();
|
|
rectFill = gs_render_save();
|
|
}
|
|
}
|