View Full Version : GLTriangleBatch messin' with my bunny mesh

08-11-2012, 06:44 AM
Hi guys. Got a little problem. I downloaded some meshes of a rabbit figure, wrote a program to render the meshes, and every mesh renders just fine until I get to the highest resolution mesh. Its all screwed up. Take a look at what I'm talking about below.

Here is the lower resolution mesh:


Now here is the higher resolution mesh:


What's going on here? You think maybe I'm just throwing too many vertices at GLTriangleBatch? I think that is what the problem is but I'm not sure. Any ideas guys? Oh, one other thing. When I attempt to render to higher resolution mesh the program stops catching my keystrokes and I have to exit the program by killing it with task manager. So, I'm thinking maybe I'm just trying to do too much.

08-11-2012, 07:33 PM
I had a quick look at the code in GLTriangleBatch; it doesn't seem to check for out of memory when the the temporary buffers are allocated. You might want to put a check in there. It is also possible that your mesh data has errors in it. Try loading the mesh into something like Blender just to make sure the mesh is ok.

08-11-2012, 09:41 PM
Thanks tonyo_au! I think you were right. GLTriangleBatch was running out of memory. So, I decided to write code to render the mesh myself and now its working fine. It's even faster too. Well, thanks again!