@@ -1121,6 +1121,12 @@
}
};
+ Engine.prototype.ReadPixels = function (x, y, width, height) {
+ var data = new Uint8Array(height * width * 4);
+ this._gl.readPixels(0, 0, width, height, this._gl.RGBA, this._gl.UNSIGNED_BYTE, data);
+ return data;
+ };
+
// Dispose
Engine.prototype.dispose = function () {
while (this.scenes.length) {
@@ -1176,6 +1176,11 @@
+ public ReadPixels(x: number, y: number, width: number, height: number) : Uint8Array {
+ }
public dispose(): void {
// Release scenes