HoangHuyNguyen / pixelcity

Automatically exported from code.google.com/p/pixelcity
0 stars 0 forks source link

Crash in Visual Studio 2008 (vertex index out of range in CMesh::Render) #23

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Reproducible crash in VS.NET 2008, due to vertex index out of range when
rendering quad strips in CMesh::Render() function.

Believe this is due to indices generated in CBuilding::CreateSimple() - it
generates 11 indices, but only has 10 vertices. Fixed this by changing loop
condition from i<=10 to i<10.

Please see attached diff which seems to fix the problem. Also fixes a minor
warning about uninitialised variable addon in CBuilding::ConstructRoof

Seems fine now - very cool demo!

Original issue reported on code.google.com by jam3sward on 16 Jun 2009 at 9:49

Attachments:

GoogleCodeExporter commented 9 years ago
Good fixes, tested and confirmed fixed in VS.NET 2008. Probably good to merged 
onto the 
trunk.

Original comment by FluffyFr...@googlemail.com on 29 Apr 2010 at 10:29