Skip to content

Commit

Permalink
Merge pull request #626 from feketeimre/develop
Browse files Browse the repository at this point in the history
Fix issue # 366
  • Loading branch information
campagnola committed Feb 5, 2018
2 parents 4ed09eb + 8d9cb79 commit 5e4d51b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pyqtgraph/opengl/GLViewWidget.py
Expand Up @@ -450,6 +450,7 @@ def renderToArray(self, size, format=GL_BGRA, type=GL_UNSIGNED_BYTE, textureSize
glfbo.glFramebufferTexture2D(glfbo.GL_FRAMEBUFFER, glfbo.GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, tex, 0)

self.paintGL(region=(x, h-y-h2, w2, h2), viewport=(0, 0, w2, h2)) # only render sub-region
glBindTexture(GL_TEXTURE_2D, tex) # fixes issue #366

## read texture back to array
data = glGetTexImage(GL_TEXTURE_2D, 0, format, type)
Expand Down

0 comments on commit 5e4d51b

Please sign in to comment.