remove Viewport class
This commit is contained in:
@@ -64,8 +64,6 @@ void GuidesRenderer::renderDebugLines(
|
||||
) {
|
||||
DrawContext ctx = pctx.sub(&batch);
|
||||
const auto& viewport = ctx.getViewport();
|
||||
uint displayWidth = viewport.getWidth();
|
||||
uint displayHeight = viewport.getHeight();
|
||||
|
||||
ctx.setDepthTest(true);
|
||||
|
||||
@@ -91,15 +89,15 @@ void GuidesRenderer::renderDebugLines(
|
||||
}
|
||||
|
||||
float length = 40.f;
|
||||
glm::vec3 tsl(displayWidth / 2, displayHeight / 2, 0.f);
|
||||
glm::vec3 tsl(viewport.x / 2, viewport.y / 2, 0.f);
|
||||
glm::mat4 model(glm::translate(glm::mat4(1.f), tsl));
|
||||
linesShader.uniformMatrix(
|
||||
"u_projview",
|
||||
glm::ortho(
|
||||
0.f,
|
||||
static_cast<float>(displayWidth),
|
||||
static_cast<float>(viewport.x),
|
||||
0.f,
|
||||
static_cast<float>(displayHeight),
|
||||
static_cast<float>(viewport.y),
|
||||
-length,
|
||||
length
|
||||
) * model *
|
||||
|
||||
Reference in New Issue
Block a user