Skip to content

Commit

Permalink
pyslm.support.render
Browse files Browse the repository at this point in the history
Fixes for ensuring correct GLDepth Buffer
  • Loading branch information
drlukeparry committed Dec 8, 2023
1 parent e407d53 commit 114ffa9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pyslm/support/render.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ def __init__(self, mesh: trimesh.Trimesh = None, rasterResolution: float = 0.05,
#self._depthRenderBuffer.resize(shape, format=gloo.gl.GL_DEPTH_COMPONENT16)

# Create FBO, attach the color buffer and depth buffer
self._fbo = gloo.FrameBuffer(self._rendertex)#, self._depthRenderBuffer)
self._fbo = gloo.FrameBuffer(self._rendertex, self._depthRenderBuffer)

gloo.set_viewport(0, 0, self.physical_size[0], self.physical_size[1])
gloo.set_viewport(0, 0, self._visSize[0], self._visSize[1])
Expand All @@ -140,7 +140,7 @@ def __init__(self, mesh: trimesh.Trimesh = None, rasterResolution: float = 0.05,
self.program['u_model'] = self.model
self.program['u_view'] = self.view

gloo.set_clear_color('white')
gloo.set_clear_color((0.0, 0.0, 0.0, 0.0))
gloo.set_state('opaque')

self.update()
Expand Down

0 comments on commit 114ffa9

Please sign in to comment.