Imagination PowerVR SDK Blog

Using VBO in glVertexAttribPointerARB


#1

Hi,


Please reference thread “Using VBO in glVertexAttribPointerARB” for this question. Can I use VBO with textures in glVertexAttribPointerARB on iPhone OpenGL ES 1.1?


#2

Hiya,

Create and initialise your VBO using glGenBuffers/glBufferData/glBindBuffer. You can then set up vertex attributes using glVertexPointer/glNormalPointer/glTexCoordPointer/glColorPointer. For multiple sets of texture coordinates use glClientActiveTexture. Note that when using VBOs the ‘pointer’ argument in gl[ … ]Pointer is an offset into your vertex structure rather than a pointer to the start of the data.

As Carlos says in the other thread you mention, there are several SDK examples that demonstrate this. If you need specific information about any of the functions mentioned you may find this link helpful:

http://www.khronos.org/opengles/sdk/1.1/docs/man/

I hope this helps.

Pete


#3

You can but it won’t make any difference on the iPhone …

 

In fact , I stopped using VBOs because they don't really offer any benefit on that platform at this point, and only make harder to perform per-frame vertex data updates ( on the CPU side)

 

#4

We recommend use of VBOs because there may be a benefit in using them on other or future platforms (or even with an update in the iPhone drivers). At the moment, on iPhone, I believe warmi’s correct.