Moved OpenTK.Graphics.OpenGL to OpenTK.Graphics.

This commit is contained in:
the_fiddler 2008-04-13 16:45:56 +00:00
parent d1df1a27ca
commit 57b097f7d0
19 changed files with 4694 additions and 4705 deletions

View file

@ -8,8 +8,7 @@ using System;
using System.Diagnostics; using System.Diagnostics;
using OpenTK; using OpenTK;
using OpenTK.Graphics.OpenGL; using OpenTK.Graphics;
using OpenTK.Graphics.OpenGL.Enums;
using OpenTK.Input; using OpenTK.Input;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;

View file

@ -10,9 +10,8 @@ using System.Text;
using System.Drawing; using System.Drawing;
using OpenTK; using OpenTK;
using OpenTK.Graphics.OpenGL; using OpenTK.Graphics;
using Examples.Shapes; using Examples.Shapes;
using OpenTK.Graphics.OpenGL.Enums;
namespace Examples.Tutorial namespace Examples.Tutorial
{ {

View file

@ -16,8 +16,7 @@ using System.Windows.Forms;
using System.Threading; using System.Threading;
using OpenTK; using OpenTK;
using OpenTK.Graphics.OpenGL; using OpenTK.Graphics;
using OpenTK.Graphics.OpenGL.Enums;
#endregion --- Using Directives --- #endregion --- Using Directives ---

View file

@ -9,13 +9,12 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Text; using System.Text;
using System.Runtime.InteropServices;
using System.Threading;
using OpenTK; using OpenTK;
using OpenTK.Graphics.OpenGL; using OpenTK.Graphics;
using OpenTK.Platform; using OpenTK.Platform;
using System.Threading;
using OpenTK.Graphics.OpenGL.Enums;
using System.Runtime.InteropServices;
using OpenTK.Math; using OpenTK.Math;
#endregion #endregion

View file

@ -20,8 +20,6 @@ using OpenTK.Graphics.OpenGL.Enums;
namespace Examples.Tutorial namespace Examples.Tutorial
{ {
using PixelFormat = OpenTK.Graphics.OpenGL.PixelFormat;
/// <summary> /// <summary>
/// Demonstrates simple OpenGL Texturing. /// Demonstrates simple OpenGL Texturing.
/// </summary> /// </summary>
@ -53,7 +51,7 @@ namespace Examples.Tutorial
ImageLockMode.ReadOnly, System.Drawing.Imaging.PixelFormat.Format32bppArgb); ImageLockMode.ReadOnly, System.Drawing.Imaging.PixelFormat.Format32bppArgb);
GL.TexImage2D(TextureTarget.Texture2D, 0, PixelInternalFormat.Rgba, data.Width, data.Height, 0, GL.TexImage2D(TextureTarget.Texture2D, 0, PixelInternalFormat.Rgba, data.Width, data.Height, 0,
PixelFormat.Bgra, PixelType.UnsignedByte, data.Scan0); OpenTK.Graphics.PixelFormat.Bgra, PixelType.UnsignedByte, data.Scan0);
bitmap.UnlockBits(data); bitmap.UnlockBits(data);

View file

@ -7,8 +7,7 @@ using System.Text;
using System.Windows.Forms; using System.Windows.Forms;
using OpenTK; using OpenTK;
using OpenTK.Graphics.OpenGL; using OpenTK.Graphics;
using OpenTK.Graphics.OpenGL.Enums;
namespace Examples.WinForms namespace Examples.WinForms
{ {

View file

@ -15,8 +15,7 @@ using System.Text;
using System.Windows.Forms; using System.Windows.Forms;
using OpenTK; using OpenTK;
using OpenTK.Graphics.OpenGL; using OpenTK.Graphics;
using OpenTK.Graphics.OpenGL.Enums;
#endregion #endregion

View file

@ -14,12 +14,10 @@ using System.Drawing;
using System.Text; using System.Text;
using System.Windows.Forms; using System.Windows.Forms;
using System.Diagnostics; using System.Diagnostics;
using OpenTK.Graphics.OpenGL;
//using Enums = OpenTK.Graphics.OpenGL.GL.Enums;
using OpenTK.Platform;
using System.Threading; using System.Threading;
using OpenTK.Graphics.OpenGL.Enums;
using OpenTK.Graphics;
using OpenTK.Platform;
#endregion #endregion

View file

@ -1,4 +1,4 @@
namespace OpenTK.Graphics.OpenGL namespace OpenTK.Graphics
{ {
#pragma warning disable 1591 #pragma warning disable 1591

View file

@ -26,7 +26,7 @@ namespace OpenTK.Graphics.OpenGL.Enums
internal static class Dummy { } internal static class Dummy { }
} }
namespace OpenTK.Graphics.OpenGL namespace OpenTK.Graphics
{ {
/// <summary> /// <summary>
/// OpenGL binding for .NET, implementing OpenGL 2.1, plus extensions. /// OpenGL binding for .NET, implementing OpenGL 2.1, plus extensions.

View file

@ -1,4 +1,4 @@
namespace OpenTK.Graphics.OpenGL namespace OpenTK.Graphics
{ {
using System; using System;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
@ -276,43 +276,43 @@ namespace OpenTK.Graphics.OpenGL
} }
public static public static
string ErrorString(OpenTK.Graphics.OpenGL.GluErrorCode error) string ErrorString(OpenTK.Graphics.GluErrorCode error)
{ {
unsafe unsafe
{ {
return System.Runtime.InteropServices.Marshal.PtrToStringAnsi(Delegates.gluErrorString((OpenTK.Graphics.OpenGL.GluErrorCode)error)); return System.Runtime.InteropServices.Marshal.PtrToStringAnsi(Delegates.gluErrorString((OpenTK.Graphics.GluErrorCode)error));
} }
} }
public static public static
string GetString(OpenTK.Graphics.OpenGL.GluStringName name) string GetString(OpenTK.Graphics.GluStringName name)
{ {
unsafe unsafe
{ {
return System.Runtime.InteropServices.Marshal.PtrToStringAnsi(Delegates.gluGetString((OpenTK.Graphics.OpenGL.GluStringName)name)); return System.Runtime.InteropServices.Marshal.PtrToStringAnsi(Delegates.gluGetString((OpenTK.Graphics.GluStringName)name));
} }
} }
public static public static
void GetNurbsProperty(IntPtr nurb, OpenTK.Graphics.OpenGL.NurbsProperty property, [Out] float[] data) void GetNurbsProperty(IntPtr nurb, OpenTK.Graphics.NurbsProperty property, [Out] float[] data)
{ {
unsafe unsafe
{ {
fixed (float* data_ptr = data) fixed (float* data_ptr = data)
{ {
Delegates.gluGetNurbsProperty((IntPtr)nurb, (OpenTK.Graphics.OpenGL.NurbsProperty)property, (float*)data_ptr); Delegates.gluGetNurbsProperty((IntPtr)nurb, (OpenTK.Graphics.NurbsProperty)property, (float*)data_ptr);
} }
} }
} }
public static public static
void GetNurbsProperty(IntPtr nurb, OpenTK.Graphics.OpenGL.NurbsProperty property, [Out] out float data) void GetNurbsProperty(IntPtr nurb, OpenTK.Graphics.NurbsProperty property, [Out] out float data)
{ {
unsafe unsafe
{ {
fixed (float* data_ptr = &data) fixed (float* data_ptr = &data)
{ {
Delegates.gluGetNurbsProperty((IntPtr)nurb, (OpenTK.Graphics.OpenGL.NurbsProperty)property, (float*)data_ptr); Delegates.gluGetNurbsProperty((IntPtr)nurb, (OpenTK.Graphics.NurbsProperty)property, (float*)data_ptr);
data = *data_ptr; data = *data_ptr;
} }
} }
@ -320,31 +320,31 @@ namespace OpenTK.Graphics.OpenGL
[System.CLSCompliant(false)] [System.CLSCompliant(false)]
public static public static
unsafe void GetNurbsProperty(IntPtr nurb, OpenTK.Graphics.OpenGL.NurbsProperty property, [Out] float* data) unsafe void GetNurbsProperty(IntPtr nurb, OpenTK.Graphics.NurbsProperty property, [Out] float* data)
{ {
Delegates.gluGetNurbsProperty((IntPtr)nurb, (OpenTK.Graphics.OpenGL.NurbsProperty)property, (float*)data); Delegates.gluGetNurbsProperty((IntPtr)nurb, (OpenTK.Graphics.NurbsProperty)property, (float*)data);
} }
public static public static
void GetTessProperty(IntPtr tess, OpenTK.Graphics.OpenGL.TessParameter which, [Out] double[] data) void GetTessProperty(IntPtr tess, OpenTK.Graphics.TessParameter which, [Out] double[] data)
{ {
unsafe unsafe
{ {
fixed (double* data_ptr = data) fixed (double* data_ptr = data)
{ {
Delegates.gluGetTessProperty((IntPtr)tess, (OpenTK.Graphics.OpenGL.TessParameter)which, (double*)data_ptr); Delegates.gluGetTessProperty((IntPtr)tess, (OpenTK.Graphics.TessParameter)which, (double*)data_ptr);
} }
} }
} }
public static public static
void GetTessProperty(IntPtr tess, OpenTK.Graphics.OpenGL.TessParameter which, [Out] out double data) void GetTessProperty(IntPtr tess, OpenTK.Graphics.TessParameter which, [Out] out double data)
{ {
unsafe unsafe
{ {
fixed (double* data_ptr = &data) fixed (double* data_ptr = &data)
{ {
Delegates.gluGetTessProperty((IntPtr)tess, (OpenTK.Graphics.OpenGL.TessParameter)which, (double*)data_ptr); Delegates.gluGetTessProperty((IntPtr)tess, (OpenTK.Graphics.TessParameter)which, (double*)data_ptr);
data = *data_ptr; data = *data_ptr;
} }
} }
@ -352,9 +352,9 @@ namespace OpenTK.Graphics.OpenGL
[System.CLSCompliant(false)] [System.CLSCompliant(false)]
public static public static
unsafe void GetTessProperty(IntPtr tess, OpenTK.Graphics.OpenGL.TessParameter which, [Out] double* data) unsafe void GetTessProperty(IntPtr tess, OpenTK.Graphics.TessParameter which, [Out] double* data)
{ {
Delegates.gluGetTessProperty((IntPtr)tess, (OpenTK.Graphics.OpenGL.TessParameter)which, (double*)data); Delegates.gluGetTessProperty((IntPtr)tess, (OpenTK.Graphics.TessParameter)which, (double*)data);
} }
public static public static
@ -417,15 +417,15 @@ namespace OpenTK.Graphics.OpenGL
} }
public static public static
void NextContour(IntPtr tess, OpenTK.Graphics.OpenGL.TessContour type) void NextContour(IntPtr tess, OpenTK.Graphics.TessContour type)
{ {
Delegates.gluNextContour((IntPtr)tess, (OpenTK.Graphics.OpenGL.TessContour)type); Delegates.gluNextContour((IntPtr)tess, (OpenTK.Graphics.TessContour)type);
} }
public static public static
void NurbsCallback(IntPtr nurb, OpenTK.Graphics.OpenGL.NurbsCallback which, Delegate CallBackFunc) void NurbsCallback(IntPtr nurb, OpenTK.Graphics.NurbsCallback which, Delegate CallBackFunc)
{ {
Delegates.gluNurbsCallback((IntPtr)nurb, (OpenTK.Graphics.OpenGL.NurbsCallback)which, (Delegate)CallBackFunc); Delegates.gluNurbsCallback((IntPtr)nurb, (OpenTK.Graphics.NurbsCallback)which, (Delegate)CallBackFunc);
} }
public static public static
@ -490,9 +490,9 @@ namespace OpenTK.Graphics.OpenGL
} }
public static public static
void NurbsProperty(IntPtr nurb, OpenTK.Graphics.OpenGL.NurbsProperty property, float value) void NurbsProperty(IntPtr nurb, OpenTK.Graphics.NurbsProperty property, float value)
{ {
Delegates.gluNurbsProperty((IntPtr)nurb, (OpenTK.Graphics.OpenGL.NurbsProperty)property, (float)value); Delegates.gluNurbsProperty((IntPtr)nurb, (OpenTK.Graphics.NurbsProperty)property, (float)value);
} }
public static public static
@ -622,58 +622,58 @@ namespace OpenTK.Graphics.OpenGL
} }
public static public static
void PwlCurve(IntPtr nurb, Int32 count, float[] data, Int32 stride, OpenTK.Graphics.OpenGL.NurbsTrim type) void PwlCurve(IntPtr nurb, Int32 count, float[] data, Int32 stride, OpenTK.Graphics.NurbsTrim type)
{ {
unsafe unsafe
{ {
fixed (float* data_ptr = data) fixed (float* data_ptr = data)
{ {
Delegates.gluPwlCurve((IntPtr)nurb, (Int32)count, (float*)data_ptr, (Int32)stride, (OpenTK.Graphics.OpenGL.NurbsTrim)type); Delegates.gluPwlCurve((IntPtr)nurb, (Int32)count, (float*)data_ptr, (Int32)stride, (OpenTK.Graphics.NurbsTrim)type);
} }
} }
} }
public static public static
void PwlCurve(IntPtr nurb, Int32 count, ref float data, Int32 stride, OpenTK.Graphics.OpenGL.NurbsTrim type) void PwlCurve(IntPtr nurb, Int32 count, ref float data, Int32 stride, OpenTK.Graphics.NurbsTrim type)
{ {
unsafe unsafe
{ {
fixed (float* data_ptr = &data) fixed (float* data_ptr = &data)
{ {
Delegates.gluPwlCurve((IntPtr)nurb, (Int32)count, (float*)data_ptr, (Int32)stride, (OpenTK.Graphics.OpenGL.NurbsTrim)type); Delegates.gluPwlCurve((IntPtr)nurb, (Int32)count, (float*)data_ptr, (Int32)stride, (OpenTK.Graphics.NurbsTrim)type);
} }
} }
} }
[System.CLSCompliant(false)] [System.CLSCompliant(false)]
public static public static
unsafe void PwlCurve(IntPtr nurb, Int32 count, float* data, Int32 stride, OpenTK.Graphics.OpenGL.NurbsTrim type) unsafe void PwlCurve(IntPtr nurb, Int32 count, float* data, Int32 stride, OpenTK.Graphics.NurbsTrim type)
{ {
Delegates.gluPwlCurve((IntPtr)nurb, (Int32)count, (float*)data, (Int32)stride, (OpenTK.Graphics.OpenGL.NurbsTrim)type); Delegates.gluPwlCurve((IntPtr)nurb, (Int32)count, (float*)data, (Int32)stride, (OpenTK.Graphics.NurbsTrim)type);
} }
public static public static
void QuadricCallback(IntPtr quad, OpenTK.Graphics.OpenGL.QuadricCallback which, Delegate CallBackFunc) void QuadricCallback(IntPtr quad, OpenTK.Graphics.QuadricCallback which, Delegate CallBackFunc)
{ {
Delegates.gluQuadricCallback((IntPtr)quad, (OpenTK.Graphics.OpenGL.QuadricCallback)which, (Delegate)CallBackFunc); Delegates.gluQuadricCallback((IntPtr)quad, (OpenTK.Graphics.QuadricCallback)which, (Delegate)CallBackFunc);
} }
public static public static
void QuadricDrawStyle(IntPtr quad, OpenTK.Graphics.OpenGL.QuadricDrawStyle draw) void QuadricDrawStyle(IntPtr quad, OpenTK.Graphics.QuadricDrawStyle draw)
{ {
Delegates.gluQuadricDrawStyle((IntPtr)quad, (OpenTK.Graphics.OpenGL.QuadricDrawStyle)draw); Delegates.gluQuadricDrawStyle((IntPtr)quad, (OpenTK.Graphics.QuadricDrawStyle)draw);
} }
public static public static
void QuadricNormal(IntPtr quad, OpenTK.Graphics.OpenGL.QuadricNormal normal) void QuadricNormal(IntPtr quad, OpenTK.Graphics.QuadricNormal normal)
{ {
Delegates.gluQuadricNormals((IntPtr)quad, (OpenTK.Graphics.OpenGL.QuadricNormal)normal); Delegates.gluQuadricNormals((IntPtr)quad, (OpenTK.Graphics.QuadricNormal)normal);
} }
public static public static
void QuadricOrientation(IntPtr quad, OpenTK.Graphics.OpenGL.QuadricOrientation orientation) void QuadricOrientation(IntPtr quad, OpenTK.Graphics.QuadricOrientation orientation)
{ {
Delegates.gluQuadricOrientation((IntPtr)quad, (OpenTK.Graphics.OpenGL.QuadricOrientation)orientation); Delegates.gluQuadricOrientation((IntPtr)quad, (OpenTK.Graphics.QuadricOrientation)orientation);
} }
public static public static
@ -749,9 +749,9 @@ namespace OpenTK.Graphics.OpenGL
} }
public static public static
void TessCallback(IntPtr tess, OpenTK.Graphics.OpenGL.TessCallback which, Delegate CallBackFunc) void TessCallback(IntPtr tess, OpenTK.Graphics.TessCallback which, Delegate CallBackFunc)
{ {
Delegates.gluTessCallback((IntPtr)tess, (OpenTK.Graphics.OpenGL.TessCallback)which, (Delegate)CallBackFunc); Delegates.gluTessCallback((IntPtr)tess, (OpenTK.Graphics.TessCallback)which, (Delegate)CallBackFunc);
} }
public static public static
@ -773,9 +773,9 @@ namespace OpenTK.Graphics.OpenGL
} }
public static public static
void TessProperty(IntPtr tess, OpenTK.Graphics.OpenGL.TessParameter which, double data) void TessProperty(IntPtr tess, OpenTK.Graphics.TessParameter which, double data)
{ {
Delegates.gluTessProperty((IntPtr)tess, (OpenTK.Graphics.OpenGL.TessParameter)which, (double)data); Delegates.gluTessProperty((IntPtr)tess, (OpenTK.Graphics.TessParameter)which, (double)data);
} }
public static public static

View file

@ -1,4 +1,4 @@
namespace OpenTK.Graphics.OpenGL namespace OpenTK.Graphics
{ {
using System; using System;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
@ -73,16 +73,16 @@ namespace OpenTK.Graphics.OpenGL
internal extern static void EndTrim(IntPtr nurb); internal extern static void EndTrim(IntPtr nurb);
[System.Security.SuppressUnmanagedCodeSecurity()] [System.Security.SuppressUnmanagedCodeSecurity()]
[System.Runtime.InteropServices.DllImport(Glu.Library, EntryPoint = "gluErrorString", ExactSpelling = true)] [System.Runtime.InteropServices.DllImport(Glu.Library, EntryPoint = "gluErrorString", ExactSpelling = true)]
internal extern static IntPtr ErrorString(OpenTK.Graphics.OpenGL.GluErrorCode error); internal extern static IntPtr ErrorString(OpenTK.Graphics.GluErrorCode error);
[System.Security.SuppressUnmanagedCodeSecurity()] [System.Security.SuppressUnmanagedCodeSecurity()]
[System.Runtime.InteropServices.DllImport(Glu.Library, EntryPoint = "gluGetString", ExactSpelling = true)] [System.Runtime.InteropServices.DllImport(Glu.Library, EntryPoint = "gluGetString", ExactSpelling = true)]
internal extern static IntPtr GetString(OpenTK.Graphics.OpenGL.GluStringName name); internal extern static IntPtr GetString(OpenTK.Graphics.GluStringName name);
[System.Security.SuppressUnmanagedCodeSecurity()] [System.Security.SuppressUnmanagedCodeSecurity()]
[System.Runtime.InteropServices.DllImport(Glu.Library, EntryPoint = "gluGetNurbsProperty", ExactSpelling = true)] [System.Runtime.InteropServices.DllImport(Glu.Library, EntryPoint = "gluGetNurbsProperty", ExactSpelling = true)]
internal extern static unsafe void GetNurbsProperty(IntPtr nurb, OpenTK.Graphics.OpenGL.NurbsProperty property, [Out] float* data); internal extern static unsafe void GetNurbsProperty(IntPtr nurb, OpenTK.Graphics.NurbsProperty property, [Out] float* data);
[System.Security.SuppressUnmanagedCodeSecurity()] [System.Security.SuppressUnmanagedCodeSecurity()]
[System.Runtime.InteropServices.DllImport(Glu.Library, EntryPoint = "gluGetTessProperty", ExactSpelling = true)] [System.Runtime.InteropServices.DllImport(Glu.Library, EntryPoint = "gluGetTessProperty", ExactSpelling = true)]
internal extern static unsafe void GetTessProperty(IntPtr tess, OpenTK.Graphics.OpenGL.TessParameter which, [Out] double* data); internal extern static unsafe void GetTessProperty(IntPtr tess, OpenTK.Graphics.TessParameter which, [Out] double* data);
[System.Security.SuppressUnmanagedCodeSecurity()] [System.Security.SuppressUnmanagedCodeSecurity()]
[System.Runtime.InteropServices.DllImport(Glu.Library, EntryPoint = "gluLoadSamplingMatrices", ExactSpelling = true)] [System.Runtime.InteropServices.DllImport(Glu.Library, EntryPoint = "gluLoadSamplingMatrices", ExactSpelling = true)]
internal extern static unsafe void LoadSamplingMatrices(IntPtr nurb, float* model, float* perspective, Int32* view); internal extern static unsafe void LoadSamplingMatrices(IntPtr nurb, float* model, float* perspective, Int32* view);
@ -100,10 +100,10 @@ namespace OpenTK.Graphics.OpenGL
internal extern static IntPtr NewTess(); internal extern static IntPtr NewTess();
[System.Security.SuppressUnmanagedCodeSecurity()] [System.Security.SuppressUnmanagedCodeSecurity()]
[System.Runtime.InteropServices.DllImport(Glu.Library, EntryPoint = "gluNextContour", ExactSpelling = true)] [System.Runtime.InteropServices.DllImport(Glu.Library, EntryPoint = "gluNextContour", ExactSpelling = true)]
internal extern static void NextContour(IntPtr tess, OpenTK.Graphics.OpenGL.TessContour type); internal extern static void NextContour(IntPtr tess, OpenTK.Graphics.TessContour type);
[System.Security.SuppressUnmanagedCodeSecurity()] [System.Security.SuppressUnmanagedCodeSecurity()]
[System.Runtime.InteropServices.DllImport(Glu.Library, EntryPoint = "gluNurbsCallback", ExactSpelling = true)] [System.Runtime.InteropServices.DllImport(Glu.Library, EntryPoint = "gluNurbsCallback", ExactSpelling = true)]
internal extern static void NurbsCallback(IntPtr nurb, OpenTK.Graphics.OpenGL.NurbsCallback which, Delegate CallBackFunc); internal extern static void NurbsCallback(IntPtr nurb, OpenTK.Graphics.NurbsCallback which, Delegate CallBackFunc);
[System.Security.SuppressUnmanagedCodeSecurity()] [System.Security.SuppressUnmanagedCodeSecurity()]
[System.Runtime.InteropServices.DllImport(Glu.Library, EntryPoint = "gluNurbsCallbackData", ExactSpelling = true)] [System.Runtime.InteropServices.DllImport(Glu.Library, EntryPoint = "gluNurbsCallbackData", ExactSpelling = true)]
internal extern static void NurbsCallbackData(IntPtr nurb, IntPtr userData); internal extern static void NurbsCallbackData(IntPtr nurb, IntPtr userData);
@ -112,7 +112,7 @@ namespace OpenTK.Graphics.OpenGL
internal extern static unsafe void NurbsCurve(IntPtr nurb, Int32 knotCount, [Out] float* knots, Int32 stride, [Out] float* control, Int32 order, MapTarget type); internal extern static unsafe void NurbsCurve(IntPtr nurb, Int32 knotCount, [Out] float* knots, Int32 stride, [Out] float* control, Int32 order, MapTarget type);
[System.Security.SuppressUnmanagedCodeSecurity()] [System.Security.SuppressUnmanagedCodeSecurity()]
[System.Runtime.InteropServices.DllImport(Glu.Library, EntryPoint = "gluNurbsProperty", ExactSpelling = true)] [System.Runtime.InteropServices.DllImport(Glu.Library, EntryPoint = "gluNurbsProperty", ExactSpelling = true)]
internal extern static void NurbsProperty(IntPtr nurb, OpenTK.Graphics.OpenGL.NurbsProperty property, float value); internal extern static void NurbsProperty(IntPtr nurb, OpenTK.Graphics.NurbsProperty property, float value);
[System.Security.SuppressUnmanagedCodeSecurity()] [System.Security.SuppressUnmanagedCodeSecurity()]
[System.Runtime.InteropServices.DllImport(Glu.Library, EntryPoint = "gluNurbsSurface", ExactSpelling = true)] [System.Runtime.InteropServices.DllImport(Glu.Library, EntryPoint = "gluNurbsSurface", ExactSpelling = true)]
internal extern static unsafe void NurbsSurface(IntPtr nurb, Int32 sKnotCount, float* sKnots, Int32 tKnotCount, float* tKnots, Int32 sStride, Int32 tStride, float* control, Int32 sOrder, Int32 tOrder, MapTarget type); internal extern static unsafe void NurbsSurface(IntPtr nurb, Int32 sKnotCount, float* sKnots, Int32 tKnotCount, float* tKnots, Int32 sStride, Int32 tStride, float* control, Int32 sOrder, Int32 tOrder, MapTarget type);
@ -133,19 +133,19 @@ namespace OpenTK.Graphics.OpenGL
internal extern static unsafe Int32 Project(double objX, double objY, double objZ, double* model, double* proj, Int32* view, double* winX, double* winY, double* winZ); internal extern static unsafe Int32 Project(double objX, double objY, double objZ, double* model, double* proj, Int32* view, double* winX, double* winY, double* winZ);
[System.Security.SuppressUnmanagedCodeSecurity()] [System.Security.SuppressUnmanagedCodeSecurity()]
[System.Runtime.InteropServices.DllImport(Glu.Library, EntryPoint = "gluPwlCurve", ExactSpelling = true)] [System.Runtime.InteropServices.DllImport(Glu.Library, EntryPoint = "gluPwlCurve", ExactSpelling = true)]
internal extern static unsafe void PwlCurve(IntPtr nurb, Int32 count, float* data, Int32 stride, OpenTK.Graphics.OpenGL.NurbsTrim type); internal extern static unsafe void PwlCurve(IntPtr nurb, Int32 count, float* data, Int32 stride, OpenTK.Graphics.NurbsTrim type);
[System.Security.SuppressUnmanagedCodeSecurity()] [System.Security.SuppressUnmanagedCodeSecurity()]
[System.Runtime.InteropServices.DllImport(Glu.Library, EntryPoint = "gluQuadricCallback", ExactSpelling = true)] [System.Runtime.InteropServices.DllImport(Glu.Library, EntryPoint = "gluQuadricCallback", ExactSpelling = true)]
internal extern static void QuadricCallback(IntPtr quad, OpenTK.Graphics.OpenGL.QuadricCallback which, Delegate CallBackFunc); internal extern static void QuadricCallback(IntPtr quad, OpenTK.Graphics.QuadricCallback which, Delegate CallBackFunc);
[System.Security.SuppressUnmanagedCodeSecurity()] [System.Security.SuppressUnmanagedCodeSecurity()]
[System.Runtime.InteropServices.DllImport(Glu.Library, EntryPoint = "gluQuadricDrawStyle", ExactSpelling = true)] [System.Runtime.InteropServices.DllImport(Glu.Library, EntryPoint = "gluQuadricDrawStyle", ExactSpelling = true)]
internal extern static void QuadricDrawStyle(IntPtr quad, OpenTK.Graphics.OpenGL.QuadricDrawStyle draw); internal extern static void QuadricDrawStyle(IntPtr quad, OpenTK.Graphics.QuadricDrawStyle draw);
[System.Security.SuppressUnmanagedCodeSecurity()] [System.Security.SuppressUnmanagedCodeSecurity()]
[System.Runtime.InteropServices.DllImport(Glu.Library, EntryPoint = "gluQuadricNormals", ExactSpelling = true)] [System.Runtime.InteropServices.DllImport(Glu.Library, EntryPoint = "gluQuadricNormals", ExactSpelling = true)]
internal extern static void QuadricNormals(IntPtr quad, OpenTK.Graphics.OpenGL.QuadricNormal normal); internal extern static void QuadricNormals(IntPtr quad, OpenTK.Graphics.QuadricNormal normal);
[System.Security.SuppressUnmanagedCodeSecurity()] [System.Security.SuppressUnmanagedCodeSecurity()]
[System.Runtime.InteropServices.DllImport(Glu.Library, EntryPoint = "gluQuadricOrientation", ExactSpelling = true)] [System.Runtime.InteropServices.DllImport(Glu.Library, EntryPoint = "gluQuadricOrientation", ExactSpelling = true)]
internal extern static void QuadricOrientation(IntPtr quad, OpenTK.Graphics.OpenGL.QuadricOrientation orientation); internal extern static void QuadricOrientation(IntPtr quad, OpenTK.Graphics.QuadricOrientation orientation);
[System.Security.SuppressUnmanagedCodeSecurity()] [System.Security.SuppressUnmanagedCodeSecurity()]
[System.Runtime.InteropServices.DllImport(Glu.Library, EntryPoint = "gluQuadricTexture", ExactSpelling = true)] [System.Runtime.InteropServices.DllImport(Glu.Library, EntryPoint = "gluQuadricTexture", ExactSpelling = true)]
internal extern static void QuadricTexture(IntPtr quad, bool texture); internal extern static void QuadricTexture(IntPtr quad, bool texture);
@ -163,7 +163,7 @@ namespace OpenTK.Graphics.OpenGL
internal extern static void TessBeginPolygon(IntPtr tess, IntPtr data); internal extern static void TessBeginPolygon(IntPtr tess, IntPtr data);
[System.Security.SuppressUnmanagedCodeSecurity()] [System.Security.SuppressUnmanagedCodeSecurity()]
[System.Runtime.InteropServices.DllImport(Glu.Library, EntryPoint = "gluTessCallback", ExactSpelling = true)] [System.Runtime.InteropServices.DllImport(Glu.Library, EntryPoint = "gluTessCallback", ExactSpelling = true)]
internal extern static void TessCallback(IntPtr tess, OpenTK.Graphics.OpenGL.TessCallback which, Delegate CallBackFunc); internal extern static void TessCallback(IntPtr tess, OpenTK.Graphics.TessCallback which, Delegate CallBackFunc);
[System.Security.SuppressUnmanagedCodeSecurity()] [System.Security.SuppressUnmanagedCodeSecurity()]
[System.Runtime.InteropServices.DllImport(Glu.Library, EntryPoint = "gluTessEndContour", ExactSpelling = true)] [System.Runtime.InteropServices.DllImport(Glu.Library, EntryPoint = "gluTessEndContour", ExactSpelling = true)]
internal extern static void TessEndContour(IntPtr tess); internal extern static void TessEndContour(IntPtr tess);
@ -175,7 +175,7 @@ namespace OpenTK.Graphics.OpenGL
internal extern static void TessNormal(IntPtr tess, double valueX, double valueY, double valueZ); internal extern static void TessNormal(IntPtr tess, double valueX, double valueY, double valueZ);
[System.Security.SuppressUnmanagedCodeSecurity()] [System.Security.SuppressUnmanagedCodeSecurity()]
[System.Runtime.InteropServices.DllImport(Glu.Library, EntryPoint = "gluTessProperty", ExactSpelling = true)] [System.Runtime.InteropServices.DllImport(Glu.Library, EntryPoint = "gluTessProperty", ExactSpelling = true)]
internal extern static void TessProperty(IntPtr tess, OpenTK.Graphics.OpenGL.TessParameter which, double data); internal extern static void TessProperty(IntPtr tess, OpenTK.Graphics.TessParameter which, double data);
[System.Security.SuppressUnmanagedCodeSecurity()] [System.Security.SuppressUnmanagedCodeSecurity()]
[System.Runtime.InteropServices.DllImport(Glu.Library, EntryPoint = "gluTessVertex", ExactSpelling = true)] [System.Runtime.InteropServices.DllImport(Glu.Library, EntryPoint = "gluTessVertex", ExactSpelling = true)]
internal extern static unsafe void TessVertex(IntPtr tess, double* location, IntPtr data); internal extern static unsafe void TessVertex(IntPtr tess, double* location, IntPtr data);

View file

@ -1,4 +1,4 @@
namespace OpenTK.Graphics.OpenGL namespace OpenTK.Graphics
{ {
using System; using System;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
@ -71,16 +71,16 @@ namespace OpenTK.Graphics.OpenGL
internal delegate void EndTrim(IntPtr nurb); internal delegate void EndTrim(IntPtr nurb);
internal static EndTrim gluEndTrim; internal static EndTrim gluEndTrim;
[System.Security.SuppressUnmanagedCodeSecurity()] [System.Security.SuppressUnmanagedCodeSecurity()]
internal delegate IntPtr ErrorString(OpenTK.Graphics.OpenGL.GluErrorCode error); internal delegate IntPtr ErrorString(OpenTK.Graphics.GluErrorCode error);
internal static ErrorString gluErrorString; internal static ErrorString gluErrorString;
[System.Security.SuppressUnmanagedCodeSecurity()] [System.Security.SuppressUnmanagedCodeSecurity()]
internal delegate IntPtr GetString(OpenTK.Graphics.OpenGL.GluStringName name); internal delegate IntPtr GetString(OpenTK.Graphics.GluStringName name);
internal static GetString gluGetString; internal static GetString gluGetString;
[System.Security.SuppressUnmanagedCodeSecurity()] [System.Security.SuppressUnmanagedCodeSecurity()]
internal unsafe delegate void GetNurbsProperty(IntPtr nurb, OpenTK.Graphics.OpenGL.NurbsProperty property, [Out] float* data); internal unsafe delegate void GetNurbsProperty(IntPtr nurb, OpenTK.Graphics.NurbsProperty property, [Out] float* data);
internal unsafe static GetNurbsProperty gluGetNurbsProperty; internal unsafe static GetNurbsProperty gluGetNurbsProperty;
[System.Security.SuppressUnmanagedCodeSecurity()] [System.Security.SuppressUnmanagedCodeSecurity()]
internal unsafe delegate void GetTessProperty(IntPtr tess, OpenTK.Graphics.OpenGL.TessParameter which, [Out] double* data); internal unsafe delegate void GetTessProperty(IntPtr tess, OpenTK.Graphics.TessParameter which, [Out] double* data);
internal unsafe static GetTessProperty gluGetTessProperty; internal unsafe static GetTessProperty gluGetTessProperty;
[System.Security.SuppressUnmanagedCodeSecurity()] [System.Security.SuppressUnmanagedCodeSecurity()]
internal unsafe delegate void LoadSamplingMatrices(IntPtr nurb, float* model, float* perspective, Int32* view); internal unsafe delegate void LoadSamplingMatrices(IntPtr nurb, float* model, float* perspective, Int32* view);
@ -98,10 +98,10 @@ namespace OpenTK.Graphics.OpenGL
internal delegate IntPtr NewTess(); internal delegate IntPtr NewTess();
internal static NewTess gluNewTess; internal static NewTess gluNewTess;
[System.Security.SuppressUnmanagedCodeSecurity()] [System.Security.SuppressUnmanagedCodeSecurity()]
internal delegate void NextContour(IntPtr tess, OpenTK.Graphics.OpenGL.TessContour type); internal delegate void NextContour(IntPtr tess, OpenTK.Graphics.TessContour type);
internal static NextContour gluNextContour; internal static NextContour gluNextContour;
[System.Security.SuppressUnmanagedCodeSecurity()] [System.Security.SuppressUnmanagedCodeSecurity()]
internal delegate void NurbsCallback(IntPtr nurb, OpenTK.Graphics.OpenGL.NurbsCallback which, Delegate CallBackFunc); internal delegate void NurbsCallback(IntPtr nurb, OpenTK.Graphics.NurbsCallback which, Delegate CallBackFunc);
internal static NurbsCallback gluNurbsCallback; internal static NurbsCallback gluNurbsCallback;
[System.Security.SuppressUnmanagedCodeSecurity()] [System.Security.SuppressUnmanagedCodeSecurity()]
internal delegate void NurbsCallbackData(IntPtr nurb, IntPtr userData); internal delegate void NurbsCallbackData(IntPtr nurb, IntPtr userData);
@ -113,7 +113,7 @@ namespace OpenTK.Graphics.OpenGL
internal unsafe delegate void NurbsCurve(IntPtr nurb, Int32 knotCount, [Out] float* knots, Int32 stride, [Out] float* control, Int32 order, MapTarget type); internal unsafe delegate void NurbsCurve(IntPtr nurb, Int32 knotCount, [Out] float* knots, Int32 stride, [Out] float* control, Int32 order, MapTarget type);
internal unsafe static NurbsCurve gluNurbsCurve; internal unsafe static NurbsCurve gluNurbsCurve;
[System.Security.SuppressUnmanagedCodeSecurity()] [System.Security.SuppressUnmanagedCodeSecurity()]
internal delegate void NurbsProperty(IntPtr nurb, OpenTK.Graphics.OpenGL.NurbsProperty property, float value); internal delegate void NurbsProperty(IntPtr nurb, OpenTK.Graphics.NurbsProperty property, float value);
internal static NurbsProperty gluNurbsProperty; internal static NurbsProperty gluNurbsProperty;
[System.Security.SuppressUnmanagedCodeSecurity()] [System.Security.SuppressUnmanagedCodeSecurity()]
internal unsafe delegate void NurbsSurface(IntPtr nurb, Int32 sKnotCount, float* sKnots, Int32 tKnotCount, float* tKnots, Int32 sStride, Int32 tStride, float* control, Int32 sOrder, Int32 tOrder, MapTarget type); internal unsafe delegate void NurbsSurface(IntPtr nurb, Int32 sKnotCount, float* sKnots, Int32 tKnotCount, float* tKnots, Int32 sStride, Int32 tStride, float* control, Int32 sOrder, Int32 tOrder, MapTarget type);
@ -134,19 +134,19 @@ namespace OpenTK.Graphics.OpenGL
internal unsafe delegate Int32 Project(double objX, double objY, double objZ, double* model, double* proj, Int32* view, double* winX, double* winY, double* winZ); internal unsafe delegate Int32 Project(double objX, double objY, double objZ, double* model, double* proj, Int32* view, double* winX, double* winY, double* winZ);
internal unsafe static Project gluProject; internal unsafe static Project gluProject;
[System.Security.SuppressUnmanagedCodeSecurity()] [System.Security.SuppressUnmanagedCodeSecurity()]
internal unsafe delegate void PwlCurve(IntPtr nurb, Int32 count, float* data, Int32 stride, OpenTK.Graphics.OpenGL.NurbsTrim type); internal unsafe delegate void PwlCurve(IntPtr nurb, Int32 count, float* data, Int32 stride, OpenTK.Graphics.NurbsTrim type);
internal unsafe static PwlCurve gluPwlCurve; internal unsafe static PwlCurve gluPwlCurve;
[System.Security.SuppressUnmanagedCodeSecurity()] [System.Security.SuppressUnmanagedCodeSecurity()]
internal delegate void QuadricCallback(IntPtr quad, OpenTK.Graphics.OpenGL.QuadricCallback which, Delegate CallBackFunc); internal delegate void QuadricCallback(IntPtr quad, OpenTK.Graphics.QuadricCallback which, Delegate CallBackFunc);
internal static QuadricCallback gluQuadricCallback; internal static QuadricCallback gluQuadricCallback;
[System.Security.SuppressUnmanagedCodeSecurity()] [System.Security.SuppressUnmanagedCodeSecurity()]
internal delegate void QuadricDrawStyle(IntPtr quad, OpenTK.Graphics.OpenGL.QuadricDrawStyle draw); internal delegate void QuadricDrawStyle(IntPtr quad, OpenTK.Graphics.QuadricDrawStyle draw);
internal static QuadricDrawStyle gluQuadricDrawStyle; internal static QuadricDrawStyle gluQuadricDrawStyle;
[System.Security.SuppressUnmanagedCodeSecurity()] [System.Security.SuppressUnmanagedCodeSecurity()]
internal delegate void QuadricNormals(IntPtr quad, OpenTK.Graphics.OpenGL.QuadricNormal normal); internal delegate void QuadricNormals(IntPtr quad, OpenTK.Graphics.QuadricNormal normal);
internal static QuadricNormals gluQuadricNormals; internal static QuadricNormals gluQuadricNormals;
[System.Security.SuppressUnmanagedCodeSecurity()] [System.Security.SuppressUnmanagedCodeSecurity()]
internal delegate void QuadricOrientation(IntPtr quad, OpenTK.Graphics.OpenGL.QuadricOrientation orientation); internal delegate void QuadricOrientation(IntPtr quad, OpenTK.Graphics.QuadricOrientation orientation);
internal static QuadricOrientation gluQuadricOrientation; internal static QuadricOrientation gluQuadricOrientation;
[System.Security.SuppressUnmanagedCodeSecurity()] [System.Security.SuppressUnmanagedCodeSecurity()]
internal delegate void QuadricTexture(IntPtr quad, bool texture); internal delegate void QuadricTexture(IntPtr quad, bool texture);
@ -164,7 +164,7 @@ namespace OpenTK.Graphics.OpenGL
internal delegate void TessBeginPolygon(IntPtr tess, IntPtr data); internal delegate void TessBeginPolygon(IntPtr tess, IntPtr data);
internal static TessBeginPolygon gluTessBeginPolygon; internal static TessBeginPolygon gluTessBeginPolygon;
[System.Security.SuppressUnmanagedCodeSecurity()] [System.Security.SuppressUnmanagedCodeSecurity()]
internal delegate void TessCallback(IntPtr tess, OpenTK.Graphics.OpenGL.TessCallback which, Delegate CallBackFunc); internal delegate void TessCallback(IntPtr tess, OpenTK.Graphics.TessCallback which, Delegate CallBackFunc);
internal static TessCallback gluTessCallback; internal static TessCallback gluTessCallback;
[System.Security.SuppressUnmanagedCodeSecurity()] [System.Security.SuppressUnmanagedCodeSecurity()]
internal delegate void TessEndContour(IntPtr tess); internal delegate void TessEndContour(IntPtr tess);
@ -176,7 +176,7 @@ namespace OpenTK.Graphics.OpenGL
internal delegate void TessNormal(IntPtr tess, double valueX, double valueY, double valueZ); internal delegate void TessNormal(IntPtr tess, double valueX, double valueY, double valueZ);
internal static TessNormal gluTessNormal; internal static TessNormal gluTessNormal;
[System.Security.SuppressUnmanagedCodeSecurity()] [System.Security.SuppressUnmanagedCodeSecurity()]
internal delegate void TessProperty(IntPtr tess, OpenTK.Graphics.OpenGL.TessParameter which, double data); internal delegate void TessProperty(IntPtr tess, OpenTK.Graphics.TessParameter which, double data);
internal static TessProperty gluTessProperty; internal static TessProperty gluTessProperty;
[System.Security.SuppressUnmanagedCodeSecurity()] [System.Security.SuppressUnmanagedCodeSecurity()]
internal unsafe delegate void TessVertex(IntPtr tess, double* location, IntPtr data); internal unsafe delegate void TessVertex(IntPtr tess, double* location, IntPtr data);

View file

@ -1,4 +1,4 @@
namespace OpenTK.Graphics.OpenGL namespace OpenTK.Graphics
{ {
#pragma warning disable 1591 #pragma warning disable 1591

View file

@ -15,7 +15,7 @@ using System.Reflection.Emit;
using OpenTK.Platform; using OpenTK.Platform;
using OpenTK.Math; using OpenTK.Math;
namespace OpenTK.Graphics.OpenGL namespace OpenTK.Graphics
{ {
public static partial class Glu public static partial class Glu
{ {

View file

@ -14,14 +14,13 @@ using System.Runtime.InteropServices;
using System.Diagnostics; using System.Diagnostics;
using OpenTK.Math; using OpenTK.Math;
using OpenTK.Graphics.OpenGL; using OpenTK.Graphics;
using OpenTK.Graphics.OpenGL.Enums;
using OpenTK.Platform; using OpenTK.Platform;
namespace OpenTK.Graphics namespace OpenTK.Graphics
{ {
using Graphics = System.Drawing.Graphics; using Graphics = System.Drawing.Graphics;
using PixelFormat = OpenTK.Graphics.OpenGL.PixelFormat; using PixelFormat = OpenTK.Graphics.PixelFormat;
public class TextureFont : IFont public class TextureFont : IFont
{ {
@ -97,7 +96,7 @@ namespace OpenTK.Graphics
GL.TexParameter(TextureTarget.Texture2D, TextureParameterName.TextureMagFilter, (int)All.Linear); GL.TexParameter(TextureTarget.Texture2D, TextureParameterName.TextureMagFilter, (int)All.Linear);
GL.TexImage2D(TextureTarget.Texture2D, 0, PixelInternalFormat.Alpha, texture_width, texture_height, 0, GL.TexImage2D(TextureTarget.Texture2D, 0, PixelInternalFormat.Alpha, texture_width, texture_height, 0,
PixelFormat.Rgba, PixelType.UnsignedByte, IntPtr.Zero); OpenTK.Graphics.PixelFormat.Rgba, PixelType.UnsignedByte, IntPtr.Zero);
} }
#endregion #endregion
@ -169,7 +168,7 @@ namespace OpenTK.Graphics
//BitmapData bitmap_data = bitmap.LockBits(new Rectangle(0, 0, rect.Width, rect.Height), ImageLockMode.ReadOnly, //BitmapData bitmap_data = bitmap.LockBits(new Rectangle(0, 0, rect.Width, rect.Height), ImageLockMode.ReadOnly,
// System.Drawing.Imaging.PixelFormat.Format32bppArgb); // System.Drawing.Imaging.PixelFormat.Format32bppArgb);
//GL.TexSubImage2D(TextureTarget.Texture2D, 0, rect.Left, rect.Top, rect.Width, rect.Height, //GL.TexSubImage2D(TextureTarget.Texture2D, 0, rect.Left, rect.Top, rect.Width, rect.Height,
// OpenTK.Graphics.OpenGL.Enums.PixelFormat.Rgba, PixelType.UnsignedByte, bitmap_data.Scan0); // OpenTK.Graphics.Enums.PixelFormat.Rgba, PixelType.UnsignedByte, bitmap_data.Scan0);
//bitmap.UnlockBits(bitmap_data); //bitmap.UnlockBits(bitmap_data);
BitmapData bitmap_data = bmp.LockBits(new Rectangle(0, 0, bmp.Width, bmp.Height), ImageLockMode.ReadOnly, BitmapData bitmap_data = bmp.LockBits(new Rectangle(0, 0, bmp.Width, bmp.Height), ImageLockMode.ReadOnly,
@ -191,7 +190,7 @@ namespace OpenTK.Graphics
fixed (int* data_ptr = data) fixed (int* data_ptr = data)
GL.TexSubImage2D(TextureTarget.Texture2D, 0, rect.Left, rect.Top, rect.Width, rect.Height, GL.TexSubImage2D(TextureTarget.Texture2D, 0, rect.Left, rect.Top, rect.Width, rect.Height,
PixelFormat.Rgba, PixelType.UnsignedByte, (IntPtr)data_ptr); OpenTK.Graphics.PixelFormat.Rgba, PixelType.UnsignedByte, (IntPtr)data_ptr);
} }
bmp.UnlockBits(bitmap_data); bmp.UnlockBits(bitmap_data);