BlazeCell - 2012-07-23

Hello all.

I'm using an Assimp::Importer object to load my meshes into my OpenGL engine. I've currently run into an issue where I get random "Access Violation Exceptions" when glDrawElements() is called on the meshes after buffering them into VBOs and IBOs. It's random in that sometimes the mesh buffers and renders fine, other times it doesn't.

As best as I can tell, it appears to be an issue with having VBOs that are too large, so I decided to take advantage of Assimp's aiProcess_SplitLargeMeshes post-process option and have defined AI_CONFIG_PP_SLM_VERTEX_LIMIT to be 25,000 (25,000 vertices * 48 bytes = 1,200,000 bytes) and AI_CONFIG_PP_SLM_TRIANGLE_LIMIT to be 21845 (65535 indices / 3 indices per tri = 21845 triangles). But unfortunately, it appears that my meshes aren't coming out any smaller. I still have meshes allocating VBOs with sizes of 1,915,200 bytes when my target is 1,200,000 bytes.

Maybe my defines are getting overridden? Maybe there's a bug with this option?

Any guidance with this issue and how I should properly be using this post-process option would be most appreciated.