Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Newbish Question regarding texturing VBOs



Am Mittwoch, 31. Oktober 2007 21:14:25 schrieb vade:

> So, in short, how does one specify texture coordinates for the
> glDrawElements without using interleaved buffers? Apologies if this is
> self evident, this is a bit deeper into OpenGL than I normally go.
If I understand it correctly, using two vbos might be helpful: Create one vbo 
with position data, and one with the texture coordinates, then load the 
vertex streams like this:

glBindBuffer(positionVBO);
glVertexPointer(...);
glBindBuffer(textureVBO);
glTexCoordPointer(...);

It is no issue to source two vbos, and glBindBuffer is designed to be cheap to 
allow exactly what the code above does. In this case you can have different 
strides of the elements in both buffers and don't have to care about the 
position data when rendering out your texcoords. The texcoords can be packed 
in any way you want them.

Attachment: signature.asc
Description: This is a digitally signed message part.

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Mac-opengl mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/mac-opengl/email@hidden

This email sent to email@hidden

References: 
 >Newbish Question regarding texturing VBOs (From: vade <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.