소스 검색

Fix gl texture size for luminance plane yet again

Dominic Szablewski 11 년 전
부모
커밋
32f8c176b8
1개의 변경된 파일3개의 추가작업 그리고 3개의 파일을 삭제
  1. 3 3
      jsmpg.js

+ 3 - 3
jsmpg.js 파일 보기

@@ -846,15 +846,15 @@ jsmpeg.prototype.renderFrameGL = function() {
846 846
 	gl.activeTexture(gl.TEXTURE0);
847 847
 	gl.bindTexture(gl.TEXTURE_2D, this.YTexture);
848 848
 
849
-	gl.texImage2D(gl.TEXTURE_2D, 0, gl.LUMINANCE, this.codedWidth, this.codedHeight, 0, gl.LUMINANCE, gl.UNSIGNED_BYTE, uint8Y);
849
+	gl.texImage2D(gl.TEXTURE_2D, 0, gl.LUMINANCE, this.codedWidth, this.height, 0, gl.LUMINANCE, gl.UNSIGNED_BYTE, uint8Y);
850 850
 	
851 851
 	gl.activeTexture(gl.TEXTURE1);
852 852
 	gl.bindTexture(gl.TEXTURE_2D, this.CBTexture);
853
-	gl.texImage2D(gl.TEXTURE_2D, 0, gl.LUMINANCE, this.halfWidth, this.halfHeight, 0, gl.LUMINANCE, gl.UNSIGNED_BYTE, uint8Cr);
853
+	gl.texImage2D(gl.TEXTURE_2D, 0, gl.LUMINANCE, this.halfWidth, this.height/2, 0, gl.LUMINANCE, gl.UNSIGNED_BYTE, uint8Cr);
854 854
 	
855 855
 	gl.activeTexture(gl.TEXTURE2);
856 856
 	gl.bindTexture(gl.TEXTURE_2D, this.CRTexture);
857
-	gl.texImage2D(gl.TEXTURE_2D, 0, gl.LUMINANCE, this.halfWidth, this.halfHeight, 0, gl.LUMINANCE, gl.UNSIGNED_BYTE, uint8Cb);
857
+	gl.texImage2D(gl.TEXTURE_2D, 0, gl.LUMINANCE, this.halfWidth, this.height/2, 0, gl.LUMINANCE, gl.UNSIGNED_BYTE, uint8Cb);
858 858
 	
859 859
 	gl.drawArrays(gl.TRIANGLE_STRIP, 0, 4);
860 860
 };