OpenGL VBO

This is a discussion on OpenGL VBO within the Game Programming forums, part of the General Programming Boards category; I've been working on a Mesh class that loads and renders Wavefront Studio OBJ files. And I've gotten it to ...

OpenGL VBO

I've been working on a Mesh class that loads and renders Wavefront Studio OBJ files. And I've gotten it to correctly load the data and seemingly correctly insert it into a VBO. But I can't get it to render correctly. Everytime it calls glDrawArrays(), the window closes and the program crashes.

After a few hours of fiddling around and rewriting it different ways, I thought I'd upload it here and see what stupid thing I'm doing wrong.

I think I'm going to rewrite what little my engine consists of from scratch - have the mesh class consist of just the parts that handle storing, rendering, and maybe animating of meshes. Then spread out other functions to other classes. Like a MeshLoader class.