kanato's picture

Add overloads for TexCoordPointer and NormalPointer

Project:The Open Toolkit library
Version:1.0-beta-2
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:closed
Description

GL.VertexPointer, GL.ColorPointer and GL.IndexPointer have an overload where the last parameter is an int, which is cast to an IntPtr internally. GL.TexCoordPointer and GL.NormalPointer should have equivalent overloads, but they are missing from the 1.0 beta branch. Also, it might be prudent to have a similar overload for GL.DrawElements as well.


Comments

Comment viewing options

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

#1

Version:1.x-dev» 0.9.x-dev
Status:open» confirmed

A NormalPointer overload actually exists, but its signature is invalid. I am going to consider this a bug and fix it both in 1.0 and trunk.

Historic notes: these overloads were added at a time when passing an int would cause an immediate crash. Now that OpenTK is using generics rather than object parameters, you can no longer pass an int by mistake, making these overloads less useful.

Still, it would be nice to have symmetry in the bindings, which is why I am considering this a bug.

the Fiddler's picture

#2

Status:confirmed» fixed

Committed to branches/1.0 and trunk (r2536).

the Fiddler's picture

#3

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

Closing issues fixed in 1.0 beta-2.