Anonymous's picture

TexCoordPointer creates StackOverflow

Project:The Open Toolkit library
Version:1.0-beta-3
Component:Code
Category:bug report
Priority:critical
Assigned:Unassigned
Status:closed
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

Comment viewing options

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

#1

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

the Fiddler's picture

#2

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

Thanks for catching this, fixed in r2563.

Vogi's picture

#3

Thanks for the fix!

the Fiddler's picture

#4

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

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