Skip to main content
gamedev.net
🔒 Locked

question about vertex buffer objects

Started by madRenEGadE Jul 1, 2007 at 9:44 AM 0 replies 500+ views
Original Post
madRenEGadE
madRenEGadE
Hello I have the following question. I have the following struct:

struct my_vertex
{
float u, v; // tex coords
float nx, ny, nz; // normal
float x, y, z; // position
};
With vertex arrays and glInterleavedArrays it is possible to render an array of my_vertex. But how can I do this with vertex buffer objects instead of vertex arrays?
Ingrater
Ingrater
Exactly the same as with vertex arrays. Additionally you have to enable certain client states like GL_VERTEX_ARRAY, GL_NORMAL_ARRAY, GL_TEXCOORD_ARRAY. Look on nehes tutorial 45 for further explanation.
http://nehe.gamedev.net/data/lessons/lesson.asp?lesson=45
http://3d.benjamin-thaut.de

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.