Skip to content

Commit

Permalink
fix read pixel
Browse files Browse the repository at this point in the history
  • Loading branch information
xpenatan committed May 15, 2024
1 parent 04957f2 commit 4ef01e7
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -824,7 +824,8 @@ else if(pixels instanceof IntBuffer) {
else {
throw new GdxRuntimeException("Inputed pixels buffer not supported.");
}
gl.readPixels(x, y, width, height, format, type, typedArray);
Uint8ArrayWrapper uint8Array = TypedArrays.createUint8Array(typedArray.getBuffer(), 0);
gl.readPixels(x, y, width, height, format, type, uint8Array);
}

@Override
Expand Down

0 comments on commit 4ef01e7

Please sign in to comment.