![]() There are getters for all the states (WebGL is mostly about managing state), they are a bit tricky to use, but using them will greatly help you understand everything going on all the time, when you need or don't need to make calls in order to update that state and where you made mistakes. You know you fixed it, when the query returns the correct WebGLBuffer Object. ![]() Now you know if you messed up with the pointer. So you go to the point in your code where you set the pointers and enable the arrays and confirm that the location you just enabled with enableVertexAttribArray returns also returns null if you query the buffer at this point. Which, if you query it before your draw call, will probably return null, which means you're not calling vertexAttribPointer correctly when setting up or switching buffers. Gl.getVertexAttrib ( attribLocation, gl.VERTEX_ATTRIB_ARRAY_BUFFER_BINDING ) However, applications may still utilize images and videos from another domain with the cooperation of the server hosting the media, otherwise known as CORS. The default behavior will be a DOMSECURITYERR. The getter for your case would be var attribLocation = 1 As a result, Chrome 13 (and Firefox 5) will no longer allow cross-domain media as a WebGL texture. Once you know how to do that, those errors will tell you all you need to debug it. Per default WebGL doesn't tell you much about it, you have to query all the information you need yourself.
0 Comments
Leave a Reply. |