Skip to content

Commit

Permalink
Fix gl texture size for luminance plane yet again
Browse files Browse the repository at this point in the history
  • Loading branch information
phoboslab committed Nov 4, 2014
1 parent c768b1f commit 32f8c17
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions jsmpg.js
Original file line number Diff line number Diff line change
Expand Up @@ -846,15 +846,15 @@ jsmpeg.prototype.renderFrameGL = function() {
gl.activeTexture(gl.TEXTURE0);
gl.bindTexture(gl.TEXTURE_2D, this.YTexture);

gl.texImage2D(gl.TEXTURE_2D, 0, gl.LUMINANCE, this.codedWidth, this.codedHeight, 0, gl.LUMINANCE, gl.UNSIGNED_BYTE, uint8Y);
gl.texImage2D(gl.TEXTURE_2D, 0, gl.LUMINANCE, this.codedWidth, this.height, 0, gl.LUMINANCE, gl.UNSIGNED_BYTE, uint8Y);

gl.activeTexture(gl.TEXTURE1);
gl.bindTexture(gl.TEXTURE_2D, this.CBTexture);
gl.texImage2D(gl.TEXTURE_2D, 0, gl.LUMINANCE, this.halfWidth, this.halfHeight, 0, gl.LUMINANCE, gl.UNSIGNED_BYTE, uint8Cr);
gl.texImage2D(gl.TEXTURE_2D, 0, gl.LUMINANCE, this.halfWidth, this.height/2, 0, gl.LUMINANCE, gl.UNSIGNED_BYTE, uint8Cr);

gl.activeTexture(gl.TEXTURE2);
gl.bindTexture(gl.TEXTURE_2D, this.CRTexture);
gl.texImage2D(gl.TEXTURE_2D, 0, gl.LUMINANCE, this.halfWidth, this.halfHeight, 0, gl.LUMINANCE, gl.UNSIGNED_BYTE, uint8Cb);
gl.texImage2D(gl.TEXTURE_2D, 0, gl.LUMINANCE, this.halfWidth, this.height/2, 0, gl.LUMINANCE, gl.UNSIGNED_BYTE, uint8Cb);

gl.drawArrays(gl.TRIANGLE_STRIP, 0, 4);
};
Expand Down

0 comments on commit 32f8c17

Please sign in to comment.