diff options
author | Sven Gothel <[email protected]> | 2015-09-28 06:53:37 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2015-09-28 06:53:37 +0200 |
commit | 3d94fac862c3605d3a0862e8e6f7725483398163 (patch) | |
tree | 4ffba8a567c8c6f980c87c528295487f5c64b76f | |
parent | dad07ad7f7e54c593e58fe3a7ace41bfe4f39b05 (diff) |
Bug 1234 - GLReadBufferUtil.readPixelsImpl(..) not using [xy] offset in readTexture.updateSubImage(..)
The passed inX and inY x/y offset for readPixel -> [textureData] buffer,
must be passed to readTexture.updateSubImage(..)'s destination offset.
I.e. the buffer's content starting at beginning is filled via glReadPixels
w/ offset applied.
Hence the texture update must pass the offset as the destination offset,
i.e. to be used for glTexSubImage2D's offset.
-rw-r--r-- | src/jogl/classes/com/jogamp/opengl/util/GLReadBufferUtil.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/jogl/classes/com/jogamp/opengl/util/GLReadBufferUtil.java b/src/jogl/classes/com/jogamp/opengl/util/GLReadBufferUtil.java index cc3462f99..3fa856a47 100644 --- a/src/jogl/classes/com/jogamp/opengl/util/GLReadBufferUtil.java +++ b/src/jogl/classes/com/jogamp/opengl/util/GLReadBufferUtil.java @@ -245,8 +245,8 @@ public class GLReadBufferUtil { readTexture.updateImage(gl, readTextureData); } else { readTexture.updateSubImage(gl, readTextureData, 0, - 0, 0, // src offset - 0, 0, // dst offset + inX, inY, // dst offset + 0, 0, // src offset width, height); } readPixelBuffer.rewind(); |