fix webgl warning and remove consolelog
This commit is contained in:
		
							parent
							
								
									aef5e53cc3
								
							
						
					
					
						commit
						68de8a2af3
					
				|  | @ -470,13 +470,6 @@ function drawScene(gl: any, | |||
| 		gl.enableVertexAttribArray(programInfo.attribLocations.textureCoord); | ||||
| 	} | ||||
| 
 | ||||
| 	// Tell WebGL we want to affect texture unit 0
 | ||||
| 	gl.activeTexture(gl.TEXTURE0); | ||||
| 	// Bind the texture to texture unit 0
 | ||||
| 	gl.bindTexture(gl.TEXTURE_2D, texture); | ||||
| 	// Tell the shader we bound the texture to texture unit 0
 | ||||
| 	gl.uniform1i(programInfo.uniformLocations.uSampler, 0); | ||||
| 
 | ||||
| 	// Tell WebGL which indices to use to index the vertices
 | ||||
| 	gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, buffers.indices); | ||||
| 
 | ||||
|  | @ -496,6 +489,13 @@ function drawScene(gl: any, | |||
| 		false, | ||||
| 		modelMatrix); | ||||
| 
 | ||||
| 	// Tell WebGL we want to affect texture unit 0
 | ||||
| 	gl.activeTexture(gl.TEXTURE0); | ||||
| 	// Bind the texture to texture unit 0
 | ||||
| 	gl.bindTexture(gl.TEXTURE_2D, texture); | ||||
| 	// Tell the shader we bound the texture to texture unit 0
 | ||||
| 	gl.uniform1i(programInfo.uniformLocations.uSampler, 0); | ||||
| 
 | ||||
| 	{ | ||||
| 		const vertexCount = length; | ||||
| 		const type = gl.UNSIGNED_SHORT; | ||||
|  |  | |||
|  | @ -110,7 +110,5 @@ export function convert (objText) { | |||
| 		outUVs.push(...uvs[d[1] - 1]); | ||||
| 	} | ||||
| 
 | ||||
| 	console.log(indices); | ||||
| 
 | ||||
| 	return [outPositions, outNormals, outUVs, indices]; | ||||
| }; | ||||
		Loading…
	
		Reference in New Issue