Skip to content

Commit

Permalink
Use viewport in metal batch
Browse files Browse the repository at this point in the history
  • Loading branch information
JoelOtter committed Sep 4, 2024
1 parent 46dc225 commit df28f4b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/plugins/metal/src/metal_batch.mm
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@
encoder = [metal_graphics.getCommandBuffer()
renderCommandEncoderWithDescriptor:renderPassDescriptor()];

[encoder setViewport:MTLViewport{
0, 0, static_cast<double>(getTargetWidth()),
static_cast<double>(getTargetHeight()), 0, 1}];

auto projection =
glm::ortho<float>(0, getTargetWidth(), getTargetHeight(), 0, 1, -1);

Expand Down

0 comments on commit df28f4b

Please sign in to comment.