mirror of https://github.com/axmolengine/axmol.git
Fix OpenGL test issue on web
This commit is contained in:
parent
d0fc3ec4c4
commit
1980311204
|
@ -458,7 +458,8 @@ var GLNodeCCAPITest = OpenGLTestLayer.extend({
|
|||
|
||||
this.shader.use();
|
||||
this.shader.setUniformsForBuiltins();
|
||||
cc.glEnableVertexAttribs( cc.VERTEX_ATTRIB_FLAG_COLOR | cc.VERTEX_ATTRIB_FLAG_POSITION);
|
||||
gl.enableVertexAttribArray(cc.VERTEX_ATTRIB_COLOR);
|
||||
gl.enableVertexAttribArray(cc.VERTEX_ATTRIB_POSITION);
|
||||
|
||||
// Draw fullscreen Square
|
||||
gl.bindBuffer(gl.ARRAY_BUFFER, this.squareVertexPositionBuffer);
|
||||
|
@ -604,7 +605,7 @@ var ShaderNode = cc.GLNode.extend({
|
|||
this.shader.setUniformLocationF32( this.uniformCenter, centerx, centery);
|
||||
this.shader.setUniformLocationF32( this.uniformResolution, 256, 256);
|
||||
|
||||
cc.glEnableVertexAttribs( cc.VERTEX_ATTRIB_FLAG_POSITION );
|
||||
gl.enableVertexAttribArray( cc.VERTEX_ATTRIB_POSITION );
|
||||
|
||||
// Draw fullscreen Square
|
||||
gl.bindBuffer(gl.ARRAY_BUFFER, this.squareVertexPositionBuffer);
|
||||
|
@ -1088,7 +1089,8 @@ var TexImage2DTest = OpenGLTestLayer.extend({
|
|||
this.shader.setUniformsForBuiltins();
|
||||
|
||||
gl.bindTexture(gl.TEXTURE_2D, this.my_texture);
|
||||
cc.glEnableVertexAttribs( cc.VERTEX_ATTRIB_FLAG_TEX_COORDS | cc.VERTEX_ATTRIB_FLAG_POSITION);
|
||||
gl.enableVertexAttribArray(cc.VERTEX_ATTRIB_POSITION);
|
||||
gl.enableVertexAttribArray(cc.VERTEX_ATTRIB_TEX_COORDS);
|
||||
|
||||
// Draw fullscreen Square
|
||||
gl.bindBuffer(gl.ARRAY_BUFFER, this.squareVertexPositionBuffer);
|
||||
|
|
2
web
2
web
|
@ -1 +1 @@
|
|||
Subproject commit f21308833d4ff8594c691f001a235a7e8a2dcd0b
|
||||
Subproject commit d176dc4f74396746445112d030c2fa63875e5bf8
|
Loading…
Reference in New Issue