Skip to content

Commit

Permalink
graphics: update SpriteBatch and TextureArraySpriteBatch projection m…
Browse files Browse the repository at this point in the history
…atrix to assume y-down (#236)
  • Loading branch information
LeHaine authored Mar 24, 2024
1 parent 25b9d4e commit 1306470
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,11 @@ class SpriteBatch(
override var projectionMatrix = Mat4().setToOrthographic(
left = 0f,
right = context.graphics.width.toFloat(),
bottom = 0f,
top = context.graphics.height.toFloat(),
bottom = context.graphics.height.toFloat(),
top = 0f,
near = -1f,
far = 1f
)
).translate(0f, -context.graphics.height * 0.5f, 0f)
set(value) {
if (_drawing) {
flush()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,11 @@ class TextureArraySpriteBatch(
override var projectionMatrix = Mat4().setToOrthographic(
left = 0f,
right = context.graphics.width.toFloat(),
bottom = 0f,
top = context.graphics.height.toFloat(),
bottom = context.graphics.height.toFloat(),
top = 0f,
near = -1f,
far = 1f
)
).translate(0f, -context.graphics.height * 0.5f, 0f)
set(value) {
if (_drawing) {
flush()
Expand Down

0 comments on commit 1306470

Please sign in to comment.