ClassiCube/OpenTK/Graphics/OpenGL/GLCore.cs

264 lines
12 KiB
C#
Raw Normal View History

2015-06-07 08:53:12 +10:00
#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;
using System.Runtime.InteropServices;
using System.Security;
2015-06-07 08:53:12 +10:00
namespace OpenTK.Graphics.OpenGL {
partial class GL {
2015-06-07 08:53:12 +10:00
internal static partial class Core {
[SuppressUnmanagedCodeSecurity()]
[DllImport(Library)]
internal extern static void glAlphaFunc(AlphaFunction func, Single @ref);
2015-06-07 08:53:12 +10:00
[SuppressUnmanagedCodeSecurity()]
[DllImport(Library)]
internal extern static void glBindBuffer(BufferTarget target, Int32 buffer);
[SuppressUnmanagedCodeSecurity()]
[DllImport(Library)]
internal extern static void glBindBufferARB(BufferTarget target, Int32 buffer);
2015-06-07 08:53:12 +10:00
[SuppressUnmanagedCodeSecurity()]
[DllImport(Library)]
internal extern static void glBindTexture(TextureTarget target, Int32 texture);
2015-06-07 08:53:12 +10:00
[SuppressUnmanagedCodeSecurity()]
[DllImport(Library)]
internal extern static void glBlendFunc(BlendingFactor sfactor, BlendingFactor dfactor);
2015-06-07 08:53:12 +10:00
[SuppressUnmanagedCodeSecurity()]
[DllImport(Library)]
internal extern static void glBufferData(BufferTarget target, IntPtr size, IntPtr data, BufferUsageHint usage);
[SuppressUnmanagedCodeSecurity()]
[DllImport(Library)]
internal extern static void glBufferDataARB(BufferTarget target, IntPtr size, IntPtr data, BufferUsageHint usage);
2015-06-07 08:53:12 +10:00
[SuppressUnmanagedCodeSecurity()]
[DllImport(Library)]
internal extern static void glBufferSubData(BufferTarget target, IntPtr offset, IntPtr size, IntPtr data);
[SuppressUnmanagedCodeSecurity()]
[DllImport(Library)]
internal extern static void glBufferSubDataARB(BufferTarget target, IntPtr offset, IntPtr size, IntPtr data);
2015-06-07 08:53:12 +10:00
[SuppressUnmanagedCodeSecurity()]
[DllImport(Library)]
internal extern static void glClear(ClearBufferMask mask);
2015-06-07 08:53:12 +10:00
[SuppressUnmanagedCodeSecurity()]
[DllImport(Library)]
internal extern static void glClearColor(Single red, Single green, Single blue, Single alpha);
2015-06-07 08:53:12 +10:00
[SuppressUnmanagedCodeSecurity()]
[DllImport(Library)]
internal extern static void glClearDepth(Double depth);
2015-06-07 08:53:12 +10:00
[SuppressUnmanagedCodeSecurity()]
[DllImport(Library)]
internal extern static void glColorMask(bool red, bool green, bool blue, bool alpha);
2015-06-07 08:53:12 +10:00
[SuppressUnmanagedCodeSecurity()]
[DllImport(Library)]
internal extern static void glColorPointer(Int32 size, PointerType type, Int32 stride, IntPtr pointer);
2015-06-07 08:53:12 +10:00
[SuppressUnmanagedCodeSecurity()]
[DllImport(Library)]
internal extern static void glCullFace(CullFaceMode mode);
2015-06-07 08:53:12 +10:00
[SuppressUnmanagedCodeSecurity()]
[DllImport(Library)]
internal extern static unsafe void glDeleteBuffers(Int32 n, Int32* buffers);
[SuppressUnmanagedCodeSecurity()]
[DllImport(Library)]
internal extern static unsafe void glDeleteBuffersARB(Int32 n, Int32* buffers);
2015-06-07 08:53:12 +10:00
[SuppressUnmanagedCodeSecurity()]
[DllImport(Library)]
internal extern static unsafe void glDeleteTextures(Int32 n, Int32* textures);
2015-06-07 08:53:12 +10:00
[SuppressUnmanagedCodeSecurity()]
[DllImport(Library)]
internal extern static void glDepthFunc(DepthFunction func);
[SuppressUnmanagedCodeSecurity()]
[DllImport(Library)]
internal extern static void glDepthMask(bool flag);
[SuppressUnmanagedCodeSecurity()]
[DllImport(Library)]
internal extern static void glDepthRange(Double near, Double far);
2015-06-07 08:53:12 +10:00
[SuppressUnmanagedCodeSecurity()]
[DllImport(Library)]
internal extern static void glDisable(EnableCap cap);
[SuppressUnmanagedCodeSecurity()]
[DllImport(Library)]
internal extern static void glDisableClientState(ArrayCap array);
2015-06-07 08:53:12 +10:00
[SuppressUnmanagedCodeSecurity()]
[DllImport(Library)]
internal extern static void glDrawArrays(BeginMode mode, Int32 first, Int32 count);
2015-06-07 08:53:12 +10:00
[SuppressUnmanagedCodeSecurity()]
[DllImport(Library)]
internal extern static void glDrawElements(BeginMode mode, Int32 count, DrawElementsType type, IntPtr indices);
2015-06-07 08:53:12 +10:00
[SuppressUnmanagedCodeSecurity()]
[DllImport(Library)]
internal extern static void glEnable(EnableCap cap);
[SuppressUnmanagedCodeSecurity()]
[DllImport(Library)]
internal extern static void glEnableClientState(ArrayCap array);
2015-06-07 08:53:12 +10:00
[SuppressUnmanagedCodeSecurity()]
[DllImport(Library)]
internal extern static void glFinish();
2015-06-07 08:53:12 +10:00
[SuppressUnmanagedCodeSecurity()]
[DllImport(Library)]
internal extern static void glFlush();
2015-06-07 08:53:12 +10:00
[SuppressUnmanagedCodeSecurity()]
[DllImport(Library)]
internal extern static void glFogf(FogParameter pname, Single param);
2015-06-07 08:53:12 +10:00
[SuppressUnmanagedCodeSecurity()]
[DllImport(Library)]
internal extern static unsafe void glFogfv(FogParameter pname, Single* @params);
[SuppressUnmanagedCodeSecurity()]
[DllImport(Library)]
internal extern static void glFogi(FogParameter pname, Int32 param);
2015-06-07 08:53:12 +10:00
[SuppressUnmanagedCodeSecurity()]
[DllImport(Library)]
internal extern static void glFrontFace(FrontFaceDirection mode);
2015-06-07 08:53:12 +10:00
[SuppressUnmanagedCodeSecurity()]
[DllImport(Library)]
internal extern static unsafe void glGenBuffers(Int32 n, [OutAttribute] Int32* buffers);
[SuppressUnmanagedCodeSecurity()]
[DllImport(Library)]
internal extern static unsafe void glGenBuffersARB(Int32 n, [OutAttribute] Int32* buffers);
2015-06-07 08:53:12 +10:00
[SuppressUnmanagedCodeSecurity()]
[DllImport(Library)]
internal extern static unsafe void glGenTextures(Int32 n, [OutAttribute] Int32* textures);
2015-06-07 08:53:12 +10:00
[SuppressUnmanagedCodeSecurity()]
[DllImport(Library)]
internal extern static ErrorCode glGetError();
2015-06-07 08:53:12 +10:00
[SuppressUnmanagedCodeSecurity()]
[DllImport(Library)]
internal extern static unsafe void glGetFloatv(GetPName pname, [OutAttribute] Single* @params);
2015-06-07 08:53:12 +10:00
[SuppressUnmanagedCodeSecurity()]
[DllImport(Library)]
internal extern static unsafe void glGetIntegerv(GetPName pname, [OutAttribute] Int32* @params);
2015-06-07 08:53:12 +10:00
[SuppressUnmanagedCodeSecurity()]
[DllImport(Library)]
internal extern static System.IntPtr glGetString(StringName name);
2015-06-07 08:53:12 +10:00
[SuppressUnmanagedCodeSecurity()]
[DllImport(Library)]
internal extern static void glHint(HintTarget target, HintMode mode);
2015-06-07 08:53:12 +10:00
[SuppressUnmanagedCodeSecurity()]
[DllImport(Library)]
internal extern static bool glIsBuffer(Int32 buffer);
[SuppressUnmanagedCodeSecurity()]
[DllImport(Library)]
internal extern static bool glIsBufferARB(Int32 buffer);
2015-06-07 08:53:12 +10:00
[SuppressUnmanagedCodeSecurity()]
[DllImport(Library)]
internal extern static bool glIsTexture(Int32 texture);
2015-06-07 08:53:12 +10:00
[SuppressUnmanagedCodeSecurity()]
[DllImport(Library)]
internal extern static void glLoadIdentity();
2015-06-07 08:53:12 +10:00
[SuppressUnmanagedCodeSecurity()]
[DllImport(Library)]
internal extern static unsafe void glLoadMatrixf(Single* m);
2015-06-07 08:53:12 +10:00
[SuppressUnmanagedCodeSecurity()]
[DllImport(Library)]
internal extern static void glMatrixMode(OpenGL.MatrixMode mode);
2015-06-07 08:53:12 +10:00
[SuppressUnmanagedCodeSecurity()]
[DllImport(Library)]
internal extern static unsafe void glMultMatrixf(Single* m);
2015-06-07 08:53:12 +10:00
[SuppressUnmanagedCodeSecurity()]
[DllImport(Library)]
internal extern static void glPopMatrix();
2015-06-07 08:53:12 +10:00
[SuppressUnmanagedCodeSecurity()]
[DllImport(Library)]
internal extern static void glPushMatrix();
2015-06-07 08:53:12 +10:00
[SuppressUnmanagedCodeSecurity()]
[DllImport(Library)]
internal extern static void glReadPixels(Int32 x, Int32 y, Int32 width, Int32 height, PixelFormat format, PixelType type, [OutAttribute] IntPtr pixels);
2015-06-07 08:53:12 +10:00
[SuppressUnmanagedCodeSecurity()]
[DllImport(Library)]
internal extern static void glShadeModel(ShadingModel mode);
2015-06-07 08:53:12 +10:00
[SuppressUnmanagedCodeSecurity()]
[DllImport(Library)]
internal extern static void glTexCoordPointer(Int32 size, PointerType type, Int32 stride, IntPtr pointer);
2015-06-07 08:53:12 +10:00
[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);
2015-06-07 08:53:12 +10:00
[SuppressUnmanagedCodeSecurity()]
[DllImport(Library)]
internal extern static void glTexParameterf(TextureTarget target, TextureParameterName pname, Single param);
[SuppressUnmanagedCodeSecurity()]
[DllImport(Library)]
internal extern static void glTexParameteri(TextureTarget target, TextureParameterName pname, Int32 param);
2015-06-07 08:53:12 +10:00
[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);
2015-06-07 08:53:12 +10:00
[SuppressUnmanagedCodeSecurity()]
[DllImport(Library)]
internal extern static void glVertexPointer(Int32 size, PointerType type, Int32 stride, IntPtr pointer);
2015-06-07 08:53:12 +10:00
[SuppressUnmanagedCodeSecurity()]
[DllImport(Library)]
internal extern static void glViewport(Int32 x, Int32 y, Int32 width, Int32 height);
2015-06-07 08:53:12 +10:00
}
}
}