Commit e66758dd authored by Paul McCarthy's avatar Paul McCarthy 🚵
Browse files

RF: Depth information is always in renderTeexture1

parent 5a1d12b6
......@@ -240,12 +240,6 @@ class GLVolume(glimageobject.GLImageObject):
self.smoothFilter = glfilter.Filter('smooth', texture=0)
self.smoothFilter.set(kernSize=self.opts.smoothing * 2)
# One of renderTexture1 or 2 will be be used
# as the target for the final draw, depending
# on settings. A reference to whichever one
# is used is saved to the "renderTexture"
# attribute on each draw.
self.renderTexture = None
self.renderTexture1 = textures.RenderTexture(
self.name, interp=gl.GL_LINEAR, rttype='cd')
self.renderTexture2 = textures.RenderTexture(
......@@ -737,8 +731,8 @@ class GLVolume(glimageobject.GLImageObject):
fslgl.glvolume_funcs.draw3D(self, *args, **kwargs)
# Apply smoothing if needed. If smoothing
# is enabled, the final final render will
# be in renderTexture2
# is enabled, the final render will be in
# renderTexture2
if opts.smoothing > 0:
self.smoothFilter.set(offsets=[1.0 / sw, 1.0 / sh])
self.smoothFilter.osApply(self.renderTexture1,
......@@ -779,7 +773,6 @@ class GLVolume(glimageobject.GLImageObject):
src.depthTexture = dep
src.draw(verts, useDepth=True)
src.depthTexture = olddep
self.renderTexture = src
def drawAll(self, *args, **kwargs):
......
......@@ -264,7 +264,7 @@ class Scene3DViewProfile(profiles.Profile):
# texture (see GLVolume.draw3d), so we can get
# the depth from there.
globj = canvas.getGLObject(ovl)
tex = globj.renderTexture.depthTexture
tex = globj.renderTexture1.depthTexture
with tex.bound():
# There's no function to read part of
# a texture in GL < 4.5, so we have
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment