Anonymous's picture

TexCoordPointer creates StackOverflow

Project:The Open Toolkit library
Category:bug report

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));


Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Vogi's picture


This was posted by me (Vogi). If you have questions about this issue, feel free to contact me.

the Fiddler's picture


Version:1.0-beta-2» 0.9.x-dev
Status:open» fixed

Thanks for catching this, fixed in r2563.

Vogi's picture


Thanks for the fix!

the Fiddler's picture


Version:0.9.x-dev» 1.0-beta-3
Status:fixed» closed

Closing issues fixed in opentk-1.0-beta-3.