Archived

This topic is now archived and is closed to further replies.

Vertex Range with Texture coords

This topic is 5981 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Well, Obelix, for a moment I was glad to see at least someone had an answer. but i don''t see how you can do it like you suggested.

the call for drawing the vertex array range is
glDrawElements(GL_TRIANGLES,3*m_NumTriangles,GL_UNSIGNED_INT,pVertexIndices);
I don''t see a place for texture co-ordinates in this one.

memory(pVertexIndices) is interleaved as :
// normal(x-y-z)-Vertex(x-y-z)-normal(x-y-z)...... ,
the memory is allocated with wglAllocateMemoryNV.
I don''t see a place for texture co-ordinates in this one either.

Wait a minute, do you think I should be using GL_T2F_N3F_V3F with glInterleavedArrays.....so my memory structure is now
//texture(x-y)-vertex(x-y-z)-normal(x-y-z)...
yeah that''s it....

hey Obelix,Appreciate it
thanks a lot
NeoGl

Share this post


Link to post
Share on other sites
From this nvidia document
http://partners.nvidia.com/Marketing/Developer/DevRel.nsf/bookmark/D1C924B3E02A1F9B8825692E007FE245
"...define the vertex array pointers, just like normal. Use one of the
glInterleavedArrays formats, or use glVertexPointer, glNormalPointer, etc."

Share this post


Link to post
Share on other sites