mattlock Posted September 28, 2016 Share Posted September 28, 2016 Hi the following code gives a webGL error: INVALID_OPERATION: drawElement: no buffer is bound to enabled attribute If you remove the diffuseTexture it works, and I tried calling material.dispose and diffuseTexture.dispose to no avail, I've reverted to 2.4 and this does not occur. Thank you for the amazing work! var material = new BABYLON.StandardMaterial('texture', scene); material.diffuseTexture = Util.texture('assets/height.jpg', scene); material.emissiveColor = new BABYLON.Color3(0.5, 0.5, 0.5); var mesh = BABYLON.MeshBuilder.CreateIcoSphere('Ball', { radius:64, subdivisions:4 }, scene); mesh.position.x = 64; mesh.position.z = 256; mesh.position.y = 32; mesh.material = material; setTimeout(() => { console.log(mesh); console.log(scene.meshes.length); setTimeout(() => { mesh.visibility = false; mesh.dispose(); console.log(scene.meshes.length); }, 1000); }, 2000); Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted September 28, 2016 Share Posted September 28, 2016 Hello can you please create a playground repro? Quote Link to comment Share on other sites More sharing options...
nittrus Posted October 10, 2016 Share Posted October 10, 2016 I can confirm this is happening with me also, I am using 2.5-beta. It seems that when you have a diffuseTexture on a mesh that when you dispose of the mesh it causes this hickup and the error shows in the console, for now I am setting the diffuseTexture to null before disposing of the mesh (a simple fix but more code). PG Repo: http://www.babylonjs-playground.com/#Z3TQT#0 In the console F12 type in sphere.dispose() Cheers Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted October 11, 2016 Share Posted October 11, 2016 Excellent catch! I fix this nasty bug:) It works now:http://www.babylonjs-playground.com/#1VU4ES#0 Quote Link to comment Share on other sites More sharing options...
nittrus Posted October 11, 2016 Share Posted October 11, 2016 3 minutes ago, Deltakosh said: Excellent catch! I fix this nasty bug:) It works now:http://www.babylonjs-playground.com/#1VU4ES#0 You're awesome, cheers! Quote Link to comment Share on other sites More sharing options...
nittrus Posted October 11, 2016 Share Posted October 11, 2016 And confirmed fixed! GameMonetize 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.