
GL.DrawElements() crashs when using a big array.
Posted Wednesday, 2 June, 2010 - 15:28 by Ricardo.Bueno inHello, folks.
I`m developing an application that draws a ruge triangulated points cloud using OpenTK.
Take a look at this code:
...
GL.DrawElements( BeginMode.Triangles, triangles.Count, DrawElementsType.UnsignedInt, triangles.ToArray() );
...
When the execution reaches this line, my program crashes and tells me that vshost.exe stopped to work.
Details of the call:
triangles.Count = 9.999.999
triangles.ToArray() return a reference, because is a customized List, so it does not return a copy, like the default c# List.
My environment:
Windows 7 64 bits
Visual Studio 2010 Express
Does anyone knows if exists some limits of memory usage on DrawElements()?
Maybe OpenTK has the 32bit memory limit?!
Thanks
Ricardo Bueno
CharPointer


Comments
Re: GL.DrawElements() crashs when using a big array.
The example here is for DrawArrays, but it's the same problem as with your DrawElements.
http://www.opentk.com/node/296
And the solution (VBO) is the same aswell.