mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-15 18:45:23 -04:00
Cleanup in OpenTK.
This commit is contained in:
parent
5f7aafc8e1
commit
e2d154d2c4
@ -33,218 +33,160 @@ namespace OpenTK.Graphics.OpenGL {
|
||||
|
||||
partial class GL {
|
||||
|
||||
internal static partial class Core {
|
||||
[SuppressUnmanagedCodeSecurity()]
|
||||
[DllImport(Library)]
|
||||
internal static class Core {
|
||||
[SuppressUnmanagedCodeSecurity, DllImport(Library)]
|
||||
internal extern static void glAlphaFunc(AlphaFunction func, Single @ref);
|
||||
|
||||
[SuppressUnmanagedCodeSecurity()]
|
||||
[DllImport(Library)]
|
||||
[SuppressUnmanagedCodeSecurity, DllImport(Library)]
|
||||
internal extern static void glBindBuffer(BufferTarget target, Int32 buffer);
|
||||
[SuppressUnmanagedCodeSecurity()]
|
||||
[DllImport(Library)]
|
||||
[SuppressUnmanagedCodeSecurity, DllImport(Library)]
|
||||
internal extern static void glBindBufferARB(BufferTarget target, Int32 buffer);
|
||||
|
||||
[SuppressUnmanagedCodeSecurity()]
|
||||
[DllImport(Library)]
|
||||
[SuppressUnmanagedCodeSecurity, DllImport(Library)]
|
||||
internal extern static void glBindTexture(TextureTarget target, Int32 texture);
|
||||
|
||||
[SuppressUnmanagedCodeSecurity()]
|
||||
[DllImport(Library)]
|
||||
[SuppressUnmanagedCodeSecurity, DllImport(Library)]
|
||||
internal extern static void glBlendFunc(BlendingFactor sfactor, BlendingFactor dfactor);
|
||||
|
||||
[SuppressUnmanagedCodeSecurity()]
|
||||
[DllImport(Library)]
|
||||
[SuppressUnmanagedCodeSecurity, DllImport(Library)]
|
||||
internal extern static void glBufferData(BufferTarget target, IntPtr size, IntPtr data, BufferUsageHint usage);
|
||||
[SuppressUnmanagedCodeSecurity()]
|
||||
[DllImport(Library)]
|
||||
[SuppressUnmanagedCodeSecurity, DllImport(Library)]
|
||||
internal extern static void glBufferDataARB(BufferTarget target, IntPtr size, IntPtr data, BufferUsageHint usage);
|
||||
|
||||
[SuppressUnmanagedCodeSecurity()]
|
||||
[DllImport(Library)]
|
||||
[SuppressUnmanagedCodeSecurity, DllImport(Library)]
|
||||
internal extern static void glBufferSubData(BufferTarget target, IntPtr offset, IntPtr size, IntPtr data);
|
||||
[SuppressUnmanagedCodeSecurity()]
|
||||
[DllImport(Library)]
|
||||
[SuppressUnmanagedCodeSecurity, DllImport(Library)]
|
||||
internal extern static void glBufferSubDataARB(BufferTarget target, IntPtr offset, IntPtr size, IntPtr data);
|
||||
|
||||
[SuppressUnmanagedCodeSecurity()]
|
||||
[DllImport(Library)]
|
||||
[SuppressUnmanagedCodeSecurity, DllImport(Library)]
|
||||
internal extern static void glClear(ClearBufferMask mask);
|
||||
|
||||
[SuppressUnmanagedCodeSecurity()]
|
||||
[DllImport(Library)]
|
||||
[SuppressUnmanagedCodeSecurity, DllImport(Library)]
|
||||
internal extern static void glClearColor(Single red, Single green, Single blue, Single alpha);
|
||||
|
||||
[SuppressUnmanagedCodeSecurity()]
|
||||
[DllImport(Library)]
|
||||
[SuppressUnmanagedCodeSecurity, DllImport(Library)]
|
||||
internal extern static void glClearDepth(Double depth);
|
||||
|
||||
[SuppressUnmanagedCodeSecurity()]
|
||||
[DllImport(Library)]
|
||||
[SuppressUnmanagedCodeSecurity, DllImport(Library)]
|
||||
internal extern static void glColorMask(bool red, bool green, bool blue, bool alpha);
|
||||
|
||||
[SuppressUnmanagedCodeSecurity()]
|
||||
[DllImport(Library)]
|
||||
[SuppressUnmanagedCodeSecurity, DllImport(Library)]
|
||||
internal extern static void glColorPointer(Int32 size, PointerType type, Int32 stride, IntPtr pointer);
|
||||
|
||||
[SuppressUnmanagedCodeSecurity()]
|
||||
[DllImport(Library)]
|
||||
[SuppressUnmanagedCodeSecurity, DllImport(Library)]
|
||||
internal extern static void glCullFace(CullFaceMode mode);
|
||||
|
||||
[SuppressUnmanagedCodeSecurity()]
|
||||
[DllImport(Library)]
|
||||
[SuppressUnmanagedCodeSecurity, DllImport(Library)]
|
||||
internal extern static unsafe void glDeleteBuffers(Int32 n, Int32* buffers);
|
||||
[SuppressUnmanagedCodeSecurity()]
|
||||
[DllImport(Library)]
|
||||
[SuppressUnmanagedCodeSecurity, DllImport(Library)]
|
||||
internal extern static unsafe void glDeleteBuffersARB(Int32 n, Int32* buffers);
|
||||
|
||||
[SuppressUnmanagedCodeSecurity()]
|
||||
[DllImport(Library)]
|
||||
[SuppressUnmanagedCodeSecurity, DllImport(Library)]
|
||||
internal extern static unsafe void glDeleteTextures(Int32 n, Int32* textures);
|
||||
|
||||
[SuppressUnmanagedCodeSecurity()]
|
||||
[DllImport(Library)]
|
||||
[SuppressUnmanagedCodeSecurity, DllImport(Library)]
|
||||
internal extern static void glDepthFunc(DepthFunction func);
|
||||
[SuppressUnmanagedCodeSecurity()]
|
||||
[DllImport(Library)]
|
||||
[SuppressUnmanagedCodeSecurity, DllImport(Library)]
|
||||
internal extern static void glDepthMask(bool flag);
|
||||
[SuppressUnmanagedCodeSecurity()]
|
||||
[DllImport(Library)]
|
||||
internal extern static void glDepthRange(Double near, Double far);
|
||||
|
||||
[SuppressUnmanagedCodeSecurity()]
|
||||
[DllImport(Library)]
|
||||
[SuppressUnmanagedCodeSecurity, DllImport(Library)]
|
||||
internal extern static void glDisable(EnableCap cap);
|
||||
[SuppressUnmanagedCodeSecurity()]
|
||||
[DllImport(Library)]
|
||||
[SuppressUnmanagedCodeSecurity, DllImport(Library)]
|
||||
internal extern static void glDisableClientState(ArrayCap array);
|
||||
|
||||
[SuppressUnmanagedCodeSecurity()]
|
||||
[DllImport(Library)]
|
||||
[SuppressUnmanagedCodeSecurity, DllImport(Library)]
|
||||
internal extern static void glDrawArrays(BeginMode mode, Int32 first, Int32 count);
|
||||
|
||||
[SuppressUnmanagedCodeSecurity()]
|
||||
[DllImport(Library)]
|
||||
[SuppressUnmanagedCodeSecurity, DllImport(Library)]
|
||||
internal extern static void glDrawElements(BeginMode mode, Int32 count, DrawElementsType type, IntPtr indices);
|
||||
|
||||
[SuppressUnmanagedCodeSecurity()]
|
||||
[DllImport(Library)]
|
||||
[SuppressUnmanagedCodeSecurity, DllImport(Library)]
|
||||
internal extern static void glEnable(EnableCap cap);
|
||||
[SuppressUnmanagedCodeSecurity()]
|
||||
[DllImport(Library)]
|
||||
[SuppressUnmanagedCodeSecurity, DllImport(Library)]
|
||||
internal extern static void glEnableClientState(ArrayCap array);
|
||||
|
||||
[SuppressUnmanagedCodeSecurity()]
|
||||
[DllImport(Library)]
|
||||
[SuppressUnmanagedCodeSecurity, DllImport(Library)]
|
||||
internal extern static void glFogf(FogParameter pname, Single param);
|
||||
|
||||
[SuppressUnmanagedCodeSecurity()]
|
||||
[DllImport(Library)]
|
||||
[SuppressUnmanagedCodeSecurity, DllImport(Library)]
|
||||
internal extern static unsafe void glFogfv(FogParameter pname, Single* @params);
|
||||
[SuppressUnmanagedCodeSecurity()]
|
||||
[DllImport(Library)]
|
||||
[SuppressUnmanagedCodeSecurity, DllImport(Library)]
|
||||
internal extern static void glFogi(FogParameter pname, Int32 param);
|
||||
|
||||
[SuppressUnmanagedCodeSecurity()]
|
||||
[DllImport(Library)]
|
||||
[SuppressUnmanagedCodeSecurity, DllImport(Library)]
|
||||
internal extern static unsafe void glGenBuffers(Int32 n, [OutAttribute] Int32* buffers);
|
||||
[SuppressUnmanagedCodeSecurity()]
|
||||
[DllImport(Library)]
|
||||
[SuppressUnmanagedCodeSecurity, DllImport(Library)]
|
||||
internal extern static unsafe void glGenBuffersARB(Int32 n, [OutAttribute] Int32* buffers);
|
||||
|
||||
[SuppressUnmanagedCodeSecurity()]
|
||||
[DllImport(Library)]
|
||||
[SuppressUnmanagedCodeSecurity, DllImport(Library)]
|
||||
internal extern static unsafe void glGenTextures(Int32 n, [OutAttribute] Int32* textures);
|
||||
|
||||
[SuppressUnmanagedCodeSecurity()]
|
||||
[DllImport(Library)]
|
||||
[SuppressUnmanagedCodeSecurity, DllImport(Library)]
|
||||
internal extern static ErrorCode glGetError();
|
||||
|
||||
[SuppressUnmanagedCodeSecurity()]
|
||||
[DllImport(Library)]
|
||||
[SuppressUnmanagedCodeSecurity, DllImport(Library)]
|
||||
internal extern static unsafe void glGetFloatv(GetPName pname, [OutAttribute] Single* @params);
|
||||
|
||||
[SuppressUnmanagedCodeSecurity()]
|
||||
[DllImport(Library)]
|
||||
[SuppressUnmanagedCodeSecurity, DllImport(Library)]
|
||||
internal extern static unsafe void glGetIntegerv(GetPName pname, [OutAttribute] Int32* @params);
|
||||
|
||||
[SuppressUnmanagedCodeSecurity()]
|
||||
[DllImport(Library)]
|
||||
[SuppressUnmanagedCodeSecurity, DllImport(Library)]
|
||||
internal extern static System.IntPtr glGetString(StringName name);
|
||||
|
||||
[SuppressUnmanagedCodeSecurity()]
|
||||
[DllImport(Library)]
|
||||
[SuppressUnmanagedCodeSecurity, DllImport(Library)]
|
||||
internal extern static void glHint(HintTarget target, HintMode mode);
|
||||
|
||||
[SuppressUnmanagedCodeSecurity()]
|
||||
[DllImport(Library)]
|
||||
[SuppressUnmanagedCodeSecurity, DllImport(Library)]
|
||||
internal extern static bool glIsBuffer(Int32 buffer);
|
||||
[SuppressUnmanagedCodeSecurity()]
|
||||
[DllImport(Library)]
|
||||
[SuppressUnmanagedCodeSecurity, DllImport(Library)]
|
||||
internal extern static bool glIsBufferARB(Int32 buffer);
|
||||
|
||||
[SuppressUnmanagedCodeSecurity()]
|
||||
[DllImport(Library)]
|
||||
[SuppressUnmanagedCodeSecurity, DllImport(Library)]
|
||||
internal extern static bool glIsTexture(Int32 texture);
|
||||
|
||||
[SuppressUnmanagedCodeSecurity()]
|
||||
[DllImport(Library)]
|
||||
[SuppressUnmanagedCodeSecurity, DllImport(Library)]
|
||||
internal extern static void glLoadIdentity();
|
||||
|
||||
[SuppressUnmanagedCodeSecurity()]
|
||||
[DllImport(Library)]
|
||||
[SuppressUnmanagedCodeSecurity, DllImport(Library)]
|
||||
internal extern static unsafe void glLoadMatrixf(Single* m);
|
||||
|
||||
[SuppressUnmanagedCodeSecurity()]
|
||||
[DllImport(Library)]
|
||||
[SuppressUnmanagedCodeSecurity, DllImport(Library)]
|
||||
internal extern static void glMatrixMode(OpenGL.MatrixMode mode);
|
||||
|
||||
[SuppressUnmanagedCodeSecurity()]
|
||||
[DllImport(Library)]
|
||||
[SuppressUnmanagedCodeSecurity, DllImport(Library)]
|
||||
internal extern static unsafe void glMultMatrixf(Single* m);
|
||||
|
||||
[SuppressUnmanagedCodeSecurity()]
|
||||
[DllImport(Library)]
|
||||
[SuppressUnmanagedCodeSecurity, DllImport(Library)]
|
||||
internal extern static void glPopMatrix();
|
||||
|
||||
[SuppressUnmanagedCodeSecurity()]
|
||||
[DllImport(Library)]
|
||||
[SuppressUnmanagedCodeSecurity, DllImport(Library)]
|
||||
internal extern static void glPushMatrix();
|
||||
|
||||
[SuppressUnmanagedCodeSecurity()]
|
||||
[DllImport(Library)]
|
||||
[SuppressUnmanagedCodeSecurity, DllImport(Library)]
|
||||
internal extern static void glReadPixels(Int32 x, Int32 y, Int32 width, Int32 height, PixelFormat format, PixelType type, [OutAttribute] IntPtr pixels);
|
||||
|
||||
[SuppressUnmanagedCodeSecurity()]
|
||||
[DllImport(Library)]
|
||||
[SuppressUnmanagedCodeSecurity, DllImport(Library)]
|
||||
internal extern static void glShadeModel(ShadingModel mode);
|
||||
|
||||
[SuppressUnmanagedCodeSecurity()]
|
||||
[DllImport(Library)]
|
||||
[SuppressUnmanagedCodeSecurity, DllImport(Library)]
|
||||
internal extern static void glTexCoordPointer(Int32 size, PointerType type, Int32 stride, IntPtr pointer);
|
||||
|
||||
[SuppressUnmanagedCodeSecurity()]
|
||||
[DllImport(Library)]
|
||||
[SuppressUnmanagedCodeSecurity, DllImport(Library)]
|
||||
internal extern static void glTexImage2D(TextureTarget target, Int32 level, PixelInternalFormat internalformat, Int32 width, Int32 height, Int32 border, PixelFormat format, PixelType type, IntPtr pixels);
|
||||
|
||||
[SuppressUnmanagedCodeSecurity()]
|
||||
[DllImport(Library)]
|
||||
[SuppressUnmanagedCodeSecurity, DllImport(Library)]
|
||||
internal extern static void glTexParameterf(TextureTarget target, TextureParameterName pname, Single param);
|
||||
|
||||
[SuppressUnmanagedCodeSecurity()]
|
||||
[DllImport(Library)]
|
||||
[SuppressUnmanagedCodeSecurity, DllImport(Library)]
|
||||
internal extern static void glTexParameteri(TextureTarget target, TextureParameterName pname, Int32 param);
|
||||
|
||||
[SuppressUnmanagedCodeSecurity()]
|
||||
[DllImport(Library)]
|
||||
[SuppressUnmanagedCodeSecurity, DllImport(Library)]
|
||||
internal extern static void glTexSubImage2D(TextureTarget target, Int32 level, Int32 xoffset, Int32 yoffset, Int32 width, Int32 height, PixelFormat format, PixelType type, IntPtr pixels);
|
||||
|
||||
[SuppressUnmanagedCodeSecurity()]
|
||||
[DllImport(Library)]
|
||||
[SuppressUnmanagedCodeSecurity, DllImport(Library)]
|
||||
internal extern static void glVertexPointer(Int32 size, PointerType type, Int32 stride, IntPtr pointer);
|
||||
|
||||
[SuppressUnmanagedCodeSecurity()]
|
||||
[DllImport(Library)]
|
||||
[SuppressUnmanagedCodeSecurity, DllImport(Library)]
|
||||
internal extern static void glViewport(Int32 x, Int32 y, Int32 width, Int32 height);
|
||||
}
|
||||
}
|
||||
|
@ -34,200 +34,197 @@ namespace OpenTK.Graphics.OpenGL {
|
||||
partial class GL {
|
||||
|
||||
public static partial class Delegates {
|
||||
[SuppressUnmanagedCodeSecurity()]
|
||||
[SuppressUnmanagedCodeSecurity]
|
||||
public delegate void AlphaFunc(AlphaFunction func, Single @ref);
|
||||
public static AlphaFunc glAlphaFunc;
|
||||
|
||||
[SuppressUnmanagedCodeSecurity()]
|
||||
[SuppressUnmanagedCodeSecurity]
|
||||
public delegate void BindBuffer(BufferTarget target, Int32 buffer);
|
||||
public static BindBuffer glBindBuffer;
|
||||
public static BindBuffer glBindBufferARB;
|
||||
|
||||
[SuppressUnmanagedCodeSecurity()]
|
||||
[SuppressUnmanagedCodeSecurity]
|
||||
public delegate void BindTexture(TextureTarget target, Int32 texture);
|
||||
public static BindTexture glBindTexture;
|
||||
|
||||
[SuppressUnmanagedCodeSecurity()]
|
||||
[SuppressUnmanagedCodeSecurity]
|
||||
public delegate void BlendFunc(BlendingFactor sfactor, BlendingFactor dfactor);
|
||||
public static BlendFunc glBlendFunc;
|
||||
|
||||
[SuppressUnmanagedCodeSecurity()]
|
||||
[SuppressUnmanagedCodeSecurity]
|
||||
public delegate void BufferData(BufferTarget target, IntPtr size, IntPtr data, BufferUsageHint usage);
|
||||
public static BufferData glBufferData;
|
||||
public static BufferData glBufferDataARB;
|
||||
|
||||
[SuppressUnmanagedCodeSecurity()]
|
||||
[SuppressUnmanagedCodeSecurity]
|
||||
public delegate void BufferSubData(BufferTarget target, IntPtr offset, IntPtr size, IntPtr data);
|
||||
public static BufferSubData glBufferSubData;
|
||||
public static BufferSubData glBufferSubDataARB;
|
||||
|
||||
[SuppressUnmanagedCodeSecurity()]
|
||||
[SuppressUnmanagedCodeSecurity]
|
||||
public delegate void Clear(ClearBufferMask mask);
|
||||
public static Clear glClear;
|
||||
|
||||
[SuppressUnmanagedCodeSecurity()]
|
||||
[SuppressUnmanagedCodeSecurity]
|
||||
public delegate void ClearColor(Single red, Single green, Single blue, Single alpha);
|
||||
public static ClearColor glClearColor;
|
||||
|
||||
[SuppressUnmanagedCodeSecurity()]
|
||||
[SuppressUnmanagedCodeSecurity]
|
||||
public delegate void ClearDepth(Double depth);
|
||||
public static ClearDepth glClearDepth;
|
||||
|
||||
[SuppressUnmanagedCodeSecurity()]
|
||||
[SuppressUnmanagedCodeSecurity]
|
||||
public delegate void ColorMask(bool red, bool green, bool blue, bool alpha);
|
||||
public static ColorMask glColorMask;
|
||||
|
||||
[SuppressUnmanagedCodeSecurity()]
|
||||
[SuppressUnmanagedCodeSecurity]
|
||||
public delegate void ColorPointer(Int32 size, PointerType type, Int32 stride, IntPtr pointer);
|
||||
public static ColorPointer glColorPointer;
|
||||
|
||||
[SuppressUnmanagedCodeSecurity()]
|
||||
[SuppressUnmanagedCodeSecurity]
|
||||
public delegate void CullFace(CullFaceMode mode);
|
||||
public static CullFace glCullFace;
|
||||
|
||||
[SuppressUnmanagedCodeSecurity()]
|
||||
[SuppressUnmanagedCodeSecurity]
|
||||
public unsafe delegate void DeleteBuffers(Int32 n, Int32* buffers);
|
||||
public static DeleteBuffers glDeleteBuffers;
|
||||
public static DeleteBuffers glDeleteBuffersARB;
|
||||
|
||||
[SuppressUnmanagedCodeSecurity()]
|
||||
[SuppressUnmanagedCodeSecurity]
|
||||
public unsafe delegate void DeleteTextures(Int32 n, Int32* textures);
|
||||
public static DeleteTextures glDeleteTextures;
|
||||
|
||||
[SuppressUnmanagedCodeSecurity()]
|
||||
[SuppressUnmanagedCodeSecurity]
|
||||
public delegate void DepthFunc(DepthFunction func);
|
||||
public static DepthFunc glDepthFunc;
|
||||
[SuppressUnmanagedCodeSecurity()]
|
||||
[SuppressUnmanagedCodeSecurity]
|
||||
public delegate void DepthMask(bool flag);
|
||||
public static DepthMask glDepthMask;
|
||||
[SuppressUnmanagedCodeSecurity()]
|
||||
public delegate void DepthRange(Double near, Double far);
|
||||
public static DepthRange glDepthRange;
|
||||
|
||||
[SuppressUnmanagedCodeSecurity()]
|
||||
[SuppressUnmanagedCodeSecurity]
|
||||
public delegate void Disable(EnableCap cap);
|
||||
public static Disable glDisable;
|
||||
[SuppressUnmanagedCodeSecurity()]
|
||||
[SuppressUnmanagedCodeSecurity]
|
||||
public delegate void DisableClientState(ArrayCap array);
|
||||
public static DisableClientState glDisableClientState;
|
||||
|
||||
[SuppressUnmanagedCodeSecurity()]
|
||||
[SuppressUnmanagedCodeSecurity]
|
||||
public delegate void DrawArrays(BeginMode mode, Int32 first, Int32 count);
|
||||
public static DrawArrays glDrawArrays;
|
||||
|
||||
[SuppressUnmanagedCodeSecurity()]
|
||||
[SuppressUnmanagedCodeSecurity]
|
||||
public delegate void DrawElements(BeginMode mode, Int32 count, DrawElementsType type, IntPtr indices);
|
||||
public static DrawElements glDrawElements;
|
||||
|
||||
[SuppressUnmanagedCodeSecurity()]
|
||||
[SuppressUnmanagedCodeSecurity]
|
||||
public delegate void Enable(EnableCap cap);
|
||||
public static Enable glEnable;
|
||||
[SuppressUnmanagedCodeSecurity()]
|
||||
[SuppressUnmanagedCodeSecurity]
|
||||
public delegate void EnableClientState(ArrayCap array);
|
||||
public static EnableClientState glEnableClientState;
|
||||
|
||||
[SuppressUnmanagedCodeSecurity()]
|
||||
[SuppressUnmanagedCodeSecurity]
|
||||
public delegate void Fogf(FogParameter pname, Single param);
|
||||
public static Fogf glFogf;
|
||||
|
||||
[SuppressUnmanagedCodeSecurity()]
|
||||
[SuppressUnmanagedCodeSecurity]
|
||||
public unsafe delegate void Fogfv(FogParameter pname, Single* @params);
|
||||
public static Fogfv glFogfv;
|
||||
[SuppressUnmanagedCodeSecurity()]
|
||||
[SuppressUnmanagedCodeSecurity]
|
||||
public delegate void Fogi(FogParameter pname, Int32 param);
|
||||
public static Fogi glFogi;
|
||||
|
||||
[SuppressUnmanagedCodeSecurity()]
|
||||
[SuppressUnmanagedCodeSecurity]
|
||||
public unsafe delegate void GenBuffers(Int32 n, [OutAttribute] Int32* buffers);
|
||||
public static GenBuffers glGenBuffers;
|
||||
public static GenBuffers glGenBuffersARB;
|
||||
|
||||
[SuppressUnmanagedCodeSecurity()]
|
||||
[SuppressUnmanagedCodeSecurity]
|
||||
public unsafe delegate void GenTextures(Int32 n, [OutAttribute] Int32* textures);
|
||||
public static GenTextures glGenTextures;
|
||||
|
||||
[SuppressUnmanagedCodeSecurity()]
|
||||
[SuppressUnmanagedCodeSecurity]
|
||||
public delegate ErrorCode GetError();
|
||||
public static GetError glGetError;
|
||||
|
||||
[SuppressUnmanagedCodeSecurity()]
|
||||
[SuppressUnmanagedCodeSecurity]
|
||||
public unsafe delegate void GetFloatv(GetPName pname, [OutAttribute] Single* @params);
|
||||
public static GetFloatv glGetFloatv;
|
||||
|
||||
[SuppressUnmanagedCodeSecurity()]
|
||||
[SuppressUnmanagedCodeSecurity]
|
||||
public unsafe delegate void GetIntegerv(GetPName pname, [OutAttribute] Int32* @params);
|
||||
public static GetIntegerv glGetIntegerv;
|
||||
|
||||
[SuppressUnmanagedCodeSecurity()]
|
||||
[SuppressUnmanagedCodeSecurity]
|
||||
public delegate System.IntPtr GetString(StringName name);
|
||||
public static GetString glGetString;
|
||||
|
||||
[SuppressUnmanagedCodeSecurity()]
|
||||
[SuppressUnmanagedCodeSecurity]
|
||||
public delegate void Hint(HintTarget target, HintMode mode);
|
||||
public static Hint glHint;
|
||||
|
||||
[SuppressUnmanagedCodeSecurity()]
|
||||
[SuppressUnmanagedCodeSecurity]
|
||||
public delegate bool IsBuffer(Int32 buffer);
|
||||
public static IsBuffer glIsBuffer;
|
||||
public static IsBuffer glIsBufferARB;
|
||||
|
||||
[SuppressUnmanagedCodeSecurity()]
|
||||
[SuppressUnmanagedCodeSecurity]
|
||||
public delegate bool IsTexture(Int32 texture);
|
||||
public static IsTexture glIsTexture;
|
||||
|
||||
[SuppressUnmanagedCodeSecurity()]
|
||||
[SuppressUnmanagedCodeSecurity]
|
||||
public delegate void LoadIdentity();
|
||||
public static LoadIdentity glLoadIdentity;
|
||||
|
||||
[SuppressUnmanagedCodeSecurity()]
|
||||
[SuppressUnmanagedCodeSecurity]
|
||||
public unsafe delegate void LoadMatrixf(Single* m);
|
||||
public static LoadMatrixf glLoadMatrixf;
|
||||
|
||||
[SuppressUnmanagedCodeSecurity()]
|
||||
[SuppressUnmanagedCodeSecurity]
|
||||
public delegate void MatrixMode(OpenGL.MatrixMode mode);
|
||||
public static MatrixMode glMatrixMode;
|
||||
|
||||
[SuppressUnmanagedCodeSecurity()]
|
||||
[SuppressUnmanagedCodeSecurity]
|
||||
public unsafe delegate void MultMatrixf(Single* m);
|
||||
public static MultMatrixf glMultMatrixf;
|
||||
|
||||
[SuppressUnmanagedCodeSecurity()]
|
||||
[SuppressUnmanagedCodeSecurity]
|
||||
public delegate void PopMatrix();
|
||||
public static PopMatrix glPopMatrix;
|
||||
|
||||
[SuppressUnmanagedCodeSecurity()]
|
||||
[SuppressUnmanagedCodeSecurity]
|
||||
public delegate void PushMatrix();
|
||||
public static PushMatrix glPushMatrix;
|
||||
|
||||
[SuppressUnmanagedCodeSecurity()]
|
||||
[SuppressUnmanagedCodeSecurity]
|
||||
public delegate void ReadPixels(Int32 x, Int32 y, Int32 width, Int32 height, PixelFormat format, PixelType type, [OutAttribute] IntPtr pixels);
|
||||
public static ReadPixels glReadPixels;
|
||||
|
||||
[SuppressUnmanagedCodeSecurity()]
|
||||
[SuppressUnmanagedCodeSecurity]
|
||||
public delegate void ShadeModel(ShadingModel mode);
|
||||
public static ShadeModel glShadeModel;
|
||||
|
||||
[SuppressUnmanagedCodeSecurity()]
|
||||
[SuppressUnmanagedCodeSecurity]
|
||||
public delegate void TexCoordPointer(Int32 size, PointerType type, Int32 stride, IntPtr pointer);
|
||||
public static TexCoordPointer glTexCoordPointer;
|
||||
|
||||
[SuppressUnmanagedCodeSecurity()]
|
||||
[SuppressUnmanagedCodeSecurity]
|
||||
public delegate void TexImage2D(TextureTarget target, Int32 level, PixelInternalFormat publicformat, Int32 width, Int32 height, Int32 border, PixelFormat format, PixelType type, IntPtr pixels);
|
||||
public static TexImage2D glTexImage2D;
|
||||
|
||||
[SuppressUnmanagedCodeSecurity()]
|
||||
[SuppressUnmanagedCodeSecurity]
|
||||
public delegate void TexParameteri(TextureTarget target, TextureParameterName pname, Int32 param);
|
||||
public static TexParameteri glTexParameteri;
|
||||
|
||||
[SuppressUnmanagedCodeSecurity()]
|
||||
[SuppressUnmanagedCodeSecurity]
|
||||
public delegate void TexSubImage2D(TextureTarget target, Int32 level, Int32 xoffset, Int32 yoffset, Int32 width, Int32 height, PixelFormat format, PixelType type, IntPtr pixels);
|
||||
public static TexSubImage2D glTexSubImage2D;
|
||||
|
||||
[SuppressUnmanagedCodeSecurity()]
|
||||
[SuppressUnmanagedCodeSecurity]
|
||||
public delegate void VertexPointer(Int32 size, PointerType type, Int32 stride, IntPtr pointer);
|
||||
public static VertexPointer glVertexPointer;
|
||||
|
||||
[SuppressUnmanagedCodeSecurity()]
|
||||
[SuppressUnmanagedCodeSecurity]
|
||||
public delegate void Viewport(Int32 x, Int32 y, Int32 width, Int32 height);
|
||||
public static Viewport glViewport;
|
||||
}
|
||||
|
@ -146,10 +146,6 @@ namespace OpenTK.Graphics.OpenGL
|
||||
Blend = ((int)0x0BE2),
|
||||
|
||||
Texture2D = ((int)0x0DE1),
|
||||
PolygonOffsetPoint = ((int)0x2A01),
|
||||
PolygonOffsetLine = ((int)0x2A02),
|
||||
|
||||
PolygonOffsetFill = ((int)0x8037),
|
||||
|
||||
VertexArray = ((int)0x8074),
|
||||
NormalArray = ((int)0x8075),
|
||||
@ -174,11 +170,6 @@ namespace OpenTK.Graphics.OpenGL
|
||||
TextureTooLargeExt = ((int)0x8065),
|
||||
}
|
||||
|
||||
public enum ExtBgra : int
|
||||
{
|
||||
BgraExt = ((int)0x80E1),
|
||||
}
|
||||
|
||||
public enum ExtVertexArrayBgra : int
|
||||
{
|
||||
Bgra = ((int)0x80E1),
|
||||
|
@ -91,7 +91,6 @@
|
||||
<Compile Include="Math\Vector2.cs" />
|
||||
<Compile Include="Math\Vector3.cs" />
|
||||
<Compile Include="Math\Vector4.cs" />
|
||||
<Compile Include="Platform\Factory.cs" />
|
||||
<Compile Include="Platform\IDisplayDeviceDriver.cs" />
|
||||
<Compile Include="Platform\IPlatformFactory.cs" />
|
||||
<Compile Include="Platform\IWindowInfo.cs" />
|
||||
|
@ -1,89 +0,0 @@
|
||||
#region License
|
||||
//
|
||||
// The Open Toolkit Library License
|
||||
//
|
||||
// Copyright (c) 2006 - 2009 the Open Toolkit library.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights to
|
||||
// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
// the Software, and to permit persons to whom the Software is furnished to do
|
||||
// so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in all
|
||||
// copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
||||
// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||
// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
// OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
|
||||
namespace OpenTK.Platform
|
||||
{
|
||||
using Graphics;
|
||||
|
||||
sealed class Factory : IPlatformFactory
|
||||
{
|
||||
#region Fields
|
||||
|
||||
static IPlatformFactory default_implementation;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructors
|
||||
|
||||
static Factory()
|
||||
{
|
||||
if (Configuration.RunningOnWindows) Default = new Windows.WinFactory();
|
||||
else if (Configuration.RunningOnMacOS) Default = new MacOS.MacOSFactory();
|
||||
else if (Configuration.RunningOnX11) Default = new X11.X11Factory();
|
||||
else throw new NotSupportedException( "Running on an unsupported platform, please refer to http://www.opentk.com for more information." );
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Public Members
|
||||
|
||||
public static IPlatformFactory Default
|
||||
{
|
||||
get { return default_implementation; }
|
||||
private set { default_implementation = value; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region IPlatformFactory Members
|
||||
|
||||
public INativeWindow CreateNativeWindow(int x, int y, int width, int height, string title,
|
||||
GraphicsMode mode, GameWindowFlags options, DisplayDevice device)
|
||||
{
|
||||
return default_implementation.CreateNativeWindow(x, y, width, height, title, mode, options, device);
|
||||
}
|
||||
|
||||
public IDisplayDeviceDriver CreateDisplayDeviceDriver()
|
||||
{
|
||||
return default_implementation.CreateDisplayDeviceDriver();
|
||||
}
|
||||
|
||||
public IGraphicsContext CreateGLContext(GraphicsMode mode, IWindowInfo window)
|
||||
{
|
||||
return default_implementation.CreateGLContext(mode, window);
|
||||
}
|
||||
|
||||
public IGraphicsMode CreateGraphicsMode()
|
||||
{
|
||||
return default_implementation.CreateGraphicsMode();
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
@ -7,8 +7,6 @@
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace OpenTK.Platform
|
||||
{
|
||||
|
@ -26,9 +26,6 @@
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
using OpenTK.Graphics;
|
||||
|
||||
namespace OpenTK.Platform
|
||||
@ -43,4 +40,15 @@ namespace OpenTK.Platform
|
||||
|
||||
IGraphicsMode CreateGraphicsMode();
|
||||
}
|
||||
|
||||
internal static class Factory {
|
||||
public static readonly IPlatformFactory Default;
|
||||
|
||||
static Factory() {
|
||||
if (Configuration.RunningOnWindows) Default = new Windows.WinFactory();
|
||||
else if (Configuration.RunningOnMacOS) Default = new MacOS.MacOSFactory();
|
||||
else if (Configuration.RunningOnX11) Default = new X11.X11Factory();
|
||||
else throw new NotSupportedException( "Running on an unsupported platform, please refer to http://www.opentk.com for more information." );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -7,8 +7,6 @@
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace OpenTK.Platform
|
||||
{
|
||||
|
@ -595,11 +595,11 @@ namespace OpenTK.Platform.MacOS
|
||||
{
|
||||
MacOSKeyModifiers modifiers = API.GetEventKeyModifiers(inEvent);
|
||||
|
||||
bool caps = (modifiers & MacOSKeyModifiers.CapsLock) != 0 ? true : false;
|
||||
bool control = (modifiers & MacOSKeyModifiers.Control) != 0 ? true : false;
|
||||
bool command = (modifiers & MacOSKeyModifiers.Command) != 0 ? true : false;
|
||||
bool option = (modifiers & MacOSKeyModifiers.Option) != 0 ? true : false;
|
||||
bool shift = (modifiers & MacOSKeyModifiers.Shift) != 0 ? true : false;
|
||||
bool caps = (modifiers & MacOSKeyModifiers.CapsLock) != 0;
|
||||
bool control = (modifiers & MacOSKeyModifiers.Control) != 0;
|
||||
bool command = (modifiers & MacOSKeyModifiers.Command) != 0;
|
||||
bool option = (modifiers & MacOSKeyModifiers.Option) != 0;
|
||||
bool shift = (modifiers & MacOSKeyModifiers.Shift) != 0;
|
||||
|
||||
Debug.Print("Modifiers Changed: {0}", modifiers);
|
||||
|
||||
|
@ -75,21 +75,6 @@ namespace OpenTK.Platform.Windows
|
||||
/// For internal use by OpenTK only!
|
||||
/// Exposes useful native WINAPI methods and structures.
|
||||
/// </summary>
|
||||
internal static class API
|
||||
{
|
||||
// Prevent BeforeFieldInit optimization, and initialize 'size' fields.
|
||||
static API()
|
||||
{
|
||||
PixelFormatDescriptorVersion = 1;
|
||||
PixelFormatDescriptorSize = (short)Marshal.SizeOf(typeof(PixelFormatDescriptor));
|
||||
WindowInfoSize = Marshal.SizeOf(typeof(WindowInfo));
|
||||
}
|
||||
|
||||
internal static readonly short PixelFormatDescriptorSize;
|
||||
internal static readonly short PixelFormatDescriptorVersion;
|
||||
internal static readonly int WindowInfoSize;
|
||||
}
|
||||
|
||||
internal static class Functions
|
||||
{
|
||||
#region Window functions
|
||||
@ -807,6 +792,9 @@ namespace OpenTK.Platform.Windows
|
||||
internal int LayerMask;
|
||||
internal int VisibleMask;
|
||||
internal int DamageMask;
|
||||
|
||||
public const short DefaultVersion = 1;
|
||||
public const short DefaultSize = 40;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
@ -31,28 +31,22 @@ namespace OpenTK.Platform.Windows {
|
||||
internal delegate int GetSwapIntervalEXT();
|
||||
internal static GetSwapIntervalEXT wglGetSwapIntervalEXT;
|
||||
|
||||
[SuppressUnmanagedCodeSecurity]
|
||||
[DllImport(Library, SetLastError = true)]
|
||||
[SuppressUnmanagedCodeSecurity,DllImport(Library, SetLastError = true)]
|
||||
internal extern static IntPtr wglCreateContext(IntPtr hDc);
|
||||
|
||||
[SuppressUnmanagedCodeSecurity]
|
||||
[DllImport(Library, SetLastError = true)]
|
||||
[SuppressUnmanagedCodeSecurity, DllImport(Library, SetLastError = true)]
|
||||
internal extern static Boolean wglDeleteContext(IntPtr oldContext);
|
||||
|
||||
[SuppressUnmanagedCodeSecurity]
|
||||
[DllImport(Library, SetLastError = true)]
|
||||
[SuppressUnmanagedCodeSecurity, DllImport(Library, SetLastError = true)]
|
||||
internal extern static IntPtr wglGetCurrentContext();
|
||||
|
||||
[SuppressUnmanagedCodeSecurity]
|
||||
[DllImport(Library, SetLastError = true)]
|
||||
[SuppressUnmanagedCodeSecurity, DllImport(Library, SetLastError = true)]
|
||||
internal extern static Boolean wglMakeCurrent(IntPtr hDc, IntPtr newContext);
|
||||
|
||||
[SuppressUnmanagedCodeSecurity]
|
||||
[DllImport(Library, SetLastError = true)]
|
||||
[SuppressUnmanagedCodeSecurity, DllImport(Library, SetLastError = true)]
|
||||
internal extern static IntPtr wglGetCurrentDC();
|
||||
|
||||
[SuppressUnmanagedCodeSecurity]
|
||||
[DllImport(Library, SetLastError = true)]
|
||||
[SuppressUnmanagedCodeSecurity, DllImport(Library, SetLastError = true)]
|
||||
internal extern static IntPtr wglGetProcAddress(String lpszProc);
|
||||
}
|
||||
}
|
||||
|
@ -189,9 +189,9 @@ namespace OpenTK.Platform.Windows
|
||||
// Find out what we really got as a format:
|
||||
IntPtr deviceContext = window.DeviceContext;
|
||||
PixelFormatDescriptor pfd = new PixelFormatDescriptor();
|
||||
pfd.Size = API.PixelFormatDescriptorSize;
|
||||
pfd.Version = API.PixelFormatDescriptorVersion;
|
||||
Functions.DescribePixelFormat(deviceContext, modeIndex, API.PixelFormatDescriptorSize, ref pfd);
|
||||
pfd.Size = PixelFormatDescriptor.DefaultSize;
|
||||
pfd.Version = PixelFormatDescriptor.DefaultVersion;
|
||||
Functions.DescribePixelFormat(deviceContext, modeIndex, pfd.Size, ref pfd);
|
||||
|
||||
Mode = new GraphicsMode(
|
||||
(IntPtr)modeIndex, new ColorFormat(pfd.RedBits, pfd.GreenBits, pfd.BlueBits, pfd.AlphaBits),
|
||||
@ -211,8 +211,8 @@ namespace OpenTK.Platform.Windows
|
||||
|
||||
Debug.Write("Selecting pixel format PFD... ");
|
||||
PixelFormatDescriptor pfd = new PixelFormatDescriptor();
|
||||
pfd.Size = API.PixelFormatDescriptorSize;
|
||||
pfd.Version = API.PixelFormatDescriptorVersion;
|
||||
pfd.Size = PixelFormatDescriptor.DefaultSize;
|
||||
pfd.Version = PixelFormatDescriptor.DefaultVersion;
|
||||
pfd.Flags =
|
||||
PixelFormatDescriptorFlags.SUPPORT_OPENGL |
|
||||
PixelFormatDescriptorFlags.DRAW_TO_WINDOW;
|
||||
|
@ -26,14 +26,12 @@
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Drawing;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using OpenTK.Graphics;
|
||||
using OpenTK.Input;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Drawing;
|
||||
|
||||
namespace OpenTK.Platform.Windows
|
||||
{
|
||||
@ -76,11 +74,6 @@ namespace OpenTK.Platform.Windows
|
||||
previous_bounds = new Rectangle(); // Used to restore previous size when leaving fullscreen mode.
|
||||
Icon icon;
|
||||
|
||||
const ClassStyle DefaultClassStyle = ClassStyle.OwnDC;
|
||||
|
||||
readonly IntPtr DefaultWindowProcedure =
|
||||
Marshal.GetFunctionPointerForDelegate(new WindowProcedure(Functions.DefWindowProc));
|
||||
|
||||
// Used for IInputDriver implementation
|
||||
WinMMJoystick joystick_driver = new WinMMJoystick();
|
||||
KeyboardDevice keyboard = new KeyboardDevice();
|
||||
@ -554,7 +547,7 @@ namespace OpenTK.Platform.Windows
|
||||
{
|
||||
ExtendedWindowClass wc = new ExtendedWindowClass();
|
||||
wc.Size = ExtendedWindowClass.SizeInBytes;
|
||||
wc.Style = DefaultClassStyle;
|
||||
wc.Style = ClassStyle.OwnDC;
|
||||
wc.Instance = Instance;
|
||||
wc.WndProc = WindowProcedureDelegate;
|
||||
wc.ClassName = ClassName;
|
||||
|
@ -1,6 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace OpenTK
|
||||
{
|
||||
|
@ -7,8 +7,6 @@
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace OpenTK
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user