Sign in to follow this  

Multitexturing with vertex buffer object

Recommended Posts

Hi, I'm trying to do multi texture with vbo, but I ran into this and I'm not sure how to go about it. let say my vertex is: struct Vertex { float x, y, z; DWORD specularColor; float nx, ny, nz; float tu, tv; float tu2, tv2; }; the problem comes when I need to specify the array pointers as well as enable/disable clientstate. glVertexPointer(3, GL_FLOAT, stride, BUFFER_OFFSET(0)); glSecondaryColorPointer(4, GL_UNSIGNED_BYTE, stride, BUFFER_OFFSET(12)); glNormalPointer(GL_FLOAT, stride, BUFFER_OFFSET(16)); glTexCoordPointer(2, GL_FLOAT, stride, BUFFER_OFFSET(28)); then I'm not sure how to specify for the last set of texture coordinate. The same goes for enable client state: glEnableClientState(GL_VERTEX_ARRAY); glEnableClientState(GL_SECONDARY_COLOR_ARRAY_EXT); glEnableClientState(GL_NORMAL_ARRAY); glEnableClientState(GL_TEXTURE_COORD_ARRAY); I'm just not sure what I need to set for the last set of texture coordinate. Appreciate any help and info on this. Thanks.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this