Worked around a Visual Studio bug that caused some overloads to become invisible.

This commit is contained in:
the_fiddler 2008-01-20 17:27:30 +00:00
parent 58f0ade060
commit 3f864cbe65

View file

@ -188,13 +188,6 @@ namespace OpenTK.OpenGL
} }
} }
[System.CLSCompliant(false)]
public static
unsafe bool CheckExtension(Byte* extName, Byte* extString)
{
return Delegates.gluCheckExtension((Byte*)extName, (Byte*)extString);
}
public static public static
bool CheckExtension(Byte[] extName, Byte[] extString) bool CheckExtension(Byte[] extName, Byte[] extString)
{ {
@ -221,6 +214,13 @@ namespace OpenTK.OpenGL
} }
} }
[System.CLSCompliant(false)]
public static
unsafe bool CheckExtension(Byte* extName, Byte* extString)
{
return Delegates.gluCheckExtension((Byte*)extName, (Byte*)extString);
}
public static public static
void Cylinder(IntPtr quad, double @base, double top, double height, Int32 slices, Int32 stacks) void Cylinder(IntPtr quad, double @base, double top, double height, Int32 slices, Int32 stacks)
{ {
@ -293,13 +293,6 @@ namespace OpenTK.OpenGL
} }
} }
[System.CLSCompliant(false)]
public static
unsafe void GetNurbsProperty(IntPtr nurb, OpenTK.OpenGL.Enums.NurbsProperty property, [Out] float* data)
{
Delegates.gluGetNurbsProperty((IntPtr)nurb, (OpenTK.OpenGL.Enums.NurbsProperty)property, (float*)data);
}
public static public static
void GetNurbsProperty(IntPtr nurb, OpenTK.OpenGL.Enums.NurbsProperty property, [Out] float[] data) void GetNurbsProperty(IntPtr nurb, OpenTK.OpenGL.Enums.NurbsProperty property, [Out] float[] data)
{ {
@ -327,9 +320,9 @@ namespace OpenTK.OpenGL
[System.CLSCompliant(false)] [System.CLSCompliant(false)]
public static public static
unsafe void GetTessProperty(IntPtr tess, OpenTK.OpenGL.Enums.TessProperty which, [Out] double* data) unsafe void GetNurbsProperty(IntPtr nurb, OpenTK.OpenGL.Enums.NurbsProperty property, [Out] float* data)
{ {
Delegates.gluGetTessProperty((IntPtr)tess, (OpenTK.OpenGL.Enums.TessProperty)which, (double*)data); Delegates.gluGetNurbsProperty((IntPtr)nurb, (OpenTK.OpenGL.Enums.NurbsProperty)property, (float*)data);
} }
public static public static
@ -359,9 +352,9 @@ namespace OpenTK.OpenGL
[System.CLSCompliant(false)] [System.CLSCompliant(false)]
public static public static
unsafe void LoadSamplingMatrices(IntPtr nurb, float* model, float* perspective, Int32* view) unsafe void GetTessProperty(IntPtr tess, OpenTK.OpenGL.Enums.TessProperty which, [Out] double* data)
{ {
Delegates.gluLoadSamplingMatrices((IntPtr)nurb, (float*)model, (float*)perspective, (Int32*)view); Delegates.gluGetTessProperty((IntPtr)tess, (OpenTK.OpenGL.Enums.TessProperty)which, (double*)data);
} }
public static public static
@ -392,6 +385,13 @@ namespace OpenTK.OpenGL
} }
} }
[System.CLSCompliant(false)]
public static
unsafe void LoadSamplingMatrices(IntPtr nurb, float* model, float* perspective, Int32* view)
{
Delegates.gluLoadSamplingMatrices((IntPtr)nurb, (float*)model, (float*)perspective, (Int32*)view);
}
public static public static
void LookAt(double eyeX, double eyeY, double eyeZ, double centerX, double centerY, double centerZ, double upX, double upY, double upZ) void LookAt(double eyeX, double eyeY, double eyeZ, double centerX, double centerY, double centerZ, double upX, double upY, double upZ)
{ {
@ -454,13 +454,6 @@ namespace OpenTK.OpenGL
} }
} }
[System.CLSCompliant(false)]
public static
unsafe void NurbsCurve(IntPtr nurb, Int32 knotCount, [Out] float* knots, Int32 stride, [Out] float* control, Int32 order, OpenTK.OpenGL.Enums.MapTarget type)
{
Delegates.gluNurbsCurve((IntPtr)nurb, (Int32)knotCount, (float*)knots, (Int32)stride, (float*)control, (Int32)order, (OpenTK.OpenGL.Enums.MapTarget)type);
}
public static public static
void NurbsCurve(IntPtr nurb, Int32 knotCount, [Out] float[] knots, Int32 stride, [Out] float[] control, Int32 order, OpenTK.OpenGL.Enums.MapTarget type) void NurbsCurve(IntPtr nurb, Int32 knotCount, [Out] float[] knots, Int32 stride, [Out] float[] control, Int32 order, OpenTK.OpenGL.Enums.MapTarget type)
{ {
@ -489,19 +482,19 @@ namespace OpenTK.OpenGL
} }
} }
[System.CLSCompliant(false)]
public static
unsafe void NurbsCurve(IntPtr nurb, Int32 knotCount, [Out] float* knots, Int32 stride, [Out] float* control, Int32 order, OpenTK.OpenGL.Enums.MapTarget type)
{
Delegates.gluNurbsCurve((IntPtr)nurb, (Int32)knotCount, (float*)knots, (Int32)stride, (float*)control, (Int32)order, (OpenTK.OpenGL.Enums.MapTarget)type);
}
public static public static
void NurbsProperty(IntPtr nurb, OpenTK.OpenGL.Enums.NurbsProperty property, float value) void NurbsProperty(IntPtr nurb, OpenTK.OpenGL.Enums.NurbsProperty property, float value)
{ {
Delegates.gluNurbsProperty((IntPtr)nurb, (OpenTK.OpenGL.Enums.NurbsProperty)property, (float)value); Delegates.gluNurbsProperty((IntPtr)nurb, (OpenTK.OpenGL.Enums.NurbsProperty)property, (float)value);
} }
[System.CLSCompliant(false)]
public static
unsafe void NurbsSurface(IntPtr nurb, Int32 sKnotCount, float* sKnots, Int32 tKnotCount, float* tKnots, Int32 sStride, Int32 tStride, float* control, Int32 sOrder, Int32 tOrder, OpenTK.OpenGL.Enums.MapTarget type)
{
Delegates.gluNurbsSurface((IntPtr)nurb, (Int32)sKnotCount, (float*)sKnots, (Int32)tKnotCount, (float*)tKnots, (Int32)sStride, (Int32)tStride, (float*)control, (Int32)sOrder, (Int32)tOrder, (OpenTK.OpenGL.Enums.MapTarget)type);
}
public static public static
void NurbsSurface(IntPtr nurb, Int32 sKnotCount, float[] sKnots, Int32 tKnotCount, float[] tKnots, Int32 sStride, Int32 tStride, float[] control, Int32 sOrder, Int32 tOrder, OpenTK.OpenGL.Enums.MapTarget type) void NurbsSurface(IntPtr nurb, Int32 sKnotCount, float[] sKnots, Int32 tKnotCount, float[] tKnots, Int32 sStride, Int32 tStride, float[] control, Int32 sOrder, Int32 tOrder, OpenTK.OpenGL.Enums.MapTarget type)
{ {
@ -530,6 +523,13 @@ namespace OpenTK.OpenGL
} }
} }
[System.CLSCompliant(false)]
public static
unsafe void NurbsSurface(IntPtr nurb, Int32 sKnotCount, float* sKnots, Int32 tKnotCount, float* tKnots, Int32 sStride, Int32 tStride, float* control, Int32 sOrder, Int32 tOrder, OpenTK.OpenGL.Enums.MapTarget type)
{
Delegates.gluNurbsSurface((IntPtr)nurb, (Int32)sKnotCount, (float*)sKnots, (Int32)tKnotCount, (float*)tKnots, (Int32)sStride, (Int32)tStride, (float*)control, (Int32)sOrder, (Int32)tOrder, (OpenTK.OpenGL.Enums.MapTarget)type);
}
public static public static
void Ortho2D(double left, double right, double bottom, double top) void Ortho2D(double left, double right, double bottom, double top)
{ {
@ -548,13 +548,6 @@ namespace OpenTK.OpenGL
Delegates.gluPerspective((double)fovy, (double)aspect, (double)zNear, (double)zFar); Delegates.gluPerspective((double)fovy, (double)aspect, (double)zNear, (double)zFar);
} }
[System.CLSCompliant(false)]
public static
unsafe void PickMatrix(double x, double y, double delX, double delY, [Out] Int32* viewport)
{
Delegates.gluPickMatrix((double)x, (double)y, (double)delX, (double)delY, (Int32*)viewport);
}
public static public static
void PickMatrix(double x, double y, double delX, double delY, [Out] Int32[] viewport) void PickMatrix(double x, double y, double delX, double delY, [Out] Int32[] viewport)
{ {
@ -582,9 +575,9 @@ namespace OpenTK.OpenGL
[System.CLSCompliant(false)] [System.CLSCompliant(false)]
public static public static
unsafe Int32 Project(double objX, double objY, double objZ, double* model, double* proj, Int32* view, double* winX, double* winY, double* winZ) unsafe void PickMatrix(double x, double y, double delX, double delY, [Out] Int32* viewport)
{ {
return Delegates.gluProject((double)objX, (double)objY, (double)objZ, (double*)model, (double*)proj, (Int32*)view, (double*)winX, (double*)winY, (double*)winZ); Delegates.gluPickMatrix((double)x, (double)y, (double)delX, (double)delY, (Int32*)viewport);
} }
public static public static
@ -623,9 +616,9 @@ namespace OpenTK.OpenGL
[System.CLSCompliant(false)] [System.CLSCompliant(false)]
public static public static
unsafe void PwlCurve(IntPtr nurb, Int32 count, float* data, Int32 stride, OpenTK.OpenGL.Enums.NurbsTrim type) unsafe Int32 Project(double objX, double objY, double objZ, double* model, double* proj, Int32* view, double* winX, double* winY, double* winZ)
{ {
Delegates.gluPwlCurve((IntPtr)nurb, (Int32)count, (float*)data, (Int32)stride, (OpenTK.OpenGL.Enums.NurbsTrim)type); return Delegates.gluProject((double)objX, (double)objY, (double)objZ, (double*)model, (double*)proj, (Int32*)view, (double*)winX, (double*)winY, (double*)winZ);
} }
public static public static
@ -652,6 +645,13 @@ namespace OpenTK.OpenGL
} }
} }
[System.CLSCompliant(false)]
public static
unsafe void PwlCurve(IntPtr nurb, Int32 count, float* data, Int32 stride, OpenTK.OpenGL.Enums.NurbsTrim type)
{
Delegates.gluPwlCurve((IntPtr)nurb, (Int32)count, (float*)data, (Int32)stride, (OpenTK.OpenGL.Enums.NurbsTrim)type);
}
public static public static
void QuadricCallback(IntPtr quad, OpenTK.OpenGL.Enums.QuadricCallback which, Delegate CallBackFunc) void QuadricCallback(IntPtr quad, OpenTK.OpenGL.Enums.QuadricCallback which, Delegate CallBackFunc)
{ {
@ -778,28 +778,6 @@ namespace OpenTK.OpenGL
Delegates.gluTessProperty((IntPtr)tess, (OpenTK.OpenGL.Enums.TessProperty)which, (double)data); Delegates.gluTessProperty((IntPtr)tess, (OpenTK.OpenGL.Enums.TessProperty)which, (double)data);
} }
[System.CLSCompliant(false)]
public static
unsafe void TessVertex(IntPtr tess, double* location, IntPtr data)
{
Delegates.gluTessVertex((IntPtr)tess, (double*)location, (IntPtr)data);
}
[System.CLSCompliant(false)]
public static
unsafe void TessVertex(IntPtr tess, double* location, [In, Out] object data)
{
System.Runtime.InteropServices.GCHandle data_ptr = System.Runtime.InteropServices.GCHandle.Alloc(data, System.Runtime.InteropServices.GCHandleType.Pinned);
try
{
Delegates.gluTessVertex((IntPtr)tess, (double*)location, (IntPtr)data_ptr.AddrOfPinnedObject());
}
finally
{
data_ptr.Free();
}
}
public static public static
void TessVertex(IntPtr tess, double[] location, IntPtr data) void TessVertex(IntPtr tess, double[] location, IntPtr data)
{ {
@ -850,15 +828,6 @@ namespace OpenTK.OpenGL
unsafe unsafe
{ {
fixed (double* location_ptr = &location) fixed (double* location_ptr = &location)
{
if (data is System.Array)
{
fixed (byte* data_ptr = (object[])data)
{
Delegates.gluTessVertex((IntPtr)tess, (double*)location_ptr, (IntPtr)data_ptr);
}
}
else
{ {
System.Runtime.InteropServices.GCHandle data_ptr = System.Runtime.InteropServices.GCHandle.Alloc(data, System.Runtime.InteropServices.GCHandleType.Pinned); System.Runtime.InteropServices.GCHandle data_ptr = System.Runtime.InteropServices.GCHandle.Alloc(data, System.Runtime.InteropServices.GCHandleType.Pinned);
try try
@ -872,13 +841,27 @@ namespace OpenTK.OpenGL
} }
} }
} }
[System.CLSCompliant(false)]
public static
unsafe void TessVertex(IntPtr tess, double* location, IntPtr data)
{
Delegates.gluTessVertex((IntPtr)tess, (double*)location, (IntPtr)data);
} }
[System.CLSCompliant(false)] [System.CLSCompliant(false)]
public static public static
unsafe Int32 UnProject(double winX, double winY, double winZ, double* model, double* proj, Int32* view, double* objX, double* objY, double* objZ) unsafe void TessVertex(IntPtr tess, double* location, [In, Out] object data)
{ {
return Delegates.gluUnProject((double)winX, (double)winY, (double)winZ, (double*)model, (double*)proj, (Int32*)view, (double*)objX, (double*)objY, (double*)objZ); System.Runtime.InteropServices.GCHandle data_ptr = System.Runtime.InteropServices.GCHandle.Alloc(data, System.Runtime.InteropServices.GCHandleType.Pinned);
try
{
Delegates.gluTessVertex((IntPtr)tess, (double*)location, (IntPtr)data_ptr.AddrOfPinnedObject());
}
finally
{
data_ptr.Free();
}
} }
public static public static
@ -917,9 +900,9 @@ namespace OpenTK.OpenGL
[System.CLSCompliant(false)] [System.CLSCompliant(false)]
public static 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) unsafe Int32 UnProject(double winX, double winY, double winZ, double* model, double* proj, Int32* view, double* objX, double* objY, double* objZ)
{ {
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); return Delegates.gluUnProject((double)winX, (double)winY, (double)winZ, (double*)model, (double*)proj, (Int32*)view, (double*)objX, (double*)objY, (double*)objZ);
} }
public static public static
@ -958,6 +941,13 @@ namespace OpenTK.OpenGL
} }
} }
[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)
{
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);
}
public static partial class Ext public static partial class Ext
{ {
public static public static
@ -990,13 +980,6 @@ namespace OpenTK.OpenGL
public static partial class Sgi public static partial class Sgi
{ {
[System.CLSCompliant(false)]
public static
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.SgisTextureFilter4)filtertype, (float*)parms, (Int32)n, (float*)weights);
}
public static public static
Int32 TexFilterFunc(OpenTK.OpenGL.Enums.TextureTarget target, OpenTK.OpenGL.Enums.SgisTextureFilter4 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)
{ {
@ -1025,6 +1008,13 @@ namespace OpenTK.OpenGL
} }
} }
[System.CLSCompliant(false)]
public static
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.SgisTextureFilter4)filtertype, (float*)parms, (Int32)n, (float*)weights);
}
} }
} }