Skip to content
Snippets Groups Projects
Commit 5f201514 authored by Paul McCarthy's avatar Paul McCarthy
Browse files

Bah, I don't ned to call glEnable/Disable(gl.GL_TEXTURE_1D). In fact, doing...

Bah, I don't  ned to call glEnable/Disable(gl.GL_TEXTURE_1D). In fact, doing so screw up subsequent draws after I've disabled myt shader program.
parent 568da6df
No related branches found
No related tags found
No related merge requests found
...@@ -726,10 +726,6 @@ class SliceCanvas(wxgl.GLCanvas): ...@@ -726,10 +726,6 @@ class SliceCanvas(wxgl.GLCanvas):
# disable interpolation # disable interpolation
gl.glShadeModel(gl.GL_FLAT) gl.glShadeModel(gl.GL_FLAT)
# enable 1D and 3D textures
gl.glEnable(gl.GL_TEXTURE_1D)
gl.glEnable(gl.GL_TEXTURE_3D)
for image in self.imageList: for image in self.imageList:
# The GL data is stored as an attribute of the image, # The GL data is stored as an attribute of the image,
...@@ -833,10 +829,6 @@ class SliceCanvas(wxgl.GLCanvas): ...@@ -833,10 +829,6 @@ class SliceCanvas(wxgl.GLCanvas):
gl.glDisableVertexAttribArray(self.voxYPos) gl.glDisableVertexAttribArray(self.voxYPos)
gl.glDisableVertexAttribArray(self.voxZPos) gl.glDisableVertexAttribArray(self.voxZPos)
gl.glDisable(gl.GL_TEXTURE_1D)
gl.glDisable(gl.GL_TEXTURE_3D)
gl.glUseProgram(0) gl.glUseProgram(0)
# A vertical line at xpos, and a horizontal line at ypos # A vertical line at xpos, and a horizontal line at ypos
...@@ -846,11 +838,11 @@ class SliceCanvas(wxgl.GLCanvas): ...@@ -846,11 +838,11 @@ class SliceCanvas(wxgl.GLCanvas):
xverts[:, self.xax] = self.xpos xverts[:, self.xax] = self.xpos
xverts[:, self.yax] = [self.ymin, self.ymax] xverts[:, self.yax] = [self.ymin, self.ymax]
xverts[:, self.zax] = self.zpos+1 xverts[:, self.zax] = self.zpos + 1
yverts[:, self.xax] = [self.xmin, self.xmax] yverts[:, self.xax] = [self.xmin, self.xmax]
yverts[:, self.yax] = self.ypos yverts[:, self.yax] = self.ypos
yverts[:, self.zax] = self.zpos+1 yverts[:, self.zax] = self.zpos + 1
gl.glBegin(gl.GL_LINES) gl.glBegin(gl.GL_LINES)
gl.glColor3f(0, 1, 0) gl.glColor3f(0, 1, 0)
gl.glVertex3f(*xverts[0]) gl.glVertex3f(*xverts[0])
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment