Tuesday, September 10, 2013

OpenGL Model Class requirements

OpenGL Model Class requirements

I've been wondering this for a while when loading in your mesh and
textures and whatnot in your model class, what do you keep? I figure once
the vertices are passed with glBufferData() I don't need them anymore,
since the call to glDrawArrays() depends on the last glBindBuffer() This
is all my Model class keeps after the loadModel() method is called.
GLuint vboID;//for... something
GLuint vaoID;//for glBindVertexArray(vaoID);
GLuint textureID;//for glBindTexture(GL_TEXTRUE2D, textureID);
GLuint vboElementCount;//for glDrawArrays(GL_TRIANGLES,0,vboElementCount);
From what I can tell that would be all I need to render a model. Other
then that what else should I keep for a simple model?

No comments:

Post a Comment