Skip to content

Commit

Permalink
RF: revert - pygame image has no tobytes
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremygray committed Dec 17, 2015
1 parent 17bb208 commit bfb07b6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions psychopy/visual/text.py
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ def _setTextShaders(self,value=None):
GL.glEnable(GL.GL_TEXTURE_2D)
GL.glBindTexture(GL.GL_TEXTURE_2D, self._texID) #bind that name to the target
GL.gluBuild2DMipmaps(GL.GL_TEXTURE_2D, 4, self.width,self._fontHeightPix,
GL.GL_RGBA, GL.GL_UNSIGNED_BYTE, pygame.image.tobytes( self._surf, "RGBA",1))
GL.GL_RGBA, GL.GL_UNSIGNED_BYTE, pygame.image.tostring( self._surf, "RGBA",1))
GL.glTexParameteri(GL.GL_TEXTURE_2D,GL.GL_TEXTURE_MAG_FILTER,smoothing) #linear smoothing if texture is stretched?
GL.glTexParameteri(GL.GL_TEXTURE_2D,GL.GL_TEXTURE_MIN_FILTER,smoothing) #but nearest pixel value if it's compressed?

Expand Down Expand Up @@ -372,7 +372,7 @@ def _setTextNoShaders(self,value=None):
GL.glBindTexture(GL.GL_TEXTURE_2D, self._texID) #bind that name to the target
GL.glTexImage2D(GL.GL_TEXTURE_2D, 0, GL.GL_RGBA,
self.width,self._fontHeightPix,0,
GL.GL_RGBA, GL.GL_UNSIGNED_BYTE, pygame.image.tobytes( self._surf, "RGBA",1))
GL.GL_RGBA, GL.GL_UNSIGNED_BYTE, pygame.image.tostring( self._surf, "RGBA",1))
GL.glTexParameteri(GL.GL_TEXTURE_2D,GL.GL_TEXTURE_MAG_FILTER,smoothing) #linear smoothing if texture is stretched?
GL.glTexParameteri(GL.GL_TEXTURE_2D,GL.GL_TEXTURE_MIN_FILTER,smoothing) #but nearest pixel value if it's compressed?
self._needUpdate = True
Expand Down

0 comments on commit bfb07b6

Please sign in to comment.