Updated the bindings with the latest generator revision.

This commit is contained in:
the_fiddler 2008-01-15 09:33:28 +00:00
parent d5961d3b8a
commit baf9b4d648
4 changed files with 167 additions and 94 deletions

View file

@ -2,8 +2,10 @@ namespace OpenTK.OpenGL
{ {
using System; using System;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
#pragma warning disable 3019
#pragma warning disable 1591
public static partial class Glu static partial class Glu
{ {
public static public static
@ -33,120 +35,156 @@ namespace OpenTK.OpenGL
public static public static
Int32 Build1DMipmapLevel(OpenTK.OpenGL.Enums.TextureTarget target, Int32 internalFormat, Int32 width, OpenTK.OpenGL.Enums.PixelFormat format, OpenTK.OpenGL.Enums.PixelType type, Int32 level, Int32 @base, Int32 max, IntPtr data) Int32 Build1DMipmapLevel(OpenTK.OpenGL.Enums.TextureTarget target, Int32 internalFormat, Int32 width, OpenTK.OpenGL.Enums.PixelFormat format, OpenTK.OpenGL.Enums.PixelType type, Int32 level, Int32 @base, Int32 max, IntPtr data)
{ {
return Delegates.gluBuild1DMipmapLevels((OpenTK.OpenGL.Enums.TextureTarget)target, (Int32)internalFormat, (Int32)width, (OpenTK.OpenGL.Enums.PixelFormat)format, (OpenTK.OpenGL.Enums.PixelType)type, (Int32)level, (Int32)@base, (Int32)max, (IntPtr)data); unsafe
{
return Delegates.gluBuild1DMipmapLevels((OpenTK.OpenGL.Enums.TextureTarget)target, (Int32)internalFormat, (Int32)width, (OpenTK.OpenGL.Enums.PixelFormat)format, (OpenTK.OpenGL.Enums.PixelType)type, (Int32)level, (Int32)@base, (Int32)max, (IntPtr)data);
}
} }
public static public static
Int32 Build1DMipmapLevel(OpenTK.OpenGL.Enums.TextureTarget target, Int32 internalFormat, Int32 width, OpenTK.OpenGL.Enums.PixelFormat format, OpenTK.OpenGL.Enums.PixelType type, Int32 level, Int32 @base, Int32 max, [In, Out] object data) Int32 Build1DMipmapLevel(OpenTK.OpenGL.Enums.TextureTarget target, Int32 internalFormat, Int32 width, OpenTK.OpenGL.Enums.PixelFormat format, OpenTK.OpenGL.Enums.PixelType type, Int32 level, Int32 @base, Int32 max, [In, Out] object data)
{ {
System.Runtime.InteropServices.GCHandle data_ptr = System.Runtime.InteropServices.GCHandle.Alloc(data, System.Runtime.InteropServices.GCHandleType.Pinned); unsafe
try
{ {
return Delegates.gluBuild1DMipmapLevels((OpenTK.OpenGL.Enums.TextureTarget)target, (Int32)internalFormat, (Int32)width, (OpenTK.OpenGL.Enums.PixelFormat)format, (OpenTK.OpenGL.Enums.PixelType)type, (Int32)level, (Int32)@base, (Int32)max, (IntPtr)data_ptr.AddrOfPinnedObject()); System.Runtime.InteropServices.GCHandle data_ptr = System.Runtime.InteropServices.GCHandle.Alloc(data, System.Runtime.InteropServices.GCHandleType.Pinned);
} try
finally {
{ return Delegates.gluBuild1DMipmapLevels((OpenTK.OpenGL.Enums.TextureTarget)target, (Int32)internalFormat, (Int32)width, (OpenTK.OpenGL.Enums.PixelFormat)format, (OpenTK.OpenGL.Enums.PixelType)type, (Int32)level, (Int32)@base, (Int32)max, (IntPtr)data_ptr.AddrOfPinnedObject());
data_ptr.Free(); }
finally
{
data_ptr.Free();
}
} }
} }
public static public static
Int32 Build1DMipmap(OpenTK.OpenGL.Enums.TextureTarget target, Int32 internalFormat, Int32 width, OpenTK.OpenGL.Enums.PixelFormat format, OpenTK.OpenGL.Enums.PixelType type, IntPtr data) Int32 Build1DMipmap(OpenTK.OpenGL.Enums.TextureTarget target, Int32 internalFormat, Int32 width, OpenTK.OpenGL.Enums.PixelFormat format, OpenTK.OpenGL.Enums.PixelType type, IntPtr data)
{ {
return Delegates.gluBuild1DMipmaps((OpenTK.OpenGL.Enums.TextureTarget)target, (Int32)internalFormat, (Int32)width, (OpenTK.OpenGL.Enums.PixelFormat)format, (OpenTK.OpenGL.Enums.PixelType)type, (IntPtr)data); unsafe
{
return Delegates.gluBuild1DMipmaps((OpenTK.OpenGL.Enums.TextureTarget)target, (Int32)internalFormat, (Int32)width, (OpenTK.OpenGL.Enums.PixelFormat)format, (OpenTK.OpenGL.Enums.PixelType)type, (IntPtr)data);
}
} }
public static public static
Int32 Build1DMipmap(OpenTK.OpenGL.Enums.TextureTarget target, Int32 internalFormat, Int32 width, OpenTK.OpenGL.Enums.PixelFormat format, OpenTK.OpenGL.Enums.PixelType type, [In, Out] object data) Int32 Build1DMipmap(OpenTK.OpenGL.Enums.TextureTarget target, Int32 internalFormat, Int32 width, OpenTK.OpenGL.Enums.PixelFormat format, OpenTK.OpenGL.Enums.PixelType type, [In, Out] object data)
{ {
System.Runtime.InteropServices.GCHandle data_ptr = System.Runtime.InteropServices.GCHandle.Alloc(data, System.Runtime.InteropServices.GCHandleType.Pinned); unsafe
try
{ {
return Delegates.gluBuild1DMipmaps((OpenTK.OpenGL.Enums.TextureTarget)target, (Int32)internalFormat, (Int32)width, (OpenTK.OpenGL.Enums.PixelFormat)format, (OpenTK.OpenGL.Enums.PixelType)type, (IntPtr)data_ptr.AddrOfPinnedObject()); System.Runtime.InteropServices.GCHandle data_ptr = System.Runtime.InteropServices.GCHandle.Alloc(data, System.Runtime.InteropServices.GCHandleType.Pinned);
} try
finally {
{ return Delegates.gluBuild1DMipmaps((OpenTK.OpenGL.Enums.TextureTarget)target, (Int32)internalFormat, (Int32)width, (OpenTK.OpenGL.Enums.PixelFormat)format, (OpenTK.OpenGL.Enums.PixelType)type, (IntPtr)data_ptr.AddrOfPinnedObject());
data_ptr.Free(); }
finally
{
data_ptr.Free();
}
} }
} }
public static public static
Int32 Build2DMipmapLevel(OpenTK.OpenGL.Enums.TextureTarget target, Int32 internalFormat, Int32 width, Int32 height, OpenTK.OpenGL.Enums.PixelFormat format, OpenTK.OpenGL.Enums.PixelType type, Int32 level, Int32 @base, Int32 max, IntPtr data) Int32 Build2DMipmapLevel(OpenTK.OpenGL.Enums.TextureTarget target, Int32 internalFormat, Int32 width, Int32 height, OpenTK.OpenGL.Enums.PixelFormat format, OpenTK.OpenGL.Enums.PixelType type, Int32 level, Int32 @base, Int32 max, IntPtr data)
{ {
return Delegates.gluBuild2DMipmapLevels((OpenTK.OpenGL.Enums.TextureTarget)target, (Int32)internalFormat, (Int32)width, (Int32)height, (OpenTK.OpenGL.Enums.PixelFormat)format, (OpenTK.OpenGL.Enums.PixelType)type, (Int32)level, (Int32)@base, (Int32)max, (IntPtr)data); unsafe
{
return Delegates.gluBuild2DMipmapLevels((OpenTK.OpenGL.Enums.TextureTarget)target, (Int32)internalFormat, (Int32)width, (Int32)height, (OpenTK.OpenGL.Enums.PixelFormat)format, (OpenTK.OpenGL.Enums.PixelType)type, (Int32)level, (Int32)@base, (Int32)max, (IntPtr)data);
}
} }
public static public static
Int32 Build2DMipmapLevel(OpenTK.OpenGL.Enums.TextureTarget target, Int32 internalFormat, Int32 width, Int32 height, OpenTK.OpenGL.Enums.PixelFormat format, OpenTK.OpenGL.Enums.PixelType type, Int32 level, Int32 @base, Int32 max, [In, Out] object data) Int32 Build2DMipmapLevel(OpenTK.OpenGL.Enums.TextureTarget target, Int32 internalFormat, Int32 width, Int32 height, OpenTK.OpenGL.Enums.PixelFormat format, OpenTK.OpenGL.Enums.PixelType type, Int32 level, Int32 @base, Int32 max, [In, Out] object data)
{ {
System.Runtime.InteropServices.GCHandle data_ptr = System.Runtime.InteropServices.GCHandle.Alloc(data, System.Runtime.InteropServices.GCHandleType.Pinned); unsafe
try
{ {
return Delegates.gluBuild2DMipmapLevels((OpenTK.OpenGL.Enums.TextureTarget)target, (Int32)internalFormat, (Int32)width, (Int32)height, (OpenTK.OpenGL.Enums.PixelFormat)format, (OpenTK.OpenGL.Enums.PixelType)type, (Int32)level, (Int32)@base, (Int32)max, (IntPtr)data_ptr.AddrOfPinnedObject()); System.Runtime.InteropServices.GCHandle data_ptr = System.Runtime.InteropServices.GCHandle.Alloc(data, System.Runtime.InteropServices.GCHandleType.Pinned);
} try
finally {
{ return Delegates.gluBuild2DMipmapLevels((OpenTK.OpenGL.Enums.TextureTarget)target, (Int32)internalFormat, (Int32)width, (Int32)height, (OpenTK.OpenGL.Enums.PixelFormat)format, (OpenTK.OpenGL.Enums.PixelType)type, (Int32)level, (Int32)@base, (Int32)max, (IntPtr)data_ptr.AddrOfPinnedObject());
data_ptr.Free(); }
finally
{
data_ptr.Free();
}
} }
} }
public static public static
Int32 Build2DMipmap(OpenTK.OpenGL.Enums.TextureTarget target, Int32 internalFormat, Int32 width, Int32 height, OpenTK.OpenGL.Enums.PixelFormat format, OpenTK.OpenGL.Enums.PixelType type, IntPtr data) Int32 Build2DMipmap(OpenTK.OpenGL.Enums.TextureTarget target, Int32 internalFormat, Int32 width, Int32 height, OpenTK.OpenGL.Enums.PixelFormat format, OpenTK.OpenGL.Enums.PixelType type, IntPtr data)
{ {
return Delegates.gluBuild2DMipmaps((OpenTK.OpenGL.Enums.TextureTarget)target, (Int32)internalFormat, (Int32)width, (Int32)height, (OpenTK.OpenGL.Enums.PixelFormat)format, (OpenTK.OpenGL.Enums.PixelType)type, (IntPtr)data); unsafe
{
return Delegates.gluBuild2DMipmaps((OpenTK.OpenGL.Enums.TextureTarget)target, (Int32)internalFormat, (Int32)width, (Int32)height, (OpenTK.OpenGL.Enums.PixelFormat)format, (OpenTK.OpenGL.Enums.PixelType)type, (IntPtr)data);
}
} }
public static public static
Int32 Build2DMipmap(OpenTK.OpenGL.Enums.TextureTarget target, Int32 internalFormat, Int32 width, Int32 height, OpenTK.OpenGL.Enums.PixelFormat format, OpenTK.OpenGL.Enums.PixelType type, [In, Out] object data) Int32 Build2DMipmap(OpenTK.OpenGL.Enums.TextureTarget target, Int32 internalFormat, Int32 width, Int32 height, OpenTK.OpenGL.Enums.PixelFormat format, OpenTK.OpenGL.Enums.PixelType type, [In, Out] object data)
{ {
System.Runtime.InteropServices.GCHandle data_ptr = System.Runtime.InteropServices.GCHandle.Alloc(data, System.Runtime.InteropServices.GCHandleType.Pinned); unsafe
try
{ {
return Delegates.gluBuild2DMipmaps((OpenTK.OpenGL.Enums.TextureTarget)target, (Int32)internalFormat, (Int32)width, (Int32)height, (OpenTK.OpenGL.Enums.PixelFormat)format, (OpenTK.OpenGL.Enums.PixelType)type, (IntPtr)data_ptr.AddrOfPinnedObject()); System.Runtime.InteropServices.GCHandle data_ptr = System.Runtime.InteropServices.GCHandle.Alloc(data, System.Runtime.InteropServices.GCHandleType.Pinned);
} try
finally {
{ return Delegates.gluBuild2DMipmaps((OpenTK.OpenGL.Enums.TextureTarget)target, (Int32)internalFormat, (Int32)width, (Int32)height, (OpenTK.OpenGL.Enums.PixelFormat)format, (OpenTK.OpenGL.Enums.PixelType)type, (IntPtr)data_ptr.AddrOfPinnedObject());
data_ptr.Free(); }
finally
{
data_ptr.Free();
}
} }
} }
public static public static
Int32 Build3DMipmapLevel(OpenTK.OpenGL.Enums.TextureTarget target, Int32 internalFormat, Int32 width, Int32 height, Int32 depth, OpenTK.OpenGL.Enums.PixelFormat format, OpenTK.OpenGL.Enums.PixelType type, Int32 level, Int32 @base, Int32 max, IntPtr data) Int32 Build3DMipmapLevel(OpenTK.OpenGL.Enums.TextureTarget target, Int32 internalFormat, Int32 width, Int32 height, Int32 depth, OpenTK.OpenGL.Enums.PixelFormat format, OpenTK.OpenGL.Enums.PixelType type, Int32 level, Int32 @base, Int32 max, IntPtr data)
{ {
return Delegates.gluBuild3DMipmapLevels((OpenTK.OpenGL.Enums.TextureTarget)target, (Int32)internalFormat, (Int32)width, (Int32)height, (Int32)depth, (OpenTK.OpenGL.Enums.PixelFormat)format, (OpenTK.OpenGL.Enums.PixelType)type, (Int32)level, (Int32)@base, (Int32)max, (IntPtr)data); unsafe
{
return Delegates.gluBuild3DMipmapLevels((OpenTK.OpenGL.Enums.TextureTarget)target, (Int32)internalFormat, (Int32)width, (Int32)height, (Int32)depth, (OpenTK.OpenGL.Enums.PixelFormat)format, (OpenTK.OpenGL.Enums.PixelType)type, (Int32)level, (Int32)@base, (Int32)max, (IntPtr)data);
}
} }
public static public static
Int32 Build3DMipmapLevel(OpenTK.OpenGL.Enums.TextureTarget target, Int32 internalFormat, Int32 width, Int32 height, Int32 depth, OpenTK.OpenGL.Enums.PixelFormat format, OpenTK.OpenGL.Enums.PixelType type, Int32 level, Int32 @base, Int32 max, [In, Out] object data) Int32 Build3DMipmapLevel(OpenTK.OpenGL.Enums.TextureTarget target, Int32 internalFormat, Int32 width, Int32 height, Int32 depth, OpenTK.OpenGL.Enums.PixelFormat format, OpenTK.OpenGL.Enums.PixelType type, Int32 level, Int32 @base, Int32 max, [In, Out] object data)
{ {
System.Runtime.InteropServices.GCHandle data_ptr = System.Runtime.InteropServices.GCHandle.Alloc(data, System.Runtime.InteropServices.GCHandleType.Pinned); unsafe
try
{ {
return Delegates.gluBuild3DMipmapLevels((OpenTK.OpenGL.Enums.TextureTarget)target, (Int32)internalFormat, (Int32)width, (Int32)height, (Int32)depth, (OpenTK.OpenGL.Enums.PixelFormat)format, (OpenTK.OpenGL.Enums.PixelType)type, (Int32)level, (Int32)@base, (Int32)max, (IntPtr)data_ptr.AddrOfPinnedObject()); System.Runtime.InteropServices.GCHandle data_ptr = System.Runtime.InteropServices.GCHandle.Alloc(data, System.Runtime.InteropServices.GCHandleType.Pinned);
} try
finally {
{ return Delegates.gluBuild3DMipmapLevels((OpenTK.OpenGL.Enums.TextureTarget)target, (Int32)internalFormat, (Int32)width, (Int32)height, (Int32)depth, (OpenTK.OpenGL.Enums.PixelFormat)format, (OpenTK.OpenGL.Enums.PixelType)type, (Int32)level, (Int32)@base, (Int32)max, (IntPtr)data_ptr.AddrOfPinnedObject());
data_ptr.Free(); }
finally
{
data_ptr.Free();
}
} }
} }
public static public static
Int32 Build3DMipmap(OpenTK.OpenGL.Enums.TextureTarget target, Int32 internalFormat, Int32 width, Int32 height, Int32 depth, OpenTK.OpenGL.Enums.PixelFormat format, OpenTK.OpenGL.Enums.PixelType type, IntPtr data) Int32 Build3DMipmap(OpenTK.OpenGL.Enums.TextureTarget target, Int32 internalFormat, Int32 width, Int32 height, Int32 depth, OpenTK.OpenGL.Enums.PixelFormat format, OpenTK.OpenGL.Enums.PixelType type, IntPtr data)
{ {
return Delegates.gluBuild3DMipmaps((OpenTK.OpenGL.Enums.TextureTarget)target, (Int32)internalFormat, (Int32)width, (Int32)height, (Int32)depth, (OpenTK.OpenGL.Enums.PixelFormat)format, (OpenTK.OpenGL.Enums.PixelType)type, (IntPtr)data); unsafe
{
return Delegates.gluBuild3DMipmaps((OpenTK.OpenGL.Enums.TextureTarget)target, (Int32)internalFormat, (Int32)width, (Int32)height, (Int32)depth, (OpenTK.OpenGL.Enums.PixelFormat)format, (OpenTK.OpenGL.Enums.PixelType)type, (IntPtr)data);
}
} }
public static public static
Int32 Build3DMipmap(OpenTK.OpenGL.Enums.TextureTarget target, Int32 internalFormat, Int32 width, Int32 height, Int32 depth, OpenTK.OpenGL.Enums.PixelFormat format, OpenTK.OpenGL.Enums.PixelType type, [In, Out] object data) Int32 Build3DMipmap(OpenTK.OpenGL.Enums.TextureTarget target, Int32 internalFormat, Int32 width, Int32 height, Int32 depth, OpenTK.OpenGL.Enums.PixelFormat format, OpenTK.OpenGL.Enums.PixelType type, [In, Out] object data)
{ {
System.Runtime.InteropServices.GCHandle data_ptr = System.Runtime.InteropServices.GCHandle.Alloc(data, System.Runtime.InteropServices.GCHandleType.Pinned); unsafe
try
{ {
return Delegates.gluBuild3DMipmaps((OpenTK.OpenGL.Enums.TextureTarget)target, (Int32)internalFormat, (Int32)width, (Int32)height, (Int32)depth, (OpenTK.OpenGL.Enums.PixelFormat)format, (OpenTK.OpenGL.Enums.PixelType)type, (IntPtr)data_ptr.AddrOfPinnedObject()); System.Runtime.InteropServices.GCHandle data_ptr = System.Runtime.InteropServices.GCHandle.Alloc(data, System.Runtime.InteropServices.GCHandleType.Pinned);
} try
finally {
{ return Delegates.gluBuild3DMipmaps((OpenTK.OpenGL.Enums.TextureTarget)target, (Int32)internalFormat, (Int32)width, (Int32)height, (Int32)depth, (OpenTK.OpenGL.Enums.PixelFormat)format, (OpenTK.OpenGL.Enums.PixelType)type, (IntPtr)data_ptr.AddrOfPinnedObject());
data_ptr.Free(); }
finally
{
data_ptr.Free();
}
} }
} }
@ -240,13 +278,19 @@ namespace OpenTK.OpenGL
public static public static
string ErrorString(OpenTK.OpenGL.Enums.GluErrorCode error) string ErrorString(OpenTK.OpenGL.Enums.GluErrorCode error)
{ {
return System.Runtime.InteropServices.Marshal.PtrToStringAnsi(Delegates.gluErrorString((OpenTK.OpenGL.Enums.GluErrorCode)error)); unsafe
{
return System.Runtime.InteropServices.Marshal.PtrToStringAnsi(Delegates.gluErrorString((OpenTK.OpenGL.Enums.GluErrorCode)error));
}
} }
public static public static
string GetString(OpenTK.OpenGL.Enums.GluStringName name) string GetString(OpenTK.OpenGL.Enums.GluStringName name)
{ {
return System.Runtime.InteropServices.Marshal.PtrToStringAnsi(Delegates.gluGetString((OpenTK.OpenGL.Enums.GluStringName)name)); unsafe
{
return System.Runtime.InteropServices.Marshal.PtrToStringAnsi(Delegates.gluGetString((OpenTK.OpenGL.Enums.GluStringName)name));
}
} }
public static public static
@ -387,20 +431,26 @@ namespace OpenTK.OpenGL
public static public static
void NurbsCallbackData(int nurb, IntPtr userData) void NurbsCallbackData(int nurb, IntPtr userData)
{ {
Delegates.gluNurbsCallbackData((int)nurb, (IntPtr)userData); unsafe
{
Delegates.gluNurbsCallbackData((int)nurb, (IntPtr)userData);
}
} }
public static public static
void NurbsCallbackData(int nurb, [In, Out] object userData) void NurbsCallbackData(int nurb, [In, Out] object userData)
{ {
System.Runtime.InteropServices.GCHandle userData_ptr = System.Runtime.InteropServices.GCHandle.Alloc(userData, System.Runtime.InteropServices.GCHandleType.Pinned); unsafe
try
{ {
Delegates.gluNurbsCallbackData((int)nurb, (IntPtr)userData_ptr.AddrOfPinnedObject()); System.Runtime.InteropServices.GCHandle userData_ptr = System.Runtime.InteropServices.GCHandle.Alloc(userData, System.Runtime.InteropServices.GCHandleType.Pinned);
} try
finally {
{ Delegates.gluNurbsCallbackData((int)nurb, (IntPtr)userData_ptr.AddrOfPinnedObject());
userData_ptr.Free(); }
finally
{
userData_ptr.Free();
}
} }
} }
@ -635,22 +685,28 @@ namespace OpenTK.OpenGL
public static public static
Int32 ScaleImage(OpenTK.OpenGL.Enums.PixelFormat format, Int32 wIn, Int32 hIn, OpenTK.OpenGL.Enums.PixelType typeIn, IntPtr dataIn, Int32 wOut, Int32 hOut, OpenTK.OpenGL.Enums.PixelType typeOut, [Out] IntPtr dataOut) Int32 ScaleImage(OpenTK.OpenGL.Enums.PixelFormat format, Int32 wIn, Int32 hIn, OpenTK.OpenGL.Enums.PixelType typeIn, IntPtr dataIn, Int32 wOut, Int32 hOut, OpenTK.OpenGL.Enums.PixelType typeOut, [Out] IntPtr dataOut)
{ {
return Delegates.gluScaleImage((OpenTK.OpenGL.Enums.PixelFormat)format, (Int32)wIn, (Int32)hIn, (OpenTK.OpenGL.Enums.PixelType)typeIn, (IntPtr)dataIn, (Int32)wOut, (Int32)hOut, (OpenTK.OpenGL.Enums.PixelType)typeOut, (IntPtr)dataOut); unsafe
{
return Delegates.gluScaleImage((OpenTK.OpenGL.Enums.PixelFormat)format, (Int32)wIn, (Int32)hIn, (OpenTK.OpenGL.Enums.PixelType)typeIn, (IntPtr)dataIn, (Int32)wOut, (Int32)hOut, (OpenTK.OpenGL.Enums.PixelType)typeOut, (IntPtr)dataOut);
}
} }
public static public static
Int32 ScaleImage(OpenTK.OpenGL.Enums.PixelFormat format, Int32 wIn, Int32 hIn, OpenTK.OpenGL.Enums.PixelType typeIn, [In, Out] object dataIn, Int32 wOut, Int32 hOut, OpenTK.OpenGL.Enums.PixelType typeOut, [In, Out] object dataOut) Int32 ScaleImage(OpenTK.OpenGL.Enums.PixelFormat format, Int32 wIn, Int32 hIn, OpenTK.OpenGL.Enums.PixelType typeIn, [In, Out] object dataIn, Int32 wOut, Int32 hOut, OpenTK.OpenGL.Enums.PixelType typeOut, [In, Out] object dataOut)
{ {
System.Runtime.InteropServices.GCHandle dataIn_ptr = System.Runtime.InteropServices.GCHandle.Alloc(dataIn, System.Runtime.InteropServices.GCHandleType.Pinned); unsafe
System.Runtime.InteropServices.GCHandle dataOut_ptr = System.Runtime.InteropServices.GCHandle.Alloc(dataOut, System.Runtime.InteropServices.GCHandleType.Pinned);
try
{ {
return Delegates.gluScaleImage((OpenTK.OpenGL.Enums.PixelFormat)format, (Int32)wIn, (Int32)hIn, (OpenTK.OpenGL.Enums.PixelType)typeIn, (IntPtr)dataIn_ptr.AddrOfPinnedObject(), (Int32)wOut, (Int32)hOut, (OpenTK.OpenGL.Enums.PixelType)typeOut, (IntPtr)dataOut_ptr.AddrOfPinnedObject()); System.Runtime.InteropServices.GCHandle dataIn_ptr = System.Runtime.InteropServices.GCHandle.Alloc(dataIn, System.Runtime.InteropServices.GCHandleType.Pinned);
} System.Runtime.InteropServices.GCHandle dataOut_ptr = System.Runtime.InteropServices.GCHandle.Alloc(dataOut, System.Runtime.InteropServices.GCHandleType.Pinned);
finally try
{ {
dataIn_ptr.Free(); return Delegates.gluScaleImage((OpenTK.OpenGL.Enums.PixelFormat)format, (Int32)wIn, (Int32)hIn, (OpenTK.OpenGL.Enums.PixelType)typeIn, (IntPtr)dataIn_ptr.AddrOfPinnedObject(), (Int32)wOut, (Int32)hOut, (OpenTK.OpenGL.Enums.PixelType)typeOut, (IntPtr)dataOut_ptr.AddrOfPinnedObject());
dataOut_ptr.Free(); }
finally
{
dataIn_ptr.Free();
dataOut_ptr.Free();
}
} }
} }
@ -669,20 +725,26 @@ namespace OpenTK.OpenGL
public static public static
void TessBeginPolygon(int tess, IntPtr data) void TessBeginPolygon(int tess, IntPtr data)
{ {
Delegates.gluTessBeginPolygon((int)tess, (IntPtr)data); unsafe
{
Delegates.gluTessBeginPolygon((int)tess, (IntPtr)data);
}
} }
public static public static
void TessBeginPolygon(int tess, [In, Out] object data) void TessBeginPolygon(int tess, [In, Out] object data)
{ {
System.Runtime.InteropServices.GCHandle data_ptr = System.Runtime.InteropServices.GCHandle.Alloc(data, System.Runtime.InteropServices.GCHandleType.Pinned); unsafe
try
{ {
Delegates.gluTessBeginPolygon((int)tess, (IntPtr)data_ptr.AddrOfPinnedObject()); System.Runtime.InteropServices.GCHandle data_ptr = System.Runtime.InteropServices.GCHandle.Alloc(data, System.Runtime.InteropServices.GCHandleType.Pinned);
} try
finally {
{ Delegates.gluTessBeginPolygon((int)tess, (IntPtr)data_ptr.AddrOfPinnedObject());
data_ptr.Free(); }
finally
{
data_ptr.Free();
}
} }
} }
@ -853,20 +915,26 @@ namespace OpenTK.OpenGL
public static public static
void NurbsCallbackData(int nurb, IntPtr userData) void NurbsCallbackData(int nurb, IntPtr userData)
{ {
Delegates.gluNurbsCallbackDataEXT((int)nurb, (IntPtr)userData); unsafe
{
Delegates.gluNurbsCallbackDataEXT((int)nurb, (IntPtr)userData);
}
} }
public static public static
void NurbsCallbackData(int nurb, [In, Out] object userData) void NurbsCallbackData(int nurb, [In, Out] object userData)
{ {
System.Runtime.InteropServices.GCHandle userData_ptr = System.Runtime.InteropServices.GCHandle.Alloc(userData, System.Runtime.InteropServices.GCHandleType.Pinned); unsafe
try
{ {
Delegates.gluNurbsCallbackDataEXT((int)nurb, (IntPtr)userData_ptr.AddrOfPinnedObject()); System.Runtime.InteropServices.GCHandle userData_ptr = System.Runtime.InteropServices.GCHandle.Alloc(userData, System.Runtime.InteropServices.GCHandleType.Pinned);
} try
finally {
{ Delegates.gluNurbsCallbackDataEXT((int)nurb, (IntPtr)userData_ptr.AddrOfPinnedObject());
userData_ptr.Free(); }
finally
{
userData_ptr.Free();
}
} }
} }
@ -875,27 +943,27 @@ namespace OpenTK.OpenGL
public static partial class Sgi public static partial class Sgi
{ {
public static public static
Int32 TexFilterFunc(OpenTK.OpenGL.Enums.TextureTarget target, OpenTK.OpenGL.Enums.Filter4TypeSgis filtertype, float[] parms, Int32 n, [Out] float[] weights) Int32 TexFilterFunc(OpenTK.OpenGL.Enums.TextureTarget target, OpenTK.OpenGL.Enums.SgisTextureFilter4 filtertype, float[] parms, Int32 n, [Out] float[] weights)
{ {
unsafe unsafe
{ {
fixed (float* parms_ptr = parms) fixed (float* parms_ptr = parms)
fixed (float* weights_ptr = weights) fixed (float* weights_ptr = weights)
{ {
return Delegates.gluTexFilterFuncSGI((OpenTK.OpenGL.Enums.TextureTarget)target, (OpenTK.OpenGL.Enums.Filter4TypeSgis)filtertype, (float*)parms_ptr, (Int32)n, (float*)weights_ptr); return Delegates.gluTexFilterFuncSGI((OpenTK.OpenGL.Enums.TextureTarget)target, (OpenTK.OpenGL.Enums.SgisTextureFilter4)filtertype, (float*)parms_ptr, (Int32)n, (float*)weights_ptr);
} }
} }
} }
public static public static
Int32 TexFilterFunc(OpenTK.OpenGL.Enums.TextureTarget target, OpenTK.OpenGL.Enums.Filter4TypeSgis filtertype, ref float parms, Int32 n, [Out] out float weights) Int32 TexFilterFunc(OpenTK.OpenGL.Enums.TextureTarget target, OpenTK.OpenGL.Enums.SgisTextureFilter4 filtertype, ref float parms, Int32 n, [Out] out float weights)
{ {
unsafe unsafe
{ {
fixed (float* parms_ptr = &parms) fixed (float* parms_ptr = &parms)
fixed (float* weights_ptr = &weights) fixed (float* weights_ptr = &weights)
{ {
Int32 retval = Delegates.gluTexFilterFuncSGI((OpenTK.OpenGL.Enums.TextureTarget)target, (OpenTK.OpenGL.Enums.Filter4TypeSgis)filtertype, (float*)parms_ptr, (Int32)n, (float*)weights_ptr); Int32 retval = Delegates.gluTexFilterFuncSGI((OpenTK.OpenGL.Enums.TextureTarget)target, (OpenTK.OpenGL.Enums.SgisTextureFilter4)filtertype, (float*)parms_ptr, (Int32)n, (float*)weights_ptr);
weights = *weights_ptr; weights = *weights_ptr;
return retval; return retval;
} }
@ -904,9 +972,9 @@ namespace OpenTK.OpenGL
[System.CLSCompliant(false)] [System.CLSCompliant(false)]
public static public static
unsafe Int32 TexFilterFunc(OpenTK.OpenGL.Enums.TextureTarget target, OpenTK.OpenGL.Enums.Filter4TypeSgis filtertype, float* parms, Int32 n, [Out] float* weights) unsafe Int32 TexFilterFunc(OpenTK.OpenGL.Enums.TextureTarget target, OpenTK.OpenGL.Enums.SgisTextureFilter4 filtertype, float* parms, Int32 n, [Out] float* weights)
{ {
return Delegates.gluTexFilterFuncSGI((OpenTK.OpenGL.Enums.TextureTarget)target, (OpenTK.OpenGL.Enums.Filter4TypeSgis)filtertype, (float*)parms, (Int32)n, (float*)weights); return Delegates.gluTexFilterFuncSGI((OpenTK.OpenGL.Enums.TextureTarget)target, (OpenTK.OpenGL.Enums.SgisTextureFilter4)filtertype, (float*)parms, (Int32)n, (float*)weights);
} }
} }

View file

@ -2,6 +2,8 @@ namespace OpenTK.OpenGL
{ {
using System; using System;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
#pragma warning disable 3019
#pragma warning disable 1591
partial class Glu partial class Glu
{ {

View file

@ -3,6 +3,8 @@ namespace OpenTK.OpenGL
using System; using System;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
#pragma warning disable 0649 #pragma warning disable 0649
#pragma warning disable 3019
#pragma warning disable 1591
partial class Glu partial class Glu
{ {
@ -180,7 +182,7 @@ namespace OpenTK.OpenGL
internal unsafe delegate void TessVertex(int tess, [Out] double* location, IntPtr data); internal unsafe delegate void TessVertex(int tess, [Out] double* location, IntPtr data);
internal unsafe static TessVertex gluTessVertex; internal unsafe static TessVertex gluTessVertex;
[System.Security.SuppressUnmanagedCodeSecurity()] [System.Security.SuppressUnmanagedCodeSecurity()]
internal unsafe delegate Int32 TexFilterFuncSGI(OpenTK.OpenGL.Enums.TextureTarget target, OpenTK.OpenGL.Enums.Filter4TypeSgis filtertype, float* parms, Int32 n, [Out] float* weights); internal unsafe delegate Int32 TexFilterFuncSGI(OpenTK.OpenGL.Enums.TextureTarget target, OpenTK.OpenGL.Enums.SgisTextureFilter4 filtertype, float* parms, Int32 n, [Out] float* weights);
internal unsafe static TexFilterFuncSGI gluTexFilterFuncSGI; internal unsafe static TexFilterFuncSGI gluTexFilterFuncSGI;
[System.Security.SuppressUnmanagedCodeSecurity()] [System.Security.SuppressUnmanagedCodeSecurity()]
internal unsafe delegate Int32 UnProject(double winX, double winY, double winZ, double* model, double* proj, Int32* view, double* objX, double* objY, double* objZ); internal unsafe delegate Int32 UnProject(double winX, double winY, double winZ, double* model, double* proj, Int32* view, double* objX, double* objY, double* objZ);
@ -190,5 +192,4 @@ namespace OpenTK.OpenGL
internal unsafe static UnProject4 gluUnProject4; internal unsafe static UnProject4 gluUnProject4;
} }
} }
#pragma warning restore 0649
} }

View file

@ -2,6 +2,8 @@ namespace OpenTK.OpenGL
{ {
namespace Enums namespace Enums
{ {
#pragma warning disable 3019
#pragma warning disable 1591
public enum GluVersion public enum GluVersion
{ {
Version11 = ((int)1), Version11 = ((int)1),
@ -23,7 +25,7 @@ namespace OpenTK.OpenGL
InvalidOperation = ((int)100904), InvalidOperation = ((int)100904),
} }
public enum Filter4TypeSgis public enum Filter4TypeSGIS
{ {
MitchellNetravaliSgi = ((int)100301), MitchellNetravaliSgi = ((int)100301),
LagrangianSgi = ((int)100300), LagrangianSgi = ((int)100300),