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

Vertex Array

This topic is 5437 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

Hi! I want to make a CVertexArray class. The basics of the design are clear, but i have 2 questions. 1. Is ist good to use a std::vector to represent e.g. vertrices of this vertex array? class CVertexArray { ... protected: std::vector m_Vertices3f; } or is it better to make it so: class CVertexArray { ... protected: float* m_Vertices3f; } Which of this two solutiins are faster? 2. There are many extensions for vertex arrays I have seen. Now could any one tell me wich are very usefull? I use yet GL_EXT_compiled_vertex_array.

Share this post

Link to post
Share on other sites
1. As far as I know, use of std::vector for vrtices is problematic. In both memory and speed.. (I hope stl guys don't flame me for that)

I would rather use a vertex class for that, such as

class CVertex3D
float x, y, z;

EDIT: code tags..

[edited by - mentat on January 28, 2003 7:52:14 AM]

Share this post

Link to post
Share on other sites