Skip to content

Commit 1a3a7d1

Browse files
committed
Update WebGLPipeline.js
1 parent fc84b19 commit 1a3a7d1

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

src/renderer/webgl/WebGLPipeline.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -696,6 +696,11 @@ var WebGLPipeline = new Class({
696696
*/
697697
resize: function (width, height)
698698
{
699+
if (width !== this.width || height !== this.height)
700+
{
701+
this.flush();
702+
}
703+
699704
this.width = width;
700705
this.height = height;
701706

@@ -728,7 +733,7 @@ var WebGLPipeline = new Class({
728733

729734
if (shader.hasUniform('uProjectionMatrix'))
730735
{
731-
this.setMatrix4fv('uProjectionMatrix', false, projectionMatrix.val, shaders[i]);
736+
this.setMatrix4fv('uProjectionMatrix', false, projectionMatrix.val, shader);
732737
}
733738
}
734739

@@ -871,7 +876,7 @@ var WebGLPipeline = new Class({
871876
var width = texture.width;
872877
var height = texture.height;
873878

874-
this.drawFillRect(0, 0, width, height, 0x0, 0.5, texture, true);
879+
this.drawFillRect(0, 0, width, height, 0x0, 1, texture, true);
875880

876881
this.flush(true);
877882

0 commit comments

Comments
 (0)