mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
remove Viewport class
This commit is contained in:
parent
105561ad77
commit
9843a1fc27
17 changed files with 60 additions and 115 deletions
|
|
@ -85,14 +85,14 @@ void TextsRenderer::renderNote(
|
|||
}
|
||||
pos /= projpos.w;
|
||||
pos.z = 0;
|
||||
xvec = {2.0f / viewport.getWidth() * scale, 0, 0};
|
||||
yvec = {0, 2.0f / viewport.getHeight() * scale, 0};
|
||||
xvec = {2.0f / viewport.x * scale, 0, 0};
|
||||
yvec = {0, 2.0f / viewport.y * scale, 0};
|
||||
} else {
|
||||
auto matrix = camera.getProjView();
|
||||
auto screenPos = matrix * glm::vec4(pos, 1.0f);
|
||||
|
||||
xvec = glm::vec3(2.0f / viewport.getWidth() * scale, 0, 0);
|
||||
yvec = glm::vec3(0, 2.0f / viewport.getHeight() * scale, 0);
|
||||
xvec = glm::vec3(2.0f / viewport.x * scale, 0, 0);
|
||||
yvec = glm::vec3(0, 2.0f / viewport.y * scale, 0);
|
||||
|
||||
pos = screenPos / screenPos.w;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue