
TexCoordPointer creates StackOverflow
Posted Sunday, 13 December, 2009 - 23:45 by Anonymous| Project: | The Open Toolkit library |
| Version: | 1.0-beta-3 |
| Component: | Code |
| Category: | bug report |
| Priority: | critical |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
Description
Using the GL.TexCoordPointer(int, TexCoordPointerType, int, int) creates a stack-overflow in my code (see below).
If I use the other overloaded function GL.TexCoordPointer(int, TexCoordPointerType, int, IntPtr) it works.
An OpenTK-bug?
// --- CODE ---
GL.GenBuffers(1, out tcHandle);
GL.BindBuffer(BufferTarget.ArrayBuffer, tcHandle);
GL.BufferData(BufferTarget.ArrayBuffer, new IntPtr(texCoordArray.Length * sizeof(Single)),
texCoordArray, BufferUsageHint.StaticDraw);
// this creates a stack-overflow:
GL.TexCoordPointer(2, TexCoordPointerType.Float, 0, 0);
// working version:
GL.TexCoordPointer(2, TexCoordPointerType.Float, 0, new IntPtr(0));


Comments
#1
This was posted by me (Vogi). If you have questions about this issue, feel free to contact me.
#2
Thanks for catching this, fixed in r2563.
#3
Thanks for the fix!
#4
Closing issues fixed in opentk-1.0-beta-3.