2007-09-02 22:52:00 +00:00
|
|
|
namespace OpenTK.OpenGL
|
|
|
|
{
|
|
|
|
using System;
|
|
|
|
using System.Runtime.InteropServices;
|
2008-01-15 09:33:28 +00:00
|
|
|
#pragma warning disable 3019
|
|
|
|
#pragma warning disable 1591
|
2007-09-02 22:52:00 +00:00
|
|
|
|
2008-01-15 09:33:28 +00:00
|
|
|
static partial class Glu
|
2007-09-02 22:52:00 +00:00
|
|
|
{
|
|
|
|
|
|
|
|
public static
|
|
|
|
void BeginCurve(int nurb)
|
|
|
|
{
|
|
|
|
Delegates.gluBeginCurve((int)nurb);
|
|
|
|
}
|
2007-10-26 13:00:16 +00:00
|
|
|
|
2007-09-02 22:52:00 +00:00
|
|
|
public static
|
|
|
|
void BeginPolygon(int tess)
|
|
|
|
{
|
|
|
|
Delegates.gluBeginPolygon((int)tess);
|
|
|
|
}
|
2007-10-26 13:00:16 +00:00
|
|
|
|
2007-09-02 22:52:00 +00:00
|
|
|
public static
|
|
|
|
void BeginSurface(int nurb)
|
|
|
|
{
|
|
|
|
Delegates.gluBeginSurface((int)nurb);
|
|
|
|
}
|
2007-10-26 13:00:16 +00:00
|
|
|
|
2007-09-02 22:52:00 +00:00
|
|
|
public static
|
|
|
|
void BeginTrim(int nurb)
|
|
|
|
{
|
|
|
|
Delegates.gluBeginTrim((int)nurb);
|
|
|
|
}
|
2007-10-26 13:00:16 +00:00
|
|
|
|
2007-09-02 22:52:00 +00:00
|
|
|
public static
|
2007-11-04 15:29:41 +00:00
|
|
|
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)
|
2007-09-02 22:52:00 +00:00
|
|
|
{
|
2008-01-15 09:33:28 +00:00
|
|
|
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);
|
|
|
|
}
|
2007-09-02 22:52:00 +00:00
|
|
|
}
|
2007-10-26 13:00:16 +00:00
|
|
|
|
2007-09-02 22:52:00 +00:00
|
|
|
public static
|
2007-11-04 15:29:41 +00:00
|
|
|
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)
|
2007-09-02 22:52:00 +00:00
|
|
|
{
|
2008-01-15 09:33:28 +00:00
|
|
|
unsafe
|
2007-10-26 13:00:16 +00:00
|
|
|
{
|
2008-01-15 09:33:28 +00:00
|
|
|
System.Runtime.InteropServices.GCHandle data_ptr = System.Runtime.InteropServices.GCHandle.Alloc(data, System.Runtime.InteropServices.GCHandleType.Pinned);
|
|
|
|
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());
|
|
|
|
}
|
|
|
|
finally
|
|
|
|
{
|
|
|
|
data_ptr.Free();
|
|
|
|
}
|
2007-09-02 22:52:00 +00:00
|
|
|
}
|
|
|
|
}
|
2007-10-26 13:00:16 +00:00
|
|
|
|
2007-09-02 22:52:00 +00:00
|
|
|
public static
|
2007-11-04 15:29:41 +00:00
|
|
|
Int32 Build1DMipmap(OpenTK.OpenGL.Enums.TextureTarget target, Int32 internalFormat, Int32 width, OpenTK.OpenGL.Enums.PixelFormat format, OpenTK.OpenGL.Enums.PixelType type, IntPtr data)
|
2007-09-02 22:52:00 +00:00
|
|
|
{
|
2008-01-15 09:33:28 +00:00
|
|
|
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);
|
|
|
|
}
|
2007-09-02 22:52:00 +00:00
|
|
|
}
|
2007-10-26 13:00:16 +00:00
|
|
|
|
2007-09-02 22:52:00 +00:00
|
|
|
public static
|
2007-11-04 15:29:41 +00:00
|
|
|
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)
|
2007-09-02 22:52:00 +00:00
|
|
|
{
|
2008-01-15 09:33:28 +00:00
|
|
|
unsafe
|
2007-10-26 13:00:16 +00:00
|
|
|
{
|
2008-01-15 09:33:28 +00:00
|
|
|
System.Runtime.InteropServices.GCHandle data_ptr = System.Runtime.InteropServices.GCHandle.Alloc(data, System.Runtime.InteropServices.GCHandleType.Pinned);
|
|
|
|
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());
|
|
|
|
}
|
|
|
|
finally
|
|
|
|
{
|
|
|
|
data_ptr.Free();
|
|
|
|
}
|
2007-09-02 22:52:00 +00:00
|
|
|
}
|
|
|
|
}
|
2007-10-26 13:00:16 +00:00
|
|
|
|
2007-09-02 22:52:00 +00:00
|
|
|
public static
|
2007-11-04 15:29:41 +00:00
|
|
|
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)
|
2007-09-02 22:52:00 +00:00
|
|
|
{
|
2008-01-15 09:33:28 +00:00
|
|
|
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);
|
|
|
|
}
|
2007-09-02 22:52:00 +00:00
|
|
|
}
|
2007-10-26 13:00:16 +00:00
|
|
|
|
2007-09-02 22:52:00 +00:00
|
|
|
public static
|
2007-11-04 15:29:41 +00:00
|
|
|
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)
|
2007-09-02 22:52:00 +00:00
|
|
|
{
|
2008-01-15 09:33:28 +00:00
|
|
|
unsafe
|
2007-10-26 13:00:16 +00:00
|
|
|
{
|
2008-01-15 09:33:28 +00:00
|
|
|
System.Runtime.InteropServices.GCHandle data_ptr = System.Runtime.InteropServices.GCHandle.Alloc(data, System.Runtime.InteropServices.GCHandleType.Pinned);
|
|
|
|
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());
|
|
|
|
}
|
|
|
|
finally
|
|
|
|
{
|
|
|
|
data_ptr.Free();
|
|
|
|
}
|
2007-09-02 22:52:00 +00:00
|
|
|
}
|
|
|
|
}
|
2007-10-26 13:00:16 +00:00
|
|
|
|
2007-09-02 22:52:00 +00:00
|
|
|
public static
|
2007-11-04 15:29:41 +00:00
|
|
|
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)
|
2007-09-02 22:52:00 +00:00
|
|
|
{
|
2008-01-15 09:33:28 +00:00
|
|
|
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);
|
|
|
|
}
|
2007-09-02 22:52:00 +00:00
|
|
|
}
|
2007-10-26 13:00:16 +00:00
|
|
|
|
2007-09-02 22:52:00 +00:00
|
|
|
public static
|
2007-11-04 15:29:41 +00:00
|
|
|
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)
|
2007-09-02 22:52:00 +00:00
|
|
|
{
|
2008-01-15 09:33:28 +00:00
|
|
|
unsafe
|
2007-10-26 13:00:16 +00:00
|
|
|
{
|
2008-01-15 09:33:28 +00:00
|
|
|
System.Runtime.InteropServices.GCHandle data_ptr = System.Runtime.InteropServices.GCHandle.Alloc(data, System.Runtime.InteropServices.GCHandleType.Pinned);
|
|
|
|
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());
|
|
|
|
}
|
|
|
|
finally
|
|
|
|
{
|
|
|
|
data_ptr.Free();
|
|
|
|
}
|
2007-09-02 22:52:00 +00:00
|
|
|
}
|
|
|
|
}
|
2007-10-26 13:00:16 +00:00
|
|
|
|
2007-09-02 22:52:00 +00:00
|
|
|
public static
|
2007-11-04 15:29:41 +00:00
|
|
|
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)
|
2007-09-02 22:52:00 +00:00
|
|
|
{
|
2008-01-15 09:33:28 +00:00
|
|
|
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);
|
|
|
|
}
|
2007-09-02 22:52:00 +00:00
|
|
|
}
|
2007-10-26 13:00:16 +00:00
|
|
|
|
2007-09-02 22:52:00 +00:00
|
|
|
public static
|
2007-11-04 15:29:41 +00:00
|
|
|
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)
|
2007-09-02 22:52:00 +00:00
|
|
|
{
|
2008-01-15 09:33:28 +00:00
|
|
|
unsafe
|
2007-09-02 22:52:00 +00:00
|
|
|
{
|
2008-01-15 09:33:28 +00:00
|
|
|
System.Runtime.InteropServices.GCHandle data_ptr = System.Runtime.InteropServices.GCHandle.Alloc(data, System.Runtime.InteropServices.GCHandleType.Pinned);
|
|
|
|
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());
|
|
|
|
}
|
|
|
|
finally
|
|
|
|
{
|
|
|
|
data_ptr.Free();
|
|
|
|
}
|
2007-09-02 22:52:00 +00:00
|
|
|
}
|
|
|
|
}
|
2007-10-26 13:00:16 +00:00
|
|
|
|
2007-09-02 22:52:00 +00:00
|
|
|
public static
|
2007-11-04 15:29:41 +00:00
|
|
|
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)
|
2007-09-02 22:52:00 +00:00
|
|
|
{
|
2008-01-15 09:33:28 +00:00
|
|
|
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);
|
|
|
|
}
|
2007-09-02 22:52:00 +00:00
|
|
|
}
|
2007-10-26 13:00:16 +00:00
|
|
|
|
2007-09-02 22:52:00 +00:00
|
|
|
public static
|
2007-11-04 15:29:41 +00:00
|
|
|
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)
|
2007-09-02 22:52:00 +00:00
|
|
|
{
|
2008-01-15 09:33:28 +00:00
|
|
|
unsafe
|
2007-09-02 22:52:00 +00:00
|
|
|
{
|
2008-01-15 09:33:28 +00:00
|
|
|
System.Runtime.InteropServices.GCHandle data_ptr = System.Runtime.InteropServices.GCHandle.Alloc(data, System.Runtime.InteropServices.GCHandleType.Pinned);
|
|
|
|
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());
|
|
|
|
}
|
|
|
|
finally
|
|
|
|
{
|
|
|
|
data_ptr.Free();
|
|
|
|
}
|
2007-09-02 22:52:00 +00:00
|
|
|
}
|
|
|
|
}
|
2007-10-26 13:00:16 +00:00
|
|
|
|
2007-09-02 22:52:00 +00:00
|
|
|
public static
|
2007-11-04 15:29:41 +00:00
|
|
|
bool CheckExtension(Byte[] extName, Byte[] extString)
|
2007-09-02 22:52:00 +00:00
|
|
|
{
|
|
|
|
unsafe
|
|
|
|
{
|
|
|
|
fixed (Byte* extName_ptr = extName)
|
|
|
|
fixed (Byte* extString_ptr = extString)
|
|
|
|
{
|
2007-10-26 13:00:16 +00:00
|
|
|
return Delegates.gluCheckExtension((Byte*)extName_ptr, (Byte*)extString_ptr);
|
2007-09-02 22:52:00 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2007-10-26 13:00:16 +00:00
|
|
|
|
2007-09-02 22:52:00 +00:00
|
|
|
public static
|
2007-11-04 15:29:41 +00:00
|
|
|
bool CheckExtension(ref Byte extName, ref Byte extString)
|
2007-09-02 22:52:00 +00:00
|
|
|
{
|
|
|
|
unsafe
|
|
|
|
{
|
2007-10-26 13:00:16 +00:00
|
|
|
fixed (Byte* extName_ptr = &extName)
|
2007-09-02 22:52:00 +00:00
|
|
|
fixed (Byte* extString_ptr = &extString)
|
|
|
|
{
|
2007-10-26 13:00:16 +00:00
|
|
|
return Delegates.gluCheckExtension((Byte*)extName_ptr, (Byte*)extString_ptr);
|
2007-09-02 22:52:00 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2007-10-26 13:00:16 +00:00
|
|
|
|
2007-09-02 22:52:00 +00:00
|
|
|
[System.CLSCompliant(false)]
|
|
|
|
public static
|
2007-11-04 15:29:41 +00:00
|
|
|
unsafe bool CheckExtension(Byte* extName, Byte* extString)
|
2007-09-02 22:52:00 +00:00
|
|
|
{
|
2007-10-26 13:00:16 +00:00
|
|
|
return Delegates.gluCheckExtension((Byte*)extName, (Byte*)extString);
|
2007-09-02 22:52:00 +00:00
|
|
|
}
|
2007-10-26 13:00:16 +00:00
|
|
|
|
2007-09-02 22:52:00 +00:00
|
|
|
public static
|
|
|
|
void Cylinder(int quad, double @base, double top, double height, Int32 slices, Int32 stacks)
|
|
|
|
{
|
|
|
|
Delegates.gluCylinder((int)quad, (double)@base, (double)top, (double)height, (Int32)slices, (Int32)stacks);
|
|
|
|
}
|
2007-10-26 13:00:16 +00:00
|
|
|
|
2007-09-02 22:52:00 +00:00
|
|
|
public static
|
|
|
|
void DeleteNurbsRenderer(int nurb)
|
|
|
|
{
|
|
|
|
Delegates.gluDeleteNurbsRenderer((int)nurb);
|
|
|
|
}
|
2007-10-26 13:00:16 +00:00
|
|
|
|
2007-09-02 22:52:00 +00:00
|
|
|
public static
|
|
|
|
void DeleteQuadric(int quad)
|
|
|
|
{
|
|
|
|
Delegates.gluDeleteQuadric((int)quad);
|
|
|
|
}
|
2007-10-26 13:00:16 +00:00
|
|
|
|
2007-09-02 22:52:00 +00:00
|
|
|
public static
|
|
|
|
void DeleteTes(int tess)
|
|
|
|
{
|
|
|
|
Delegates.gluDeleteTess((int)tess);
|
|
|
|
}
|
2007-10-26 13:00:16 +00:00
|
|
|
|
2007-09-02 22:52:00 +00:00
|
|
|
public static
|
|
|
|
void Disk(int quad, double inner, double outer, Int32 slices, Int32 loops)
|
|
|
|
{
|
|
|
|
Delegates.gluDisk((int)quad, (double)inner, (double)outer, (Int32)slices, (Int32)loops);
|
|
|
|
}
|
2007-10-26 13:00:16 +00:00
|
|
|
|
2007-09-02 22:52:00 +00:00
|
|
|
public static
|
|
|
|
void EndCurve(int nurb)
|
|
|
|
{
|
|
|
|
Delegates.gluEndCurve((int)nurb);
|
|
|
|
}
|
2007-10-26 13:00:16 +00:00
|
|
|
|
2007-09-02 22:52:00 +00:00
|
|
|
public static
|
|
|
|
void EndPolygon(int tess)
|
|
|
|
{
|
|
|
|
Delegates.gluEndPolygon((int)tess);
|
|
|
|
}
|
2007-10-26 13:00:16 +00:00
|
|
|
|
2007-09-02 22:52:00 +00:00
|
|
|
public static
|
|
|
|
void EndSurface(int nurb)
|
|
|
|
{
|
|
|
|
Delegates.gluEndSurface((int)nurb);
|
|
|
|
}
|
2007-10-26 13:00:16 +00:00
|
|
|
|
2007-09-02 22:52:00 +00:00
|
|
|
public static
|
|
|
|
void EndTrim(int nurb)
|
|
|
|
{
|
|
|
|
Delegates.gluEndTrim((int)nurb);
|
|
|
|
}
|
2007-10-26 13:00:16 +00:00
|
|
|
|
2007-09-02 22:52:00 +00:00
|
|
|
public static
|
2007-11-04 15:29:41 +00:00
|
|
|
string ErrorString(OpenTK.OpenGL.Enums.GluErrorCode error)
|
2007-09-02 22:52:00 +00:00
|
|
|
{
|
2008-01-15 09:33:28 +00:00
|
|
|
unsafe
|
|
|
|
{
|
|
|
|
return System.Runtime.InteropServices.Marshal.PtrToStringAnsi(Delegates.gluErrorString((OpenTK.OpenGL.Enums.GluErrorCode)error));
|
|
|
|
}
|
2007-09-02 22:52:00 +00:00
|
|
|
}
|
2007-10-26 13:00:16 +00:00
|
|
|
|
2007-09-02 22:52:00 +00:00
|
|
|
public static
|
2007-11-04 15:29:41 +00:00
|
|
|
string GetString(OpenTK.OpenGL.Enums.GluStringName name)
|
2007-09-02 22:52:00 +00:00
|
|
|
{
|
2008-01-15 09:33:28 +00:00
|
|
|
unsafe
|
|
|
|
{
|
|
|
|
return System.Runtime.InteropServices.Marshal.PtrToStringAnsi(Delegates.gluGetString((OpenTK.OpenGL.Enums.GluStringName)name));
|
|
|
|
}
|
2007-09-02 22:52:00 +00:00
|
|
|
}
|
2007-10-26 13:00:16 +00:00
|
|
|
|
2007-09-02 22:52:00 +00:00
|
|
|
public static
|
2007-11-04 15:29:41 +00:00
|
|
|
void GetNurbsProperty(int nurb, OpenTK.OpenGL.Enums.NurbsProperty property, [Out] float[] data)
|
2007-09-02 22:52:00 +00:00
|
|
|
{
|
|
|
|
unsafe
|
|
|
|
{
|
|
|
|
fixed (float* data_ptr = data)
|
|
|
|
{
|
2007-11-04 15:29:41 +00:00
|
|
|
Delegates.gluGetNurbsProperty((int)nurb, (OpenTK.OpenGL.Enums.NurbsProperty)property, (float*)data_ptr);
|
2007-09-02 22:52:00 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2007-10-26 13:00:16 +00:00
|
|
|
|
2007-09-02 22:52:00 +00:00
|
|
|
public static
|
2007-11-04 15:29:41 +00:00
|
|
|
void GetNurbsProperty(int nurb, OpenTK.OpenGL.Enums.NurbsProperty property, [Out] out float data)
|
2007-09-02 22:52:00 +00:00
|
|
|
{
|
|
|
|
unsafe
|
|
|
|
{
|
|
|
|
fixed (float* data_ptr = &data)
|
|
|
|
{
|
2007-11-04 15:29:41 +00:00
|
|
|
Delegates.gluGetNurbsProperty((int)nurb, (OpenTK.OpenGL.Enums.NurbsProperty)property, (float*)data_ptr);
|
2007-10-26 13:00:16 +00:00
|
|
|
data = *data_ptr;
|
2007-09-02 22:52:00 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2007-10-26 13:00:16 +00:00
|
|
|
|
2007-09-02 22:52:00 +00:00
|
|
|
[System.CLSCompliant(false)]
|
|
|
|
public static
|
2007-11-04 15:29:41 +00:00
|
|
|
unsafe void GetNurbsProperty(int nurb, OpenTK.OpenGL.Enums.NurbsProperty property, [Out] float* data)
|
2007-09-02 22:52:00 +00:00
|
|
|
{
|
2007-11-04 15:29:41 +00:00
|
|
|
Delegates.gluGetNurbsProperty((int)nurb, (OpenTK.OpenGL.Enums.NurbsProperty)property, (float*)data);
|
2007-09-02 22:52:00 +00:00
|
|
|
}
|
2007-10-26 13:00:16 +00:00
|
|
|
|
2007-09-02 22:52:00 +00:00
|
|
|
public static
|
2007-11-04 15:29:41 +00:00
|
|
|
void GetTessProperty(int tess, OpenTK.OpenGL.Enums.TessProperty which, [Out] double[] data)
|
2007-09-02 22:52:00 +00:00
|
|
|
{
|
|
|
|
unsafe
|
|
|
|
{
|
|
|
|
fixed (double* data_ptr = data)
|
|
|
|
{
|
2007-11-04 15:29:41 +00:00
|
|
|
Delegates.gluGetTessProperty((int)tess, (OpenTK.OpenGL.Enums.TessProperty)which, (double*)data_ptr);
|
2007-09-02 22:52:00 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2007-10-26 13:00:16 +00:00
|
|
|
|
2007-09-02 22:52:00 +00:00
|
|
|
public static
|
2007-11-04 15:29:41 +00:00
|
|
|
void GetTessProperty(int tess, OpenTK.OpenGL.Enums.TessProperty which, [Out] out double data)
|
2007-09-02 22:52:00 +00:00
|
|
|
{
|
|
|
|
unsafe
|
|
|
|
{
|
|
|
|
fixed (double* data_ptr = &data)
|
|
|
|
{
|
2007-11-04 15:29:41 +00:00
|
|
|
Delegates.gluGetTessProperty((int)tess, (OpenTK.OpenGL.Enums.TessProperty)which, (double*)data_ptr);
|
2007-10-26 13:00:16 +00:00
|
|
|
data = *data_ptr;
|
2007-09-02 22:52:00 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2007-10-26 13:00:16 +00:00
|
|
|
|
2007-09-02 22:52:00 +00:00
|
|
|
[System.CLSCompliant(false)]
|
|
|
|
public static
|
2007-11-04 15:29:41 +00:00
|
|
|
unsafe void GetTessProperty(int tess, OpenTK.OpenGL.Enums.TessProperty which, [Out] double* data)
|
2007-09-02 22:52:00 +00:00
|
|
|
{
|
2007-11-04 15:29:41 +00:00
|
|
|
Delegates.gluGetTessProperty((int)tess, (OpenTK.OpenGL.Enums.TessProperty)which, (double*)data);
|
2007-09-02 22:52:00 +00:00
|
|
|
}
|
2007-10-26 13:00:16 +00:00
|
|
|
|
2007-09-02 22:52:00 +00:00
|
|
|
public static
|
2007-10-26 13:00:16 +00:00
|
|
|
void LoadSamplingMatrices(int nurb, float[] model, float[] perspective, Int32[] view)
|
2007-09-02 22:52:00 +00:00
|
|
|
{
|
|
|
|
unsafe
|
|
|
|
{
|
2007-10-26 13:00:16 +00:00
|
|
|
fixed (float* model_ptr = model)
|
|
|
|
fixed (float* perspective_ptr = perspective)
|
2007-09-02 22:52:00 +00:00
|
|
|
fixed (Int32* view_ptr = view)
|
|
|
|
{
|
2007-10-26 13:00:16 +00:00
|
|
|
Delegates.gluLoadSamplingMatrices((int)nurb, (float*)model_ptr, (float*)perspective_ptr, (Int32*)view_ptr);
|
2007-09-02 22:52:00 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2007-10-26 13:00:16 +00:00
|
|
|
|
2007-09-02 22:52:00 +00:00
|
|
|
public static
|
2007-10-26 13:00:16 +00:00
|
|
|
void LoadSamplingMatrices(int nurb, ref float model, ref float perspective, ref Int32 view)
|
2007-09-02 22:52:00 +00:00
|
|
|
{
|
|
|
|
unsafe
|
|
|
|
{
|
2007-10-26 13:00:16 +00:00
|
|
|
fixed (float* model_ptr = &model)
|
|
|
|
fixed (float* perspective_ptr = &perspective)
|
2007-09-02 22:52:00 +00:00
|
|
|
fixed (Int32* view_ptr = &view)
|
|
|
|
{
|
2007-10-26 13:00:16 +00:00
|
|
|
Delegates.gluLoadSamplingMatrices((int)nurb, (float*)model_ptr, (float*)perspective_ptr, (Int32*)view_ptr);
|
2007-09-02 22:52:00 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2007-10-26 13:00:16 +00:00
|
|
|
|
2007-09-02 22:52:00 +00:00
|
|
|
[System.CLSCompliant(false)]
|
|
|
|
public static
|
2007-10-26 13:00:16 +00:00
|
|
|
unsafe void LoadSamplingMatrices(int nurb, float* model, float* perspective, Int32* view)
|
2007-09-02 22:52:00 +00:00
|
|
|
{
|
2007-10-26 13:00:16 +00:00
|
|
|
Delegates.gluLoadSamplingMatrices((int)nurb, (float*)model, (float*)perspective, (Int32*)view);
|
2007-09-02 22:52:00 +00:00
|
|
|
}
|
2007-10-26 13:00:16 +00:00
|
|
|
|
2007-09-02 22:52:00 +00:00
|
|
|
public static
|
2007-10-26 13:00:16 +00:00
|
|
|
void LookAt(double eyeX, double eyeY, double eyeZ, double centerX, double centerY, double centerZ, double upX, double upY, double upZ)
|
2007-09-02 22:52:00 +00:00
|
|
|
{
|
2007-10-26 13:00:16 +00:00
|
|
|
Delegates.gluLookAt((double)eyeX, (double)eyeY, (double)eyeZ, (double)centerX, (double)centerY, (double)centerZ, (double)upX, (double)upY, (double)upZ);
|
|
|
|
}
|
|
|
|
|
|
|
|
public static
|
|
|
|
int NewNurbsRenderer()
|
|
|
|
{
|
|
|
|
return Delegates.gluNewNurbsRenderer();
|
|
|
|
}
|
|
|
|
|
|
|
|
public static
|
|
|
|
int NewQuadric()
|
|
|
|
{
|
|
|
|
return Delegates.gluNewQuadric();
|
|
|
|
}
|
|
|
|
|
|
|
|
public static
|
|
|
|
int NewTes()
|
|
|
|
{
|
|
|
|
return Delegates.gluNewTess();
|
|
|
|
}
|
|
|
|
|
|
|
|
public static
|
2007-11-04 15:29:41 +00:00
|
|
|
void NextContour(int tess, OpenTK.OpenGL.Enums.TessContour type)
|
2007-10-26 13:00:16 +00:00
|
|
|
{
|
2007-11-04 15:29:41 +00:00
|
|
|
Delegates.gluNextContour((int)tess, (OpenTK.OpenGL.Enums.TessContour)type);
|
2007-10-26 13:00:16 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public static
|
2007-11-04 15:29:41 +00:00
|
|
|
void NurbsCallback(int nurb, OpenTK.OpenGL.Enums.NurbsCallback which, IntPtr CallBackFunc)
|
2007-10-26 13:00:16 +00:00
|
|
|
{
|
2007-11-04 15:29:41 +00:00
|
|
|
Delegates.gluNurbsCallback((int)nurb, (OpenTK.OpenGL.Enums.NurbsCallback)which, (IntPtr)CallBackFunc);
|
2007-10-26 13:00:16 +00:00
|
|
|
}
|
|
|
|
|
2007-09-02 22:52:00 +00:00
|
|
|
public static
|
2007-10-26 13:00:16 +00:00
|
|
|
void NurbsCallbackData(int nurb, IntPtr userData)
|
2007-09-02 22:52:00 +00:00
|
|
|
{
|
2008-01-15 09:33:28 +00:00
|
|
|
unsafe
|
|
|
|
{
|
|
|
|
Delegates.gluNurbsCallbackData((int)nurb, (IntPtr)userData);
|
|
|
|
}
|
2007-10-26 13:00:16 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public static
|
|
|
|
void NurbsCallbackData(int nurb, [In, Out] object userData)
|
|
|
|
{
|
2008-01-15 09:33:28 +00:00
|
|
|
unsafe
|
2007-10-26 13:00:16 +00:00
|
|
|
{
|
2008-01-15 09:33:28 +00:00
|
|
|
System.Runtime.InteropServices.GCHandle userData_ptr = System.Runtime.InteropServices.GCHandle.Alloc(userData, System.Runtime.InteropServices.GCHandleType.Pinned);
|
|
|
|
try
|
|
|
|
{
|
|
|
|
Delegates.gluNurbsCallbackData((int)nurb, (IntPtr)userData_ptr.AddrOfPinnedObject());
|
|
|
|
}
|
|
|
|
finally
|
|
|
|
{
|
|
|
|
userData_ptr.Free();
|
|
|
|
}
|
2007-09-02 22:52:00 +00:00
|
|
|
}
|
|
|
|
}
|
2007-10-26 13:00:16 +00:00
|
|
|
|
2007-09-02 22:52:00 +00:00
|
|
|
public static
|
2007-11-04 15:29:41 +00:00
|
|
|
void NurbsCurve(int nurb, Int32 knotCount, [Out] float[] knots, Int32 stride, [Out] float[] control, Int32 order, OpenTK.OpenGL.Enums.MapTarget type)
|
2007-09-02 22:52:00 +00:00
|
|
|
{
|
|
|
|
unsafe
|
|
|
|
{
|
2007-10-26 13:00:16 +00:00
|
|
|
fixed (float* knots_ptr = knots)
|
|
|
|
fixed (float* control_ptr = control)
|
2007-09-02 22:52:00 +00:00
|
|
|
{
|
2007-11-04 15:29:41 +00:00
|
|
|
Delegates.gluNurbsCurve((int)nurb, (Int32)knotCount, (float*)knots_ptr, (Int32)stride, (float*)control_ptr, (Int32)order, (OpenTK.OpenGL.Enums.MapTarget)type);
|
2007-09-02 22:52:00 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2007-10-26 13:00:16 +00:00
|
|
|
|
2007-09-02 22:52:00 +00:00
|
|
|
public static
|
2007-11-04 15:29:41 +00:00
|
|
|
void NurbsCurve(int nurb, Int32 knotCount, [Out] out float knots, Int32 stride, [Out] out float control, Int32 order, OpenTK.OpenGL.Enums.MapTarget type)
|
2007-09-02 22:52:00 +00:00
|
|
|
{
|
|
|
|
unsafe
|
|
|
|
{
|
2007-10-26 13:00:16 +00:00
|
|
|
fixed (float* knots_ptr = &knots)
|
|
|
|
fixed (float* control_ptr = &control)
|
2007-09-02 22:52:00 +00:00
|
|
|
{
|
2007-11-04 15:29:41 +00:00
|
|
|
Delegates.gluNurbsCurve((int)nurb, (Int32)knotCount, (float*)knots_ptr, (Int32)stride, (float*)control_ptr, (Int32)order, (OpenTK.OpenGL.Enums.MapTarget)type);
|
2007-10-26 13:00:16 +00:00
|
|
|
knots = *knots_ptr;
|
|
|
|
control = *control_ptr;
|
2007-09-02 22:52:00 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2007-10-26 13:00:16 +00:00
|
|
|
|
2007-09-02 22:52:00 +00:00
|
|
|
[System.CLSCompliant(false)]
|
|
|
|
public static
|
2007-11-04 15:29:41 +00:00
|
|
|
unsafe void NurbsCurve(int nurb, Int32 knotCount, [Out] float* knots, Int32 stride, [Out] float* control, Int32 order, OpenTK.OpenGL.Enums.MapTarget type)
|
2007-09-02 22:52:00 +00:00
|
|
|
{
|
2007-11-04 15:29:41 +00:00
|
|
|
Delegates.gluNurbsCurve((int)nurb, (Int32)knotCount, (float*)knots, (Int32)stride, (float*)control, (Int32)order, (OpenTK.OpenGL.Enums.MapTarget)type);
|
2007-09-02 22:52:00 +00:00
|
|
|
}
|
2007-10-26 13:00:16 +00:00
|
|
|
|
2007-09-02 22:52:00 +00:00
|
|
|
public static
|
2007-11-04 15:29:41 +00:00
|
|
|
void NurbsProperty(int nurb, OpenTK.OpenGL.Enums.NurbsProperty property, float value)
|
2007-09-02 22:52:00 +00:00
|
|
|
{
|
2007-11-04 15:29:41 +00:00
|
|
|
Delegates.gluNurbsProperty((int)nurb, (OpenTK.OpenGL.Enums.NurbsProperty)property, (float)value);
|
2007-09-02 22:52:00 +00:00
|
|
|
}
|
2007-10-26 13:00:16 +00:00
|
|
|
|
2007-09-02 22:52:00 +00:00
|
|
|
public static
|
2007-11-04 15:29:41 +00:00
|
|
|
void NurbsSurface(int nurb, Int32 sKnotCount, float[] sKnots, Int32 tKnotCount, float[] tKnots, Int32 sStride, Int32 tStride, float[] control, Int32 sOrder, Int32 tOrder, OpenTK.OpenGL.Enums.MapTarget type)
|
2007-09-02 22:52:00 +00:00
|
|
|
{
|
|
|
|
unsafe
|
|
|
|
{
|
2007-10-26 13:00:16 +00:00
|
|
|
fixed (float* sKnots_ptr = sKnots)
|
|
|
|
fixed (float* tKnots_ptr = tKnots)
|
|
|
|
fixed (float* control_ptr = control)
|
2007-09-02 22:52:00 +00:00
|
|
|
{
|
2007-11-04 15:29:41 +00:00
|
|
|
Delegates.gluNurbsSurface((int)nurb, (Int32)sKnotCount, (float*)sKnots_ptr, (Int32)tKnotCount, (float*)tKnots_ptr, (Int32)sStride, (Int32)tStride, (float*)control_ptr, (Int32)sOrder, (Int32)tOrder, (OpenTK.OpenGL.Enums.MapTarget)type);
|
2007-09-02 22:52:00 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2007-10-26 13:00:16 +00:00
|
|
|
|
2007-09-02 22:52:00 +00:00
|
|
|
public static
|
2007-11-04 15:29:41 +00:00
|
|
|
void NurbsSurface(int nurb, Int32 sKnotCount, ref float sKnots, Int32 tKnotCount, ref float tKnots, Int32 sStride, Int32 tStride, ref float control, Int32 sOrder, Int32 tOrder, OpenTK.OpenGL.Enums.MapTarget type)
|
2007-09-02 22:52:00 +00:00
|
|
|
{
|
|
|
|
unsafe
|
|
|
|
{
|
2007-10-26 13:00:16 +00:00
|
|
|
fixed (float* sKnots_ptr = &sKnots)
|
|
|
|
fixed (float* tKnots_ptr = &tKnots)
|
|
|
|
fixed (float* control_ptr = &control)
|
2007-09-02 22:52:00 +00:00
|
|
|
{
|
2007-11-04 15:29:41 +00:00
|
|
|
Delegates.gluNurbsSurface((int)nurb, (Int32)sKnotCount, (float*)sKnots_ptr, (Int32)tKnotCount, (float*)tKnots_ptr, (Int32)sStride, (Int32)tStride, (float*)control_ptr, (Int32)sOrder, (Int32)tOrder, (OpenTK.OpenGL.Enums.MapTarget)type);
|
2007-09-02 22:52:00 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2007-10-26 13:00:16 +00:00
|
|
|
|
2007-09-02 22:52:00 +00:00
|
|
|
[System.CLSCompliant(false)]
|
|
|
|
public static
|
2007-11-04 15:29:41 +00:00
|
|
|
unsafe void NurbsSurface(int nurb, Int32 sKnotCount, float* sKnots, Int32 tKnotCount, float* tKnots, Int32 sStride, Int32 tStride, float* control, Int32 sOrder, Int32 tOrder, OpenTK.OpenGL.Enums.MapTarget type)
|
2007-09-02 22:52:00 +00:00
|
|
|
{
|
2007-11-04 15:29:41 +00:00
|
|
|
Delegates.gluNurbsSurface((int)nurb, (Int32)sKnotCount, (float*)sKnots, (Int32)tKnotCount, (float*)tKnots, (Int32)sStride, (Int32)tStride, (float*)control, (Int32)sOrder, (Int32)tOrder, (OpenTK.OpenGL.Enums.MapTarget)type);
|
2007-09-02 22:52:00 +00:00
|
|
|
}
|
2007-10-26 13:00:16 +00:00
|
|
|
|
2007-09-02 22:52:00 +00:00
|
|
|
public static
|
2007-10-26 13:00:16 +00:00
|
|
|
void Ortho2D(double left, double right, double bottom, double top)
|
2007-09-02 22:52:00 +00:00
|
|
|
{
|
2007-10-26 13:00:16 +00:00
|
|
|
Delegates.gluOrtho2D((double)left, (double)right, (double)bottom, (double)top);
|
2007-09-02 22:52:00 +00:00
|
|
|
}
|
2007-10-26 13:00:16 +00:00
|
|
|
|
2007-09-02 22:52:00 +00:00
|
|
|
public static
|
2007-10-26 13:00:16 +00:00
|
|
|
void PartialDisk(int quad, double inner, double outer, Int32 slices, Int32 loops, double start, double sweep)
|
2007-09-02 22:52:00 +00:00
|
|
|
{
|
2007-10-26 13:00:16 +00:00
|
|
|
Delegates.gluPartialDisk((int)quad, (double)inner, (double)outer, (Int32)slices, (Int32)loops, (double)start, (double)sweep);
|
2007-09-02 22:52:00 +00:00
|
|
|
}
|
2007-10-26 13:00:16 +00:00
|
|
|
|
2007-09-02 22:52:00 +00:00
|
|
|
public static
|
2007-10-26 13:00:16 +00:00
|
|
|
void Perspective(double fovy, double aspect, double zNear, double zFar)
|
2007-09-02 22:52:00 +00:00
|
|
|
{
|
2007-10-26 13:00:16 +00:00
|
|
|
Delegates.gluPerspective((double)fovy, (double)aspect, (double)zNear, (double)zFar);
|
2007-09-02 22:52:00 +00:00
|
|
|
}
|
2007-10-26 13:00:16 +00:00
|
|
|
|
2007-09-02 22:52:00 +00:00
|
|
|
public static
|
2007-10-26 13:00:16 +00:00
|
|
|
void PickMatrix(double x, double y, double delX, double delY, [Out] Int32[] viewport)
|
2007-09-02 22:52:00 +00:00
|
|
|
{
|
|
|
|
unsafe
|
|
|
|
{
|
2007-10-26 13:00:16 +00:00
|
|
|
fixed (Int32* viewport_ptr = viewport)
|
2007-09-02 22:52:00 +00:00
|
|
|
{
|
2007-10-26 13:00:16 +00:00
|
|
|
Delegates.gluPickMatrix((double)x, (double)y, (double)delX, (double)delY, (Int32*)viewport_ptr);
|
2007-09-02 22:52:00 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2007-10-26 13:00:16 +00:00
|
|
|
|
2007-09-02 22:52:00 +00:00
|
|
|
public static
|
2007-10-26 13:00:16 +00:00
|
|
|
void PickMatrix(double x, double y, double delX, double delY, [Out] out Int32 viewport)
|
2007-09-02 22:52:00 +00:00
|
|
|
{
|
|
|
|
unsafe
|
|
|
|
{
|
2007-10-26 13:00:16 +00:00
|
|
|
fixed (Int32* viewport_ptr = &viewport)
|
2007-09-02 22:52:00 +00:00
|
|
|
{
|
2007-10-26 13:00:16 +00:00
|
|
|
Delegates.gluPickMatrix((double)x, (double)y, (double)delX, (double)delY, (Int32*)viewport_ptr);
|
|
|
|
viewport = *viewport_ptr;
|
2007-09-02 22:52:00 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2007-10-26 13:00:16 +00:00
|
|
|
|
2007-09-02 22:52:00 +00:00
|
|
|
[System.CLSCompliant(false)]
|
|
|
|
public static
|
2007-10-26 13:00:16 +00:00
|
|
|
unsafe void PickMatrix(double x, double y, double delX, double delY, [Out] Int32* viewport)
|
2007-09-02 22:52:00 +00:00
|
|
|
{
|
2007-10-26 13:00:16 +00:00
|
|
|
Delegates.gluPickMatrix((double)x, (double)y, (double)delX, (double)delY, (Int32*)viewport);
|
2007-09-02 22:52:00 +00:00
|
|
|
}
|
2007-10-26 13:00:16 +00:00
|
|
|
|
2007-09-02 22:52:00 +00:00
|
|
|
public static
|
2007-10-26 13:00:16 +00:00
|
|
|
Int32 Project(double objX, double objY, double objZ, double[] model, double[] proj, Int32[] view, double[] winX, double[] winY, double[] winZ)
|
2007-09-02 22:52:00 +00:00
|
|
|
{
|
|
|
|
unsafe
|
|
|
|
{
|
2007-10-26 13:00:16 +00:00
|
|
|
fixed (double* model_ptr = model)
|
|
|
|
fixed (double* proj_ptr = proj)
|
2007-09-02 22:52:00 +00:00
|
|
|
fixed (Int32* view_ptr = view)
|
2007-10-26 13:00:16 +00:00
|
|
|
fixed (double* winX_ptr = winX)
|
|
|
|
fixed (double* winY_ptr = winY)
|
|
|
|
fixed (double* winZ_ptr = winZ)
|
2007-09-02 22:52:00 +00:00
|
|
|
{
|
2007-10-26 13:00:16 +00:00
|
|
|
return Delegates.gluProject((double)objX, (double)objY, (double)objZ, (double*)model_ptr, (double*)proj_ptr, (Int32*)view_ptr, (double*)winX_ptr, (double*)winY_ptr, (double*)winZ_ptr);
|
2007-09-02 22:52:00 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2007-10-26 13:00:16 +00:00
|
|
|
|
2007-09-02 22:52:00 +00:00
|
|
|
public static
|
2007-10-26 13:00:16 +00:00
|
|
|
Int32 Project(double objX, double objY, double objZ, ref double model, ref double proj, ref Int32 view, ref double winX, ref double winY, ref double winZ)
|
2007-09-02 22:52:00 +00:00
|
|
|
{
|
|
|
|
unsafe
|
|
|
|
{
|
2007-10-26 13:00:16 +00:00
|
|
|
fixed (double* model_ptr = &model)
|
|
|
|
fixed (double* proj_ptr = &proj)
|
2007-09-02 22:52:00 +00:00
|
|
|
fixed (Int32* view_ptr = &view)
|
2007-10-26 13:00:16 +00:00
|
|
|
fixed (double* winX_ptr = &winX)
|
|
|
|
fixed (double* winY_ptr = &winY)
|
|
|
|
fixed (double* winZ_ptr = &winZ)
|
2007-09-02 22:52:00 +00:00
|
|
|
{
|
2007-10-26 13:00:16 +00:00
|
|
|
return Delegates.gluProject((double)objX, (double)objY, (double)objZ, (double*)model_ptr, (double*)proj_ptr, (Int32*)view_ptr, (double*)winX_ptr, (double*)winY_ptr, (double*)winZ_ptr);
|
2007-09-02 22:52:00 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2007-10-26 13:00:16 +00:00
|
|
|
|
2007-09-02 22:52:00 +00:00
|
|
|
[System.CLSCompliant(false)]
|
|
|
|
public static
|
2007-10-26 13:00:16 +00:00
|
|
|
unsafe Int32 Project(double objX, double objY, double objZ, double* model, double* proj, Int32* view, double* winX, double* winY, double* winZ)
|
2007-09-02 22:52:00 +00:00
|
|
|
{
|
2007-10-26 13:00:16 +00:00
|
|
|
return Delegates.gluProject((double)objX, (double)objY, (double)objZ, (double*)model, (double*)proj, (Int32*)view, (double*)winX, (double*)winY, (double*)winZ);
|
2007-09-02 22:52:00 +00:00
|
|
|
}
|
2007-10-26 13:00:16 +00:00
|
|
|
|
2007-09-02 22:52:00 +00:00
|
|
|
public static
|
2007-11-04 15:29:41 +00:00
|
|
|
void PwlCurve(int nurb, Int32 count, float[] data, Int32 stride, OpenTK.OpenGL.Enums.NurbsTrim type)
|
2007-09-02 22:52:00 +00:00
|
|
|
{
|
|
|
|
unsafe
|
|
|
|
{
|
2007-10-26 13:00:16 +00:00
|
|
|
fixed (float* data_ptr = data)
|
2007-09-02 22:52:00 +00:00
|
|
|
{
|
2007-11-04 15:29:41 +00:00
|
|
|
Delegates.gluPwlCurve((int)nurb, (Int32)count, (float*)data_ptr, (Int32)stride, (OpenTK.OpenGL.Enums.NurbsTrim)type);
|
2007-09-02 22:52:00 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2007-10-26 13:00:16 +00:00
|
|
|
|
2007-09-02 22:52:00 +00:00
|
|
|
public static
|
2007-11-04 15:29:41 +00:00
|
|
|
void PwlCurve(int nurb, Int32 count, ref float data, Int32 stride, OpenTK.OpenGL.Enums.NurbsTrim type)
|
2007-09-02 22:52:00 +00:00
|
|
|
{
|
|
|
|
unsafe
|
|
|
|
{
|
2007-10-26 13:00:16 +00:00
|
|
|
fixed (float* data_ptr = &data)
|
2007-09-02 22:52:00 +00:00
|
|
|
{
|
2007-11-04 15:29:41 +00:00
|
|
|
Delegates.gluPwlCurve((int)nurb, (Int32)count, (float*)data_ptr, (Int32)stride, (OpenTK.OpenGL.Enums.NurbsTrim)type);
|
2007-09-02 22:52:00 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2007-10-26 13:00:16 +00:00
|
|
|
|
2007-09-02 22:52:00 +00:00
|
|
|
[System.CLSCompliant(false)]
|
|
|
|
public static
|
2007-11-04 15:29:41 +00:00
|
|
|
unsafe void PwlCurve(int nurb, Int32 count, float* data, Int32 stride, OpenTK.OpenGL.Enums.NurbsTrim type)
|
2007-09-02 22:52:00 +00:00
|
|
|
{
|
2007-11-04 15:29:41 +00:00
|
|
|
Delegates.gluPwlCurve((int)nurb, (Int32)count, (float*)data, (Int32)stride, (OpenTK.OpenGL.Enums.NurbsTrim)type);
|
2007-09-02 22:52:00 +00:00
|
|
|
}
|
2007-10-26 13:00:16 +00:00
|
|
|
|
2007-09-02 22:52:00 +00:00
|
|
|
public static
|
2007-11-04 15:29:41 +00:00
|
|
|
void QuadricCallback(int quad, OpenTK.OpenGL.Enums.QuadricCallback which, IntPtr CallBackFunc)
|
2007-09-02 22:52:00 +00:00
|
|
|
{
|
2007-11-04 15:29:41 +00:00
|
|
|
Delegates.gluQuadricCallback((int)quad, (OpenTK.OpenGL.Enums.QuadricCallback)which, (IntPtr)CallBackFunc);
|
2007-09-02 22:52:00 +00:00
|
|
|
}
|
2007-10-26 13:00:16 +00:00
|
|
|
|
2007-09-02 22:52:00 +00:00
|
|
|
public static
|
2007-11-04 15:29:41 +00:00
|
|
|
void QuadricDrawStyle(int quad, OpenTK.OpenGL.Enums.QuadricDrawStyle draw)
|
2007-09-02 22:52:00 +00:00
|
|
|
{
|
2007-11-04 15:29:41 +00:00
|
|
|
Delegates.gluQuadricDrawStyle((int)quad, (OpenTK.OpenGL.Enums.QuadricDrawStyle)draw);
|
2007-09-02 22:52:00 +00:00
|
|
|
}
|
2007-10-26 13:00:16 +00:00
|
|
|
|
2007-09-02 22:52:00 +00:00
|
|
|
public static
|
2007-11-04 15:29:41 +00:00
|
|
|
void QuadricNormal(int quad, OpenTK.OpenGL.Enums.QuadricNormal normal)
|
2007-09-02 22:52:00 +00:00
|
|
|
{
|
2007-11-04 15:29:41 +00:00
|
|
|
Delegates.gluQuadricNormals((int)quad, (OpenTK.OpenGL.Enums.QuadricNormal)normal);
|
2007-09-02 22:52:00 +00:00
|
|
|
}
|
2007-10-26 13:00:16 +00:00
|
|
|
|
2007-09-02 22:52:00 +00:00
|
|
|
public static
|
2007-11-04 15:29:41 +00:00
|
|
|
void QuadricOrientation(int quad, OpenTK.OpenGL.Enums.QuadricOrientation orientation)
|
2007-09-02 22:52:00 +00:00
|
|
|
{
|
2007-11-04 15:29:41 +00:00
|
|
|
Delegates.gluQuadricOrientation((int)quad, (OpenTK.OpenGL.Enums.QuadricOrientation)orientation);
|
2007-09-02 22:52:00 +00:00
|
|
|
}
|
2007-10-26 13:00:16 +00:00
|
|
|
|
2007-09-02 22:52:00 +00:00
|
|
|
public static
|
2007-11-04 15:29:41 +00:00
|
|
|
void QuadricTexture(int quad, bool texture)
|
2007-09-02 22:52:00 +00:00
|
|
|
{
|
2007-11-04 15:29:41 +00:00
|
|
|
Delegates.gluQuadricTexture((int)quad, (bool)texture);
|
2007-09-02 22:52:00 +00:00
|
|
|
}
|
2007-10-26 13:00:16 +00:00
|
|
|
|
2007-09-02 22:52:00 +00:00
|
|
|
public static
|
2007-11-04 15:29:41 +00:00
|
|
|
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)
|
2007-09-02 22:52:00 +00:00
|
|
|
{
|
2008-01-15 09:33:28 +00:00
|
|
|
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);
|
|
|
|
}
|
2007-09-02 22:52:00 +00:00
|
|
|
}
|
2007-10-26 13:00:16 +00:00
|
|
|
|
2007-09-02 22:52:00 +00:00
|
|
|
public static
|
2007-11-04 15:29:41 +00:00
|
|
|
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)
|
2007-09-02 22:52:00 +00:00
|
|
|
{
|
2008-01-15 09:33:28 +00:00
|
|
|
unsafe
|
2007-10-26 13:00:16 +00:00
|
|
|
{
|
2008-01-15 09:33:28 +00:00
|
|
|
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);
|
|
|
|
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());
|
|
|
|
}
|
|
|
|
finally
|
|
|
|
{
|
|
|
|
dataIn_ptr.Free();
|
|
|
|
dataOut_ptr.Free();
|
|
|
|
}
|
2007-10-26 13:00:16 +00:00
|
|
|
}
|
2007-09-02 22:52:00 +00:00
|
|
|
}
|
2007-10-26 13:00:16 +00:00
|
|
|
|
2007-09-02 22:52:00 +00:00
|
|
|
public static
|
2007-10-26 13:00:16 +00:00
|
|
|
void Sphere(int quad, double radius, Int32 slices, Int32 stacks)
|
2007-09-02 22:52:00 +00:00
|
|
|
{
|
2007-10-26 13:00:16 +00:00
|
|
|
Delegates.gluSphere((int)quad, (double)radius, (Int32)slices, (Int32)stacks);
|
2007-09-02 22:52:00 +00:00
|
|
|
}
|
2007-10-26 13:00:16 +00:00
|
|
|
|
2007-09-02 22:52:00 +00:00
|
|
|
public static
|
2007-10-26 13:00:16 +00:00
|
|
|
void TessBeginContour(int tess)
|
2007-09-02 22:52:00 +00:00
|
|
|
{
|
2007-10-26 13:00:16 +00:00
|
|
|
Delegates.gluTessBeginContour((int)tess);
|
2007-09-02 22:52:00 +00:00
|
|
|
}
|
2007-10-26 13:00:16 +00:00
|
|
|
|
2007-09-02 22:52:00 +00:00
|
|
|
public static
|
2007-10-26 13:00:16 +00:00
|
|
|
void TessBeginPolygon(int tess, IntPtr data)
|
2007-09-02 22:52:00 +00:00
|
|
|
{
|
2008-01-15 09:33:28 +00:00
|
|
|
unsafe
|
|
|
|
{
|
|
|
|
Delegates.gluTessBeginPolygon((int)tess, (IntPtr)data);
|
|
|
|
}
|
2007-09-02 22:52:00 +00:00
|
|
|
}
|
2007-10-26 13:00:16 +00:00
|
|
|
|
2007-09-02 22:52:00 +00:00
|
|
|
public static
|
2007-10-26 13:00:16 +00:00
|
|
|
void TessBeginPolygon(int tess, [In, Out] object data)
|
2007-09-02 22:52:00 +00:00
|
|
|
{
|
2008-01-15 09:33:28 +00:00
|
|
|
unsafe
|
2007-10-26 13:00:16 +00:00
|
|
|
{
|
2008-01-15 09:33:28 +00:00
|
|
|
System.Runtime.InteropServices.GCHandle data_ptr = System.Runtime.InteropServices.GCHandle.Alloc(data, System.Runtime.InteropServices.GCHandleType.Pinned);
|
|
|
|
try
|
|
|
|
{
|
|
|
|
Delegates.gluTessBeginPolygon((int)tess, (IntPtr)data_ptr.AddrOfPinnedObject());
|
|
|
|
}
|
|
|
|
finally
|
|
|
|
{
|
|
|
|
data_ptr.Free();
|
|
|
|
}
|
2007-09-02 22:52:00 +00:00
|
|
|
}
|
|
|
|
}
|
2007-10-26 13:00:16 +00:00
|
|
|
|
2007-09-02 22:52:00 +00:00
|
|
|
public static
|
2007-11-04 15:29:41 +00:00
|
|
|
void TessCallback(int tess, OpenTK.OpenGL.Enums.TessCallback which, IntPtr CallBackFunc)
|
2007-09-02 22:52:00 +00:00
|
|
|
{
|
2007-11-04 15:29:41 +00:00
|
|
|
Delegates.gluTessCallback((int)tess, (OpenTK.OpenGL.Enums.TessCallback)which, (IntPtr)CallBackFunc);
|
2007-09-02 22:52:00 +00:00
|
|
|
}
|
2007-10-26 13:00:16 +00:00
|
|
|
|
2007-09-02 22:52:00 +00:00
|
|
|
public static
|
2007-10-26 13:00:16 +00:00
|
|
|
void TessEndContour(int tess)
|
2007-09-02 22:52:00 +00:00
|
|
|
{
|
2007-10-26 13:00:16 +00:00
|
|
|
Delegates.gluTessEndContour((int)tess);
|
2007-09-02 22:52:00 +00:00
|
|
|
}
|
2007-10-26 13:00:16 +00:00
|
|
|
|
2007-09-02 22:52:00 +00:00
|
|
|
public static
|
2007-10-26 13:00:16 +00:00
|
|
|
void TessEndPolygon(int tess)
|
2007-09-02 22:52:00 +00:00
|
|
|
{
|
2007-10-26 13:00:16 +00:00
|
|
|
Delegates.gluTessEndPolygon((int)tess);
|
2007-09-02 22:52:00 +00:00
|
|
|
}
|
2007-10-26 13:00:16 +00:00
|
|
|
|
2007-09-02 22:52:00 +00:00
|
|
|
public static
|
2007-10-26 13:00:16 +00:00
|
|
|
void TessNormal(int tess, double valueX, double valueY, double valueZ)
|
2007-09-02 22:52:00 +00:00
|
|
|
{
|
2007-10-26 13:00:16 +00:00
|
|
|
Delegates.gluTessNormal((int)tess, (double)valueX, (double)valueY, (double)valueZ);
|
2007-09-02 22:52:00 +00:00
|
|
|
}
|
2007-10-26 13:00:16 +00:00
|
|
|
|
2007-09-02 22:52:00 +00:00
|
|
|
public static
|
2007-11-04 15:29:41 +00:00
|
|
|
void TessProperty(int tess, OpenTK.OpenGL.Enums.TessProperty which, double data)
|
2007-09-02 22:52:00 +00:00
|
|
|
{
|
2007-11-04 15:29:41 +00:00
|
|
|
Delegates.gluTessProperty((int)tess, (OpenTK.OpenGL.Enums.TessProperty)which, (double)data);
|
2007-09-02 22:52:00 +00:00
|
|
|
}
|
2007-10-26 13:00:16 +00:00
|
|
|
|
2007-09-02 22:52:00 +00:00
|
|
|
public static
|
2007-10-26 13:00:16 +00:00
|
|
|
void TessVertex(int tess, [Out] double[] location, IntPtr data)
|
2007-09-02 22:52:00 +00:00
|
|
|
{
|
|
|
|
unsafe
|
|
|
|
{
|
2007-10-26 13:00:16 +00:00
|
|
|
fixed (double* location_ptr = location)
|
2007-09-02 22:52:00 +00:00
|
|
|
{
|
2007-10-26 13:00:16 +00:00
|
|
|
Delegates.gluTessVertex((int)tess, (double*)location_ptr, (IntPtr)data);
|
2007-09-02 22:52:00 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2007-10-26 13:00:16 +00:00
|
|
|
|
2007-09-02 22:52:00 +00:00
|
|
|
[System.CLSCompliant(false)]
|
|
|
|
public static
|
2007-10-26 13:00:16 +00:00
|
|
|
unsafe void TessVertex(int tess, [Out] double* location, [In, Out] object data)
|
2007-09-02 22:52:00 +00:00
|
|
|
{
|
2007-10-26 13:00:16 +00:00
|
|
|
System.Runtime.InteropServices.GCHandle data_ptr = System.Runtime.InteropServices.GCHandle.Alloc(data, System.Runtime.InteropServices.GCHandleType.Pinned);
|
|
|
|
try
|
2007-09-02 22:52:00 +00:00
|
|
|
{
|
2007-10-26 13:00:16 +00:00
|
|
|
Delegates.gluTessVertex((int)tess, (double*)location, (IntPtr)data_ptr.AddrOfPinnedObject());
|
2007-09-02 22:52:00 +00:00
|
|
|
}
|
2007-10-26 13:00:16 +00:00
|
|
|
finally
|
2007-09-02 22:52:00 +00:00
|
|
|
{
|
2007-10-26 13:00:16 +00:00
|
|
|
data_ptr.Free();
|
2007-09-02 22:52:00 +00:00
|
|
|
}
|
|
|
|
}
|
2007-10-26 13:00:16 +00:00
|
|
|
|
2007-09-02 22:52:00 +00:00
|
|
|
public static
|
2007-10-26 13:00:16 +00:00
|
|
|
void TessVertex(int tess, [Out] out double location, [In, Out] object data)
|
2007-09-02 22:52:00 +00:00
|
|
|
{
|
|
|
|
unsafe
|
|
|
|
{
|
2007-10-26 13:00:16 +00:00
|
|
|
fixed (double* location_ptr = &location)
|
2007-09-02 22:52:00 +00:00
|
|
|
{
|
2007-10-26 13:00:16 +00:00
|
|
|
System.Runtime.InteropServices.GCHandle data_ptr = System.Runtime.InteropServices.GCHandle.Alloc(data, System.Runtime.InteropServices.GCHandleType.Pinned);
|
|
|
|
try
|
|
|
|
{
|
|
|
|
Delegates.gluTessVertex((int)tess, (double*)location_ptr, (IntPtr)data_ptr.AddrOfPinnedObject());
|
|
|
|
location = *location_ptr;
|
|
|
|
}
|
|
|
|
finally
|
|
|
|
{
|
|
|
|
data_ptr.Free();
|
|
|
|
}
|
2007-09-02 22:52:00 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2007-10-26 13:00:16 +00:00
|
|
|
|
2007-09-02 22:52:00 +00:00
|
|
|
public static
|
2007-10-26 13:00:16 +00:00
|
|
|
Int32 UnProject(double winX, double winY, double winZ, double[] model, double[] proj, Int32[] view, double[] objX, double[] objY, double[] objZ)
|
2007-09-02 22:52:00 +00:00
|
|
|
{
|
|
|
|
unsafe
|
|
|
|
{
|
2007-10-26 13:00:16 +00:00
|
|
|
fixed (double* model_ptr = model)
|
|
|
|
fixed (double* proj_ptr = proj)
|
|
|
|
fixed (Int32* view_ptr = view)
|
|
|
|
fixed (double* objX_ptr = objX)
|
|
|
|
fixed (double* objY_ptr = objY)
|
2007-09-02 22:52:00 +00:00
|
|
|
fixed (double* objZ_ptr = objZ)
|
|
|
|
{
|
2007-10-26 13:00:16 +00:00
|
|
|
return Delegates.gluUnProject((double)winX, (double)winY, (double)winZ, (double*)model_ptr, (double*)proj_ptr, (Int32*)view_ptr, (double*)objX_ptr, (double*)objY_ptr, (double*)objZ_ptr);
|
2007-09-02 22:52:00 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2007-10-26 13:00:16 +00:00
|
|
|
|
2007-09-02 22:52:00 +00:00
|
|
|
public static
|
2007-10-26 13:00:16 +00:00
|
|
|
Int32 UnProject(double winX, double winY, double winZ, ref double model, ref double proj, ref Int32 view, ref double objX, ref double objY, ref double objZ)
|
2007-09-02 22:52:00 +00:00
|
|
|
{
|
|
|
|
unsafe
|
|
|
|
{
|
|
|
|
fixed (double* model_ptr = &model)
|
|
|
|
fixed (double* proj_ptr = &proj)
|
|
|
|
fixed (Int32* view_ptr = &view)
|
|
|
|
fixed (double* objX_ptr = &objX)
|
|
|
|
fixed (double* objY_ptr = &objY)
|
2007-10-26 13:00:16 +00:00
|
|
|
fixed (double* objZ_ptr = &objZ)
|
2007-09-02 22:52:00 +00:00
|
|
|
{
|
2007-10-26 13:00:16 +00:00
|
|
|
return Delegates.gluUnProject((double)winX, (double)winY, (double)winZ, (double*)model_ptr, (double*)proj_ptr, (Int32*)view_ptr, (double*)objX_ptr, (double*)objY_ptr, (double*)objZ_ptr);
|
2007-09-02 22:52:00 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2007-10-26 13:00:16 +00:00
|
|
|
|
2007-09-02 22:52:00 +00:00
|
|
|
[System.CLSCompliant(false)]
|
|
|
|
public static
|
2007-10-26 13:00:16 +00:00
|
|
|
unsafe Int32 UnProject(double winX, double winY, double winZ, double* model, double* proj, Int32* view, double* objX, double* objY, double* objZ)
|
2007-09-02 22:52:00 +00:00
|
|
|
{
|
2007-10-26 13:00:16 +00:00
|
|
|
return Delegates.gluUnProject((double)winX, (double)winY, (double)winZ, (double*)model, (double*)proj, (Int32*)view, (double*)objX, (double*)objY, (double*)objZ);
|
2007-09-02 22:52:00 +00:00
|
|
|
}
|
2007-10-26 13:00:16 +00:00
|
|
|
|
2007-09-02 22:52:00 +00:00
|
|
|
public static
|
2007-10-26 13:00:16 +00:00
|
|
|
Int32 UnProject4(double winX, double winY, double winZ, double clipW, double[] model, double[] proj, Int32[] view, double near, double far, double[] objX, double[] objY, double[] objZ, double[] objW)
|
2007-09-02 22:52:00 +00:00
|
|
|
{
|
|
|
|
unsafe
|
|
|
|
{
|
2007-10-26 13:00:16 +00:00
|
|
|
fixed (double* model_ptr = model)
|
|
|
|
fixed (double* proj_ptr = proj)
|
|
|
|
fixed (Int32* view_ptr = view)
|
|
|
|
fixed (double* objX_ptr = objX)
|
|
|
|
fixed (double* objY_ptr = objY)
|
|
|
|
fixed (double* objZ_ptr = objZ)
|
2007-09-02 22:52:00 +00:00
|
|
|
fixed (double* objW_ptr = objW)
|
|
|
|
{
|
2007-10-26 13:00:16 +00:00
|
|
|
return Delegates.gluUnProject4((double)winX, (double)winY, (double)winZ, (double)clipW, (double*)model_ptr, (double*)proj_ptr, (Int32*)view_ptr, (double)near, (double)far, (double*)objX_ptr, (double*)objY_ptr, (double*)objZ_ptr, (double*)objW_ptr);
|
2007-09-02 22:52:00 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2007-10-26 13:00:16 +00:00
|
|
|
|
2007-09-02 22:52:00 +00:00
|
|
|
public static
|
|
|
|
Int32 UnProject4(double winX, double winY, double winZ, double clipW, ref double model, ref double proj, ref Int32 view, double near, double far, ref double objX, ref double objY, ref double objZ, ref double objW)
|
|
|
|
{
|
|
|
|
unsafe
|
|
|
|
{
|
|
|
|
fixed (double* model_ptr = &model)
|
|
|
|
fixed (double* proj_ptr = &proj)
|
|
|
|
fixed (Int32* view_ptr = &view)
|
|
|
|
fixed (double* objX_ptr = &objX)
|
|
|
|
fixed (double* objY_ptr = &objY)
|
|
|
|
fixed (double* objZ_ptr = &objZ)
|
|
|
|
fixed (double* objW_ptr = &objW)
|
|
|
|
{
|
2007-10-26 13:00:16 +00:00
|
|
|
return Delegates.gluUnProject4((double)winX, (double)winY, (double)winZ, (double)clipW, (double*)model_ptr, (double*)proj_ptr, (Int32*)view_ptr, (double)near, (double)far, (double*)objX_ptr, (double*)objY_ptr, (double*)objZ_ptr, (double*)objW_ptr);
|
2007-09-02 22:52:00 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2007-10-26 13:00:16 +00:00
|
|
|
|
|
|
|
[System.CLSCompliant(false)]
|
|
|
|
public static
|
|
|
|
unsafe Int32 UnProject4(double winX, double winY, double winZ, double clipW, double* model, double* proj, Int32* view, double near, double far, double* objX, double* objY, double* objZ, double* objW)
|
2007-09-02 22:52:00 +00:00
|
|
|
{
|
2007-10-26 13:00:16 +00:00
|
|
|
return Delegates.gluUnProject4((double)winX, (double)winY, (double)winZ, (double)clipW, (double*)model, (double*)proj, (Int32*)view, (double)near, (double)far, (double*)objX, (double*)objY, (double*)objZ, (double*)objW);
|
2007-09-02 22:52:00 +00:00
|
|
|
}
|
|
|
|
|
2007-11-04 15:29:41 +00:00
|
|
|
public static partial class Ext
|
2007-09-02 22:52:00 +00:00
|
|
|
{
|
|
|
|
public static
|
2007-10-26 13:00:16 +00:00
|
|
|
void NurbsCallbackData(int nurb, IntPtr userData)
|
2007-09-02 22:52:00 +00:00
|
|
|
{
|
2008-01-15 09:33:28 +00:00
|
|
|
unsafe
|
|
|
|
{
|
|
|
|
Delegates.gluNurbsCallbackDataEXT((int)nurb, (IntPtr)userData);
|
|
|
|
}
|
2007-09-02 22:52:00 +00:00
|
|
|
}
|
2007-10-26 13:00:16 +00:00
|
|
|
|
2007-09-02 22:52:00 +00:00
|
|
|
public static
|
2007-10-26 13:00:16 +00:00
|
|
|
void NurbsCallbackData(int nurb, [In, Out] object userData)
|
2007-09-02 22:52:00 +00:00
|
|
|
{
|
2008-01-15 09:33:28 +00:00
|
|
|
unsafe
|
2007-09-02 22:52:00 +00:00
|
|
|
{
|
2008-01-15 09:33:28 +00:00
|
|
|
System.Runtime.InteropServices.GCHandle userData_ptr = System.Runtime.InteropServices.GCHandle.Alloc(userData, System.Runtime.InteropServices.GCHandleType.Pinned);
|
|
|
|
try
|
|
|
|
{
|
|
|
|
Delegates.gluNurbsCallbackDataEXT((int)nurb, (IntPtr)userData_ptr.AddrOfPinnedObject());
|
|
|
|
}
|
|
|
|
finally
|
|
|
|
{
|
|
|
|
userData_ptr.Free();
|
|
|
|
}
|
2007-09-02 22:52:00 +00:00
|
|
|
}
|
|
|
|
}
|
2007-10-26 13:00:16 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
|
2007-11-04 15:29:41 +00:00
|
|
|
public static partial class Sgi
|
2007-10-26 13:00:16 +00:00
|
|
|
{
|
2007-09-02 22:52:00 +00:00
|
|
|
public static
|
2008-01-15 09:33:28 +00:00
|
|
|
Int32 TexFilterFunc(OpenTK.OpenGL.Enums.TextureTarget target, OpenTK.OpenGL.Enums.SgisTextureFilter4 filtertype, float[] parms, Int32 n, [Out] float[] weights)
|
2007-09-02 22:52:00 +00:00
|
|
|
{
|
|
|
|
unsafe
|
|
|
|
{
|
|
|
|
fixed (float* parms_ptr = parms)
|
|
|
|
fixed (float* weights_ptr = weights)
|
|
|
|
{
|
2008-01-15 09:33:28 +00:00
|
|
|
return Delegates.gluTexFilterFuncSGI((OpenTK.OpenGL.Enums.TextureTarget)target, (OpenTK.OpenGL.Enums.SgisTextureFilter4)filtertype, (float*)parms_ptr, (Int32)n, (float*)weights_ptr);
|
2007-09-02 22:52:00 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2007-10-26 13:00:16 +00:00
|
|
|
|
2007-09-02 22:52:00 +00:00
|
|
|
public static
|
2008-01-15 09:33:28 +00:00
|
|
|
Int32 TexFilterFunc(OpenTK.OpenGL.Enums.TextureTarget target, OpenTK.OpenGL.Enums.SgisTextureFilter4 filtertype, ref float parms, Int32 n, [Out] out float weights)
|
2007-09-02 22:52:00 +00:00
|
|
|
{
|
|
|
|
unsafe
|
|
|
|
{
|
2007-10-26 13:00:16 +00:00
|
|
|
fixed (float* parms_ptr = &parms)
|
2007-09-02 22:52:00 +00:00
|
|
|
fixed (float* weights_ptr = &weights)
|
|
|
|
{
|
2008-01-15 09:33:28 +00:00
|
|
|
Int32 retval = Delegates.gluTexFilterFuncSGI((OpenTK.OpenGL.Enums.TextureTarget)target, (OpenTK.OpenGL.Enums.SgisTextureFilter4)filtertype, (float*)parms_ptr, (Int32)n, (float*)weights_ptr);
|
2007-10-26 13:00:16 +00:00
|
|
|
weights = *weights_ptr;
|
2007-09-02 22:52:00 +00:00
|
|
|
return retval;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2007-10-26 13:00:16 +00:00
|
|
|
|
2007-09-02 22:52:00 +00:00
|
|
|
[System.CLSCompliant(false)]
|
|
|
|
public static
|
2008-01-15 09:33:28 +00:00
|
|
|
unsafe Int32 TexFilterFunc(OpenTK.OpenGL.Enums.TextureTarget target, OpenTK.OpenGL.Enums.SgisTextureFilter4 filtertype, float* parms, Int32 n, [Out] float* weights)
|
2007-09-02 22:52:00 +00:00
|
|
|
{
|
2008-01-15 09:33:28 +00:00
|
|
|
return Delegates.gluTexFilterFuncSGI((OpenTK.OpenGL.Enums.TextureTarget)target, (OpenTK.OpenGL.Enums.SgisTextureFilter4)filtertype, (float*)parms, (Int32)n, (float*)weights);
|
2007-09-02 22:52:00 +00:00
|
|
|
}
|
2007-10-26 13:00:16 +00:00
|
|
|
|
2007-09-02 22:52:00 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|