Sign in to follow this  
guvidu

VBO and indexed vertexes

Recommended Posts

Hy there. Maybe you can help me with this and tell me whats the best way of rendering my objects. i have the vertexes put in an array "vertexes" i have the textures and normals also put in their own arrays. and i have the indexes of the vertexes. what im doing now is like this: at initialization compute a vector<CVector3> verts with all the vertexes push_back based on de indexes... - so from 200 "vertexes" i now have like 600 put in the vector "verts". afther that compute a VBO - clear the vector "verts" and render the VBO. what i want is to pass the "vertexes" to the vbo not the "verts" - so instead of passing 600 just pass 200. and then render based on the indexes. i tried this with glVertexPointer(....vertexes); glDrawElements(..... indexes); but that doesnt give me performance; so i may be doing something wrong. Can you guys help me? pls forgive my english:) 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