Skip to content

Commit

Permalink
Merge pull request #192 from julee/fix_text2d
Browse files Browse the repository at this point in the history
TextWriter2D: Fix the viewport calculation error in text rendering
  • Loading branch information
einarf authored Mar 29, 2024
2 parents 6b7d2ed + ee95d40 commit b920d52
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion moderngl_window/text/bitmapped/text_2d.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def _write(self, text: str):
def draw(self, pos, length=-1, size=24.0):
# Calculate ortho projection based on viewport
vp = self.ctx.fbo.viewport
w, h = vp[2] - vp[0], vp[3] - vp[1]
w, h = vp[2], vp[3]
projection = matrix44.create_orthogonal_projection_matrix(
0, # left
w, # right
Expand Down

0 comments on commit b920d52

Please sign in to comment.