Skip to content

Commit b2b52a7

Browse files
committed
Merge branch 'fix-gl-text-rendering' into 'main'
Fix text rendering in OpenGLRenderer (GH-704) See merge request omniverse/warp!1290
2 parents 44a5a2b + bd0b95a commit b2b52a7

2 files changed

Lines changed: 7 additions & 0 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@
5858
([GH-688](https://github.com/NVIDIA/warp/issues/688)).
5959
- Fixed inconsistency in orientation of 2D geometry side normals ([GH-629](https://github.com/NVIDIA/warp/issues/629)).
6060
- Fixed `wp.svd2()` with duplicate singular values and improved accuracy ([GH-679](https://github.com/NVIDIA/warp/issues/679)).
61+
- Fix text rendering in OpenGLRenderer ([GH-704](https://github.com/NVIDIA/warp/issues/629)).
6162

6263
## [1.7.1] - 2025-04-30
6364

warp/render/render_opengl.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1990,6 +1990,10 @@ def _draw(self):
19901990
gl.glBlendFunc(gl.GL_SRC_ALPHA, gl.GL_ONE_MINUS_SRC_ALPHA)
19911991
gl.glEnable(gl.GL_BLEND)
19921992

1993+
# disable depth test to fix text rendering
1994+
# https://github.com/pyglet/pyglet/issues/1302
1995+
gl.glDisable(gl.GL_DEPTH_TEST)
1996+
19931997
text = f"""Sim Time: {self.time:.1f}
19941998
Update FPS: {self._fps_update:.1f}
19951999
Render FPS: {self._fps_render:.1f}
@@ -2003,6 +2007,8 @@ def _draw(self):
20032007
self._info_label.y = self.screen_height - 5
20042008
self._info_label.draw()
20052009

2010+
gl.glEnable(gl.GL_DEPTH_TEST)
2011+
20062012
for cb in self.render_2d_callbacks:
20072013
cb()
20082014

0 commit comments

Comments
 (0)