I'm having trouble rendering a pretty large VBO of quads. This code appears to work fine on small meshes, yet when I try to render pretty large ones(58997 quads) from a single VBO it crashes specifically in
glDrawArrays( it->second.mType, 0, it->second.mNumPrimitives * it->second.mNumVertsPerPrimitive );
No call stack, just a single random address in the callstack window and the output windows shows
First-chance exception at 0x003ff829 in ET.exe: 0xC0000005: Access violation reading location 0x01e27000.Unhandled exception at 0x003ff829 in ET.exe: 0xC0000005: Access violation reading location 0x01e27000.
If I remove for example the * it->second.mNumVertsPerPrimitive from the glDrawArrays I don't see the whole mesh.
Here's my construction and rendering code. Since I always get confused about whether various parameters means number of geometric primtives(quad, triangle, etc), or number of floats, I'm trying to wrap the VBO creation and rendering in some helper functions to hide it.
And the drawing code