sufficient size in bound vertex attribute

Hi,

I'm trying to map the texture to the sphere. However, the webgl only show me the black block without any object. When I check it using firefox, I find out many errors.

For example:
DrawElements: bound vertex attribute buffers do not have sufficient size for given indices from the bound element array
No VBO bound to enabled attrib index 1!
Uniformli: Location: null object passed as argument

I want to know what situation will the webgl show these errors. How can I solve them?

I don’t know much about WebGL, but these sound very much like the browser reporting errors in your code.

DrawElements: bound vertex attribute buffers do not have sufficient size for given indices from the bound element array

Would seem to indicate that you are using an index that is larger than the size of (one of) the vertex attribute buffers.

No VBO bound to enabled attrib index 1

Which may be related to this one, which seems to say you have enabled vertex attribute 1, but not bound a VBO as data source to it.

Uniformli: Location: null object passed as argument

My guess is you are trying to set a uniform’s value, but since the shader did not compile/link, querying the uniform’s location already failed and returned an invalid (null) value.