Implemented vertex arrays, prob. rendering

This is a discussion on Implemented vertex arrays, prob. rendering within the Game Programming forums, part of the General Programming Boards category; I got interested in Shamino's perpetual plight to implement a central data format. Subsequently, I implemented a mechanism for my ...

Implemented vertex arrays, prob. rendering

I got interested in Shamino's perpetual plight to implement a central data format. Subsequently, I implemented a mechanism for my 'own' basic layout that can be rendered using vertex arrays.

Now, as far as I can see I've gotten things to work, but when I render everything using glVertex/TexCoord pointer and then glDrawArrays, I can an exception in my ATI driver (accessing something it shouldn't be). When I render the data 'manually' using 'stop and start' immediate mode GL, it renders fine, meaning that the data is 'correct.' Somewhere, I'm goofing up bigtime.

All I can suggest is making sure you called glEnable(GL_VERTEX_ARRAY) before rendering (if not, this could perhaps create an access violation as you described?), and perhaps seeing if OpenGL returns any errors in addition to the driver exception.

I've never bothered with vertex arrays, so I can't be of much help here.

I meant it was stupid as in the solution was obvious, and further agravated by the fact that, as bubba mentioned, this is already implemented in the dx API. I was not trying to say that this was an easy problem to solve, in general.