[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Public WebGL] Issue with enable vertex attributes and re-binding VBOs

Thanks Ken,

I got it working fine, I just couldn't quite understand why...

I work largely on my own, so sometimes its possible to not quite see something. Your answer together with Vlad's earlier answer have now clarified things for me.



On 08/16/2010 02:01 PM, Kenneth Waters wrote:

If I'm understanding you correctly this is the intended behavior; and OpenGL 3 works the same way. BindBuffer(ARRAY_BUFFER, ) only sets the ARRAY_BUFFER state, it does not change where data is going to be fetched from. When you call VertexAttribPointer it binds the current ARRAY_BUFFER to that attribute. This allows you to take attributes from multiple different VBOs in one draw call.

If you only call BindBuffer and not VertexAttribPointer you will continue to fetch from the buffer that was bound when you called VertexAttribPointer.

-- Kenneth Waters

----------------------------------------------------------- You are currently subscribed to public_webgl@khronos.org. To unsubscribe, send an email to majordomo@khronos.org with the following command in the body of your email: