From 6a19d1f5c7bf4159352286eda4ae6ff207144167 Mon Sep 17 00:00:00 2001 From: Harrison Date: Tue, 23 Jun 2020 20:07:12 -0500 Subject: [PATCH] Basic rendering with camera controls are functional. --- .../Exceptions/OpenGLErrorException.cs | 24 +- .../Exceptions/OpenGLException.cs | 18 - src/SlatedGameToolkit.Framework/GameEngine.cs | 46 +- .../Graphics/GLEnum.cs | 811 ---- .../Graphics/Meshes/IMeshable.cs | 14 + .../Graphics/Meshes/RectangleMesh.cs | 25 +- .../Graphics/OpenGL.cs | 127 - .../Graphics/OpenGL/GLContext.cs | 3545 +++++++++++++++ .../Graphics/OpenGL/OpenGL.cs | 3885 +++++++++++++++++ .../Graphics/Programs/GLProgram.cs | 105 - .../Graphics/Programs/GLShaderProgram.cs | 61 - .../Graphics/Render/Batch.cs | 121 - .../Graphics/Render/Camera.cs | 66 +- .../Graphics/Render/Camera2D.cs | 7 +- .../Graphics/Render/IRenderable.cs | 12 - .../Graphics/Render/MeshBatch.cs | 166 + .../Graphics/Render/Programs/RenderProgram.cs | 70 + .../Graphics/Render/Renderer.cs | 41 - .../Graphics/Render/Shaders/FragmentShader.cs | 57 + .../Graphics/Render/Shaders/IShadeable.cs | 11 + .../Graphics/Render/Shaders/VertexShader.cs | 55 + .../Graphics/Render/Sprite2D.cs | 20 +- .../Graphics/Render/VertexArrayBuffers.cs | 123 + .../Graphics/Shaders/GLFragmentShader.cs | 27 - .../Graphics/Shaders/GLShader.cs | 44 - .../Graphics/Shaders/GLVertexArraySet.cs | 140 - .../Graphics/Shaders/GLVertexShader.cs | 26 - .../Graphics/Shaders/NormalFragmentShader.cs | 21 - .../Graphics/Shaders/NormalVertexShader.cs | 20 - .../Graphics/Shaders/VertexArray.cs | 63 - .../Graphics/Textures/GLTexture2DSet.cs | 81 - .../Graphics/Textures/Texture.cs | 56 +- .../Graphics/Textures/TextureData.cs | 12 +- .../Graphics/Window/WindowContext.cs | 49 +- .../Graphics/Window/WindowContextsManager.cs | 33 + .../Input/Devices/Keyboard.cs | 11 +- src/SlatedGameToolkit.Framework/Input/Key.cs | 262 -- .../Loader/AssetManager.cs | 99 +- .../Loader/CommonLoaders.cs | 46 + .../Loader/ILoadable.cs | 31 - .../Loader/TextureLoader.cs | 29 - .../Resources/default.frag | 2 +- .../Resources/default.vert | 6 +- .../Resources/filler.png | Bin 0 -> 3130 bytes .../{SDL2-bindings => SDL2}/SDL2.cs | 0 .../{SDL2-bindings => SDL2}/SDL2_image.cs | 0 .../{SDL2-bindings => SDL2}/SDL2_mixer.cs | 0 .../{SDL2-bindings => SDL2}/SDL2_ttf.cs | 0 .../StateSystem/StateManager.cs | 11 +- .../Utilities/ColorUtils.cs | 20 + .../Utilities/EmbeddedResourceUtils.cs | 32 + .../Utilities/MatrixUtils.cs | 13 + .../Utilities/VectorUtils.cs | 17 + .../CommandSystem/CommandProcessor.cs | 4 +- .../Commands/HelpCommand.cs | 2 +- .../Resources/Playground/filler.png | Bin 0 -> 3080 bytes .../Resources/Playground/yhdnbgnc.png | Bin 41434 -> 32887 bytes .../Utilities/Playground/MainState.cs | 43 +- 58 files changed, 8386 insertions(+), 2224 deletions(-) delete mode 100644 src/SlatedGameToolkit.Framework/Exceptions/OpenGLException.cs delete mode 100644 src/SlatedGameToolkit.Framework/Graphics/GLEnum.cs delete mode 100644 src/SlatedGameToolkit.Framework/Graphics/OpenGL.cs create mode 100644 src/SlatedGameToolkit.Framework/Graphics/OpenGL/GLContext.cs create mode 100644 src/SlatedGameToolkit.Framework/Graphics/OpenGL/OpenGL.cs delete mode 100644 src/SlatedGameToolkit.Framework/Graphics/Programs/GLProgram.cs delete mode 100644 src/SlatedGameToolkit.Framework/Graphics/Programs/GLShaderProgram.cs delete mode 100644 src/SlatedGameToolkit.Framework/Graphics/Render/Batch.cs delete mode 100644 src/SlatedGameToolkit.Framework/Graphics/Render/IRenderable.cs create mode 100644 src/SlatedGameToolkit.Framework/Graphics/Render/MeshBatch.cs create mode 100644 src/SlatedGameToolkit.Framework/Graphics/Render/Programs/RenderProgram.cs delete mode 100644 src/SlatedGameToolkit.Framework/Graphics/Render/Renderer.cs create mode 100644 src/SlatedGameToolkit.Framework/Graphics/Render/Shaders/FragmentShader.cs create mode 100644 src/SlatedGameToolkit.Framework/Graphics/Render/Shaders/IShadeable.cs create mode 100644 src/SlatedGameToolkit.Framework/Graphics/Render/Shaders/VertexShader.cs create mode 100644 src/SlatedGameToolkit.Framework/Graphics/Render/VertexArrayBuffers.cs delete mode 100644 src/SlatedGameToolkit.Framework/Graphics/Shaders/GLFragmentShader.cs delete mode 100644 src/SlatedGameToolkit.Framework/Graphics/Shaders/GLShader.cs delete mode 100644 src/SlatedGameToolkit.Framework/Graphics/Shaders/GLVertexArraySet.cs delete mode 100644 src/SlatedGameToolkit.Framework/Graphics/Shaders/GLVertexShader.cs delete mode 100644 src/SlatedGameToolkit.Framework/Graphics/Shaders/NormalFragmentShader.cs delete mode 100644 src/SlatedGameToolkit.Framework/Graphics/Shaders/NormalVertexShader.cs delete mode 100644 src/SlatedGameToolkit.Framework/Graphics/Shaders/VertexArray.cs delete mode 100644 src/SlatedGameToolkit.Framework/Graphics/Textures/GLTexture2DSet.cs delete mode 100644 src/SlatedGameToolkit.Framework/Input/Key.cs create mode 100644 src/SlatedGameToolkit.Framework/Loader/CommonLoaders.cs delete mode 100644 src/SlatedGameToolkit.Framework/Loader/ILoadable.cs delete mode 100644 src/SlatedGameToolkit.Framework/Loader/TextureLoader.cs create mode 100644 src/SlatedGameToolkit.Framework/Resources/filler.png rename src/SlatedGameToolkit.Framework/{SDL2-bindings => SDL2}/SDL2.cs (100%) rename src/SlatedGameToolkit.Framework/{SDL2-bindings => SDL2}/SDL2_image.cs (100%) rename src/SlatedGameToolkit.Framework/{SDL2-bindings => SDL2}/SDL2_mixer.cs (100%) rename src/SlatedGameToolkit.Framework/{SDL2-bindings => SDL2}/SDL2_ttf.cs (100%) create mode 100644 src/SlatedGameToolkit.Framework/Utilities/ColorUtils.cs create mode 100644 src/SlatedGameToolkit.Framework/Utilities/EmbeddedResourceUtils.cs create mode 100644 src/SlatedGameToolkit.Framework/Utilities/MatrixUtils.cs create mode 100644 src/SlatedGameToolkit.Framework/Utilities/VectorUtils.cs create mode 100644 src/SlatedGameToolkit.Tools/Resources/Playground/filler.png diff --git a/src/SlatedGameToolkit.Framework/Exceptions/OpenGLErrorException.cs b/src/SlatedGameToolkit.Framework/Exceptions/OpenGLErrorException.cs index ddef5d6..f44bf39 100644 --- a/src/SlatedGameToolkit.Framework/Exceptions/OpenGLErrorException.cs +++ b/src/SlatedGameToolkit.Framework/Exceptions/OpenGLErrorException.cs @@ -4,26 +4,18 @@ using SlatedGameToolkit.Framework.Graphics.Window; namespace SlatedGameToolkit.Framework.Exceptions { - public class OpenGLErrorException : OpenGLException { - public uint ErrorCode { get; private set; } - public OpenGLErrorException(uint errorCode) : base() { + public class OpenGLErrorException : Exception { + public Graphics.OpenGL.ErrorCode ErrorCode {get; private set;} + public OpenGLErrorException(Graphics.OpenGL.ErrorCode error) : base(string.Format("OpenGL error: {0}", error)) { + this.ErrorCode = error; } - public OpenGLErrorException(uint errorCode, string message) : base(message) { - + public OpenGLErrorException(Graphics.OpenGL.ErrorCode error, string message) : base(string.Format("OpenGL error: {0}. \"{1}\"", error, message)) { + this.ErrorCode = error; } - public OpenGLErrorException(uint errorCode, string message, Exception inner) : base(message, inner) { - } - - /// - /// Checks the current context for OpenGL errors that has occurred and throws an exception if there is one. - /// - public static void CheckGLErrorStatus() { - uint errorCode = WindowContextsManager.CurrentWindowContext.GetGLStatus(); - if (errorCode != (uint) GLEnum.GL_NO_ERROR) { - throw new OpenGLErrorException(errorCode, string.Format("OpenGL error ({0}): {1}", errorCode, ((GLEnum) errorCode))); - } + public OpenGLErrorException(Graphics.OpenGL.ErrorCode error, string message, Exception inner) : base(string.Format("OpenGL error: {0}. \"{1}\"", error, message), inner) { + this.ErrorCode = error; } } } \ No newline at end of file diff --git a/src/SlatedGameToolkit.Framework/Exceptions/OpenGLException.cs b/src/SlatedGameToolkit.Framework/Exceptions/OpenGLException.cs deleted file mode 100644 index e7b18ab..0000000 --- a/src/SlatedGameToolkit.Framework/Exceptions/OpenGLException.cs +++ /dev/null @@ -1,18 +0,0 @@ -using System; -using SlatedGameToolkit.Framework.Graphics; -using SlatedGameToolkit.Framework.Graphics.Window; - -namespace SlatedGameToolkit.Framework.Exceptions -{ - public class OpenGLException : Exception { - public OpenGLException() : base() { - } - - public OpenGLException(string message) : base(message) { - - } - - public OpenGLException(string message, Exception inner) : base(message, inner) { - } - } -} \ No newline at end of file diff --git a/src/SlatedGameToolkit.Framework/GameEngine.cs b/src/SlatedGameToolkit.Framework/GameEngine.cs index b408eeb..6d60214 100644 --- a/src/SlatedGameToolkit.Framework/GameEngine.cs +++ b/src/SlatedGameToolkit.Framework/GameEngine.cs @@ -1,21 +1,25 @@ using System; +using System.Runtime.InteropServices; using System.Threading; using SDL2; using Serilog; using Serilog.Core; using SlatedGameToolkit.Framework.Exceptions; -using SlatedGameToolkit.Framework.Graphics; +using SlatedGameToolkit.Framework.Graphics.Textures; using SlatedGameToolkit.Framework.Graphics.Window; using SlatedGameToolkit.Framework.Input; using SlatedGameToolkit.Framework.Input.Devices; using SlatedGameToolkit.Framework.StateSystem; using SlatedGameToolkit.Framework.StateSystem.States; +using SlatedGameToolkit.Framework.Utilities; namespace SlatedGameToolkit.Framework { /// /// The main engine that will host the game loop. /// public static class GameEngine { + private const int GL_MAJOR_VER = 3, GL_MINOR_VER = 3; + public static TextureData FillerTextureData {get; private set;} public static bool Debugging { get; set; } public static Logger Logger { get; private set; } private static readonly object ignitionLock = new object(); @@ -128,10 +132,10 @@ namespace SlatedGameToolkit.Framework { } break; case SDL.SDL_EventType.SDL_KEYDOWN: - Keyboard.OnKeyPressed((Key) SDL_Event.key.keysym.sym); + Keyboard.OnKeyPressed(SDL_Event.key.keysym.sym); break; case SDL.SDL_EventType.SDL_KEYUP: - Keyboard.OnKeyReleased((Key) SDL_Event.key.keysym.sym); + Keyboard.OnKeyReleased(SDL_Event.key.keysym.sym); break; case SDL.SDL_EventType.SDL_WINDOWEVENT: WindowContext handle = WindowContextsManager.ContextFromWindowID(SDL_Event.window.windowID); @@ -180,6 +184,7 @@ namespace SlatedGameToolkit.Framework { SDL.SDL_Quit(); Logger.Information("Game engine has stopped."); Logger.Dispose(); + WindowContextsManager.DisposeAllWindowContexts(); Logger = null; } } @@ -232,18 +237,45 @@ namespace SlatedGameToolkit.Framework { throw new FrameworkSDLException(); } - if (SDL.SDL_GL_SetAttribute(SDL.SDL_GLattr.SDL_GL_CONTEXT_MAJOR_VERSION, OpenGL.OpenGLMajorVersion) < 0) throw new FrameworkSDLException(); - if (SDL.SDL_GL_SetAttribute(SDL.SDL_GLattr.SDL_GL_CONTEXT_MINOR_VERSION, OpenGL.OpenGLMinorVersion) < 0) throw new FrameworkSDLException(); - if (SDL.SDL_GL_SetAttribute(SDL.SDL_GLattr.SDL_GL_CONTEXT_PROFILE_MASK, SDL.SDL_GLprofile.SDL_GL_CONTEXT_PROFILE_CORE) < 0) throw new FrameworkSDLException(); + if (SDL.SDL_GL_SetAttribute(SDL.SDL_GLattr.SDL_GL_CONTEXT_MAJOR_VERSION, GL_MAJOR_VER) < 0 || + SDL.SDL_GL_SetAttribute(SDL.SDL_GLattr.SDL_GL_CONTEXT_MINOR_VERSION, GL_MINOR_VER) < 0 || + SDL.SDL_GL_SetAttribute(SDL.SDL_GLattr.SDL_GL_CONTEXT_PROFILE_MASK, SDL.SDL_GLprofile.SDL_GL_CONTEXT_PROFILE_CORE) < 0) + throw new FrameworkSDLException(string.Format("Unable to load correct OpenGL version {0}.{1}.0 Core.", GL_MINOR_VER, GL_MAJOR_VER)); + + LoadEngineAssets(); thread = new Thread(Loop); - thread.Name = "SlatedGameToolkit Engine"; + thread.Name = "SGTK-Engine"; thread.Priority = ThreadPriority.AboveNormal; thread.Start(initialState); return true; } } + private unsafe static void LoadEngineAssets() { + byte[] buffer = EmbeddedResourceUtils.ReadEmbeddedResourceData("filler.png"); + fixed (void* ptr = &buffer[0]) { + IntPtr rwOps = SDL.SDL_RWFromConstMem(new IntPtr(ptr), buffer.Length * sizeof(byte)); + IntPtr surfacePtr = SDL_image.IMG_Load_RW(rwOps, 1); + SDL.SDL_Surface surface = Marshal.PtrToStructure(surfacePtr); + + SDL.SDL_PixelFormat pixelFormat = Marshal.PtrToStructure(surface.format); + if (pixelFormat.format != SDL.SDL_PIXELFORMAT_RGBA8888) { + IntPtr convertedPtr = SDL.SDL_ConvertSurfaceFormat(surfacePtr, SDL.SDL_PIXELFORMAT_RGBA8888, 0); + if (convertedPtr == null) throw new OptionalSDLException(); + SDL.SDL_FreeSurface(surfacePtr); + surfacePtr = convertedPtr; + surface = Marshal.PtrToStructure(surfacePtr); + } + byte[] data = new byte[surface.pitch * surface.h]; + + Marshal.Copy(surface.pixels, data, 0, data.Length); + FillerTextureData = new TextureData(surface.w, surface.h, data); + + SDL.SDL_FreeSurface(surfacePtr); + } + } + public static bool IsRunning() { return !stopped; } diff --git a/src/SlatedGameToolkit.Framework/Graphics/GLEnum.cs b/src/SlatedGameToolkit.Framework/Graphics/GLEnum.cs deleted file mode 100644 index e795ad5..0000000 --- a/src/SlatedGameToolkit.Framework/Graphics/GLEnum.cs +++ /dev/null @@ -1,811 +0,0 @@ -namespace SlatedGameToolkit.Framework.Graphics -{ - public enum GLEnum: uint { - GL_DEPTH_BUFFER_BIT = 0x00000100, - GL_STENCIL_BUFFER_BIT = 0x00000400, - GL_COLOR_BUFFER_BIT = 0x00004000, - GL_FALSE = 0, - GL_TRUE = 1, - GL_POINTS = 0x0000, - GL_LINES = 0x0001, - GL_LINE_LOOP = 0x0002, - GL_LINE_STRIP = 0x0003, - GL_TRIANGLES = 0x0004, - GL_TRIANGLE_STRIP = 0x0005, - GL_TRIANGLE_FAN = 0x0006, - GL_QUADS = 0x0007, - GL_NEVER = 0x0200, - GL_LESS = 0x0201, - GL_EQUAL = 0x0202, - GL_LEQUAL = 0x0203, - GL_GREATER = 0x0204, - GL_NOTEQUAL = 0x0205, - GL_GEQUAL = 0x0206, - GL_ALWAYS = 0x0207, - GL_ZERO = 0, - GL_ONE = 1, - GL_SRC_COLOR = 0x0300, - GL_ONE_MINUS_SRC_COLOR = 0x0301, - GL_SRC_ALPHA = 0x0302, - GL_ONE_MINUS_SRC_ALPHA = 0x0303, - GL_DST_ALPHA = 0x0304, - GL_ONE_MINUS_DST_ALPHA = 0x0305, - GL_DST_COLOR = 0x0306, - GL_ONE_MINUS_DST_COLOR = 0x0307, - GL_SRC_ALPHA_SATURATE = 0x0308, - GL_NONE = 0, - GL_FRONT_LEFT = 0x0400, - GL_FRONT_RIGHT = 0x0401, - GL_BACK_LEFT = 0x0402, - GL_BACK_RIGHT = 0x0403, - GL_FRONT = 0x0404, - GL_BACK = 0x0405, - GL_LEFT = 0x0406, - GL_RIGHT = 0x0407, - GL_FRONT_AND_BACK = 0x0408, - GL_NO_ERROR = 0, - GL_INVALID_ENUM = 0x0500, - GL_INVALID_VALUE = 0x0501, - GL_INVALID_OPERATION = 0x0502, - GL_OUT_OF_MEMORY = 0x0505, - GL_CW = 0x0900, - GL_CCW = 0x0901, - GL_POINT_SIZE = 0x0B11, - GL_POINT_SIZE_RANGE = 0x0B12, - GL_POINT_SIZE_GRANULARITY = 0x0B13, - GL_LINE_SMOOTH = 0x0B20, - GL_LINE_WIDTH = 0x0B21, - GL_LINE_WIDTH_RANGE = 0x0B22, - GL_LINE_WIDTH_GRANULARITY = 0x0B23, - GL_POLYGON_MODE = 0x0B40, - GL_POLYGON_SMOOTH = 0x0B41, - GL_CULL_FACE = 0x0B44, - GL_CULL_FACE_MODE = 0x0B45, - GL_FRONT_FACE = 0x0B46, - GL_DEPTH_RANGE = 0x0B70, - GL_DEPTH_TEST = 0x0B71, - GL_DEPTH_WRITEMASK = 0x0B72, - GL_DEPTH_CLEAR_VALUE = 0x0B73, - GL_DEPTH_FUNC = 0x0B74, - GL_STENCIL_TEST = 0x0B90, - GL_STENCIL_CLEAR_VALUE = 0x0B91, - GL_STENCIL_FUNC = 0x0B92, - GL_STENCIL_VALUE_MASK = 0x0B93, - GL_STENCIL_FAIL = 0x0B94, - GL_STENCIL_PASS_DEPTH_FAIL = 0x0B95, - GL_STENCIL_PASS_DEPTH_PASS = 0x0B96, - GL_STENCIL_REF = 0x0B97, - GL_STENCIL_WRITEMASK = 0x0B98, - GL_VIEWPORT = 0x0BA2, - GL_DITHER = 0x0BD0, - GL_BLEND_DST = 0x0BE0, - GL_BLEND_SRC = 0x0BE1, - GL_BLEND = 0x0BE2, - GL_LOGIC_OP_MODE = 0x0BF0, - GL_DRAW_BUFFER = 0x0C01, - GL_READ_BUFFER = 0x0C02, - GL_SCISSOR_BOX = 0x0C10, - GL_SCISSOR_TEST = 0x0C11, - GL_COLOR_CLEAR_VALUE = 0x0C22, - GL_COLOR_WRITEMASK = 0x0C23, - GL_DOUBLEBUFFER = 0x0C32, - GL_STEREO = 0x0C33, - GL_LINE_SMOOTH_HINT = 0x0C52, - GL_POLYGON_SMOOTH_HINT = 0x0C53, - GL_UNPACK_SWAP_BYTES = 0x0CF0, - GL_UNPACK_LSB_FIRST = 0x0CF1, - GL_UNPACK_ROW_LENGTH = 0x0CF2, - GL_UNPACK_SKIP_ROWS = 0x0CF3, - GL_UNPACK_SKIP_PIXELS = 0x0CF4, - GL_UNPACK_ALIGNMENT = 0x0CF5, - GL_PACK_SWAP_BYTES = 0x0D00, - GL_PACK_LSB_FIRST = 0x0D01, - GL_PACK_ROW_LENGTH = 0x0D02, - GL_PACK_SKIP_ROWS = 0x0D03, - GL_PACK_SKIP_PIXELS = 0x0D04, - GL_PACK_ALIGNMENT = 0x0D05, - GL_MAX_TEXTURE_SIZE = 0x0D33, - GL_MAX_VIEWPORT_DIMS = 0x0D3A, - GL_SUBPIXEL_BITS = 0x0D50, - GL_TEXTURE_1D = 0x0DE0, - GL_TEXTURE_2D = 0x0DE1, - GL_TEXTURE_WIDTH = 0x1000, - GL_TEXTURE_HEIGHT = 0x1001, - GL_TEXTURE_BORDER_COLOR = 0x1004, - GL_DONT_CARE = 0x1100, - GL_FASTEST = 0x1101, - GL_NICEST = 0x1102, - GL_BYTE = 0x1400, - GL_UNSIGNED_BYTE = 0x1401, - GL_SHORT = 0x1402, - GL_UNSIGNED_SHORT = 0x1403, - GL_INT = 0x1404, - GL_UNSIGNED_INT = 0x1405, - GL_FLOAT = 0x1406, - GL_STACK_OVERFLOW = 0x0503, - GL_STACK_UNDERFLOW = 0x0504, - GL_CLEAR = 0x1500, - GL_AND = 0x1501, - GL_AND_REVERSE = 0x1502, - GL_COPY = 0x1503, - GL_AND_INVERTED = 0x1504, - GL_NOOP = 0x1505, - GL_XOR = 0x1506, - GL_OR = 0x1507, - GL_NOR = 0x1508, - GL_EQUIV = 0x1509, - GL_INVERT = 0x150A, - GL_OR_REVERSE = 0x150B, - GL_COPY_INVERTED = 0x150C, - GL_OR_INVERTED = 0x150D, - GL_NAND = 0x150E, - GL_SET = 0x150F, - GL_TEXTURE = 0x1702, - GL_COLOR = 0x1800, - GL_DEPTH = 0x1801, - GL_STENCIL = 0x1802, - GL_STENCIL_INDEX = 0x1901, - GL_DEPTH_COMPONENT = 0x1902, - GL_RED = 0x1903, - GL_GREEN = 0x1904, - GL_BLUE = 0x1905, - GL_ALPHA = 0x1906, - GL_RGB = 0x1907, - GL_RGBA = 0x1908, - GL_POINT = 0x1B00, - GL_LINE = 0x1B01, - GL_FILL = 0x1B02, - GL_KEEP = 0x1E00, - GL_REPLACE = 0x1E01, - GL_INCR = 0x1E02, - GL_DECR = 0x1E03, - GL_VENDOR = 0x1F00, - GL_RENDERER = 0x1F01, - GL_VERSION = 0x1F02, - GL_EXTENSIONS = 0x1F03, - GL_NEAREST = 0x2600, - GL_LINEAR = 0x2601, - GL_NEAREST_MIPMAP_NEAREST = 0x2700, - GL_LINEAR_MIPMAP_NEAREST = 0x2701, - GL_NEAREST_MIPMAP_LINEAR = 0x2702, - GL_LINEAR_MIPMAP_LINEAR = 0x2703, - GL_TEXTURE_MAG_FILTER = 0x2800, - GL_TEXTURE_MIN_FILTER = 0x2801, - GL_TEXTURE_WRAP_S = 0x2802, - GL_TEXTURE_WRAP_T = 0x2803, - GL_REPEAT = 0x2901, - GL_COLOR_LOGIC_OP = 0x0BF2, - GL_POLYGON_OFFSET_UNITS = 0x2A00, - GL_POLYGON_OFFSET_POINT = 0x2A01, - GL_POLYGON_OFFSET_LINE = 0x2A02, - GL_POLYGON_OFFSET_FILL = 0x8037, - GL_POLYGON_OFFSET_FACTOR = 0x8038, - GL_TEXTURE_BINDING_1D = 0x8068, - GL_TEXTURE_BINDING_2D = 0x8069, - GL_TEXTURE_INTERNAL_FORMAT = 0x1003, - GL_TEXTURE_RED_SIZE = 0x805C, - GL_TEXTURE_GREEN_SIZE = 0x805D, - GL_TEXTURE_BLUE_SIZE = 0x805E, - GL_TEXTURE_ALPHA_SIZE = 0x805F, - GL_DOUBLE = 0x140A, - GL_PROXY_TEXTURE_1D = 0x8063, - GL_PROXY_TEXTURE_2D = 0x8064, - GL_R3_G3_B2 = 0x2A10, - GL_RGB4 = 0x804F, - GL_RGB5 = 0x8050, - GL_RGB8 = 0x8051, - GL_RGB10 = 0x8052, - GL_RGB12 = 0x8053, - GL_RGB16 = 0x8054, - GL_RGBA2 = 0x8055, - GL_RGBA4 = 0x8056, - GL_RGB5_A1 = 0x8057, - GL_RGBA8 = 0x8058, - GL_RGB10_A2 = 0x8059, - GL_RGBA12 = 0x805A, - GL_RGBA16 = 0x805B, - GL_VERTEX_ARRAY = 0x8074, - GL_UNSIGNED_BYTE_3_3_2 = 0x8032, - GL_UNSIGNED_SHORT_4_4_4_4 = 0x8033, - GL_UNSIGNED_SHORT_5_5_5_1 = 0x8034, - GL_UNSIGNED_INT_8_8_8_8 = 0x8035, - GL_UNSIGNED_INT_10_10_10_2 = 0x8036, - GL_TEXTURE_BINDING_3D = 0x806A, - GL_PACK_SKIP_IMAGES = 0x806B, - GL_PACK_IMAGE_HEIGHT = 0x806C, - GL_UNPACK_SKIP_IMAGES = 0x806D, - GL_UNPACK_IMAGE_HEIGHT = 0x806E, - GL_TEXTURE_3D = 0x806F, - GL_PROXY_TEXTURE_3D = 0x8070, - GL_TEXTURE_DEPTH = 0x8071, - GL_TEXTURE_WRAP_R = 0x8072, - GL_MAX_3D_TEXTURE_SIZE = 0x8073, - GL_UNSIGNED_BYTE_2_3_3_REV = 0x8362, - GL_UNSIGNED_SHORT_5_6_5 = 0x8363, - GL_UNSIGNED_SHORT_5_6_5_REV = 0x8364, - GL_UNSIGNED_SHORT_4_4_4_4_REV = 0x8365, - GL_UNSIGNED_SHORT_1_5_5_5_REV = 0x8366, - GL_UNSIGNED_INT_8_8_8_8_REV = 0x8367, - GL_UNSIGNED_INT_2_10_10_10_REV = 0x8368, - GL_BGR = 0x80E0, - GL_BGRA = 0x80E1, - GL_MAX_ELEMENTS_VERTICES = 0x80E8, - GL_MAX_ELEMENTS_INDICES = 0x80E9, - GL_CLAMP_TO_EDGE = 0x812F, - GL_TEXTURE_MIN_LOD = 0x813A, - GL_TEXTURE_MAX_LOD = 0x813B, - GL_TEXTURE_BASE_LEVEL = 0x813C, - GL_TEXTURE_MAX_LEVEL = 0x813D, - GL_SMOOTH_POINT_SIZE_RANGE = 0x0B12, - GL_SMOOTH_POINT_SIZE_GRANULARITY = 0x0B13, - GL_SMOOTH_LINE_WIDTH_RANGE = 0x0B22, - GL_SMOOTH_LINE_WIDTH_GRANULARITY = 0x0B23, - GL_ALIASED_LINE_WIDTH_RANGE = 0x846E, - GL_TEXTURE0 = 0x84C0, - GL_TEXTURE1 = 0x84C1, - GL_TEXTURE2 = 0x84C2, - GL_TEXTURE3 = 0x84C3, - GL_TEXTURE4 = 0x84C4, - GL_TEXTURE5 = 0x84C5, - GL_TEXTURE6 = 0x84C6, - GL_TEXTURE7 = 0x84C7, - GL_TEXTURE8 = 0x84C8, - GL_TEXTURE9 = 0x84C9, - GL_TEXTURE10 = 0x84CA, - GL_TEXTURE11 = 0x84CB, - GL_TEXTURE12 = 0x84CC, - GL_TEXTURE13 = 0x84CD, - GL_TEXTURE14 = 0x84CE, - GL_TEXTURE15 = 0x84CF, - GL_TEXTURE16 = 0x84D0, - GL_TEXTURE17 = 0x84D1, - GL_TEXTURE18 = 0x84D2, - GL_TEXTURE19 = 0x84D3, - GL_TEXTURE20 = 0x84D4, - GL_TEXTURE21 = 0x84D5, - GL_TEXTURE22 = 0x84D6, - GL_TEXTURE23 = 0x84D7, - GL_TEXTURE24 = 0x84D8, - GL_TEXTURE25 = 0x84D9, - GL_TEXTURE26 = 0x84DA, - GL_TEXTURE27 = 0x84DB, - GL_TEXTURE28 = 0x84DC, - GL_TEXTURE29 = 0x84DD, - GL_TEXTURE30 = 0x84DE, - GL_TEXTURE31 = 0x84DF, - GL_ACTIVE_TEXTURE = 0x84E0, - GL_MULTISAMPLE = 0x809D, - GL_SAMPLE_ALPHA_TO_COVERAGE = 0x809E, - GL_SAMPLE_ALPHA_TO_ONE = 0x809F, - GL_SAMPLE_COVERAGE = 0x80A0, - GL_SAMPLE_BUFFERS = 0x80A8, - GL_SAMPLES = 0x80A9, - GL_SAMPLE_COVERAGE_VALUE = 0x80AA, - GL_SAMPLE_COVERAGE_INVERT = 0x80AB, - GL_TEXTURE_CUBE_MAP = 0x8513, - GL_TEXTURE_BINDING_CUBE_MAP = 0x8514, - GL_TEXTURE_CUBE_MAP_POSITIVE_X = 0x8515, - GL_TEXTURE_CUBE_MAP_NEGATIVE_X = 0x8516, - GL_TEXTURE_CUBE_MAP_POSITIVE_Y = 0x8517, - GL_TEXTURE_CUBE_MAP_NEGATIVE_Y = 0x8518, - GL_TEXTURE_CUBE_MAP_POSITIVE_Z = 0x8519, - GL_TEXTURE_CUBE_MAP_NEGATIVE_Z = 0x851A, - GL_PROXY_TEXTURE_CUBE_MAP = 0x851B, - GL_MAX_CUBE_MAP_TEXTURE_SIZE = 0x851C, - GL_COMPRESSED_RGB = 0x84ED, - GL_COMPRESSED_RGBA = 0x84EE, - GL_TEXTURE_COMPRESSION_HINT = 0x84EF, - GL_TEXTURE_COMPRESSED_IMAGE_SIZE = 0x86A0, - GL_TEXTURE_COMPRESSED = 0x86A1, - GL_NUM_COMPRESSED_TEXTURE_FORMATS = 0x86A2, - GL_COMPRESSED_TEXTURE_FORMATS = 0x86A3, - GL_CLAMP_TO_BORDER = 0x812D, - GL_BLEND_DST_RGB = 0x80C8, - GL_BLEND_SRC_RGB = 0x80C9, - GL_BLEND_DST_ALPHA = 0x80CA, - GL_BLEND_SRC_ALPHA = 0x80CB, - GL_POINT_FADE_THRESHOLD_SIZE = 0x8128, - GL_DEPTH_COMPONENT16 = 0x81A5, - GL_DEPTH_COMPONENT24 = 0x81A6, - GL_DEPTH_COMPONENT32 = 0x81A7, - GL_MIRRORED_REPEAT = 0x8370, - GL_MAX_TEXTURE_LOD_BIAS = 0x84FD, - GL_TEXTURE_LOD_BIAS = 0x8501, - GL_INCR_WRAP = 0x8507, - GL_DECR_WRAP = 0x8508, - GL_TEXTURE_DEPTH_SIZE = 0x884A, - GL_TEXTURE_COMPARE_MODE = 0x884C, - GL_TEXTURE_COMPARE_FUNC = 0x884D, - GL_BLEND_COLOR = 0x8005, - GL_BLEND_EQUATION = 0x8009, - GL_CONSTANT_COLOR = 0x8001, - GL_ONE_MINUS_CONSTANT_COLOR = 0x8002, - GL_CONSTANT_ALPHA = 0x8003, - GL_ONE_MINUS_CONSTANT_ALPHA = 0x8004, - GL_FUNC_ADD = 0x8006, - GL_FUNC_REVERSE_SUBTRACT = 0x800B, - GL_FUNC_SUBTRACT = 0x800A, - GL_MIN = 0x8007, - GL_MAX = 0x8008, - GL_BUFFER_SIZE = 0x8764, - GL_BUFFER_USAGE = 0x8765, - GL_QUERY_COUNTER_BITS = 0x8864, - GL_CURRENT_QUERY = 0x8865, - GL_QUERY_RESULT = 0x8866, - GL_QUERY_RESULT_AVAILABLE = 0x8867, - GL_ARRAY_BUFFER = 0x8892, - GL_ELEMENT_ARRAY_BUFFER = 0x8893, - GL_ARRAY_BUFFER_BINDING = 0x8894, - GL_ELEMENT_ARRAY_BUFFER_BINDING = 0x8895, - GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING = 0x889F, - GL_READ_ONLY = 0x88B8, - GL_WRITE_ONLY = 0x88B9, - GL_READ_WRITE = 0x88BA, - GL_BUFFER_ACCESS = 0x88BB, - GL_BUFFER_MAPPED = 0x88BC, - GL_BUFFER_MAP_POINTER = 0x88BD, - GL_STREAM_DRAW = 0x88E0, - GL_STREAM_READ = 0x88E1, - GL_STREAM_COPY = 0x88E2, - GL_STATIC_DRAW = 0x88E4, - GL_STATIC_READ = 0x88E5, - GL_STATIC_COPY = 0x88E6, - GL_DYNAMIC_DRAW = 0x88E8, - GL_DYNAMIC_READ = 0x88E9, - GL_DYNAMIC_COPY = 0x88EA, - GL_SAMPLES_PASSED = 0x8914, - GL_SRC1_ALPHA = 0x8589, - GL_BLEND_EQUATION_RGB = 0x8009, - GL_VERTEX_ATTRIB_ARRAY_ENABLED = 0x8622, - GL_VERTEX_ATTRIB_ARRAY_SIZE = 0x8623, - GL_VERTEX_ATTRIB_ARRAY_STRIDE = 0x8624, - GL_VERTEX_ATTRIB_ARRAY_TYPE = 0x8625, - GL_CURRENT_VERTEX_ATTRIB = 0x8626, - GL_VERTEX_PROGRAM_POINT_SIZE = 0x8642, - GL_VERTEX_ATTRIB_ARRAY_POINTER = 0x8645, - GL_STENCIL_BACK_FUNC = 0x8800, - GL_STENCIL_BACK_FAIL = 0x8801, - GL_STENCIL_BACK_PASS_DEPTH_FAIL = 0x8802, - GL_STENCIL_BACK_PASS_DEPTH_PASS = 0x8803, - GL_MAX_DRAW_BUFFERS = 0x8824, - GL_DRAW_BUFFER0 = 0x8825, - GL_DRAW_BUFFER1 = 0x8826, - GL_DRAW_BUFFER2 = 0x8827, - GL_DRAW_BUFFER3 = 0x8828, - GL_DRAW_BUFFER4 = 0x8829, - GL_DRAW_BUFFER5 = 0x882A, - GL_DRAW_BUFFER6 = 0x882B, - GL_DRAW_BUFFER7 = 0x882C, - GL_DRAW_BUFFER8 = 0x882D, - GL_DRAW_BUFFER9 = 0x882E, - GL_DRAW_BUFFER10 = 0x882F, - GL_DRAW_BUFFER11 = 0x8830, - GL_DRAW_BUFFER12 = 0x8831, - GL_DRAW_BUFFER13 = 0x8832, - GL_DRAW_BUFFER14 = 0x8833, - GL_DRAW_BUFFER15 = 0x8834, - GL_BLEND_EQUATION_ALPHA = 0x883D, - GL_MAX_VERTEX_ATTRIBS = 0x8869, - GL_VERTEX_ATTRIB_ARRAY_NORMALIZED = 0x886A, - GL_MAX_TEXTURE_IMAGE_UNITS = 0x8872, - GL_FRAGMENT_SHADER = 0x8B30, - GL_VERTEX_SHADER = 0x8B31, - GL_MAX_FRAGMENT_UNIFORM_COMPONENTS = 0x8B49, - GL_MAX_VERTEX_UNIFORM_COMPONENTS = 0x8B4A, - GL_MAX_VARYING_FLOATS = 0x8B4B, - GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS = 0x8B4C, - GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS = 0x8B4D, - GL_SHADER_TYPE = 0x8B4F, - GL_FLOAT_VEC2 = 0x8B50, - GL_FLOAT_VEC3 = 0x8B51, - GL_FLOAT_VEC4 = 0x8B52, - GL_INT_VEC2 = 0x8B53, - GL_INT_VEC3 = 0x8B54, - GL_INT_VEC4 = 0x8B55, - GL_BOOL = 0x8B56, - GL_BOOL_VEC2 = 0x8B57, - GL_BOOL_VEC3 = 0x8B58, - GL_BOOL_VEC4 = 0x8B59, - GL_FLOAT_MAT2 = 0x8B5A, - GL_FLOAT_MAT3 = 0x8B5B, - GL_FLOAT_MAT4 = 0x8B5C, - GL_SAMPLER_1D = 0x8B5D, - GL_SAMPLER_2D = 0x8B5E, - GL_SAMPLER_3D = 0x8B5F, - GL_SAMPLER_CUBE = 0x8B60, - GL_SAMPLER_1D_SHADOW = 0x8B61, - GL_SAMPLER_2D_SHADOW = 0x8B62, - GL_DELETE_STATUS = 0x8B80, - GL_COMPILE_STATUS = 0x8B81, - GL_LINK_STATUS = 0x8B82, - GL_VALIDATE_STATUS = 0x8B83, - GL_INFO_LOG_LENGTH = 0x8B84, - GL_ATTACHED_SHADERS = 0x8B85, - GL_ACTIVE_UNIFORMS = 0x8B86, - GL_ACTIVE_UNIFORM_MAX_LENGTH = 0x8B87, - GL_SHADER_SOURCE_LENGTH = 0x8B88, - GL_ACTIVE_ATTRIBUTES = 0x8B89, - GL_ACTIVE_ATTRIBUTE_MAX_LENGTH = 0x8B8A, - GL_FRAGMENT_SHADER_DERIVATIVE_HINT = 0x8B8B, - GL_SHADING_LANGUAGE_VERSION = 0x8B8C, - GL_CURRENT_PROGRAM = 0x8B8D, - GL_POINT_SPRITE_COORD_ORIGIN = 0x8CA0, - GL_LOWER_LEFT = 0x8CA1, - GL_UPPER_LEFT = 0x8CA2, - GL_STENCIL_BACK_REF = 0x8CA3, - GL_STENCIL_BACK_VALUE_MASK = 0x8CA4, - GL_STENCIL_BACK_WRITEMASK = 0x8CA5, - GL_PIXEL_PACK_BUFFER = 0x88EB, - GL_PIXEL_UNPACK_BUFFER = 0x88EC, - GL_PIXEL_PACK_BUFFER_BINDING = 0x88ED, - GL_PIXEL_UNPACK_BUFFER_BINDING = 0x88EF, - GL_FLOAT_MAT2x3 = 0x8B65, - GL_FLOAT_MAT2x4 = 0x8B66, - GL_FLOAT_MAT3x2 = 0x8B67, - GL_FLOAT_MAT3x4 = 0x8B68, - GL_FLOAT_MAT4x2 = 0x8B69, - GL_FLOAT_MAT4x3 = 0x8B6A, - GL_SRGB = 0x8C40, - GL_SRGB8 = 0x8C41, - GL_SRGB_ALPHA = 0x8C42, - GL_SRGB8_ALPHA8 = 0x8C43, - GL_COMPRESSED_SRGB = 0x8C48, - GL_COMPRESSED_SRGB_ALPHA = 0x8C49, - GL_COMPARE_REF_TO_TEXTURE = 0x884E, - GL_CLIP_DISTANCE0 = 0x3000, - GL_CLIP_DISTANCE1 = 0x3001, - GL_CLIP_DISTANCE2 = 0x3002, - GL_CLIP_DISTANCE3 = 0x3003, - GL_CLIP_DISTANCE4 = 0x3004, - GL_CLIP_DISTANCE5 = 0x3005, - GL_CLIP_DISTANCE6 = 0x3006, - GL_CLIP_DISTANCE7 = 0x3007, - GL_MAX_CLIP_DISTANCES = 0x0D32, - GL_MAJOR_VERSION = 0x821B, - GL_MINOR_VERSION = 0x821C, - GL_NUM_EXTENSIONS = 0x821D, - GL_CONTEXT_FLAGS = 0x821E, - GL_COMPRESSED_RED = 0x8225, - GL_COMPRESSED_RG = 0x8226, - GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT = 0x00000001, - GL_RGBA32F = 0x8814, - GL_RGB32F = 0x8815, - GL_RGBA16F = 0x881A, - GL_RGB16F = 0x881B, - GL_VERTEX_ATTRIB_ARRAY_INTEGER = 0x88FD, - GL_MAX_ARRAY_TEXTURE_LAYERS = 0x88FF, - GL_MIN_PROGRAM_TEXEL_OFFSET = 0x8904, - GL_MAX_PROGRAM_TEXEL_OFFSET = 0x8905, - GL_CLAMP_READ_COLOR = 0x891C, - GL_FIXED_ONLY = 0x891D, - GL_MAX_VARYING_COMPONENTS = 0x8B4B, - GL_TEXTURE_1D_ARRAY = 0x8C18, - GL_PROXY_TEXTURE_1D_ARRAY = 0x8C19, - GL_TEXTURE_2D_ARRAY = 0x8C1A, - GL_PROXY_TEXTURE_2D_ARRAY = 0x8C1B, - GL_TEXTURE_BINDING_1D_ARRAY = 0x8C1C, - GL_TEXTURE_BINDING_2D_ARRAY = 0x8C1D, - GL_R11F_G11F_B10F = 0x8C3A, - GL_UNSIGNED_INT_10F_11F_11F_REV = 0x8C3B, - GL_RGB9_E5 = 0x8C3D, - GL_UNSIGNED_INT_5_9_9_9_REV = 0x8C3E, - GL_TEXTURE_SHARED_SIZE = 0x8C3F, - GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH = 0x8C76, - GL_TRANSFORM_FEEDBACK_BUFFER_MODE = 0x8C7F, - GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS = 0x8C80, - GL_TRANSFORM_FEEDBACK_VARYINGS = 0x8C83, - GL_TRANSFORM_FEEDBACK_BUFFER_START = 0x8C84, - GL_TRANSFORM_FEEDBACK_BUFFER_SIZE = 0x8C85, - GL_PRIMITIVES_GENERATED = 0x8C87, - GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN = 0x8C88, - GL_RASTERIZER_DISCARD = 0x8C89, - GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS = 0x8C8A, - GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS = 0x8C8B, - GL_INTERLEAVED_ATTRIBS = 0x8C8C, - GL_SEPARATE_ATTRIBS = 0x8C8D, - GL_TRANSFORM_FEEDBACK_BUFFER = 0x8C8E, - GL_TRANSFORM_FEEDBACK_BUFFER_BINDING = 0x8C8F, - GL_RGBA32UI = 0x8D70, - GL_RGB32UI = 0x8D71, - GL_RGBA16UI = 0x8D76, - GL_RGB16UI = 0x8D77, - GL_RGBA8UI = 0x8D7C, - GL_RGB8UI = 0x8D7D, - GL_RGBA32I = 0x8D82, - GL_RGB32I = 0x8D83, - GL_RGBA16I = 0x8D88, - GL_RGB16I = 0x8D89, - GL_RGBA8I = 0x8D8E, - GL_RGB8I = 0x8D8F, - GL_RED_INTEGER = 0x8D94, - GL_GREEN_INTEGER = 0x8D95, - GL_BLUE_INTEGER = 0x8D96, - GL_RGB_INTEGER = 0x8D98, - GL_RGBA_INTEGER = 0x8D99, - GL_BGR_INTEGER = 0x8D9A, - GL_BGRA_INTEGER = 0x8D9B, - GL_SAMPLER_1D_ARRAY = 0x8DC0, - GL_SAMPLER_2D_ARRAY = 0x8DC1, - GL_SAMPLER_1D_ARRAY_SHADOW = 0x8DC3, - GL_SAMPLER_2D_ARRAY_SHADOW = 0x8DC4, - GL_SAMPLER_CUBE_SHADOW = 0x8DC5, - GL_UNSIGNED_INT_VEC2 = 0x8DC6, - GL_UNSIGNED_INT_VEC3 = 0x8DC7, - GL_UNSIGNED_INT_VEC4 = 0x8DC8, - GL_INT_SAMPLER_1D = 0x8DC9, - GL_INT_SAMPLER_2D = 0x8DCA, - GL_INT_SAMPLER_3D = 0x8DCB, - GL_INT_SAMPLER_CUBE = 0x8DCC, - GL_INT_SAMPLER_1D_ARRAY = 0x8DCE, - GL_INT_SAMPLER_2D_ARRAY = 0x8DCF, - GL_UNSIGNED_INT_SAMPLER_1D = 0x8DD1, - GL_UNSIGNED_INT_SAMPLER_2D = 0x8DD2, - GL_UNSIGNED_INT_SAMPLER_3D = 0x8DD3, - GL_UNSIGNED_INT_SAMPLER_CUBE = 0x8DD4, - GL_UNSIGNED_INT_SAMPLER_1D_ARRAY = 0x8DD6, - GL_UNSIGNED_INT_SAMPLER_2D_ARRAY = 0x8DD7, - GL_QUERY_WAIT = 0x8E13, - GL_QUERY_NO_WAIT = 0x8E14, - GL_QUERY_BY_REGION_WAIT = 0x8E15, - GL_QUERY_BY_REGION_NO_WAIT = 0x8E16, - GL_BUFFER_ACCESS_FLAGS = 0x911F, - GL_BUFFER_MAP_LENGTH = 0x9120, - GL_BUFFER_MAP_OFFSET = 0x9121, - GL_DEPTH_COMPONENT32F = 0x8CAC, - GL_DEPTH32F_STENCIL8 = 0x8CAD, - GL_FLOAT_32_UNSIGNED_INT_24_8_REV = 0x8DAD, - GL_INVALID_FRAMEBUFFER_OPERATION = 0x0506, - GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING = 0x8210, - GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE = 0x8211, - GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE = 0x8212, - GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE = 0x8213, - GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE = 0x8214, - GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE = 0x8215, - GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE = 0x8216, - GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE = 0x8217, - GL_FRAMEBUFFER_DEFAULT = 0x8218, - GL_FRAMEBUFFER_UNDEFINED = 0x8219, - GL_DEPTH_STENCIL_ATTACHMENT = 0x821A, - GL_MAX_RENDERBUFFER_SIZE = 0x84E8, - GL_DEPTH_STENCIL = 0x84F9, - GL_UNSIGNED_INT_24_8 = 0x84FA, - GL_DEPTH24_STENCIL8 = 0x88F0, - GL_TEXTURE_STENCIL_SIZE = 0x88F1, - GL_TEXTURE_RED_TYPE = 0x8C10, - GL_TEXTURE_GREEN_TYPE = 0x8C11, - GL_TEXTURE_BLUE_TYPE = 0x8C12, - GL_TEXTURE_ALPHA_TYPE = 0x8C13, - GL_TEXTURE_DEPTH_TYPE = 0x8C16, - GL_UNSIGNED_NORMALIZED = 0x8C17, - GL_FRAMEBUFFER_BINDING = 0x8CA6, - GL_DRAW_FRAMEBUFFER_BINDING = 0x8CA6, - GL_RENDERBUFFER_BINDING = 0x8CA7, - GL_READ_FRAMEBUFFER = 0x8CA8, - GL_DRAW_FRAMEBUFFER = 0x8CA9, - GL_READ_FRAMEBUFFER_BINDING = 0x8CAA, - GL_RENDERBUFFER_SAMPLES = 0x8CAB, - GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE = 0x8CD0, - GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME = 0x8CD1, - GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL = 0x8CD2, - GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE = 0x8CD3, - GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER = 0x8CD4, - GL_FRAMEBUFFER_COMPLETE = 0x8CD5, - GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT = 0x8CD6, - GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT = 0x8CD7, - GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER = 0x8CDB, - GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER = 0x8CDC, - GL_FRAMEBUFFER_UNSUPPORTED = 0x8CDD, - GL_MAX_COLOR_ATTACHMENTS = 0x8CDF, - GL_COLOR_ATTACHMENT0 = 0x8CE0, - GL_COLOR_ATTACHMENT1 = 0x8CE1, - GL_COLOR_ATTACHMENT2 = 0x8CE2, - GL_COLOR_ATTACHMENT3 = 0x8CE3, - GL_COLOR_ATTACHMENT4 = 0x8CE4, - GL_COLOR_ATTACHMENT5 = 0x8CE5, - GL_COLOR_ATTACHMENT6 = 0x8CE6, - GL_COLOR_ATTACHMENT7 = 0x8CE7, - GL_COLOR_ATTACHMENT8 = 0x8CE8, - GL_COLOR_ATTACHMENT9 = 0x8CE9, - GL_COLOR_ATTACHMENT10 = 0x8CEA, - GL_COLOR_ATTACHMENT11 = 0x8CEB, - GL_COLOR_ATTACHMENT12 = 0x8CEC, - GL_COLOR_ATTACHMENT13 = 0x8CED, - GL_COLOR_ATTACHMENT14 = 0x8CEE, - GL_COLOR_ATTACHMENT15 = 0x8CEF, - GL_COLOR_ATTACHMENT16 = 0x8CF0, - GL_COLOR_ATTACHMENT17 = 0x8CF1, - GL_COLOR_ATTACHMENT18 = 0x8CF2, - GL_COLOR_ATTACHMENT19 = 0x8CF3, - GL_COLOR_ATTACHMENT20 = 0x8CF4, - GL_COLOR_ATTACHMENT21 = 0x8CF5, - GL_COLOR_ATTACHMENT22 = 0x8CF6, - GL_COLOR_ATTACHMENT23 = 0x8CF7, - GL_COLOR_ATTACHMENT24 = 0x8CF8, - GL_COLOR_ATTACHMENT25 = 0x8CF9, - GL_COLOR_ATTACHMENT26 = 0x8CFA, - GL_COLOR_ATTACHMENT27 = 0x8CFB, - GL_COLOR_ATTACHMENT28 = 0x8CFC, - GL_COLOR_ATTACHMENT29 = 0x8CFD, - GL_COLOR_ATTACHMENT30 = 0x8CFE, - GL_COLOR_ATTACHMENT31 = 0x8CFF, - GL_DEPTH_ATTACHMENT = 0x8D00, - GL_STENCIL_ATTACHMENT = 0x8D20, - GL_FRAMEBUFFER = 0x8D40, - GL_RENDERBUFFER = 0x8D41, - GL_RENDERBUFFER_WIDTH = 0x8D42, - GL_RENDERBUFFER_HEIGHT = 0x8D43, - GL_RENDERBUFFER_INTERNAL_FORMAT = 0x8D44, - GL_STENCIL_INDEX1 = 0x8D46, - GL_STENCIL_INDEX4 = 0x8D47, - GL_STENCIL_INDEX8 = 0x8D48, - GL_STENCIL_INDEX16 = 0x8D49, - GL_RENDERBUFFER_RED_SIZE = 0x8D50, - GL_RENDERBUFFER_GREEN_SIZE = 0x8D51, - GL_RENDERBUFFER_BLUE_SIZE = 0x8D52, - GL_RENDERBUFFER_ALPHA_SIZE = 0x8D53, - GL_RENDERBUFFER_DEPTH_SIZE = 0x8D54, - GL_RENDERBUFFER_STENCIL_SIZE = 0x8D55, - GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE = 0x8D56, - GL_MAX_SAMPLES = 0x8D57, - GL_FRAMEBUFFER_SRGB = 0x8DB9, - GL_HALF_FLOAT = 0x140B, - GL_MAP_READ_BIT = 0x0001, - GL_MAP_WRITE_BIT = 0x0002, - GL_MAP_INVALIDATE_RANGE_BIT = 0x0004, - GL_MAP_INVALIDATE_BUFFER_BIT = 0x0008, - GL_MAP_FLUSH_EXPLICIT_BIT = 0x0010, - GL_MAP_UNSYNCHRONIZED_BIT = 0x0020, - GL_COMPRESSED_RED_RGTC1 = 0x8DBB, - GL_COMPRESSED_SIGNED_RED_RGTC1 = 0x8DBC, - GL_COMPRESSED_RG_RGTC2 = 0x8DBD, - GL_COMPRESSED_SIGNED_RG_RGTC2 = 0x8DBE, - GL_RG = 0x8227, - GL_RG_INTEGER = 0x8228, - GL_R8 = 0x8229, - GL_R16 = 0x822A, - GL_RG8 = 0x822B, - GL_RG16 = 0x822C, - GL_R16F = 0x822D, - GL_R32F = 0x822E, - GL_RG16F = 0x822F, - GL_RG32F = 0x8230, - GL_R8I = 0x8231, - GL_R8UI = 0x8232, - GL_R16I = 0x8233, - GL_R16UI = 0x8234, - GL_R32I = 0x8235, - GL_R32UI = 0x8236, - GL_RG8I = 0x8237, - GL_RG8UI = 0x8238, - GL_RG16I = 0x8239, - GL_RG16UI = 0x823A, - GL_RG32I = 0x823B, - GL_RG32UI = 0x823C, - GL_VERTEX_ARRAY_BINDING = 0x85B5, - GL_SAMPLER_2D_RECT = 0x8B63, - GL_SAMPLER_2D_RECT_SHADOW = 0x8B64, - GL_SAMPLER_BUFFER = 0x8DC2, - GL_INT_SAMPLER_2D_RECT = 0x8DCD, - GL_INT_SAMPLER_BUFFER = 0x8DD0, - GL_UNSIGNED_INT_SAMPLER_2D_RECT = 0x8DD5, - GL_UNSIGNED_INT_SAMPLER_BUFFER = 0x8DD8, - GL_TEXTURE_BUFFER = 0x8C2A, - GL_MAX_TEXTURE_BUFFER_SIZE = 0x8C2B, - GL_TEXTURE_BINDING_BUFFER = 0x8C2C, - GL_TEXTURE_BUFFER_DATA_STORE_BINDING = 0x8C2D, - GL_TEXTURE_RECTANGLE = 0x84F5, - GL_TEXTURE_BINDING_RECTANGLE = 0x84F6, - GL_PROXY_TEXTURE_RECTANGLE = 0x84F7, - GL_MAX_RECTANGLE_TEXTURE_SIZE = 0x84F8, - GL_R8_SNORM = 0x8F94, - GL_RG8_SNORM = 0x8F95, - GL_RGB8_SNORM = 0x8F96, - GL_RGBA8_SNORM = 0x8F97, - GL_R16_SNORM = 0x8F98, - GL_RG16_SNORM = 0x8F99, - GL_RGB16_SNORM = 0x8F9A, - GL_RGBA16_SNORM = 0x8F9B, - GL_SIGNED_NORMALIZED = 0x8F9C, - GL_PRIMITIVE_RESTART = 0x8F9D, - GL_PRIMITIVE_RESTART_INDEX = 0x8F9E, - GL_COPY_READ_BUFFER = 0x8F36, - GL_COPY_WRITE_BUFFER = 0x8F37, - GL_UNIFORM_BUFFER = 0x8A11, - GL_UNIFORM_BUFFER_BINDING = 0x8A28, - GL_UNIFORM_BUFFER_START = 0x8A29, - GL_UNIFORM_BUFFER_SIZE = 0x8A2A, - GL_MAX_VERTEX_UNIFORM_BLOCKS = 0x8A2B, - GL_MAX_GEOMETRY_UNIFORM_BLOCKS = 0x8A2C, - GL_MAX_FRAGMENT_UNIFORM_BLOCKS = 0x8A2D, - GL_MAX_COMBINED_UNIFORM_BLOCKS = 0x8A2E, - GL_MAX_UNIFORM_BUFFER_BINDINGS = 0x8A2F, - GL_MAX_UNIFORM_BLOCK_SIZE = 0x8A30, - GL_MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS = 0x8A31, - GL_MAX_COMBINED_GEOMETRY_UNIFORM_COMPONENTS = 0x8A32, - GL_MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS = 0x8A33, - GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT = 0x8A34, - GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH = 0x8A35, - GL_ACTIVE_UNIFORM_BLOCKS = 0x8A36, - GL_UNIFORM_TYPE = 0x8A37, - GL_UNIFORM_SIZE = 0x8A38, - GL_UNIFORM_NAME_LENGTH = 0x8A39, - GL_UNIFORM_BLOCK_INDEX = 0x8A3A, - GL_UNIFORM_OFFSET = 0x8A3B, - GL_UNIFORM_ARRAY_STRIDE = 0x8A3C, - GL_UNIFORM_MATRIX_STRIDE = 0x8A3D, - GL_UNIFORM_IS_ROW_MAJOR = 0x8A3E, - GL_UNIFORM_BLOCK_BINDING = 0x8A3F, - GL_UNIFORM_BLOCK_DATA_SIZE = 0x8A40, - GL_UNIFORM_BLOCK_NAME_LENGTH = 0x8A41, - GL_UNIFORM_BLOCK_ACTIVE_UNIFORMS = 0x8A42, - GL_UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES = 0x8A43, - GL_UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER = 0x8A44, - GL_UNIFORM_BLOCK_REFERENCED_BY_GEOMETRY_SHADER = 0x8A45, - GL_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER = 0x8A46, - GL_INVALID_INDEX = 0xFFFFFFFFu, - GL_CONTEXT_CORE_PROFILE_BIT = 0x00000001, - GL_CONTEXT_COMPATIBILITY_PROFILE_BIT = 0x00000002, - GL_LINES_ADJACENCY = 0x000A, - GL_LINE_STRIP_ADJACENCY = 0x000B, - GL_TRIANGLES_ADJACENCY = 0x000C, - GL_TRIANGLE_STRIP_ADJACENCY = 0x000D, - GL_PROGRAM_POINT_SIZE = 0x8642, - GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS = 0x8C29, - GL_FRAMEBUFFER_ATTACHMENT_LAYERED = 0x8DA7, - GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS = 0x8DA8, - GL_GEOMETRY_SHADER = 0x8DD9, - GL_GEOMETRY_VERTICES_OUT = 0x8916, - GL_GEOMETRY_INPUT_TYPE = 0x8917, - GL_GEOMETRY_OUTPUT_TYPE = 0x8918, - GL_MAX_GEOMETRY_UNIFORM_COMPONENTS = 0x8DDF, - GL_MAX_GEOMETRY_OUTPUT_VERTICES = 0x8DE0, - GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS = 0x8DE1, - GL_MAX_VERTEX_OUTPUT_COMPONENTS = 0x9122, - GL_MAX_GEOMETRY_INPUT_COMPONENTS = 0x9123, - GL_MAX_GEOMETRY_OUTPUT_COMPONENTS = 0x9124, - GL_MAX_FRAGMENT_INPUT_COMPONENTS = 0x9125, - GL_CONTEXT_PROFILE_MASK = 0x9126, - GL_DEPTH_CLAMP = 0x864F, - GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION = 0x8E4C, - GL_FIRST_VERTEX_CONVENTION = 0x8E4D, - GL_LAST_VERTEX_CONVENTION = 0x8E4E, - GL_PROVOKING_VERTEX = 0x8E4F, - GL_TEXTURE_CUBE_MAP_SEAMLESS = 0x884F, - GL_MAX_SERVER_WAIT_TIMEOUT = 0x9111, - GL_OBJECT_TYPE = 0x9112, - GL_SYNC_CONDITION = 0x9113, - GL_SYNC_STATUS = 0x9114, - GL_SYNC_FLAGS = 0x9115, - GL_SYNC_FENCE = 0x9116, - GL_SYNC_GPU_COMMANDS_COMPLETE = 0x9117, - GL_UNSIGNALED = 0x9118, - GL_SIGNALED = 0x9119, - GL_ALREADY_SIGNALED = 0x911A, - GL_TIMEOUT_EXPIRED = 0x911B, - GL_CONDITION_SATISFIED = 0x911C, - GL_WAIT_FAILED = 0x911D, - // GL_TIMEOUT_IGNORED = 0xFFFFFFFFFFFFFFFFull, - GL_SYNC_FLUSH_COMMANDS_BIT = 0x00000001, - GL_SAMPLE_POSITION = 0x8E50, - GL_SAMPLE_MASK = 0x8E51, - GL_SAMPLE_MASK_VALUE = 0x8E52, - GL_MAX_SAMPLE_MASK_WORDS = 0x8E59, - GL_TEXTURE_2D_MULTISAMPLE = 0x9100, - GL_PROXY_TEXTURE_2D_MULTISAMPLE = 0x9101, - GL_TEXTURE_2D_MULTISAMPLE_ARRAY = 0x9102, - GL_PROXY_TEXTURE_2D_MULTISAMPLE_ARRAY = 0x9103, - GL_TEXTURE_BINDING_2D_MULTISAMPLE = 0x9104, - GL_TEXTURE_BINDING_2D_MULTISAMPLE_ARRAY = 0x9105, - GL_TEXTURE_SAMPLES = 0x9106, - GL_TEXTURE_FIXED_SAMPLE_LOCATIONS = 0x9107, - GL_SAMPLER_2D_MULTISAMPLE = 0x9108, - GL_INT_SAMPLER_2D_MULTISAMPLE = 0x9109, - GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE = 0x910A, - GL_SAMPLER_2D_MULTISAMPLE_ARRAY = 0x910B, - GL_INT_SAMPLER_2D_MULTISAMPLE_ARRAY = 0x910C, - GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE_ARRAY = 0x910D, - GL_MAX_COLOR_TEXTURE_SAMPLES = 0x910E, - GL_MAX_DEPTH_TEXTURE_SAMPLES = 0x910F, - GL_MAX_INTEGER_SAMPLES = 0x9110, - } -} \ No newline at end of file diff --git a/src/SlatedGameToolkit.Framework/Graphics/Meshes/IMeshable.cs b/src/SlatedGameToolkit.Framework/Graphics/Meshes/IMeshable.cs index 618a91e..2e36811 100644 --- a/src/SlatedGameToolkit.Framework/Graphics/Meshes/IMeshable.cs +++ b/src/SlatedGameToolkit.Framework/Graphics/Meshes/IMeshable.cs @@ -1,6 +1,8 @@ using System; +using System.Drawing; using System.Numerics; +using SlatedGameToolkit.Framework.Graphics.Textures; namespace SlatedGameToolkit.Framework.Graphics.Meshes { @@ -18,5 +20,17 @@ namespace SlatedGameToolkit.Framework.Graphics.Meshes /// /// unsigned integers that are the indices of the vertices to use. uint[] Elements { get; } + + /// + /// The texture for this mesh. + /// + /// Texture for this mesh. + Texture Texture { get; } + + /// + /// The blended color of this mesh. + /// + /// A color for this mesh. + Color Color { get; } } } \ No newline at end of file diff --git a/src/SlatedGameToolkit.Framework/Graphics/Meshes/RectangleMesh.cs b/src/SlatedGameToolkit.Framework/Graphics/Meshes/RectangleMesh.cs index 831d871..23385f9 100644 --- a/src/SlatedGameToolkit.Framework/Graphics/Meshes/RectangleMesh.cs +++ b/src/SlatedGameToolkit.Framework/Graphics/Meshes/RectangleMesh.cs @@ -1,17 +1,18 @@ using System; using System.Drawing; using System.Numerics; +using SlatedGameToolkit.Framework.Graphics.Textures; namespace SlatedGameToolkit.Framework.Graphics.Meshes { - public abstract class RectangleMesh : IMeshable + public class RectangleMesh : IMeshable { - private Matrix4x4 matRot; + private Matrix4x4 matRot = Matrix4x4.Identity; private bool changed; private Vector3 rotation; private Vector2 origin, dimensions; - protected readonly Vector2[] textureCoords = new Vector2[4]; - private ValueTuple[] vertices = new ValueTuple[4]; + public readonly Vector2[] textureCoords = new Vector2[4]; + public ValueTuple[] vertices = new ValueTuple[4]; private uint[] indices = new uint[] {0, 1, 3, 1, 2, 3}; public ValueTuple[] Vertices @@ -28,10 +29,10 @@ namespace SlatedGameToolkit.Framework.Graphics.Meshes return origin.X; } - protected set + set { changed = true; - origin.X = X; + origin.X = value; } } @@ -41,7 +42,7 @@ namespace SlatedGameToolkit.Framework.Graphics.Meshes return origin.Y; } - protected set + set { changed = true; origin.Y = value; @@ -55,7 +56,7 @@ namespace SlatedGameToolkit.Framework.Graphics.Meshes return dimensions.X; } - protected set + set { changed = true; dimensions.X = value; @@ -69,7 +70,8 @@ namespace SlatedGameToolkit.Framework.Graphics.Meshes return dimensions.Y; } - protected set + + set { changed = true; dimensions.Y = value; @@ -92,6 +94,11 @@ namespace SlatedGameToolkit.Framework.Graphics.Meshes matRot = Matrix4x4.CreateFromYawPitchRoll(value.X, value.Y, value.Z); } } + + public Texture Texture { get; set; } + + public Color Color { get; set; } + private void CalculateVertices() { if (!changed) return; Vector3[] baseVerts = new Vector3[4]; diff --git a/src/SlatedGameToolkit.Framework/Graphics/OpenGL.cs b/src/SlatedGameToolkit.Framework/Graphics/OpenGL.cs deleted file mode 100644 index ba98028..0000000 --- a/src/SlatedGameToolkit.Framework/Graphics/OpenGL.cs +++ /dev/null @@ -1,127 +0,0 @@ -using System; -using System.Runtime.InteropServices; -using SDL2; -using SlatedGameToolkit.Framework.Exceptions; -using SlatedGameToolkit.Framework.Graphics.Programs; -using SlatedGameToolkit.Framework.Graphics.Shaders; - -namespace SlatedGameToolkit.Framework.Graphics -{ - [UnmanagedFunctionPointer(CallingConvention.Cdecl)] - public delegate void GLClearColour(float r, float g, float b); - [UnmanagedFunctionPointer(CallingConvention.Cdecl)] - public delegate void GLClear(GLEnum flags); - [UnmanagedFunctionPointer(CallingConvention.Cdecl)] - public delegate void GLViewport(int x, int y, int width, int height); - [UnmanagedFunctionPointer(CallingConvention.Cdecl)] - public delegate UIntPtr GLCreateShader(GLEnum type); - [UnmanagedFunctionPointer(CallingConvention.Cdecl)] - public delegate UIntPtr GLShaderSource(UIntPtr shaderHandle, uint count, string[] program, int[] length); - [UnmanagedFunctionPointer(CallingConvention.Cdecl)] - public delegate void GLCompileShader(UIntPtr shaderHandle); - [UnmanagedFunctionPointer(CallingConvention.Cdecl)] - public delegate void GLGetShaderInfoLog(UIntPtr shader, uint maxLength, out uint writtenLength, byte[] output); - [UnmanagedFunctionPointer(CallingConvention.Cdecl)] - public delegate UIntPtr GLCreateProgram(); - [UnmanagedFunctionPointer(CallingConvention.Cdecl)] - public delegate UIntPtr GLDeleteProgram(UIntPtr program); - [UnmanagedFunctionPointer(CallingConvention.Cdecl)] - public delegate void GLAttachShader(UIntPtr program, UIntPtr shader); - [UnmanagedFunctionPointer(CallingConvention.Cdecl)] - public delegate void GLDetachShader(UIntPtr program, UIntPtr shader); - [UnmanagedFunctionPointer(CallingConvention.Cdecl)] - public delegate void GLDeleteShader(UIntPtr shader); - [UnmanagedFunctionPointer(CallingConvention.Cdecl)] - public delegate void GLBindAttribLocation(UIntPtr program, uint index, string name); - [UnmanagedFunctionPointer(CallingConvention.Cdecl)] - public delegate void GLGetProgramInfoLog(UIntPtr program, uint maxLength, out uint writtenLength, byte[] output); - [UnmanagedFunctionPointer(CallingConvention.Cdecl)] - public delegate void GLLinkProgram(UIntPtr program); - [UnmanagedFunctionPointer(CallingConvention.Cdecl)] - public delegate void GLProgramParameter(UIntPtr program, GLEnum parameterName, int value); - [UnmanagedFunctionPointer(CallingConvention.Cdecl)] - public delegate void GLUseProgram(UIntPtr program); - [UnmanagedFunctionPointer(CallingConvention.Cdecl)] - public delegate void GLGenProgramPipelines(uint size, UIntPtr[] pipelines); - [UnmanagedFunctionPointer(CallingConvention.Cdecl)] - public delegate void GLDeleteProgramPipelines(uint size, UIntPtr[] pipelines); - [UnmanagedFunctionPointer(CallingConvention.Cdecl)] - public delegate void GLBindProgramPipeline(UIntPtr pipeline); - [UnmanagedFunctionPointer(CallingConvention.Cdecl)] - public delegate void GLUseProgramStages(UIntPtr pipeline, GLEnum bitField, UIntPtr program); - [UnmanagedFunctionPointer(CallingConvention.Cdecl)] - public delegate uint GLGetError(); - [UnmanagedFunctionPointer(CallingConvention.Cdecl)] - public delegate int GLGetAttribLocation(UIntPtr program, string attribName); - [UnmanagedFunctionPointer(CallingConvention.Cdecl)] - public delegate void GLBindBuffer(GLEnum target, UIntPtr buffer); - [UnmanagedFunctionPointer(CallingConvention.Cdecl)] - public delegate void GLGenBuffers(uint size, UIntPtr[] buffers); - [UnmanagedFunctionPointer(CallingConvention.Cdecl)] - public unsafe delegate void GLBufferData(GLEnum target, uint size, Array data, GLEnum usage); - [UnmanagedFunctionPointer(CallingConvention.Cdecl)] - public delegate void GLDeleteBuffers(uint size, UIntPtr[] buffers); - [UnmanagedFunctionPointer(CallingConvention.Cdecl)] - public delegate void GLVertexAttribPointer(uint index, int size, GLEnum type, bool normalized, uint stride, uint offset); - [UnmanagedFunctionPointer(CallingConvention.Cdecl)] - public delegate void GLGenVertexArrays(uint amount, UIntPtr[] arrays); - [UnmanagedFunctionPointer(CallingConvention.Cdecl)] - public delegate void GLDeleteVertexArrays(uint amount, UIntPtr[] arrays); - [UnmanagedFunctionPointer(CallingConvention.Cdecl)] - public delegate void GLBindVertexArray(UIntPtr array); - [UnmanagedFunctionPointer(CallingConvention.Cdecl)] - public delegate void GLEnableVertexAttribArray(uint attribIndex); - [UnmanagedFunctionPointer(CallingConvention.Cdecl)] - public delegate void GLDisableVertexAttribArray(uint attribIndex); - [UnmanagedFunctionPointer(CallingConvention.Cdecl)] - public delegate void GLDrawArrays(GLEnum mode, int first, uint count); - [UnmanagedFunctionPointer(CallingConvention.Cdecl)] - public delegate void GLDrawElements(GLEnum mode, uint count, int offset); - [UnmanagedFunctionPointer(CallingConvention.Cdecl)] - public delegate void GLMultiDrawArrays(GLEnum mode, int[] first, uint[] count, uint primout); - [UnmanagedFunctionPointer(CallingConvention.Cdecl)] - public delegate void GLMultiDrawElements(GLEnum mode, uint[] count, GLEnum type, uint[] indiceOffsets, int length); - [UnmanagedFunctionPointer(CallingConvention.Cdecl)] - public delegate void GLGenTextures(uint n, UIntPtr[] textureHandles); - [UnmanagedFunctionPointer(CallingConvention.Cdecl)] - public delegate void GLBindTexture(GLEnum target, UIntPtr texture); - [UnmanagedFunctionPointer(CallingConvention.Cdecl)] - public delegate void GLDeleteTextures(uint n, UIntPtr[] textureHandles); - [UnmanagedFunctionPointer(CallingConvention.Cdecl)] - public delegate void GLTexParameteri(GLEnum target, GLEnum pname, int value); - [UnmanagedFunctionPointer(CallingConvention.Cdecl)] - public delegate void GLTexParameterf(GLEnum target, GLEnum pname, float value); - [UnmanagedFunctionPointer(CallingConvention.Cdecl)] - public delegate void GLTexParameteriv(GLEnum target, GLEnum pname, int[] values); - [UnmanagedFunctionPointer(CallingConvention.Cdecl)] - public delegate void GLTexParameterfv(GLEnum target, GLEnum pname, float[] values); - [UnmanagedFunctionPointer(CallingConvention.Cdecl)] - public delegate void GLTexImage2D(GLEnum target, int level, int publicFormat, uint width, uint height, int border, GLEnum format, GLEnum type, byte[] data); - [UnmanagedFunctionPointer(CallingConvention.Cdecl)] - public delegate void GLGenerateMipmap(GLEnum target); - [UnmanagedFunctionPointer(CallingConvention.Cdecl)] - public delegate int GLGetUniformLocation(UIntPtr program, string name); - [UnmanagedFunctionPointer(CallingConvention.Cdecl)] - public delegate void GLUniformMatrix4fv(int index, uint count, bool transpose, float[] matrix); - - public static class OpenGL { - public const int OpenGLMajorVersion = 3; - public const int OpenGLMinorVersion = 3; - /// - /// Attempts to retrieve and instantiate an OpenGL function as a C# delegate. - /// Make sure the delegates signature is correct as failing to do so will potentially - /// lead to a CLR error on usage. - /// - /// Uses SDL2 as the function address retriever. - /// - /// The process name, case sensitive, exactly as OpenGL defines it. - /// The delegate type to cast to. - /// The delegate associated with the retrieved path. - public static T RetrieveGLDelegate(string functionName) where T : Delegate { - GameEngine.Logger.Debug(String.Format("Retrieving function with name: {0}", functionName)); - IntPtr functionAddress = SDL.SDL_GL_GetProcAddress(functionName); - if (functionAddress.Equals(IntPtr.Zero)) throw new FrameworkSDLException(); - return Marshal.GetDelegateForFunctionPointer(functionAddress); - } - } -} \ No newline at end of file diff --git a/src/SlatedGameToolkit.Framework/Graphics/OpenGL/GLContext.cs b/src/SlatedGameToolkit.Framework/Graphics/OpenGL/GLContext.cs new file mode 100644 index 0000000..588b8f8 --- /dev/null +++ b/src/SlatedGameToolkit.Framework/Graphics/OpenGL/GLContext.cs @@ -0,0 +1,3545 @@ +using System; +using System.Diagnostics.CodeAnalysis; +using System.Runtime.InteropServices; +using System.Security; +using SDL2; +using SlatedGameToolkit.Framework.Exceptions; + +namespace SlatedGameToolkit.Framework.Graphics.OpenGL +{ + [SuppressUnmanagedCodeSecurity] + [SuppressMessage("ReSharper", "StringLiteralTypo")] + [SuppressMessage("ReSharper", "IdentifierTypo")] + [SuppressMessage("ReSharper", "InconsistentNaming")] + public class GLContext : IDisposable + { + public IntPtr Handle { get; private set; } + private bool disposed; + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLCULLFACEPROC(CullFaceMode mode); + private PFNGLCULLFACEPROC glCullFace; + + public void CullFace(CullFaceMode mode) + { + glCullFace.Invoke(mode); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLFRONTFACEPROC(FrontFaceDirection mode); + private PFNGLFRONTFACEPROC glFrontFace; + + public void FrontFace(FrontFaceDirection mode) + { + glFrontFace.Invoke(mode); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLHINTPROC(HintTarget target, HintMode mode); + private PFNGLHINTPROC glHint; + + public void Hint(HintTarget target, HintMode mode) + { + glHint.Invoke(target, mode); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLLINEWIDTHPROC(float width); + private PFNGLLINEWIDTHPROC glLineWidth; + + public void LineWidth(float width) + { + glLineWidth.Invoke(width); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLPOINTSIZEPROC(float size); + private PFNGLPOINTSIZEPROC glPointSize; + + public void PointSize(float size) + { + glPointSize.Invoke(size); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLPOLYGONMODEPROC(MaterialFace face, PolygonMode mode); + private PFNGLPOLYGONMODEPROC glPolygonMode; + + public void PolygonMode(MaterialFace face, PolygonMode mode) + { + glPolygonMode.Invoke(face, mode); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLSCISSORPROC(int x, int y, int width, int height); + private PFNGLSCISSORPROC glScissor; + + public void Scissor(int x, int y, int width, int height) + { + glScissor.Invoke(x, y, width, height); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLTEXPARAMETERFPROC(TextureTarget target, TextureParameterName pname, float param); + private PFNGLTEXPARAMETERFPROC glTexParameterf; + + public void TexParameterf(TextureTarget target, TextureParameterName pname, float param) + { + glTexParameterf.Invoke(target, pname, param); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLTEXPARAMETERFVPROC(TextureTarget target, TextureParameterName pname, float[] parameters); + private PFNGLTEXPARAMETERFVPROC glTexParameterfv; + + public void TexParameterfv(TextureTarget target, TextureParameterName pname, float[] parameters) + { + glTexParameterfv.Invoke(target, pname, parameters); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLTEXPARAMETERIPROC(TextureTarget target, TextureParameterName pname, int param); + private PFNGLTEXPARAMETERIPROC glTexParameteri; + + public void TexParameteri(TextureTarget target, TextureParameterName pname, int param) + { + glTexParameteri.Invoke(target, pname, param); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLTEXPARAMETERIVPROC(TextureTarget target, TextureParameterName pname, int[] parameters); + private PFNGLTEXPARAMETERIVPROC glTexParameteriv; + + public void TexParameteriv(TextureTarget target, TextureParameterName pname, int[] parameters) + { + glTexParameteriv.Invoke(target, pname, parameters); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLTEXIMAGE1DPROC(TextureTarget target, int level, int internalformat, int width, int border, PixelFormat format, PixelType type, IntPtr pixels); + private PFNGLTEXIMAGE1DPROC glTexImage1D; + + public void TexImage1D(TextureTarget target, int level, int internalformat, int width, int border, PixelFormat format, PixelType type, IntPtr pixels) + { + glTexImage1D.Invoke(target, level, internalformat, width, border, format, type, pixels); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLTEXIMAGE2DPROC(TextureTarget target, int level, InternalFormat internalformat, uint width, uint height, int border, PixelFormat format, PixelType type, IntPtr pixels); + private PFNGLTEXIMAGE2DPROC glTexImage2D; + + public void TexImage2D(TextureTarget target, int level, InternalFormat internalformat, uint width, uint height, int border, PixelFormat format, PixelType type, IntPtr pixels) + { + glTexImage2D.Invoke(target, level, internalformat, width, height, border, format, type, pixels); + DetectGLError(); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLDRAWBUFFERPROC(DrawBufferMode buf); + private PFNGLDRAWBUFFERPROC glDrawBuffer; + + public void DrawBuffer(DrawBufferMode buf) + { + glDrawBuffer.Invoke(buf); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLCLEARPROC(ClearBufferMask mask); + private PFNGLCLEARPROC glClear; + + public void Clear(ClearBufferMask mask) + { + glClear.Invoke(mask); + DetectGLError(); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLCLEARCOLORPROC(float red, float green, float blue, float alpha); + private PFNGLCLEARCOLORPROC glClearColor; + + public void ClearColor(float red, float green, float blue, float alpha) + { + glClearColor.Invoke(red, green, blue, alpha); + DetectGLError(); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLCLEARSTENCILPROC(int s); + private PFNGLCLEARSTENCILPROC glClearStencil; + + public void ClearStencil(int s) + { + glClearStencil.Invoke(s); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLCLEARDEPTHPROC(double depth); + private PFNGLCLEARDEPTHPROC glClearDepth; + + public void ClearDepth(double depth) + { + glClearDepth.Invoke(depth); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLSTENCILMASKPROC(uint mask); + private PFNGLSTENCILMASKPROC glStencilMask; + + public void StencilMask(uint mask) + { + glStencilMask.Invoke(mask); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLCOLORMASKPROC(bool red, bool green, bool blue, bool alpha); + private PFNGLCOLORMASKPROC glColorMask; + + public void ColorMask(bool red, bool green, bool blue, bool alpha) + { + glColorMask.Invoke(red, green, blue, alpha); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLDEPTHMASKPROC(bool flag); + private PFNGLDEPTHMASKPROC glDepthMask; + + public void DepthMask(bool flag) + { + glDepthMask.Invoke(flag); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLDISABLEPROC(EnableCap cap); + private PFNGLDISABLEPROC glDisable; + + public void Disable(EnableCap cap) + { + glDisable.Invoke(cap); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLENABLEPROC(EnableCap cap); + private PFNGLENABLEPROC glEnable; + + public void Enable(EnableCap cap) + { + glEnable.Invoke(cap); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLFINISHPROC(); + private PFNGLFINISHPROC glFinish; + + public void Finish() + { + glFinish.Invoke(); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLFLUSHPROC(); + private PFNGLFLUSHPROC glFlush; + + public void Flush() + { + glFlush.Invoke(); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLBLENDFUNCPROC(BlendingFactor sfactor, BlendingFactor dfactor); + private PFNGLBLENDFUNCPROC glBlendFunc; + + public void BlendFunc(BlendingFactor sfactor, BlendingFactor dfactor) + { + glBlendFunc.Invoke(sfactor, dfactor); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLLOGICOPPROC(LogicOp opcode); + private PFNGLLOGICOPPROC glLogicOp; + + public void LogicOp(LogicOp opcode) + { + glLogicOp.Invoke(opcode); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLSTENCILFUNCPROC(StencilFunction func, int reference, uint mask); + private PFNGLSTENCILFUNCPROC glStencilFunc; + + public void StencilFunc(StencilFunction func, int reference, uint mask) + { + glStencilFunc.Invoke(func, reference, mask); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLSTENCILOPPROC(StencilOp fail, StencilOp zfail, StencilOp zpass); + private PFNGLSTENCILOPPROC glStencilOp; + + public void StencilOp(StencilOp fail, StencilOp zfail, StencilOp zpass) + { + glStencilOp.Invoke(fail, zfail, zpass); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLDEPTHFUNCPROC(DepthFunction func); + private PFNGLDEPTHFUNCPROC glDepthFunc; + + public void DepthFunc(DepthFunction func) + { + glDepthFunc.Invoke(func); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLPIXELSTOREFPROC(PixelStoreParameter pname, float param); + private PFNGLPIXELSTOREFPROC glPixelStoref; + + public void PixelStoref(PixelStoreParameter pname, float param) + { + glPixelStoref.Invoke(pname, param); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLPIXELSTOREIPROC(PixelStoreParameter pname, int param); + private PFNGLPIXELSTOREIPROC glPixelStorei; + + public void PixelStorei(PixelStoreParameter pname, int param) + { + glPixelStorei.Invoke(pname, param); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLREADBUFFERPROC(ReadBufferMode src); + private PFNGLREADBUFFERPROC glReadBuffer; + + public void ReadBuffer(ReadBufferMode src) + { + glReadBuffer.Invoke(src); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLREADPIXELSPROC(int x, int y, int width, int height, PixelFormat format, PixelType type, out IntPtr pixels); + private PFNGLREADPIXELSPROC glReadPixels; + + public void ReadPixels(int x, int y, int width, int height, PixelFormat format, PixelType type, out IntPtr pixels) + { + glReadPixels.Invoke(x, y, width, height, format, type, out pixels); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLGETBOOLEANVPROC(GetPName pname, out bool data); + private PFNGLGETBOOLEANVPROC glGetBooleanv; + + public void GetBooleanv(GetPName pname, out bool data) + { + glGetBooleanv.Invoke(pname, out data); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLGETDOUBLEVPROC(GetPName pname, out double data); + private PFNGLGETDOUBLEVPROC glGetDoublev; + + public void GetDoublev(GetPName pname, out double data) + { + glGetDoublev.Invoke(pname, out data); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate ErrorCode PFNGLGETERRORPROC(); + private PFNGLGETERRORPROC glGetError; + + public ErrorCode GetError() + { + return glGetError.Invoke(); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLGETFLOATVPROC(GetPName pname, out float data); + private PFNGLGETFLOATVPROC glGetFloatv; + + public void GetFloatv(GetPName pname, out float data) + { + glGetFloatv.Invoke(pname, out data); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLGETINTEGERVPROC(GetPName pname, out int data); + private PFNGLGETINTEGERVPROC glGetIntegerv; + + public void GetIntegerv(GetPName pname, out int data) + { + glGetIntegerv.Invoke(pname, out data); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate IntPtr PFNGLGETSTRINGPROC(StringName name); + private PFNGLGETSTRINGPROC glGetString; + + public IntPtr GetString(StringName name) + { + return glGetString.Invoke(name); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLGETTEXIMAGEPROC(TextureTarget target, int level, PixelFormat format, PixelType type, out IntPtr pixels); + private PFNGLGETTEXIMAGEPROC glGetTexImage; + + public void GetTexImage(TextureTarget target, int level, PixelFormat format, PixelType type, out IntPtr pixels) + { + glGetTexImage.Invoke(target, level, format, type, out pixels); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLGETTEXPARAMETERFVPROC(TextureTarget target, GetTextureParameter pname, out float parameters); + private PFNGLGETTEXPARAMETERFVPROC glGetTexParameterfv; + + public void GetTexParameterfv(TextureTarget target, GetTextureParameter pname, out float parameters) + { + glGetTexParameterfv.Invoke(target, pname, out parameters); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLGETTEXPARAMETERIVPROC(TextureTarget target, GetTextureParameter pname, out int parameters); + private PFNGLGETTEXPARAMETERIVPROC glGetTexParameteriv; + + public void GetTexParameteriv(TextureTarget target, GetTextureParameter pname, out int parameters) + { + glGetTexParameteriv.Invoke(target, pname, out parameters); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLGETTEXLEVELPARAMETERFVPROC(TextureTarget target, int level, GetTextureParameter pname, out float parameters); + private PFNGLGETTEXLEVELPARAMETERFVPROC glGetTexLevelParameterfv; + + public void GetTexLevelParameterfv(TextureTarget target, int level, GetTextureParameter pname, out float parameters) + { + glGetTexLevelParameterfv.Invoke(target, level, pname, out parameters); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLGETTEXLEVELPARAMETERIVPROC(TextureTarget target, int level, GetTextureParameter pname, out int parameters); + private PFNGLGETTEXLEVELPARAMETERIVPROC glGetTexLevelParameteriv; + + public void GetTexLevelParameteriv(TextureTarget target, int level, GetTextureParameter pname, out int parameters) + { + glGetTexLevelParameteriv.Invoke(target, level, pname, out parameters); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate bool PFNGLISENABLEDPROC(EnableCap cap); + private PFNGLISENABLEDPROC glIsEnabled; + + public bool IsEnabled(EnableCap cap) + { + return glIsEnabled.Invoke(cap); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLDEPTHRANGEPROC(double n, double f); + private PFNGLDEPTHRANGEPROC glDepthRange; + + public void DepthRange(double n, double f) + { + glDepthRange.Invoke(n, f); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLVIEWPORTPROC(int x, int y, int width, int height); + private PFNGLVIEWPORTPROC glViewport; + + public void Viewport(int x, int y, int width, int height) + { + glViewport.Invoke(x, y, width, height); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLDRAWARRAYSPROC(PrimitiveType mode, int first, int count); + private PFNGLDRAWARRAYSPROC glDrawArrays; + + public void DrawArrays(PrimitiveType mode, int first, int count) + { + glDrawArrays.Invoke(mode, first, count); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLDRAWELEMENTSPROC(PrimitiveType mode, int count, DrawElementsType type, IntPtr indices); + private PFNGLDRAWELEMENTSPROC glDrawElements; + + public void DrawElements(PrimitiveType mode, int count, DrawElementsType type, IntPtr indices) + { + glDrawElements.Invoke(mode, count, type, indices); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLPOLYGONOFFSETPROC(float factor, float units); + private PFNGLPOLYGONOFFSETPROC glPolygonOffset; + + public void PolygonOffset(float factor, float units) + { + glPolygonOffset.Invoke(factor, units); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLCOPYTEXIMAGE1DPROC(TextureTarget target, int level, InternalFormat internalformat, int x, int y, int width, int border); + private PFNGLCOPYTEXIMAGE1DPROC glCopyTexImage1D; + + public void CopyTexImage1D(TextureTarget target, int level, InternalFormat internalformat, int x, int y, int width, int border) + { + glCopyTexImage1D.Invoke(target, level, internalformat, x, y, width, border); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLCOPYTEXIMAGE2DPROC(TextureTarget target, int level, InternalFormat internalformat, int x, int y, int width, int height, int border); + private PFNGLCOPYTEXIMAGE2DPROC glCopyTexImage2D; + + public void CopyTexImage2D(TextureTarget target, int level, InternalFormat internalformat, int x, int y, int width, int height, int border) + { + glCopyTexImage2D.Invoke(target, level, internalformat, x, y, width, height, border); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLCOPYTEXSUBIMAGE1DPROC(TextureTarget target, int level, int xoffset, int x, int y, int width); + private PFNGLCOPYTEXSUBIMAGE1DPROC glCopyTexSubImage1D; + + public void CopyTexSubImage1D(TextureTarget target, int level, int xoffset, int x, int y, int width) + { + glCopyTexSubImage1D.Invoke(target, level, xoffset, x, y, width); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLCOPYTEXSUBIMAGE2DPROC(TextureTarget target, int level, int xoffset, int yoffset, int x, int y, int width, int height); + private PFNGLCOPYTEXSUBIMAGE2DPROC glCopyTexSubImage2D; + + public void CopyTexSubImage2D(TextureTarget target, int level, int xoffset, int yoffset, int x, int y, int width, int height) + { + glCopyTexSubImage2D.Invoke(target, level, xoffset, yoffset, x, y, width, height); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLTEXSUBIMAGE1DPROC(TextureTarget target, int level, int xoffset, int width, PixelFormat format, PixelType type, IntPtr pixels); + private PFNGLTEXSUBIMAGE1DPROC glTexSubImage1D; + + public void TexSubImage1D(TextureTarget target, int level, int xoffset, int width, PixelFormat format, PixelType type, IntPtr pixels) + { + glTexSubImage1D.Invoke(target, level, xoffset, width, format, type, pixels); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLTEXSUBIMAGE2DPROC(TextureTarget target, int level, int xoffset, int yoffset, int width, int height, PixelFormat format, PixelType type, IntPtr pixels); + private PFNGLTEXSUBIMAGE2DPROC glTexSubImage2D; + + public void TexSubImage2D(TextureTarget target, int level, int xoffset, int yoffset, int width, int height, PixelFormat format, PixelType type, IntPtr pixels) + { + glTexSubImage2D.Invoke(target, level, xoffset, yoffset, width, height, format, type, pixels); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLBINDTEXTUREPROC(TextureTarget target, uint texture); + private PFNGLBINDTEXTUREPROC glBindTexture; + + public void BindTexture(TextureTarget target, uint texture) + { + glBindTexture.Invoke(target, texture); + DetectGLError(); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLDELETETEXTURESPROC(int n, uint[] textures); + private PFNGLDELETETEXTURESPROC glDeleteTextures; + + public void DeleteTextures(int n, uint[] textures) + { + glDeleteTextures.Invoke(n, textures); + DetectGLError(); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLGENTEXTURESPROC(int n, uint[] textures); + private PFNGLGENTEXTURESPROC glGenTextures; + + public void GenTextures(int n, uint[] textures) + { + glGenTextures.Invoke(n, textures); + DetectGLError(); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate bool PFNGLISTEXTUREPROC(uint texture); + private PFNGLISTEXTUREPROC glIsTexture; + + public bool IsTexture(uint texture) + { + return glIsTexture.Invoke(texture); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLDRAWRANGEELEMENTSPROC(PrimitiveType mode, uint start, uint end, int count, DrawElementsType type, IntPtr indices); + private PFNGLDRAWRANGEELEMENTSPROC glDrawRangeElements; + + public void DrawRangeElements(PrimitiveType mode, uint start, uint end, int count, DrawElementsType type, IntPtr indices) + { + glDrawRangeElements.Invoke(mode, start, end, count, type, indices); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLTEXIMAGE3DPROC(TextureTarget target, int level, int internalformat, int width, int height, int depth, int border, PixelFormat format, PixelType type, IntPtr pixels); + private PFNGLTEXIMAGE3DPROC glTexImage3D; + + public void TexImage3D(TextureTarget target, int level, int internalformat, int width, int height, int depth, int border, PixelFormat format, PixelType type, IntPtr pixels) + { + glTexImage3D.Invoke(target, level, internalformat, width, height, depth, border, format, type, pixels); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLTEXSUBIMAGE3DPROC(TextureTarget target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, PixelFormat format, PixelType type, IntPtr pixels); + private PFNGLTEXSUBIMAGE3DPROC glTexSubImage3D; + + public void TexSubImage3D(TextureTarget target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, PixelFormat format, PixelType type, IntPtr pixels) + { + glTexSubImage3D.Invoke(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLCOPYTEXSUBIMAGE3DPROC(TextureTarget target, int level, int xoffset, int yoffset, int zoffset, int x, int y, int width, int height); + private PFNGLCOPYTEXSUBIMAGE3DPROC glCopyTexSubImage3D; + + public void CopyTexSubImage3D(TextureTarget target, int level, int xoffset, int yoffset, int zoffset, int x, int y, int width, int height) + { + glCopyTexSubImage3D.Invoke(target, level, xoffset, yoffset, zoffset, x, y, width, height); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLACTIVETEXTUREPROC(TextureUnit texture); + private PFNGLACTIVETEXTUREPROC glActiveTexture; + + public void ActiveTexture(TextureUnit texture) + { + glActiveTexture.Invoke(texture); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLSAMPLECOVERAGEPROC(float value, bool invert); + private PFNGLSAMPLECOVERAGEPROC glSampleCoverage; + + public void SampleCoverage(float value, bool invert) + { + glSampleCoverage.Invoke(value, invert); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLCOMPRESSEDTEXIMAGE3DPROC(TextureTarget target, int level, InternalFormat internalformat, int width, int height, int depth, int border, int imageSize, IntPtr data); + private PFNGLCOMPRESSEDTEXIMAGE3DPROC glCompressedTexImage3D; + + public void CompressedTexImage3D(TextureTarget target, int level, InternalFormat internalformat, int width, int height, int depth, int border, int imageSize, IntPtr data) + { + glCompressedTexImage3D.Invoke(target, level, internalformat, width, height, depth, border, imageSize, data); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLCOMPRESSEDTEXIMAGE2DPROC(TextureTarget target, int level, InternalFormat internalformat, int width, int height, int border, int imageSize, IntPtr data); + private PFNGLCOMPRESSEDTEXIMAGE2DPROC glCompressedTexImage2D; + + public void CompressedTexImage2D(TextureTarget target, int level, InternalFormat internalformat, int width, int height, int border, int imageSize, IntPtr data) + { + glCompressedTexImage2D.Invoke(target, level, internalformat, width, height, border, imageSize, data); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLCOMPRESSEDTEXIMAGE1DPROC(TextureTarget target, int level, InternalFormat internalformat, int width, int border, int imageSize, IntPtr data); + private PFNGLCOMPRESSEDTEXIMAGE1DPROC glCompressedTexImage1D; + + public void CompressedTexImage1D(TextureTarget target, int level, InternalFormat internalformat, int width, int border, int imageSize, IntPtr data) + { + glCompressedTexImage1D.Invoke(target, level, internalformat, width, border, imageSize, data); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC(TextureTarget target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, PixelFormat format, int imageSize, IntPtr data); + private PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC glCompressedTexSubImage3D; + + public void CompressedTexSubImage3D(TextureTarget target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, PixelFormat format, int imageSize, IntPtr data) + { + glCompressedTexSubImage3D.Invoke(target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC(TextureTarget target, int level, int xoffset, int yoffset, int width, int height, PixelFormat format, int imageSize, IntPtr data); + private PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC glCompressedTexSubImage2D; + + public void CompressedTexSubImage2D(TextureTarget target, int level, int xoffset, int yoffset, int width, int height, PixelFormat format, int imageSize, IntPtr data) + { + glCompressedTexSubImage2D.Invoke(target, level, xoffset, yoffset, width, height, format, imageSize, data); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC(TextureTarget target, int level, int xoffset, int width, PixelFormat format, int imageSize, IntPtr data); + private PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC glCompressedTexSubImage1D; + + public void CompressedTexSubImage1D(TextureTarget target, int level, int xoffset, int width, PixelFormat format, int imageSize, IntPtr data) + { + glCompressedTexSubImage1D.Invoke(target, level, xoffset, width, format, imageSize, data); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLGETCOMPRESSEDTEXIMAGEPROC(TextureTarget target, int level, out IntPtr img); + private PFNGLGETCOMPRESSEDTEXIMAGEPROC glGetCompressedTexImage; + + public void GetCompressedTexImage(TextureTarget target, int level, out IntPtr img) + { + glGetCompressedTexImage.Invoke(target, level, out img); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLBLENDFUNCSEPARATEPROC(BlendingFactor sfactorRGB, BlendingFactor dfactorRGB, BlendingFactor sfactorAlpha, BlendingFactor dfactorAlpha); + private PFNGLBLENDFUNCSEPARATEPROC glBlendFuncSeparate; + + public void BlendFuncSeparate(BlendingFactor sfactorRGB, BlendingFactor dfactorRGB, BlendingFactor sfactorAlpha, BlendingFactor dfactorAlpha) + { + glBlendFuncSeparate.Invoke(sfactorRGB, dfactorRGB, sfactorAlpha, dfactorAlpha); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLMULTIDRAWARRAYSPROC(PrimitiveType mode, int[] first, int[] count, int drawcount); + private PFNGLMULTIDRAWARRAYSPROC glMultiDrawArrays; + + public void MultiDrawArrays(PrimitiveType mode, int[] first, int[] count, int drawcount) + { + glMultiDrawArrays.Invoke(mode, first, count, drawcount); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLMULTIDRAWELEMENTSPROC(PrimitiveType mode, int[] count, DrawElementsType type, IntPtr indices, int drawcount); + private PFNGLMULTIDRAWELEMENTSPROC glMultiDrawElements; + + public void MultiDrawElements(PrimitiveType mode, int[] count, DrawElementsType type, IntPtr indices, int drawcount) + { + glMultiDrawElements.Invoke(mode, count, type, indices, drawcount); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLPOINTPARAMETERFPROC(int pname, float param); + private PFNGLPOINTPARAMETERFPROC glPointParameterf; + + public void PointParameterf(int pname, float param) + { + glPointParameterf.Invoke(pname, param); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLPOINTPARAMETERFVPROC(int pname, float[] parameters); + private PFNGLPOINTPARAMETERFVPROC glPointParameterfv; + + public void PointParameterfv(int pname, float[] parameters) + { + glPointParameterfv.Invoke(pname, parameters); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLPOINTPARAMETERIPROC(int pname, int param); + private PFNGLPOINTPARAMETERIPROC glPointParameteri; + + public void PointParameteri(int pname, int param) + { + glPointParameteri.Invoke(pname, param); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLPOINTPARAMETERIVPROC(int pname, int[] parameters); + private PFNGLPOINTPARAMETERIVPROC glPointParameteriv; + + public void PointParameteriv(int pname, int[] parameters) + { + glPointParameteriv.Invoke(pname, parameters); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLVERTEXATTRIBP4UIVPROC(uint index, VertexAttribPointerType type, bool normalized, uint[] value); + private PFNGLVERTEXATTRIBP4UIVPROC glVertexAttribP4uiv; + + public void VertexAttribP4uiv(uint index, VertexAttribPointerType type, bool normalized, uint[] value) + { + glVertexAttribP4uiv.Invoke(index, type, normalized, value); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLVERTEXATTRIBP4UIPROC(uint index, VertexAttribPointerType type, bool normalized, uint value); + private PFNGLVERTEXATTRIBP4UIPROC glVertexAttribP4ui; + + public void VertexAttribP4ui(uint index, VertexAttribPointerType type, bool normalized, uint value) + { + glVertexAttribP4ui.Invoke(index, type, normalized, value); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLVERTEXATTRIBP3UIVPROC(uint index, VertexAttribPointerType type, bool normalized, uint[] value); + private PFNGLVERTEXATTRIBP3UIVPROC glVertexAttribP3uiv; + + public void VertexAttribP3uiv(uint index, VertexAttribPointerType type, bool normalized, uint[] value) + { + glVertexAttribP3uiv.Invoke(index, type, normalized, value); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLVERTEXATTRIBP3UIPROC(uint index, VertexAttribPointerType type, bool normalized, uint value); + private PFNGLVERTEXATTRIBP3UIPROC glVertexAttribP3ui; + + public void VertexAttribP3ui(uint index, VertexAttribPointerType type, bool normalized, uint value) + { + glVertexAttribP3ui.Invoke(index, type, normalized, value); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLVERTEXATTRIBP2UIVPROC(uint index, VertexAttribPointerType type, bool normalized, uint[] value); + private PFNGLVERTEXATTRIBP2UIVPROC glVertexAttribP2uiv; + + public void VertexAttribP2uiv(uint index, VertexAttribPointerType type, bool normalized, uint[] value) + { + glVertexAttribP2uiv.Invoke(index, type, normalized, value); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLVERTEXATTRIBP2UIPROC(uint index, VertexAttribPointerType type, bool normalized, uint value); + private PFNGLVERTEXATTRIBP2UIPROC glVertexAttribP2ui; + + public void VertexAttribP2ui(uint index, VertexAttribPointerType type, bool normalized, uint value) + { + glVertexAttribP2ui.Invoke(index, type, normalized, value); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLVERTEXATTRIBP1UIVPROC(uint index, VertexAttribPointerType type, bool normalized, uint[] value); + private PFNGLVERTEXATTRIBP1UIVPROC glVertexAttribP1uiv; + + public void VertexAttribP1uiv(uint index, VertexAttribPointerType type, bool normalized, uint[] value) + { + glVertexAttribP1uiv.Invoke(index, type, normalized, value); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLVERTEXATTRIBP1UIPROC(uint index, VertexAttribPointerType type, bool normalized, uint value); + private PFNGLVERTEXATTRIBP1UIPROC glVertexAttribP1ui; + + public void VertexAttribP1ui(uint index, VertexAttribPointerType type, bool normalized, uint value) + { + glVertexAttribP1ui.Invoke(index, type, normalized, value); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLVERTEXATTRIBDIVISORPROC(uint index, uint divisor); + private PFNGLVERTEXATTRIBDIVISORPROC glVertexAttribDivisor; + + public void VertexAttribDivisor(uint index, uint divisor) + { + glVertexAttribDivisor.Invoke(index, divisor); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLGETQUERYOBJECTUI64VPROC(uint id, QueryObjectParameterName pname, out ulong parameters); + private PFNGLGETQUERYOBJECTUI64VPROC glGetQueryObjectui64v; + + public void GetQueryObjectui64v(uint id, QueryObjectParameterName pname, out ulong parameters) + { + glGetQueryObjectui64v.Invoke(id, pname, out parameters); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLGETQUERYOBJECTI64VPROC(uint id, QueryObjectParameterName pname, out long parameters); + private PFNGLGETQUERYOBJECTI64VPROC glGetQueryObjecti64v; + + public void GetQueryObjecti64v(uint id, QueryObjectParameterName pname, out long parameters) + { + glGetQueryObjecti64v.Invoke(id, pname, out parameters); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLQUERYCOUNTERPROC(uint id, QueryCounterTarget target); + private PFNGLQUERYCOUNTERPROC glQueryCounter; + + public void QueryCounter(uint id, QueryCounterTarget target) + { + glQueryCounter.Invoke(id, target); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLGETSAMPLERPARAMETERIUIVPROC(uint sampler, SamplerParameterName pname, out uint parameters); + private PFNGLGETSAMPLERPARAMETERIUIVPROC glGetSamplerParameterIuiv; + + public void GetSamplerParameterIuiv(uint sampler, SamplerParameterName pname, out uint parameters) + { + glGetSamplerParameterIuiv.Invoke(sampler, pname, out parameters); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLGETSAMPLERPARAMETERFVPROC(uint sampler, SamplerParameterName pname, out float parameters); + private PFNGLGETSAMPLERPARAMETERFVPROC glGetSamplerParameterfv; + + public void GetSamplerParameterfv(uint sampler, SamplerParameterName pname, out float parameters) + { + glGetSamplerParameterfv.Invoke(sampler, pname, out parameters); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLGETSAMPLERPARAMETERIIVPROC(uint sampler, SamplerParameterName pname, out int parameters); + private PFNGLGETSAMPLERPARAMETERIIVPROC glGetSamplerParameterIiv; + + public void GetSamplerParameterIiv(uint sampler, SamplerParameterName pname, out int parameters) + { + glGetSamplerParameterIiv.Invoke(sampler, pname, out parameters); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLGETSAMPLERPARAMETERIVPROC(uint sampler, SamplerParameterName pname, out int parameters); + private PFNGLGETSAMPLERPARAMETERIVPROC glGetSamplerParameteriv; + + public void GetSamplerParameteriv(uint sampler, SamplerParameterName pname, out int parameters) + { + glGetSamplerParameteriv.Invoke(sampler, pname, out parameters); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLSAMPLERPARAMETERIUIVPROC(uint sampler, SamplerParameterName pname, uint[] param); + private PFNGLSAMPLERPARAMETERIUIVPROC glSamplerParameterIuiv; + + public void SamplerParameterIuiv(uint sampler, SamplerParameterName pname, uint[] param) + { + glSamplerParameterIuiv.Invoke(sampler, pname, param); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLSAMPLERPARAMETERIIVPROC(uint sampler, SamplerParameterName pname, int[] param); + private PFNGLSAMPLERPARAMETERIIVPROC glSamplerParameterIiv; + + public void SamplerParameterIiv(uint sampler, SamplerParameterName pname, int[] param) + { + glSamplerParameterIiv.Invoke(sampler, pname, param); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLSAMPLERPARAMETERFVPROC(uint sampler, SamplerParameterName pname, float[] param); + private PFNGLSAMPLERPARAMETERFVPROC glSamplerParameterfv; + + public void SamplerParameterfv(uint sampler, SamplerParameterName pname, float[] param) + { + glSamplerParameterfv.Invoke(sampler, pname, param); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLSAMPLERPARAMETERFPROC(uint sampler, SamplerParameterName pname, float param); + private PFNGLSAMPLERPARAMETERFPROC glSamplerParameterf; + + public void SamplerParameterf(uint sampler, SamplerParameterName pname, float param) + { + glSamplerParameterf.Invoke(sampler, pname, param); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLSAMPLERPARAMETERIVPROC(uint sampler, SamplerParameterName pname, int[] param); + private PFNGLSAMPLERPARAMETERIVPROC glSamplerParameteriv; + + public void SamplerParameteriv(uint sampler, SamplerParameterName pname, int[] param) + { + glSamplerParameteriv.Invoke(sampler, pname, param); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLSAMPLERPARAMETERIPROC(uint sampler, SamplerParameterName pname, int param); + private PFNGLSAMPLERPARAMETERIPROC glSamplerParameteri; + + public void SamplerParameteri(uint sampler, SamplerParameterName pname, int param) + { + glSamplerParameteri.Invoke(sampler, pname, param); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLBINDSAMPLERPROC(uint unit, uint sampler); + private PFNGLBINDSAMPLERPROC glBindSampler; + + public void BindSampler(uint unit, uint sampler) + { + glBindSampler.Invoke(unit, sampler); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate bool PFNGLISSAMPLERPROC(uint sampler); + private PFNGLISSAMPLERPROC glIsSampler; + + public bool IsSampler(uint sampler) + { + return glIsSampler.Invoke(sampler); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLDELETESAMPLERSPROC(int count, uint[] samplers); + private PFNGLDELETESAMPLERSPROC glDeleteSamplers; + + public void DeleteSamplers(int count, uint[] samplers) + { + glDeleteSamplers.Invoke(count, samplers); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLGENSAMPLERSPROC(int count, out uint samplers); + private PFNGLGENSAMPLERSPROC glGenSamplers; + + public void GenSamplers(int count, out uint samplers) + { + glGenSamplers.Invoke(count, out samplers); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate int PFNGLGETFRAGDATAINDEXPROC(uint program, sbyte[] name); + private PFNGLGETFRAGDATAINDEXPROC glGetFragDataIndex; + + public int GetFragDataIndex(uint program, sbyte[] name) + { + return glGetFragDataIndex.Invoke(program, name); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLBINDFRAGDATALOCATIONINDEXEDPROC(uint program, uint colorNumber, uint index, sbyte[] name); + private PFNGLBINDFRAGDATALOCATIONINDEXEDPROC glBindFragDataLocationIndexed; + + public void BindFragDataLocationIndexed(uint program, uint colorNumber, uint index, sbyte[] name) + { + glBindFragDataLocationIndexed.Invoke(program, colorNumber, index, name); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLBLENDCOLORPROC(float red, float green, float blue, float alpha); + private PFNGLBLENDCOLORPROC glBlendColor; + + public void BlendColor(float red, float green, float blue, float alpha) + { + glBlendColor.Invoke(red, green, blue, alpha); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLBLENDEQUATIONPROC(BlendEquationModeEXT mode); + private PFNGLBLENDEQUATIONPROC glBlendEquation; + + public void BlendEquation(BlendEquationModeEXT mode) + { + glBlendEquation.Invoke(mode); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLGENQUERIESPROC(int n, out uint ids); + private PFNGLGENQUERIESPROC glGenQueries; + + public void GenQueries(int n, out uint ids) + { + glGenQueries.Invoke(n, out ids); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLDELETEQUERIESPROC(int n, uint[] ids); + private PFNGLDELETEQUERIESPROC glDeleteQueries; + + public void DeleteQueries(int n, uint[] ids) + { + glDeleteQueries.Invoke(n, ids); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate bool PFNGLISQUERYPROC(uint id); + private PFNGLISQUERYPROC glIsQuery; + + public bool IsQuery(uint id) + { + return glIsQuery.Invoke(id); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLBEGINQUERYPROC(QueryTarget target, uint id); + private PFNGLBEGINQUERYPROC glBeginQuery; + + public void BeginQuery(QueryTarget target, uint id) + { + glBeginQuery.Invoke(target, id); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLENDQUERYPROC(QueryTarget target); + private PFNGLENDQUERYPROC glEndQuery; + + public void EndQuery(QueryTarget target) + { + glEndQuery.Invoke(target); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLGETQUERYIVPROC(QueryTarget target, QueryParameterName pname, out int parameters); + private PFNGLGETQUERYIVPROC glGetQueryiv; + + public void GetQueryiv(QueryTarget target, QueryParameterName pname, out int parameters) + { + glGetQueryiv.Invoke(target, pname, out parameters); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLGETQUERYOBJECTIVPROC(uint id, QueryObjectParameterName pname, out int parameters); + private PFNGLGETQUERYOBJECTIVPROC glGetQueryObjectiv; + + public void GetQueryObjectiv(uint id, QueryObjectParameterName pname, out int parameters) + { + glGetQueryObjectiv.Invoke(id, pname, out parameters); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLGETQUERYOBJECTUIVPROC(uint id, QueryObjectParameterName pname, out uint parameters); + private PFNGLGETQUERYOBJECTUIVPROC glGetQueryObjectuiv; + + public void GetQueryObjectuiv(uint id, QueryObjectParameterName pname, out uint parameters) + { + glGetQueryObjectuiv.Invoke(id, pname, out parameters); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLBINDBUFFERPROC(BufferTargetARB target, uint buffer); + private PFNGLBINDBUFFERPROC glBindBuffer; + + public void BindBuffer(BufferTargetARB target, uint buffer) + { + glBindBuffer.Invoke(target, buffer); + DetectGLError(); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLDELETEBUFFERSPROC(int n, uint[] buffers); + private PFNGLDELETEBUFFERSPROC glDeleteBuffers; + + public void DeleteBuffers(int n, uint[] buffers) + { + glDeleteBuffers.Invoke(n, buffers); + DetectGLError(); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLGENBUFFERSPROC(int n, uint[] buffers); + private PFNGLGENBUFFERSPROC glGenBuffers; + + public void GenBuffers(int n, uint[] buffers) + { + glGenBuffers.Invoke(n, buffers); + DetectGLError(); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate bool PFNGLISBUFFERPROC(uint buffer); + private PFNGLISBUFFERPROC glIsBuffer; + + public bool IsBuffer(uint buffer) + { + return glIsBuffer.Invoke(buffer); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLBUFFERDATAPROC(BufferTargetARB target, uint size, IntPtr data, BufferUsageARB usage); + private PFNGLBUFFERDATAPROC glBufferData; + + public void BufferData(BufferTargetARB target, uint size, IntPtr data, BufferUsageARB usage) + { + glBufferData.Invoke(target, size, data, usage); + DetectGLError(); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLBUFFERSUBDATAPROC(BufferTargetARB target, IntPtr offset, IntPtr size, IntPtr data); + private PFNGLBUFFERSUBDATAPROC glBufferSubData; + + public void BufferSubData(BufferTargetARB target, IntPtr offset, IntPtr size, IntPtr data) + { + glBufferSubData.Invoke(target, offset, size, data); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLGETBUFFERSUBDATAPROC(BufferTargetARB target, IntPtr offset, IntPtr size, out IntPtr data); + private PFNGLGETBUFFERSUBDATAPROC glGetBufferSubData; + + public void GetBufferSubData(BufferTargetARB target, IntPtr offset, IntPtr size, out IntPtr data) + { + glGetBufferSubData.Invoke(target, offset, size, out data); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate IntPtr PFNGLMAPBUFFERPROC(BufferTargetARB target, BufferAccessARB access); + private PFNGLMAPBUFFERPROC glMapBuffer; + + public IntPtr MapBuffer(BufferTargetARB target, BufferAccessARB access) + { + return glMapBuffer.Invoke(target, access); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate bool PFNGLUNMAPBUFFERPROC(BufferTargetARB target); + private PFNGLUNMAPBUFFERPROC glUnmapBuffer; + + public bool UnmapBuffer(BufferTargetARB target) + { + return glUnmapBuffer.Invoke(target); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLGETBUFFERPARAMETERIVPROC(BufferTargetARB target, int pname, out int parameters); + private PFNGLGETBUFFERPARAMETERIVPROC glGetBufferParameteriv; + + public void GetBufferParameteriv(BufferTargetARB target, int pname, out int parameters) + { + glGetBufferParameteriv.Invoke(target, pname, out parameters); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLGETBUFFERPOINTERVPROC(BufferTargetARB target, int pname, out IntPtr parameters); + private PFNGLGETBUFFERPOINTERVPROC glGetBufferPointerv; + + public void GetBufferPointerv(BufferTargetARB target, int pname, out IntPtr parameters) + { + glGetBufferPointerv.Invoke(target, pname, out parameters); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLBLENDEQUATIONSEPARATEPROC(BlendEquationModeEXT modeRGB, BlendEquationModeEXT modeAlpha); + private PFNGLBLENDEQUATIONSEPARATEPROC glBlendEquationSeparate; + + public void BlendEquationSeparate(BlendEquationModeEXT modeRGB, BlendEquationModeEXT modeAlpha) + { + glBlendEquationSeparate.Invoke(modeRGB, modeAlpha); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLDRAWBUFFERSPROC(int n, int[] bufs); + private PFNGLDRAWBUFFERSPROC glDrawBuffers; + + public void DrawBuffers(int n, int[] bufs) + { + glDrawBuffers.Invoke(n, bufs); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLSTENCILOPSEPARATEPROC(StencilFaceDirection face, StencilOp sfail, StencilOp dpfail, StencilOp dppass); + private PFNGLSTENCILOPSEPARATEPROC glStencilOpSeparate; + + public void StencilOpSeparate(StencilFaceDirection face, StencilOp sfail, StencilOp dpfail, StencilOp dppass) + { + glStencilOpSeparate.Invoke(face, sfail, dpfail, dppass); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLSTENCILFUNCSEPARATEPROC(StencilFaceDirection face, StencilFunction func, int reference, uint mask); + private PFNGLSTENCILFUNCSEPARATEPROC glStencilFuncSeparate; + + public void StencilFuncSeparate(StencilFaceDirection face, StencilFunction func, int reference, uint mask) + { + glStencilFuncSeparate.Invoke(face, func, reference, mask); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLSTENCILMASKSEPARATEPROC(StencilFaceDirection face, uint mask); + private PFNGLSTENCILMASKSEPARATEPROC glStencilMaskSeparate; + + public void StencilMaskSeparate(StencilFaceDirection face, uint mask) + { + glStencilMaskSeparate.Invoke(face, mask); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLATTACHSHADERPROC(uint program, uint shader); + private PFNGLATTACHSHADERPROC glAttachShader; + + public void AttachShader(uint program, uint shader) + { + glAttachShader.Invoke(program, shader); + DetectGLError(); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLBINDATTRIBLOCATIONPROC(uint program, uint index, sbyte[] name); + private PFNGLBINDATTRIBLOCATIONPROC glBindAttribLocation; + + public void BindAttribLocation(uint program, uint index, sbyte[] name) + { + glBindAttribLocation.Invoke(program, index, name); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLCOMPILESHADERPROC(uint shader); + private PFNGLCOMPILESHADERPROC glCompileShader; + + public void CompileShader(uint shader) + { + glCompileShader.Invoke(shader); + DetectGLError(); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate uint PFNGLCREATEPROGRAMPROC(); + private PFNGLCREATEPROGRAMPROC glCreateProgram; + + public uint CreateProgram() + { + uint handle = glCreateProgram.Invoke(); + DetectGLError(); + return handle; + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate uint PFNGLCREATESHADERPROC(ShaderType type); + private PFNGLCREATESHADERPROC glCreateShader; + + public uint CreateShader(ShaderType type) + { + uint handle = glCreateShader.Invoke(type); + DetectGLError(); + return handle; + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLDELETEPROGRAMPROC(uint program); + private PFNGLDELETEPROGRAMPROC glDeleteProgram; + + public void DeleteProgram(uint program) + { + glDeleteProgram.Invoke(program); + DetectGLError(); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLDELETESHADERPROC(uint shader); + private PFNGLDELETESHADERPROC glDeleteShader; + + public void DeleteShader(uint shader) + { + glDeleteShader.Invoke(shader); + DetectGLError(); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLDETACHSHADERPROC(uint program, uint shader); + private PFNGLDETACHSHADERPROC glDetachShader; + + public void DetachShader(uint program, uint shader) + { + glDetachShader.Invoke(program, shader); + DetectGLError(); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLDISABLEVERTEXATTRIBARRAYPROC(uint index); + private PFNGLDISABLEVERTEXATTRIBARRAYPROC glDisableVertexAttribArray; + + public void DisableVertexAttribArray(uint index) + { + glDisableVertexAttribArray.Invoke(index); + DetectGLError(); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLENABLEVERTEXATTRIBARRAYPROC(uint index); + private PFNGLENABLEVERTEXATTRIBARRAYPROC glEnableVertexAttribArray; + + public void EnableVertexAttribArray(uint index) + { + glEnableVertexAttribArray.Invoke(index); + DetectGLError(); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLGETACTIVEATTRIBPROC(uint program, uint index, int bufSize, out int length, out int size, out AttributeType type, out sbyte name); + private PFNGLGETACTIVEATTRIBPROC glGetActiveAttrib; + + public void GetActiveAttrib(uint program, uint index, int bufSize, out int length, out int size, out AttributeType type, out sbyte name) + { + glGetActiveAttrib.Invoke(program, index, bufSize, out length, out size, out type, out name); + DetectGLError(); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLGETACTIVEUNIFORMPROC(uint program, uint index, int bufSize, out int length, out int size, out AttributeType type, out sbyte name); + private PFNGLGETACTIVEUNIFORMPROC glGetActiveUniform; + + public void GetActiveUniform(uint program, uint index, int bufSize, out int length, out int size, out AttributeType type, out sbyte name) + { + glGetActiveUniform.Invoke(program, index, bufSize, out length, out size, out type, out name); + DetectGLError(); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLGETATTACHEDSHADERSPROC(uint program, int maxCount, out int count, out uint shaders); + private PFNGLGETATTACHEDSHADERSPROC glGetAttachedShaders; + + public void GetAttachedShaders(uint program, int maxCount, out int count, out uint shaders) + { + glGetAttachedShaders.Invoke(program, maxCount, out count, out shaders); + DetectGLError(); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate int PFNGLGETATTRIBLOCATIONPROC(uint program, string name); + private PFNGLGETATTRIBLOCATIONPROC glGetAttribLocation; + + public int GetAttribLocation(uint program, string name) + { + int loc = glGetAttribLocation.Invoke(program, name); + DetectGLError(); + return loc; + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLGETPROGRAMIVPROC(uint program, ProgramPropertyARB pname, out int parameters); + private PFNGLGETPROGRAMIVPROC glGetProgramiv; + + public void GetProgramiv(uint program, ProgramPropertyARB pname, out int parameters) + { + glGetProgramiv.Invoke(program, pname, out parameters); + DetectGLError(); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLGETPROGRAMINFOLOGPROC(uint program, int bufSize, out int length, byte[] infoLog); + private PFNGLGETPROGRAMINFOLOGPROC glGetProgramInfoLog; + + public void GetProgramInfoLog(uint program, int bufSize, out int length, byte[] infoLog) + { + glGetProgramInfoLog.Invoke(program, bufSize, out length, infoLog); + DetectGLError(); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLGETSHADERIVPROC(uint shader, ShaderParameterName pname, out int parameters); + private PFNGLGETSHADERIVPROC glGetShaderiv; + + public void GetShaderiv(uint shader, ShaderParameterName pname, out int parameters) + { + glGetShaderiv.Invoke(shader, pname, out parameters); + DetectGLError(); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLGETSHADERINFOLOGPROC(uint shader, int bufSize, out int length, byte[] infoLog); + private PFNGLGETSHADERINFOLOGPROC glGetShaderInfoLog; + + public void GetShaderInfoLog(uint shader, int bufSize, out int length, byte[] infoLog) + { + glGetShaderInfoLog.Invoke(shader, bufSize, out length, infoLog); + DetectGLError(); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLGETSHADERSOURCEPROC(uint shader, int bufSize, out int length, out sbyte source); + private PFNGLGETSHADERSOURCEPROC glGetShaderSource; + + public void GetShaderSource(uint shader, int bufSize, out int length, out sbyte source) + { + glGetShaderSource.Invoke(shader, bufSize, out length, out source); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate int PFNGLGETUNIFORMLOCATIONPROC(uint program, string name); + private PFNGLGETUNIFORMLOCATIONPROC glGetUniformLocation; + + public int GetUniformLocation(uint program, string name) + { + int loc = glGetUniformLocation.Invoke(program, name); + DetectGLError(); + return loc; + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLGETUNIFORMFVPROC(uint program, int location, out float parameters); + private PFNGLGETUNIFORMFVPROC glGetUniformfv; + + public void GetUniformfv(uint program, int location, out float parameters) + { + glGetUniformfv.Invoke(program, location, out parameters); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLGETUNIFORMIVPROC(uint program, int location, out int parameters); + private PFNGLGETUNIFORMIVPROC glGetUniformiv; + + public void GetUniformiv(uint program, int location, out int parameters) + { + glGetUniformiv.Invoke(program, location, out parameters); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLGETVERTEXATTRIBDVPROC(uint index, int pname, out double parameters); + private PFNGLGETVERTEXATTRIBDVPROC glGetVertexAttribdv; + + public void GetVertexAttribdv(uint index, int pname, out double parameters) + { + glGetVertexAttribdv.Invoke(index, pname, out parameters); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLGETVERTEXATTRIBFVPROC(uint index, int pname, out float parameters); + private PFNGLGETVERTEXATTRIBFVPROC glGetVertexAttribfv; + + public void GetVertexAttribfv(uint index, int pname, out float parameters) + { + glGetVertexAttribfv.Invoke(index, pname, out parameters); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLGETVERTEXATTRIBIVPROC(uint index, int pname, out int parameters); + private PFNGLGETVERTEXATTRIBIVPROC glGetVertexAttribiv; + + public void GetVertexAttribiv(uint index, int pname, out int parameters) + { + glGetVertexAttribiv.Invoke(index, pname, out parameters); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLGETVERTEXATTRIBPOINTERVPROC(uint index, int pname, out IntPtr pointer); + private PFNGLGETVERTEXATTRIBPOINTERVPROC glGetVertexAttribPointerv; + + public void GetVertexAttribPointerv(uint index, int pname, out IntPtr pointer) + { + glGetVertexAttribPointerv.Invoke(index, pname, out pointer); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate bool PFNGLISPROGRAMPROC(uint program); + private PFNGLISPROGRAMPROC glIsProgram; + + public bool IsProgram(uint program) + { + return glIsProgram.Invoke(program); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate bool PFNGLISSHADERPROC(uint shader); + private PFNGLISSHADERPROC glIsShader; + + public bool IsShader(uint shader) + { + return glIsShader.Invoke(shader); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLLINKPROGRAMPROC(uint program); + private PFNGLLINKPROGRAMPROC glLinkProgram; + + public void LinkProgram(uint program) + { + glLinkProgram.Invoke(program); + DetectGLError(); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLSHADERSOURCEPROC(uint shader, int count, string[] str, int[] length); + private PFNGLSHADERSOURCEPROC glShaderSource; + + public void ShaderSource(uint shader, int count, string[] str, int[] length) + { + glShaderSource.Invoke(shader, count, str, length); + DetectGLError(); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLUSEPROGRAMPROC(uint program); + private PFNGLUSEPROGRAMPROC glUseProgram; + + public void UseProgram(uint program) + { + glUseProgram.Invoke(program); + DetectGLError(); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLUNIFORM1FPROC(int location, float v0); + private PFNGLUNIFORM1FPROC glUniform1f; + + public void Uniform1f(int location, float v0) + { + glUniform1f.Invoke(location, v0); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLUNIFORM2FPROC(int location, float v0, float v1); + private PFNGLUNIFORM2FPROC glUniform2f; + + public void Uniform2f(int location, float v0, float v1) + { + glUniform2f.Invoke(location, v0, v1); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLUNIFORM3FPROC(int location, float v0, float v1, float v2); + private PFNGLUNIFORM3FPROC glUniform3f; + + public void Uniform3f(int location, float v0, float v1, float v2) + { + glUniform3f.Invoke(location, v0, v1, v2); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLUNIFORM4FPROC(int location, float v0, float v1, float v2, float v3); + private PFNGLUNIFORM4FPROC glUniform4f; + + public void Uniform4f(int location, float v0, float v1, float v2, float v3) + { + glUniform4f.Invoke(location, v0, v1, v2, v3); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLUNIFORM1IPROC(int location, int v0); + private PFNGLUNIFORM1IPROC glUniform1i; + + public void Uniform1i(int location, int v0) + { + glUniform1i.Invoke(location, v0); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLUNIFORM2IPROC(int location, int v0, int v1); + private PFNGLUNIFORM2IPROC glUniform2i; + + public void Uniform2i(int location, int v0, int v1) + { + glUniform2i.Invoke(location, v0, v1); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLUNIFORM3IPROC(int location, int v0, int v1, int v2); + private PFNGLUNIFORM3IPROC glUniform3i; + + public void Uniform3i(int location, int v0, int v1, int v2) + { + glUniform3i.Invoke(location, v0, v1, v2); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLUNIFORM4IPROC(int location, int v0, int v1, int v2, int v3); + private PFNGLUNIFORM4IPROC glUniform4i; + + public void Uniform4i(int location, int v0, int v1, int v2, int v3) + { + glUniform4i.Invoke(location, v0, v1, v2, v3); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLUNIFORM1FVPROC(int location, int count, float[] value); + private PFNGLUNIFORM1FVPROC glUniform1fv; + + public void Uniform1fv(int location, int count, float[] value) + { + glUniform1fv.Invoke(location, count, value); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLUNIFORM2FVPROC(int location, int count, float[] value); + private PFNGLUNIFORM2FVPROC glUniform2fv; + + public void Uniform2fv(int location, int count, float[] value) + { + glUniform2fv.Invoke(location, count, value); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLUNIFORM3FVPROC(int location, int count, float[] value); + private PFNGLUNIFORM3FVPROC glUniform3fv; + + public void Uniform3fv(int location, int count, float[] value) + { + glUniform3fv.Invoke(location, count, value); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLUNIFORM4FVPROC(int location, int count, float[] value); + private PFNGLUNIFORM4FVPROC glUniform4fv; + + public void Uniform4fv(int location, int count, float[] value) + { + glUniform4fv.Invoke(location, count, value); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLUNIFORM1IVPROC(int location, int count, int[] value); + private PFNGLUNIFORM1IVPROC glUniform1iv; + + public void Uniform1iv(int location, int count, int[] value) + { + glUniform1iv.Invoke(location, count, value); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLUNIFORM2IVPROC(int location, int count, int[] value); + private PFNGLUNIFORM2IVPROC glUniform2iv; + + public void Uniform2iv(int location, int count, int[] value) + { + glUniform2iv.Invoke(location, count, value); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLUNIFORM3IVPROC(int location, int count, int[] value); + private PFNGLUNIFORM3IVPROC glUniform3iv; + + public void Uniform3iv(int location, int count, int[] value) + { + glUniform3iv.Invoke(location, count, value); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLUNIFORM4IVPROC(int location, int count, int[] value); + private PFNGLUNIFORM4IVPROC glUniform4iv; + + public void Uniform4iv(int location, int count, int[] value) + { + glUniform4iv.Invoke(location, count, value); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLUNIFORMMATRIX2FVPROC(int location, int count, bool transpose, float[] value); + private PFNGLUNIFORMMATRIX2FVPROC glUniformMatrix2fv; + + public void UniformMatrix2fv(int location, int count, bool transpose, float[] value) + { + glUniformMatrix2fv.Invoke(location, count, transpose, value); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLUNIFORMMATRIX3FVPROC(int location, int count, bool transpose, float[] value); + private PFNGLUNIFORMMATRIX3FVPROC glUniformMatrix3fv; + + public void UniformMatrix3fv(int location, int count, bool transpose, float[] value) + { + glUniformMatrix3fv.Invoke(location, count, transpose, value); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLUNIFORMMATRIX4FVPROC(int location, int count, bool transpose, float[] value); + private PFNGLUNIFORMMATRIX4FVPROC glUniformMatrix4fv; + + public void UniformMatrix4fv(int location, int count, bool transpose, float[] value) + { + glUniformMatrix4fv.Invoke(location, count, transpose, value); + DetectGLError(); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLVALIDATEPROGRAMPROC(uint program); + private PFNGLVALIDATEPROGRAMPROC glValidateProgram; + + public void ValidateProgram(uint program) + { + glValidateProgram.Invoke(program); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLVERTEXATTRIB1DPROC(uint index, double x); + private PFNGLVERTEXATTRIB1DPROC glVertexAttrib1d; + + public void VertexAttrib1d(uint index, double x) + { + glVertexAttrib1d.Invoke(index, x); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLVERTEXATTRIB1DVPROC(uint index, double[] v); + private PFNGLVERTEXATTRIB1DVPROC glVertexAttrib1dv; + + public void VertexAttrib1dv(uint index, double[] v) + { + glVertexAttrib1dv.Invoke(index, v); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLVERTEXATTRIB1FPROC(uint index, float x); + private PFNGLVERTEXATTRIB1FPROC glVertexAttrib1f; + + public void VertexAttrib1f(uint index, float x) + { + glVertexAttrib1f.Invoke(index, x); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLVERTEXATTRIB1FVPROC(uint index, float[] v); + private PFNGLVERTEXATTRIB1FVPROC glVertexAttrib1fv; + + public void VertexAttrib1fv(uint index, float[] v) + { + glVertexAttrib1fv.Invoke(index, v); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLVERTEXATTRIB1SPROC(uint index, short x); + private PFNGLVERTEXATTRIB1SPROC glVertexAttrib1s; + + public void VertexAttrib1s(uint index, short x) + { + glVertexAttrib1s.Invoke(index, x); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLVERTEXATTRIB1SVPROC(uint index, short[] v); + private PFNGLVERTEXATTRIB1SVPROC glVertexAttrib1sv; + + public void VertexAttrib1sv(uint index, short[] v) + { + glVertexAttrib1sv.Invoke(index, v); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLVERTEXATTRIB2DPROC(uint index, double x, double y); + private PFNGLVERTEXATTRIB2DPROC glVertexAttrib2d; + + public void VertexAttrib2d(uint index, double x, double y) + { + glVertexAttrib2d.Invoke(index, x, y); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLVERTEXATTRIB2DVPROC(uint index, double[] v); + private PFNGLVERTEXATTRIB2DVPROC glVertexAttrib2dv; + + public void VertexAttrib2dv(uint index, double[] v) + { + glVertexAttrib2dv.Invoke(index, v); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLVERTEXATTRIB2FPROC(uint index, float x, float y); + private PFNGLVERTEXATTRIB2FPROC glVertexAttrib2f; + + public void VertexAttrib2f(uint index, float x, float y) + { + glVertexAttrib2f.Invoke(index, x, y); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLVERTEXATTRIB2FVPROC(uint index, float[] v); + private PFNGLVERTEXATTRIB2FVPROC glVertexAttrib2fv; + + public void VertexAttrib2fv(uint index, float[] v) + { + glVertexAttrib2fv.Invoke(index, v); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLVERTEXATTRIB2SPROC(uint index, short x, short y); + private PFNGLVERTEXATTRIB2SPROC glVertexAttrib2s; + + public void VertexAttrib2s(uint index, short x, short y) + { + glVertexAttrib2s.Invoke(index, x, y); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLVERTEXATTRIB2SVPROC(uint index, short[] v); + private PFNGLVERTEXATTRIB2SVPROC glVertexAttrib2sv; + + public void VertexAttrib2sv(uint index, short[] v) + { + glVertexAttrib2sv.Invoke(index, v); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLVERTEXATTRIB3DPROC(uint index, double x, double y, double z); + private PFNGLVERTEXATTRIB3DPROC glVertexAttrib3d; + + public void VertexAttrib3d(uint index, double x, double y, double z) + { + glVertexAttrib3d.Invoke(index, x, y, z); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLVERTEXATTRIB3DVPROC(uint index, double[] v); + private PFNGLVERTEXATTRIB3DVPROC glVertexAttrib3dv; + + public void VertexAttrib3dv(uint index, double[] v) + { + glVertexAttrib3dv.Invoke(index, v); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLVERTEXATTRIB3FPROC(uint index, float x, float y, float z); + private PFNGLVERTEXATTRIB3FPROC glVertexAttrib3f; + + public void VertexAttrib3f(uint index, float x, float y, float z) + { + glVertexAttrib3f.Invoke(index, x, y, z); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLVERTEXATTRIB3FVPROC(uint index, float[] v); + private PFNGLVERTEXATTRIB3FVPROC glVertexAttrib3fv; + + public void VertexAttrib3fv(uint index, float[] v) + { + glVertexAttrib3fv.Invoke(index, v); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLVERTEXATTRIB3SPROC(uint index, short x, short y, short z); + private PFNGLVERTEXATTRIB3SPROC glVertexAttrib3s; + + public void VertexAttrib3s(uint index, short x, short y, short z) + { + glVertexAttrib3s.Invoke(index, x, y, z); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLVERTEXATTRIB3SVPROC(uint index, short[] v); + private PFNGLVERTEXATTRIB3SVPROC glVertexAttrib3sv; + + public void VertexAttrib3sv(uint index, short[] v) + { + glVertexAttrib3sv.Invoke(index, v); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLVERTEXATTRIB4NBVPROC(uint index, sbyte[] v); + private PFNGLVERTEXATTRIB4NBVPROC glVertexAttrib4Nbv; + + public void VertexAttrib4Nbv(uint index, sbyte[] v) + { + glVertexAttrib4Nbv.Invoke(index, v); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLVERTEXATTRIB4NIVPROC(uint index, int[] v); + private PFNGLVERTEXATTRIB4NIVPROC glVertexAttrib4Niv; + + public void VertexAttrib4Niv(uint index, int[] v) + { + glVertexAttrib4Niv.Invoke(index, v); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLVERTEXATTRIB4NSVPROC(uint index, short[] v); + private PFNGLVERTEXATTRIB4NSVPROC glVertexAttrib4Nsv; + + public void VertexAttrib4Nsv(uint index, short[] v) + { + glVertexAttrib4Nsv.Invoke(index, v); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLVERTEXATTRIB4NUBPROC(uint index, byte x, byte y, byte z, byte w); + private PFNGLVERTEXATTRIB4NUBPROC glVertexAttrib4Nub; + + public void VertexAttrib4Nub(uint index, byte x, byte y, byte z, byte w) + { + glVertexAttrib4Nub.Invoke(index, x, y, z, w); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLVERTEXATTRIB4NUBVPROC(uint index, byte[] v); + private PFNGLVERTEXATTRIB4NUBVPROC glVertexAttrib4Nubv; + + public void VertexAttrib4Nubv(uint index, byte[] v) + { + glVertexAttrib4Nubv.Invoke(index, v); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLVERTEXATTRIB4NUIVPROC(uint index, uint[] v); + private PFNGLVERTEXATTRIB4NUIVPROC glVertexAttrib4Nuiv; + + public void VertexAttrib4Nuiv(uint index, uint[] v) + { + glVertexAttrib4Nuiv.Invoke(index, v); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLVERTEXATTRIB4NUSVPROC(uint index, ushort[] v); + private PFNGLVERTEXATTRIB4NUSVPROC glVertexAttrib4Nusv; + + public void VertexAttrib4Nusv(uint index, ushort[] v) + { + glVertexAttrib4Nusv.Invoke(index, v); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLVERTEXATTRIB4BVPROC(uint index, sbyte[] v); + private PFNGLVERTEXATTRIB4BVPROC glVertexAttrib4bv; + + public void VertexAttrib4bv(uint index, sbyte[] v) + { + glVertexAttrib4bv.Invoke(index, v); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLVERTEXATTRIB4DPROC(uint index, double x, double y, double z, double w); + private PFNGLVERTEXATTRIB4DPROC glVertexAttrib4d; + + public void VertexAttrib4d(uint index, double x, double y, double z, double w) + { + glVertexAttrib4d.Invoke(index, x, y, z, w); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLVERTEXATTRIB4DVPROC(uint index, double[] v); + private PFNGLVERTEXATTRIB4DVPROC glVertexAttrib4dv; + + public void VertexAttrib4dv(uint index, double[] v) + { + glVertexAttrib4dv.Invoke(index, v); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLVERTEXATTRIB4FPROC(uint index, float x, float y, float z, float w); + private PFNGLVERTEXATTRIB4FPROC glVertexAttrib4f; + + public void VertexAttrib4f(uint index, float x, float y, float z, float w) + { + glVertexAttrib4f.Invoke(index, x, y, z, w); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLVERTEXATTRIB4FVPROC(uint index, float[] v); + private PFNGLVERTEXATTRIB4FVPROC glVertexAttrib4fv; + + public void VertexAttrib4fv(uint index, float[] v) + { + glVertexAttrib4fv.Invoke(index, v); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLVERTEXATTRIB4IVPROC(uint index, int[] v); + private PFNGLVERTEXATTRIB4IVPROC glVertexAttrib4iv; + + public void VertexAttrib4iv(uint index, int[] v) + { + glVertexAttrib4iv.Invoke(index, v); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLVERTEXATTRIB4SPROC(uint index, short x, short y, short z, short w); + private PFNGLVERTEXATTRIB4SPROC glVertexAttrib4s; + + public void VertexAttrib4s(uint index, short x, short y, short z, short w) + { + glVertexAttrib4s.Invoke(index, x, y, z, w); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLVERTEXATTRIB4SVPROC(uint index, short[] v); + private PFNGLVERTEXATTRIB4SVPROC glVertexAttrib4sv; + + public void VertexAttrib4sv(uint index, short[] v) + { + glVertexAttrib4sv.Invoke(index, v); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLVERTEXATTRIB4UBVPROC(uint index, byte[] v); + private PFNGLVERTEXATTRIB4UBVPROC glVertexAttrib4ubv; + + public void VertexAttrib4ubv(uint index, byte[] v) + { + glVertexAttrib4ubv.Invoke(index, v); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLVERTEXATTRIB4UIVPROC(uint index, uint[] v); + private PFNGLVERTEXATTRIB4UIVPROC glVertexAttrib4uiv; + + public void VertexAttrib4uiv(uint index, uint[] v) + { + glVertexAttrib4uiv.Invoke(index, v); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLVERTEXATTRIB4USVPROC(uint index, ushort[] v); + private PFNGLVERTEXATTRIB4USVPROC glVertexAttrib4usv; + + public void VertexAttrib4usv(uint index, ushort[] v) + { + glVertexAttrib4usv.Invoke(index, v); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLVERTEXATTRIBPOINTERPROC(uint index, int size, VertexAttribPointerType type, bool normalized, uint stride, IntPtr pointer); + private PFNGLVERTEXATTRIBPOINTERPROC glVertexAttribPointer; + + public void VertexAttribPointer(uint index, int size, VertexAttribPointerType type, bool normalized, uint stride, IntPtr pointer) + { + glVertexAttribPointer.Invoke(index, size, type, normalized, stride, pointer); + DetectGLError(); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLUNIFORMMATRIX2X3FVPROC(int location, int count, bool transpose, float[] value); + private PFNGLUNIFORMMATRIX2X3FVPROC glUniformMatrix2x3fv; + + public void UniformMatrix2x3fv(int location, int count, bool transpose, float[] value) + { + glUniformMatrix2x3fv.Invoke(location, count, transpose, value); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLUNIFORMMATRIX3X2FVPROC(int location, int count, bool transpose, float[] value); + private PFNGLUNIFORMMATRIX3X2FVPROC glUniformMatrix3x2fv; + + public void UniformMatrix3x2fv(int location, int count, bool transpose, float[] value) + { + glUniformMatrix3x2fv.Invoke(location, count, transpose, value); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLUNIFORMMATRIX2X4FVPROC(int location, int count, bool transpose, float[] value); + private PFNGLUNIFORMMATRIX2X4FVPROC glUniformMatrix2x4fv; + + public void UniformMatrix2x4fv(int location, int count, bool transpose, float[] value) + { + glUniformMatrix2x4fv.Invoke(location, count, transpose, value); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLUNIFORMMATRIX4X2FVPROC(int location, int count, bool transpose, float[] value); + private PFNGLUNIFORMMATRIX4X2FVPROC glUniformMatrix4x2fv; + + public void UniformMatrix4x2fv(int location, int count, bool transpose, float[] value) + { + glUniformMatrix4x2fv.Invoke(location, count, transpose, value); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLUNIFORMMATRIX3X4FVPROC(int location, int count, bool transpose, float[] value); + private PFNGLUNIFORMMATRIX3X4FVPROC glUniformMatrix3x4fv; + + public void UniformMatrix3x4fv(int location, int count, bool transpose, float[] value) + { + glUniformMatrix3x4fv.Invoke(location, count, transpose, value); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLUNIFORMMATRIX4X3FVPROC(int location, int count, bool transpose, float[] value); + private PFNGLUNIFORMMATRIX4X3FVPROC glUniformMatrix4x3fv; + + public void UniformMatrix4x3fv(int location, int count, bool transpose, float[] value) + { + glUniformMatrix4x3fv.Invoke(location, count, transpose, value); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLCOLORMASKIPROC(uint index, bool r, bool g, bool b, bool a); + private PFNGLCOLORMASKIPROC glColorMaski; + + public void ColorMaski(uint index, bool r, bool g, bool b, bool a) + { + glColorMaski.Invoke(index, r, g, b, a); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLGETBOOLEANI_VPROC(BufferTargetARB target, uint index, out bool data); + private PFNGLGETBOOLEANI_VPROC glGetBooleani_v; + + public void GetBooleani_v(BufferTargetARB target, uint index, out bool data) + { + glGetBooleani_v.Invoke(target, index, out data); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLGETINTEGERI_VPROC(TypeEnum target, uint index, out int data); + private PFNGLGETINTEGERI_VPROC glGetIntegeri_v; + + public void GetIntegeri_v(TypeEnum target, uint index, out int data) + { + glGetIntegeri_v.Invoke(target, index, out data); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLENABLEIPROC(EnableCap target, uint index); + private PFNGLENABLEIPROC glEnablei; + + public void Enablei(EnableCap target, uint index) + { + glEnablei.Invoke(target, index); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLDISABLEIPROC(EnableCap target, uint index); + private PFNGLDISABLEIPROC glDisablei; + + public void Disablei(EnableCap target, uint index) + { + glDisablei.Invoke(target, index); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate bool PFNGLISENABLEDIPROC(EnableCap target, uint index); + private PFNGLISENABLEDIPROC glIsEnabledi; + + public bool IsEnabledi(EnableCap target, uint index) + { + return glIsEnabledi.Invoke(target, index); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLBEGINTRANSFORMFEEDBACKPROC(PrimitiveType primitiveMode); + private PFNGLBEGINTRANSFORMFEEDBACKPROC glBeginTransformFeedback; + + public void BeginTransformFeedback(PrimitiveType primitiveMode) + { + glBeginTransformFeedback.Invoke(primitiveMode); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLENDTRANSFORMFEEDBACKPROC(); + private PFNGLENDTRANSFORMFEEDBACKPROC glEndTransformFeedback; + + public void EndTransformFeedback() + { + glEndTransformFeedback.Invoke(); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLBINDBUFFERRANGEPROC(BufferTargetARB target, uint index, uint buffer, IntPtr offset, IntPtr size); + private PFNGLBINDBUFFERRANGEPROC glBindBufferRange; + + public void BindBufferRange(BufferTargetARB target, uint index, uint buffer, IntPtr offset, IntPtr size) + { + glBindBufferRange.Invoke(target, index, buffer, offset, size); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLBINDBUFFERBASEPROC(BufferTargetARB target, uint index, uint buffer); + private PFNGLBINDBUFFERBASEPROC glBindBufferBase; + + public void BindBufferBase(BufferTargetARB target, uint index, uint buffer) + { + glBindBufferBase.Invoke(target, index, buffer); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLTRANSFORMFEEDBACKVARYINGSPROC(uint program, int count, sbyte varyings, int bufferMode); + private PFNGLTRANSFORMFEEDBACKVARYINGSPROC glTransformFeedbackVaryings; + + public void TransformFeedbackVaryings(uint program, int count, sbyte varyings, int bufferMode) + { + glTransformFeedbackVaryings.Invoke(program, count, varyings, bufferMode); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLGETTRANSFORMFEEDBACKVARYINGPROC(uint program, uint index, int bufSize, out int length, out int size, out int type, out sbyte name); + private PFNGLGETTRANSFORMFEEDBACKVARYINGPROC glGetTransformFeedbackVarying; + + public void GetTransformFeedbackVarying(uint program, uint index, int bufSize, out int length, out int size, out int type, out sbyte name) + { + glGetTransformFeedbackVarying.Invoke(program, index, bufSize, out length, out size, out type, out name); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLCLAMPCOLORPROC(int target, int clamp); + private PFNGLCLAMPCOLORPROC glClampColor; + + public void ClampColor(int target, int clamp) + { + glClampColor.Invoke(target, clamp); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLBEGINCONDITIONALRENDERPROC(uint id, TypeEnum mode); + private PFNGLBEGINCONDITIONALRENDERPROC glBeginConditionalRender; + + public void BeginConditionalRender(uint id, TypeEnum mode) + { + glBeginConditionalRender.Invoke(id, mode); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLENDCONDITIONALRENDERPROC(); + private PFNGLENDCONDITIONALRENDERPROC glEndConditionalRender; + + public void EndConditionalRender() + { + glEndConditionalRender.Invoke(); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLVERTEXATTRIBIPOINTERPROC(uint index, int size, VertexAttribPointerType type, int stride, IntPtr pointer); + private PFNGLVERTEXATTRIBIPOINTERPROC glVertexAttribIPointer; + + public void VertexAttribIPointer(uint index, int size, VertexAttribPointerType type, int stride, IntPtr pointer) + { + glVertexAttribIPointer.Invoke(index, size, type, stride, pointer); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLGETVERTEXATTRIBIIVPROC(uint index, VertexAttribEnum pname, out int parameters); + private PFNGLGETVERTEXATTRIBIIVPROC glGetVertexAttribIiv; + + public void GetVertexAttribIiv(uint index, VertexAttribEnum pname, out int parameters) + { + glGetVertexAttribIiv.Invoke(index, pname, out parameters); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLGETVERTEXATTRIBIUIVPROC(uint index, VertexAttribEnum pname, out uint parameters); + private PFNGLGETVERTEXATTRIBIUIVPROC glGetVertexAttribIuiv; + + public void GetVertexAttribIuiv(uint index, VertexAttribEnum pname, out uint parameters) + { + glGetVertexAttribIuiv.Invoke(index, pname, out parameters); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLVERTEXATTRIBI1IPROC(uint index, int x); + private PFNGLVERTEXATTRIBI1IPROC glVertexAttribI1i; + + public void VertexAttribI1i(uint index, int x) + { + glVertexAttribI1i.Invoke(index, x); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLVERTEXATTRIBI2IPROC(uint index, int x, int y); + private PFNGLVERTEXATTRIBI2IPROC glVertexAttribI2i; + + public void VertexAttribI2i(uint index, int x, int y) + { + glVertexAttribI2i.Invoke(index, x, y); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLVERTEXATTRIBI3IPROC(uint index, int x, int y, int z); + private PFNGLVERTEXATTRIBI3IPROC glVertexAttribI3i; + + public void VertexAttribI3i(uint index, int x, int y, int z) + { + glVertexAttribI3i.Invoke(index, x, y, z); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLVERTEXATTRIBI4IPROC(uint index, int x, int y, int z, int w); + private PFNGLVERTEXATTRIBI4IPROC glVertexAttribI4i; + + public void VertexAttribI4i(uint index, int x, int y, int z, int w) + { + glVertexAttribI4i.Invoke(index, x, y, z, w); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLVERTEXATTRIBI1UIPROC(uint index, uint x); + private PFNGLVERTEXATTRIBI1UIPROC glVertexAttribI1ui; + + public void VertexAttribI1ui(uint index, uint x) + { + glVertexAttribI1ui.Invoke(index, x); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLVERTEXATTRIBI2UIPROC(uint index, uint x, uint y); + private PFNGLVERTEXATTRIBI2UIPROC glVertexAttribI2ui; + + public void VertexAttribI2ui(uint index, uint x, uint y) + { + glVertexAttribI2ui.Invoke(index, x, y); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLVERTEXATTRIBI3UIPROC(uint index, uint x, uint y, uint z); + private PFNGLVERTEXATTRIBI3UIPROC glVertexAttribI3ui; + + public void VertexAttribI3ui(uint index, uint x, uint y, uint z) + { + glVertexAttribI3ui.Invoke(index, x, y, z); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLVERTEXATTRIBI4UIPROC(uint index, uint x, uint y, uint z, uint w); + private PFNGLVERTEXATTRIBI4UIPROC glVertexAttribI4ui; + + public void VertexAttribI4ui(uint index, uint x, uint y, uint z, uint w) + { + glVertexAttribI4ui.Invoke(index, x, y, z, w); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLVERTEXATTRIBI1IVPROC(uint index, int[] v); + private PFNGLVERTEXATTRIBI1IVPROC glVertexAttribI1iv; + + public void VertexAttribI1iv(uint index, int[] v) + { + glVertexAttribI1iv.Invoke(index, v); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLVERTEXATTRIBI2IVPROC(uint index, int[] v); + private PFNGLVERTEXATTRIBI2IVPROC glVertexAttribI2iv; + + public void VertexAttribI2iv(uint index, int[] v) + { + glVertexAttribI2iv.Invoke(index, v); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLVERTEXATTRIBI3IVPROC(uint index, int[] v); + private PFNGLVERTEXATTRIBI3IVPROC glVertexAttribI3iv; + + public void VertexAttribI3iv(uint index, int[] v) + { + glVertexAttribI3iv.Invoke(index, v); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLVERTEXATTRIBI4IVPROC(uint index, int[] v); + private PFNGLVERTEXATTRIBI4IVPROC glVertexAttribI4iv; + + public void VertexAttribI4iv(uint index, int[] v) + { + glVertexAttribI4iv.Invoke(index, v); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLVERTEXATTRIBI1UIVPROC(uint index, uint[] v); + private PFNGLVERTEXATTRIBI1UIVPROC glVertexAttribI1uiv; + + public void VertexAttribI1uiv(uint index, uint[] v) + { + glVertexAttribI1uiv.Invoke(index, v); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLVERTEXATTRIBI2UIVPROC(uint index, uint[] v); + private PFNGLVERTEXATTRIBI2UIVPROC glVertexAttribI2uiv; + + public void VertexAttribI2uiv(uint index, uint[] v) + { + glVertexAttribI2uiv.Invoke(index, v); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLVERTEXATTRIBI3UIVPROC(uint index, uint[] v); + private PFNGLVERTEXATTRIBI3UIVPROC glVertexAttribI3uiv; + + public void VertexAttribI3uiv(uint index, uint[] v) + { + glVertexAttribI3uiv.Invoke(index, v); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLVERTEXATTRIBI4UIVPROC(uint index, uint[] v); + private PFNGLVERTEXATTRIBI4UIVPROC glVertexAttribI4uiv; + + public void VertexAttribI4uiv(uint index, uint[] v) + { + glVertexAttribI4uiv.Invoke(index, v); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLVERTEXATTRIBI4BVPROC(uint index, sbyte[] v); + private PFNGLVERTEXATTRIBI4BVPROC glVertexAttribI4bv; + + public void VertexAttribI4bv(uint index, sbyte[] v) + { + glVertexAttribI4bv.Invoke(index, v); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLVERTEXATTRIBI4SVPROC(uint index, short[] v); + private PFNGLVERTEXATTRIBI4SVPROC glVertexAttribI4sv; + + public void VertexAttribI4sv(uint index, short[] v) + { + glVertexAttribI4sv.Invoke(index, v); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLVERTEXATTRIBI4UBVPROC(uint index, byte[] v); + private PFNGLVERTEXATTRIBI4UBVPROC glVertexAttribI4ubv; + + public void VertexAttribI4ubv(uint index, byte[] v) + { + glVertexAttribI4ubv.Invoke(index, v); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLVERTEXATTRIBI4USVPROC(uint index, ushort[] v); + private PFNGLVERTEXATTRIBI4USVPROC glVertexAttribI4usv; + + public void VertexAttribI4usv(uint index, ushort[] v) + { + glVertexAttribI4usv.Invoke(index, v); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLGETUNIFORMUIVPROC(uint program, int location, out uint parameters); + private PFNGLGETUNIFORMUIVPROC glGetUniformuiv; + + public void GetUniformuiv(uint program, int location, out uint parameters) + { + glGetUniformuiv.Invoke(program, location, out parameters); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLBINDFRAGDATALOCATIONPROC(uint program, uint color, sbyte[] name); + private PFNGLBINDFRAGDATALOCATIONPROC glBindFragDataLocation; + + public void BindFragDataLocation(uint program, uint color, sbyte[] name) + { + glBindFragDataLocation.Invoke(program, color, name); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate int PFNGLGETFRAGDATALOCATIONPROC(uint program, sbyte[] name); + private PFNGLGETFRAGDATALOCATIONPROC glGetFragDataLocation; + + public int GetFragDataLocation(uint program, sbyte[] name) + { + return glGetFragDataLocation.Invoke(program, name); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLUNIFORM1UIPROC(int location, uint v0); + private PFNGLUNIFORM1UIPROC glUniform1ui; + + public void Uniform1ui(int location, uint v0) + { + glUniform1ui.Invoke(location, v0); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLUNIFORM2UIPROC(int location, uint v0, uint v1); + private PFNGLUNIFORM2UIPROC glUniform2ui; + + public void Uniform2ui(int location, uint v0, uint v1) + { + glUniform2ui.Invoke(location, v0, v1); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLUNIFORM3UIPROC(int location, uint v0, uint v1, uint v2); + private PFNGLUNIFORM3UIPROC glUniform3ui; + + public void Uniform3ui(int location, uint v0, uint v1, uint v2) + { + glUniform3ui.Invoke(location, v0, v1, v2); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLUNIFORM4UIPROC(int location, uint v0, uint v1, uint v2, uint v3); + private PFNGLUNIFORM4UIPROC glUniform4ui; + + public void Uniform4ui(int location, uint v0, uint v1, uint v2, uint v3) + { + glUniform4ui.Invoke(location, v0, v1, v2, v3); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLUNIFORM1UIVPROC(int location, int count, uint[] value); + private PFNGLUNIFORM1UIVPROC glUniform1uiv; + + public void Uniform1uiv(int location, int count, uint[] value) + { + glUniform1uiv.Invoke(location, count, value); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLUNIFORM2UIVPROC(int location, int count, uint[] value); + private PFNGLUNIFORM2UIVPROC glUniform2uiv; + + public void Uniform2uiv(int location, int count, uint[] value) + { + glUniform2uiv.Invoke(location, count, value); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLUNIFORM3UIVPROC(int location, int count, uint[] value); + private PFNGLUNIFORM3UIVPROC glUniform3uiv; + + public void Uniform3uiv(int location, int count, uint[] value) + { + glUniform3uiv.Invoke(location, count, value); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLUNIFORM4UIVPROC(int location, int count, uint[] value); + private PFNGLUNIFORM4UIVPROC glUniform4uiv; + + public void Uniform4uiv(int location, int count, uint[] value) + { + glUniform4uiv.Invoke(location, count, value); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLTEXPARAMETERIIVPROC(TextureTarget target, TextureParameterName pname, int[] parameters); + private PFNGLTEXPARAMETERIIVPROC glTexParameterIiv; + + public void TexParameterIiv(TextureTarget target, TextureParameterName pname, int[] parameters) + { + glTexParameterIiv.Invoke(target, pname, parameters); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLTEXPARAMETERIUIVPROC(TextureTarget target, TextureParameterName pname, uint[] parameters); + private PFNGLTEXPARAMETERIUIVPROC glTexParameterIuiv; + + public void TexParameterIuiv(TextureTarget target, TextureParameterName pname, uint[] parameters) + { + glTexParameterIuiv.Invoke(target, pname, parameters); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLGETTEXPARAMETERIIVPROC(TextureTarget target, GetTextureParameter pname, out int parameters); + private PFNGLGETTEXPARAMETERIIVPROC glGetTexParameterIiv; + + public void GetTexParameterIiv(TextureTarget target, GetTextureParameter pname, out int parameters) + { + glGetTexParameterIiv.Invoke(target, pname, out parameters); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLGETTEXPARAMETERIUIVPROC(TextureTarget target, GetTextureParameter pname, out uint parameters); + private PFNGLGETTEXPARAMETERIUIVPROC glGetTexParameterIuiv; + + public void GetTexParameterIuiv(TextureTarget target, GetTextureParameter pname, out uint parameters) + { + glGetTexParameterIuiv.Invoke(target, pname, out parameters); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLCLEARBUFFERIVPROC(Buffer buffer, int drawbuffer, int[] value); + private PFNGLCLEARBUFFERIVPROC glClearBufferiv; + + public void ClearBufferiv(Buffer buffer, int drawbuffer, int[] value) + { + glClearBufferiv.Invoke(buffer, drawbuffer, value); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLCLEARBUFFERUIVPROC(Buffer buffer, int drawbuffer, uint[] value); + private PFNGLCLEARBUFFERUIVPROC glClearBufferuiv; + + public void ClearBufferuiv(Buffer buffer, int drawbuffer, uint[] value) + { + glClearBufferuiv.Invoke(buffer, drawbuffer, value); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLCLEARBUFFERFVPROC(Buffer buffer, int drawbuffer, float[] value); + private PFNGLCLEARBUFFERFVPROC glClearBufferfv; + + public void ClearBufferfv(Buffer buffer, int drawbuffer, float[] value) + { + glClearBufferfv.Invoke(buffer, drawbuffer, value); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLCLEARBUFFERFIPROC(Buffer buffer, int drawbuffer, float depth, int stencil); + private PFNGLCLEARBUFFERFIPROC glClearBufferfi; + + public void ClearBufferfi(Buffer buffer, int drawbuffer, float depth, int stencil) + { + glClearBufferfi.Invoke(buffer, drawbuffer, depth, stencil); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate IntPtr PFNGLGETSTRINGIPROC(StringName name, uint index); + private PFNGLGETSTRINGIPROC glGetStringi; + + public IntPtr GetStringi(StringName name, uint index) + { + return glGetStringi.Invoke(name, index); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate bool PFNGLISRENDERBUFFERPROC(uint renderbuffer); + private PFNGLISRENDERBUFFERPROC glIsRenderbuffer; + + public bool IsRenderbuffer(uint renderbuffer) + { + return glIsRenderbuffer.Invoke(renderbuffer); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLBINDRENDERBUFFERPROC(RenderbufferTarget target, uint renderbuffer); + private PFNGLBINDRENDERBUFFERPROC glBindRenderbuffer; + + public void BindRenderbuffer(RenderbufferTarget target, uint renderbuffer) + { + glBindRenderbuffer.Invoke(target, renderbuffer); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLDELETERENDERBUFFERSPROC(int n, uint[] renderbuffers); + private PFNGLDELETERENDERBUFFERSPROC glDeleteRenderbuffers; + + public void DeleteRenderbuffers(int n, uint[] renderbuffers) + { + glDeleteRenderbuffers.Invoke(n, renderbuffers); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLGENRENDERBUFFERSPROC(int n, out uint renderbuffers); + private PFNGLGENRENDERBUFFERSPROC glGenRenderbuffers; + + public void GenRenderbuffers(int n, out uint renderbuffers) + { + glGenRenderbuffers.Invoke(n, out renderbuffers); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLRENDERBUFFERSTORAGEPROC(RenderbufferTarget target, InternalFormat internalformat, int width, int height); + private PFNGLRENDERBUFFERSTORAGEPROC glRenderbufferStorage; + + public void RenderbufferStorage(RenderbufferTarget target, InternalFormat internalformat, int width, int height) + { + glRenderbufferStorage.Invoke(target, internalformat, width, height); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLGETRENDERBUFFERPARAMETERIVPROC(RenderbufferTarget target, RenderbufferParameterName pname, out int parameters); + private PFNGLGETRENDERBUFFERPARAMETERIVPROC glGetRenderbufferParameteriv; + + public void GetRenderbufferParameteriv(RenderbufferTarget target, RenderbufferParameterName pname, out int parameters) + { + glGetRenderbufferParameteriv.Invoke(target, pname, out parameters); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate bool PFNGLISFRAMEBUFFERPROC(uint framebuffer); + private PFNGLISFRAMEBUFFERPROC glIsFramebuffer; + + public bool IsFramebuffer(uint framebuffer) + { + return glIsFramebuffer.Invoke(framebuffer); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLBINDFRAMEBUFFERPROC(FramebufferTarget target, uint framebuffer); + private PFNGLBINDFRAMEBUFFERPROC glBindFramebuffer; + + public void BindFramebuffer(FramebufferTarget target, uint framebuffer) + { + glBindFramebuffer.Invoke(target, framebuffer); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLDELETEFRAMEBUFFERSPROC(int n, uint[] framebuffers); + private PFNGLDELETEFRAMEBUFFERSPROC glDeleteFramebuffers; + + public void DeleteFramebuffers(int n, uint[] framebuffers) + { + glDeleteFramebuffers.Invoke(n, framebuffers); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLGENFRAMEBUFFERSPROC(int n, out uint framebuffers); + private PFNGLGENFRAMEBUFFERSPROC glGenFramebuffers; + + public void GenFramebuffers(int n, out uint framebuffers) + { + glGenFramebuffers.Invoke(n, out framebuffers); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate FramebufferStatus PFNGLCHECKFRAMEBUFFERSTATUSPROC(FramebufferTarget target); + private PFNGLCHECKFRAMEBUFFERSTATUSPROC glCheckFramebufferStatus; + + public FramebufferStatus CheckFramebufferStatus(FramebufferTarget target) + { + return glCheckFramebufferStatus.Invoke(target); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLFRAMEBUFFERTEXTURE1DPROC(FramebufferTarget target, FramebufferAttachment attachment, TextureTarget textarget, uint texture, int level); + private PFNGLFRAMEBUFFERTEXTURE1DPROC glFramebufferTexture1D; + + public void FramebufferTexture1D(FramebufferTarget target, FramebufferAttachment attachment, TextureTarget textarget, uint texture, int level) + { + glFramebufferTexture1D.Invoke(target, attachment, textarget, texture, level); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLFRAMEBUFFERTEXTURE2DPROC(FramebufferTarget target, FramebufferAttachment attachment, TextureTarget textarget, uint texture, int level); + private PFNGLFRAMEBUFFERTEXTURE2DPROC glFramebufferTexture2D; + + public void FramebufferTexture2D(FramebufferTarget target, FramebufferAttachment attachment, TextureTarget textarget, uint texture, int level) + { + glFramebufferTexture2D.Invoke(target, attachment, textarget, texture, level); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLFRAMEBUFFERTEXTURE3DPROC(FramebufferTarget target, FramebufferAttachment attachment, TextureTarget textarget, uint texture, int level, int zoffset); + private PFNGLFRAMEBUFFERTEXTURE3DPROC glFramebufferTexture3D; + + public void FramebufferTexture3D(FramebufferTarget target, FramebufferAttachment attachment, TextureTarget textarget, uint texture, int level, int zoffset) + { + glFramebufferTexture3D.Invoke(target, attachment, textarget, texture, level, zoffset); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLFRAMEBUFFERRENDERBUFFERPROC(FramebufferTarget target, FramebufferAttachment attachment, RenderbufferTarget renderbuffertarget, uint renderbuffer); + private PFNGLFRAMEBUFFERRENDERBUFFERPROC glFramebufferRenderbuffer; + + public void FramebufferRenderbuffer(FramebufferTarget target, FramebufferAttachment attachment, RenderbufferTarget renderbuffertarget, uint renderbuffer) + { + glFramebufferRenderbuffer.Invoke(target, attachment, renderbuffertarget, renderbuffer); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC(FramebufferTarget target, FramebufferAttachment attachment, FramebufferAttachmentParameterName pname, out int parameters); + private PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC glGetFramebufferAttachmentParameteriv; + + public void GetFramebufferAttachmentParameteriv(FramebufferTarget target, FramebufferAttachment attachment, FramebufferAttachmentParameterName pname, out int parameters) + { + glGetFramebufferAttachmentParameteriv.Invoke(target, attachment, pname, out parameters); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLGENERATEMIPMAPPROC(TextureTarget target); + private PFNGLGENERATEMIPMAPPROC glGenerateMipmap; + + public void GenerateMipmap(TextureTarget target) + { + glGenerateMipmap.Invoke(target); + DetectGLError(); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLBLITFRAMEBUFFERPROC(int srcX0, int srcY0, int srcX1, int srcY1, int dstX0, int dstY0, int dstX1, int dstY1, ClearBufferMask mask, BlitFramebufferFilter filter); + private PFNGLBLITFRAMEBUFFERPROC glBlitFramebuffer; + + public void BlitFramebuffer(int srcX0, int srcY0, int srcX1, int srcY1, int dstX0, int dstY0, int dstX1, int dstY1, ClearBufferMask mask, BlitFramebufferFilter filter) + { + glBlitFramebuffer.Invoke(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLRENDERBUFFERSTORAGEMULTISAMPLEPROC(RenderbufferTarget target, int samples, InternalFormat internalformat, int width, int height); + private PFNGLRENDERBUFFERSTORAGEMULTISAMPLEPROC glRenderbufferStorageMultisample; + + public void RenderbufferStorageMultisample(RenderbufferTarget target, int samples, InternalFormat internalformat, int width, int height) + { + glRenderbufferStorageMultisample.Invoke(target, samples, internalformat, width, height); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLFRAMEBUFFERTEXTURELAYERPROC(FramebufferTarget target, FramebufferAttachment attachment, uint texture, int level, int layer); + private PFNGLFRAMEBUFFERTEXTURELAYERPROC glFramebufferTextureLayer; + + public void FramebufferTextureLayer(FramebufferTarget target, FramebufferAttachment attachment, uint texture, int level, int layer) + { + glFramebufferTextureLayer.Invoke(target, attachment, texture, level, layer); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate IntPtr PFNGLMAPBUFFERRANGEPROC(BufferTargetARB target, IntPtr offset, IntPtr length, MapBufferAccessMask access); + private PFNGLMAPBUFFERRANGEPROC glMapBufferRange; + + public IntPtr MapBufferRange(BufferTargetARB target, IntPtr offset, IntPtr length, MapBufferAccessMask access) + { + return glMapBufferRange.Invoke(target, offset, length, access); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLFLUSHMAPPEDBUFFERRANGEPROC(BufferTargetARB target, IntPtr offset, IntPtr length); + private PFNGLFLUSHMAPPEDBUFFERRANGEPROC glFlushMappedBufferRange; + + public void FlushMappedBufferRange(BufferTargetARB target, IntPtr offset, IntPtr length) + { + glFlushMappedBufferRange.Invoke(target, offset, length); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLBINDVERTEXARRAYPROC(uint array); + private PFNGLBINDVERTEXARRAYPROC glBindVertexArray; + + public void BindVertexArray(uint array) + { + glBindVertexArray.Invoke(array); + DetectGLError(); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLDELETEVERTEXARRAYSPROC(int n, uint[] arrays); + private PFNGLDELETEVERTEXARRAYSPROC glDeleteVertexArrays; + + public void DeleteVertexArrays(int n, uint[] arrays) + { + glDeleteVertexArrays.Invoke(n, arrays); + DetectGLError(); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLGENVERTEXARRAYSPROC(int n, uint[] arrays); + private PFNGLGENVERTEXARRAYSPROC glGenVertexArrays; + + public void GenVertexArrays(int n, uint[] arrays) + { + glGenVertexArrays.Invoke(n, arrays); + DetectGLError(); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate bool PFNGLISVERTEXARRAYPROC(uint array); + private PFNGLISVERTEXARRAYPROC glIsVertexArray; + + public bool IsVertexArray(uint array) + { + return glIsVertexArray.Invoke(array); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLDRAWARRAYSINSTANCEDPROC(PrimitiveType mode, int first, int count, int instancecount); + private PFNGLDRAWARRAYSINSTANCEDPROC glDrawArraysInstanced; + + public void DrawArraysInstanced(PrimitiveType mode, int first, int count, int instancecount) + { + glDrawArraysInstanced.Invoke(mode, first, count, instancecount); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLDRAWELEMENTSINSTANCEDPROC(PrimitiveType mode, int count, DrawElementsType type, IntPtr indices, int instancecount); + private PFNGLDRAWELEMENTSINSTANCEDPROC glDrawElementsInstanced; + + public void DrawElementsInstanced(PrimitiveType mode, int count, DrawElementsType type, IntPtr indices, int instancecount) + { + glDrawElementsInstanced.Invoke(mode, count, type, indices, instancecount); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLTEXBUFFERPROC(TextureTarget target, InternalFormat internalformat, uint buffer); + private PFNGLTEXBUFFERPROC glTexBuffer; + + public void TexBuffer(TextureTarget target, InternalFormat internalformat, uint buffer) + { + glTexBuffer.Invoke(target, internalformat, buffer); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLPRIMITIVERESTARTINDEXPROC(uint index); + private PFNGLPRIMITIVERESTARTINDEXPROC glPrimitiveRestartIndex; + + public void PrimitiveRestartIndex(uint index) + { + glPrimitiveRestartIndex.Invoke(index); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLCOPYBUFFERSUBDATAPROC(CopyBufferSubDataTarget readTarget, CopyBufferSubDataTarget writeTarget, IntPtr readOffset, IntPtr writeOffset, IntPtr size); + private PFNGLCOPYBUFFERSUBDATAPROC glCopyBufferSubData; + + public void CopyBufferSubData(CopyBufferSubDataTarget readTarget, CopyBufferSubDataTarget writeTarget, IntPtr readOffset, IntPtr writeOffset, IntPtr size) + { + glCopyBufferSubData.Invoke(readTarget, writeTarget, readOffset, writeOffset, size); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLGETUNIFORMINDICESPROC(uint program, int uniformCount, sbyte uniformNames, out uint uniformIndices); + private PFNGLGETUNIFORMINDICESPROC glGetUniformIndices; + + public void GetUniformIndices(uint program, int uniformCount, sbyte uniformNames, out uint uniformIndices) + { + glGetUniformIndices.Invoke(program, uniformCount, uniformNames, out uniformIndices); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLGETACTIVEUNIFORMSIVPROC(uint program, int uniformCount, uint[] uniformIndices, UniformPName pname, out int parameters); + private PFNGLGETACTIVEUNIFORMSIVPROC glGetActiveUniformsiv; + + public void GetActiveUniformsiv(uint program, int uniformCount, uint[] uniformIndices, UniformPName pname, out int parameters) + { + glGetActiveUniformsiv.Invoke(program, uniformCount, uniformIndices, pname, out parameters); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLGETACTIVEUNIFORMNAMEPROC(uint program, uint uniformIndex, int bufSize, out int length, out sbyte uniformName); + private PFNGLGETACTIVEUNIFORMNAMEPROC glGetActiveUniformName; + + public void GetActiveUniformName(uint program, uint uniformIndex, int bufSize, out int length, out sbyte uniformName) + { + glGetActiveUniformName.Invoke(program, uniformIndex, bufSize, out length, out uniformName); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate uint PFNGLGETUNIFORMBLOCKINDEXPROC(uint program, sbyte[] uniformBlockName); + private PFNGLGETUNIFORMBLOCKINDEXPROC glGetUniformBlockIndex; + + public uint GetUniformBlockIndex(uint program, sbyte[] uniformBlockName) + { + return glGetUniformBlockIndex.Invoke(program, uniformBlockName); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLGETACTIVEUNIFORMBLOCKIVPROC(uint program, uint uniformBlockIndex, UniformBlockPName pname, out int parameters); + private PFNGLGETACTIVEUNIFORMBLOCKIVPROC glGetActiveUniformBlockiv; + + public void GetActiveUniformBlockiv(uint program, uint uniformBlockIndex, UniformBlockPName pname, out int parameters) + { + glGetActiveUniformBlockiv.Invoke(program, uniformBlockIndex, pname, out parameters); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLGETACTIVEUNIFORMBLOCKNAMEPROC(uint program, uint uniformBlockIndex, int bufSize, out int length, out sbyte uniformBlockName); + private PFNGLGETACTIVEUNIFORMBLOCKNAMEPROC glGetActiveUniformBlockName; + + public void GetActiveUniformBlockName(uint program, uint uniformBlockIndex, int bufSize, out int length, out sbyte uniformBlockName) + { + glGetActiveUniformBlockName.Invoke(program, uniformBlockIndex, bufSize, out length, out uniformBlockName); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLUNIFORMBLOCKBINDINGPROC(uint program, uint uniformBlockIndex, uint uniformBlockBinding); + private PFNGLUNIFORMBLOCKBINDINGPROC glUniformBlockBinding; + + public void UniformBlockBinding(uint program, uint uniformBlockIndex, uint uniformBlockBinding) + { + glUniformBlockBinding.Invoke(program, uniformBlockIndex, uniformBlockBinding); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLDRAWELEMENTSBASEVERTEXPROC(PrimitiveType mode, int count, DrawElementsType type, IntPtr indices, int basevertex); + private PFNGLDRAWELEMENTSBASEVERTEXPROC glDrawElementsBaseVertex; + + public void DrawElementsBaseVertex(PrimitiveType mode, int count, DrawElementsType type, IntPtr indices, int basevertex) + { + glDrawElementsBaseVertex.Invoke(mode, count, type, indices, basevertex); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLDRAWRANGEELEMENTSBASEVERTEXPROC(PrimitiveType mode, uint start, uint end, int count, DrawElementsType type, IntPtr indices, int basevertex); + private PFNGLDRAWRANGEELEMENTSBASEVERTEXPROC glDrawRangeElementsBaseVertex; + + public void DrawRangeElementsBaseVertex(PrimitiveType mode, uint start, uint end, int count, DrawElementsType type, IntPtr indices, int basevertex) + { + glDrawRangeElementsBaseVertex.Invoke(mode, start, end, count, type, indices, basevertex); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXPROC(PrimitiveType mode, int count, DrawElementsType type, IntPtr indices, int instancecount, int basevertex); + private PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXPROC glDrawElementsInstancedBaseVertex; + + public void DrawElementsInstancedBaseVertex(PrimitiveType mode, int count, DrawElementsType type, IntPtr indices, int instancecount, int basevertex) + { + glDrawElementsInstancedBaseVertex.Invoke(mode, count, type, indices, instancecount, basevertex); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLMULTIDRAWELEMENTSBASEVERTEXPROC(PrimitiveType mode, int[] count, DrawElementsType type, int[] indices, int drawcount, int[] basevertex); + private PFNGLMULTIDRAWELEMENTSBASEVERTEXPROC glMultiDrawElementsBaseVertex; + + public void MultiDrawElementsBaseVertex(PrimitiveType mode, int[] count, DrawElementsType type, int[] indices, int drawcount, int[] basevertex) + { + glMultiDrawElementsBaseVertex.Invoke(mode, count, type, indices, drawcount, basevertex); + DetectGLError(); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLPROVOKINGVERTEXPROC(VertexProvokingMode mode); + private PFNGLPROVOKINGVERTEXPROC glProvokingVertex; + + public void ProvokingVertex(VertexProvokingMode mode) + { + glProvokingVertex.Invoke(mode); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate IntPtr PFNGLFENCESYNCPROC(SyncCondition condition, uint flags); + private PFNGLFENCESYNCPROC glFenceSync; + + public IntPtr FenceSync(SyncCondition condition, uint flags) + { + return glFenceSync.Invoke(condition, flags); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate bool PFNGLISSYNCPROC(IntPtr sync); + private PFNGLISSYNCPROC glIsSync; + + public bool IsSync(IntPtr sync) + { + return glIsSync.Invoke(sync); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLDELETESYNCPROC(IntPtr sync); + private PFNGLDELETESYNCPROC glDeleteSync; + + public void DeleteSync(IntPtr sync) + { + glDeleteSync.Invoke(sync); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate SyncStatus PFNGLCLIENTWAITSYNCPROC(IntPtr sync, SyncObjectMask flags, ulong timeout); + private PFNGLCLIENTWAITSYNCPROC glClientWaitSync; + + public SyncStatus ClientWaitSync(IntPtr sync, SyncObjectMask flags, ulong timeout) + { + return glClientWaitSync.Invoke(sync, flags, timeout); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLWAITSYNCPROC(IntPtr sync, uint flags, ulong timeout); + private PFNGLWAITSYNCPROC glWaitSync; + + public void WaitSync(IntPtr sync, uint flags, ulong timeout) + { + glWaitSync.Invoke(sync, flags, timeout); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLGETINTEGER64VPROC(GetPName pname, out long data); + private PFNGLGETINTEGER64VPROC glGetInteger64v; + + public void GetInteger64v(GetPName pname, out long data) + { + glGetInteger64v.Invoke(pname, out data); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLGETSYNCIVPROC(IntPtr sync, SyncParameterName pname, int bufSize, out int length, out int values); + private PFNGLGETSYNCIVPROC glGetSynciv; + + public void GetSynciv(IntPtr sync, SyncParameterName pname, int bufSize, out int length, out int values) + { + glGetSynciv.Invoke(sync, pname, bufSize, out length, out values); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLGETINTEGER64I_VPROC(TypeEnum target, uint index, out long data); + private PFNGLGETINTEGER64I_VPROC glGetInteger64i_v; + + public void GetInteger64i_v(TypeEnum target, uint index, out long data) + { + glGetInteger64i_v.Invoke(target, index, out data); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLGETBUFFERPARAMETERI64VPROC(BufferTargetARB target, int pname, out long parameters); + private PFNGLGETBUFFERPARAMETERI64VPROC glGetBufferParameteri64v; + + public void GetBufferParameteri64v(BufferTargetARB target, int pname, out long parameters) + { + glGetBufferParameteri64v.Invoke(target, pname, out parameters); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLFRAMEBUFFERTEXTUREPROC(FramebufferTarget target, FramebufferAttachment attachment, uint texture, int level); + private PFNGLFRAMEBUFFERTEXTUREPROC glFramebufferTexture; + + public void FramebufferTexture(FramebufferTarget target, FramebufferAttachment attachment, uint texture, int level) + { + glFramebufferTexture.Invoke(target, attachment, texture, level); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLTEXIMAGE2DMULTISAMPLEPROC(TextureTarget target, int samples, InternalFormat internalformat, int width, int height, bool fixedsamplelocations); + private PFNGLTEXIMAGE2DMULTISAMPLEPROC glTexImage2DMultisample; + + public void TexImage2DMultisample(TextureTarget target, int samples, InternalFormat internalformat, int width, int height, bool fixedsamplelocations) + { + glTexImage2DMultisample.Invoke(target, samples, internalformat, width, height, fixedsamplelocations); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLTEXIMAGE3DMULTISAMPLEPROC(TextureTarget target, int samples, InternalFormat internalformat, int width, int height, int depth, bool fixedsamplelocations); + private PFNGLTEXIMAGE3DMULTISAMPLEPROC glTexImage3DMultisample; + + public void TexImage3DMultisample(TextureTarget target, int samples, InternalFormat internalformat, int width, int height, int depth, bool fixedsamplelocations) + { + glTexImage3DMultisample.Invoke(target, samples, internalformat, width, height, depth, fixedsamplelocations); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLGETMULTISAMPLEFVPROC(int pname, uint index, out float val); + private PFNGLGETMULTISAMPLEFVPROC glGetMultisamplefv; + + public void GetMultisamplefv(int pname, uint index, out float val) + { + glGetMultisamplefv.Invoke(pname, index, out val); + } + + [UnmanagedFunctionPointer(CallingConvention.Cdecl)] + private delegate void PFNGLSAMPLEMASKIPROC(uint maskNumber, uint mask); + private PFNGLSAMPLEMASKIPROC glSampleMaski; + + public void SampleMaski(uint maskNumber, uint mask) + { + glSampleMaski.Invoke(maskNumber, mask); + } + + public GLContext(IntPtr windowHandle) + { + GetProcAddressHandler loader = SDL.SDL_GL_GetProcAddress; + Handle = SDL.SDL_GL_CreateContext(windowHandle); + if (Handle == null) { + throw new FrameworkSDLException(); + } + + glCullFace = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glCullFace")); + glFrontFace = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glFrontFace")); + glHint = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glHint")); + glLineWidth = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glLineWidth")); + glPointSize = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glPointSize")); + glPolygonMode = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glPolygonMode")); + glScissor = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glScissor")); + glTexParameterf = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glTexParameterf")); + glTexParameterfv = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glTexParameterfv")); + glTexParameteri = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glTexParameteri")); + glTexParameteriv = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glTexParameteriv")); + glTexImage1D = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glTexImage1D")); + glTexImage2D = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glTexImage2D")); + glDrawBuffer = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glDrawBuffer")); + glClear = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glClear")); + glClearColor = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glClearColor")); + glClearStencil = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glClearStencil")); + glClearDepth = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glClearDepth")); + glStencilMask = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glStencilMask")); + glColorMask = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glColorMask")); + glDepthMask = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glDepthMask")); + glDisable = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glDisable")); + glEnable = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glEnable")); + glFinish = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glFinish")); + glFlush = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glFlush")); + glBlendFunc = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glBlendFunc")); + glLogicOp = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glLogicOp")); + glStencilFunc = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glStencilFunc")); + glStencilOp = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glStencilOp")); + glDepthFunc = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glDepthFunc")); + glPixelStoref = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glPixelStoref")); + glPixelStorei = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glPixelStorei")); + glReadBuffer = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glReadBuffer")); + glReadPixels = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glReadPixels")); + glGetBooleanv = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glGetBooleanv")); + glGetDoublev = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glGetDoublev")); + glGetError = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glGetError")); + glGetFloatv = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glGetFloatv")); + glGetIntegerv = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glGetIntegerv")); + glGetString = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glGetString")); + glGetTexImage = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glGetTexImage")); + glGetTexParameterfv = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glGetTexParameterfv")); + glGetTexParameteriv = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glGetTexParameteriv")); + glGetTexLevelParameterfv = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glGetTexLevelParameterfv")); + glGetTexLevelParameteriv = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glGetTexLevelParameteriv")); + glIsEnabled = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glIsEnabled")); + glDepthRange = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glDepthRange")); + glViewport = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glViewport")); + glDrawArrays = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glDrawArrays")); + glDrawElements = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glDrawElements")); + glPolygonOffset = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glPolygonOffset")); + glCopyTexImage1D = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glCopyTexImage1D")); + glCopyTexImage2D = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glCopyTexImage2D")); + glCopyTexSubImage1D = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glCopyTexSubImage1D")); + glCopyTexSubImage2D = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glCopyTexSubImage2D")); + glTexSubImage1D = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glTexSubImage1D")); + glTexSubImage2D = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glTexSubImage2D")); + glBindTexture = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glBindTexture")); + glDeleteTextures = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glDeleteTextures")); + glGenTextures = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glGenTextures")); + glIsTexture = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glIsTexture")); + glDrawRangeElements = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glDrawRangeElements")); + glTexImage3D = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glTexImage3D")); + glTexSubImage3D = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glTexSubImage3D")); + glCopyTexSubImage3D = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glCopyTexSubImage3D")); + glActiveTexture = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glActiveTexture")); + glSampleCoverage = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glSampleCoverage")); + glCompressedTexImage3D = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glCompressedTexImage3D")); + glCompressedTexImage2D = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glCompressedTexImage2D")); + glCompressedTexImage1D = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glCompressedTexImage1D")); + glCompressedTexSubImage3D = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glCompressedTexSubImage3D")); + glCompressedTexSubImage2D = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glCompressedTexSubImage2D")); + glCompressedTexSubImage1D = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glCompressedTexSubImage1D")); + glGetCompressedTexImage = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glGetCompressedTexImage")); + glBlendFuncSeparate = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glBlendFuncSeparate")); + glMultiDrawArrays = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glMultiDrawArrays")); + glMultiDrawElements = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glMultiDrawElements")); + glPointParameterf = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glPointParameterf")); + glPointParameterfv = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glPointParameterfv")); + glPointParameteri = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glPointParameteri")); + glPointParameteriv = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glPointParameteriv")); + glVertexAttribP4uiv = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glVertexAttribP4uiv")); + glVertexAttribP4ui = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glVertexAttribP4ui")); + glVertexAttribP3uiv = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glVertexAttribP3uiv")); + glVertexAttribP3ui = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glVertexAttribP3ui")); + glVertexAttribP2uiv = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glVertexAttribP2uiv")); + glVertexAttribP2ui = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glVertexAttribP2ui")); + glVertexAttribP1uiv = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glVertexAttribP1uiv")); + glVertexAttribP1ui = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glVertexAttribP1ui")); + glVertexAttribDivisor = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glVertexAttribDivisor")); + glGetQueryObjectui64v = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glGetQueryObjectui64v")); + glGetQueryObjecti64v = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glGetQueryObjecti64v")); + glQueryCounter = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glQueryCounter")); + glGetSamplerParameterIuiv = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glGetSamplerParameterIuiv")); + glGetSamplerParameterfv = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glGetSamplerParameterfv")); + glGetSamplerParameterIiv = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glGetSamplerParameterIiv")); + glGetSamplerParameteriv = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glGetSamplerParameteriv")); + glSamplerParameterIuiv = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glSamplerParameterIuiv")); + glSamplerParameterIiv = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glSamplerParameterIiv")); + glSamplerParameterfv = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glSamplerParameterfv")); + glSamplerParameterf = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glSamplerParameterf")); + glSamplerParameteriv = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glSamplerParameteriv")); + glSamplerParameteri = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glSamplerParameteri")); + glBindSampler = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glBindSampler")); + glIsSampler = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glIsSampler")); + glDeleteSamplers = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glDeleteSamplers")); + glGenSamplers = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glGenSamplers")); + glGetFragDataIndex = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glGetFragDataIndex")); + glBindFragDataLocationIndexed = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glBindFragDataLocationIndexed")); + glBlendColor = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glBlendColor")); + glBlendEquation = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glBlendEquation")); + glGenQueries = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glGenQueries")); + glDeleteQueries = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glDeleteQueries")); + glIsQuery = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glIsQuery")); + glBeginQuery = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glBeginQuery")); + glEndQuery = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glEndQuery")); + glGetQueryiv = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glGetQueryiv")); + glGetQueryObjectiv = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glGetQueryObjectiv")); + glGetQueryObjectuiv = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glGetQueryObjectuiv")); + glBindBuffer = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glBindBuffer")); + glDeleteBuffers = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glDeleteBuffers")); + glGenBuffers = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glGenBuffers")); + glIsBuffer = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glIsBuffer")); + glBufferData = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glBufferData")); + glBufferSubData = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glBufferSubData")); + glGetBufferSubData = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glGetBufferSubData")); + glMapBuffer = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glMapBuffer")); + glUnmapBuffer = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glUnmapBuffer")); + glGetBufferParameteriv = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glGetBufferParameteriv")); + glGetBufferPointerv = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glGetBufferPointerv")); + glBlendEquationSeparate = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glBlendEquationSeparate")); + glDrawBuffers = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glDrawBuffers")); + glStencilOpSeparate = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glStencilOpSeparate")); + glStencilFuncSeparate = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glStencilFuncSeparate")); + glStencilMaskSeparate = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glStencilMaskSeparate")); + glAttachShader = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glAttachShader")); + glBindAttribLocation = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glBindAttribLocation")); + glCompileShader = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glCompileShader")); + glCreateProgram = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glCreateProgram")); + glCreateShader = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glCreateShader")); + glDeleteProgram = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glDeleteProgram")); + glDeleteShader = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glDeleteShader")); + glDetachShader = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glDetachShader")); + glDisableVertexAttribArray = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glDisableVertexAttribArray")); + glEnableVertexAttribArray = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glEnableVertexAttribArray")); + glGetActiveAttrib = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glGetActiveAttrib")); + glGetActiveUniform = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glGetActiveUniform")); + glGetAttachedShaders = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glGetAttachedShaders")); + glGetAttribLocation = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glGetAttribLocation")); + glGetProgramiv = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glGetProgramiv")); + glGetProgramInfoLog = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glGetProgramInfoLog")); + glGetShaderiv = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glGetShaderiv")); + glGetShaderInfoLog = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glGetShaderInfoLog")); + glGetShaderSource = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glGetShaderSource")); + glGetUniformLocation = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glGetUniformLocation")); + glGetUniformfv = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glGetUniformfv")); + glGetUniformiv = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glGetUniformiv")); + glGetVertexAttribdv = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glGetVertexAttribdv")); + glGetVertexAttribfv = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glGetVertexAttribfv")); + glGetVertexAttribiv = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glGetVertexAttribiv")); + glGetVertexAttribPointerv = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glGetVertexAttribPointerv")); + glIsProgram = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glIsProgram")); + glIsShader = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glIsShader")); + glLinkProgram = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glLinkProgram")); + glShaderSource = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glShaderSource")); + glUseProgram = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glUseProgram")); + glUniform1f = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glUniform1f")); + glUniform2f = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glUniform2f")); + glUniform3f = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glUniform3f")); + glUniform4f = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glUniform4f")); + glUniform1i = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glUniform1i")); + glUniform2i = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glUniform2i")); + glUniform3i = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glUniform3i")); + glUniform4i = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glUniform4i")); + glUniform1fv = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glUniform1fv")); + glUniform2fv = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glUniform2fv")); + glUniform3fv = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glUniform3fv")); + glUniform4fv = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glUniform4fv")); + glUniform1iv = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glUniform1iv")); + glUniform2iv = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glUniform2iv")); + glUniform3iv = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glUniform3iv")); + glUniform4iv = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glUniform4iv")); + glUniformMatrix2fv = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glUniformMatrix2fv")); + glUniformMatrix3fv = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glUniformMatrix3fv")); + glUniformMatrix4fv = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glUniformMatrix4fv")); + glValidateProgram = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glValidateProgram")); + glVertexAttrib1d = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glVertexAttrib1d")); + glVertexAttrib1dv = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glVertexAttrib1dv")); + glVertexAttrib1f = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glVertexAttrib1f")); + glVertexAttrib1fv = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glVertexAttrib1fv")); + glVertexAttrib1s = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glVertexAttrib1s")); + glVertexAttrib1sv = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glVertexAttrib1sv")); + glVertexAttrib2d = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glVertexAttrib2d")); + glVertexAttrib2dv = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glVertexAttrib2dv")); + glVertexAttrib2f = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glVertexAttrib2f")); + glVertexAttrib2fv = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glVertexAttrib2fv")); + glVertexAttrib2s = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glVertexAttrib2s")); + glVertexAttrib2sv = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glVertexAttrib2sv")); + glVertexAttrib3d = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glVertexAttrib3d")); + glVertexAttrib3dv = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glVertexAttrib3dv")); + glVertexAttrib3f = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glVertexAttrib3f")); + glVertexAttrib3fv = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glVertexAttrib3fv")); + glVertexAttrib3s = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glVertexAttrib3s")); + glVertexAttrib3sv = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glVertexAttrib3sv")); + glVertexAttrib4Nbv = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glVertexAttrib4Nbv")); + glVertexAttrib4Niv = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glVertexAttrib4Niv")); + glVertexAttrib4Nsv = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glVertexAttrib4Nsv")); + glVertexAttrib4Nub = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glVertexAttrib4Nub")); + glVertexAttrib4Nubv = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glVertexAttrib4Nubv")); + glVertexAttrib4Nuiv = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glVertexAttrib4Nuiv")); + glVertexAttrib4Nusv = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glVertexAttrib4Nusv")); + glVertexAttrib4bv = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glVertexAttrib4bv")); + glVertexAttrib4d = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glVertexAttrib4d")); + glVertexAttrib4dv = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glVertexAttrib4dv")); + glVertexAttrib4f = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glVertexAttrib4f")); + glVertexAttrib4fv = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glVertexAttrib4fv")); + glVertexAttrib4iv = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glVertexAttrib4iv")); + glVertexAttrib4s = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glVertexAttrib4s")); + glVertexAttrib4sv = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glVertexAttrib4sv")); + glVertexAttrib4ubv = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glVertexAttrib4ubv")); + glVertexAttrib4uiv = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glVertexAttrib4uiv")); + glVertexAttrib4usv = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glVertexAttrib4usv")); + glVertexAttribPointer = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glVertexAttribPointer")); + glUniformMatrix2x3fv = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glUniformMatrix2x3fv")); + glUniformMatrix3x2fv = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glUniformMatrix3x2fv")); + glUniformMatrix2x4fv = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glUniformMatrix2x4fv")); + glUniformMatrix4x2fv = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glUniformMatrix4x2fv")); + glUniformMatrix3x4fv = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glUniformMatrix3x4fv")); + glUniformMatrix4x3fv = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glUniformMatrix4x3fv")); + glColorMaski = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glColorMaski")); + glGetBooleani_v = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glGetBooleani_v")); + glGetIntegeri_v = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glGetIntegeri_v")); + glEnablei = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glEnablei")); + glDisablei = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glDisablei")); + glIsEnabledi = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glIsEnabledi")); + glBeginTransformFeedback = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glBeginTransformFeedback")); + glEndTransformFeedback = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glEndTransformFeedback")); + glBindBufferRange = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glBindBufferRange")); + glBindBufferBase = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glBindBufferBase")); + glTransformFeedbackVaryings = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glTransformFeedbackVaryings")); + glGetTransformFeedbackVarying = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glGetTransformFeedbackVarying")); + glClampColor = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glClampColor")); + glBeginConditionalRender = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glBeginConditionalRender")); + glEndConditionalRender = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glEndConditionalRender")); + glVertexAttribIPointer = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glVertexAttribIPointer")); + glGetVertexAttribIiv = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glGetVertexAttribIiv")); + glGetVertexAttribIuiv = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glGetVertexAttribIuiv")); + glVertexAttribI1i = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glVertexAttribI1i")); + glVertexAttribI2i = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glVertexAttribI2i")); + glVertexAttribI3i = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glVertexAttribI3i")); + glVertexAttribI4i = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glVertexAttribI4i")); + glVertexAttribI1ui = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glVertexAttribI1ui")); + glVertexAttribI2ui = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glVertexAttribI2ui")); + glVertexAttribI3ui = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glVertexAttribI3ui")); + glVertexAttribI4ui = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glVertexAttribI4ui")); + glVertexAttribI1iv = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glVertexAttribI1iv")); + glVertexAttribI2iv = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glVertexAttribI2iv")); + glVertexAttribI3iv = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glVertexAttribI3iv")); + glVertexAttribI4iv = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glVertexAttribI4iv")); + glVertexAttribI1uiv = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glVertexAttribI1uiv")); + glVertexAttribI2uiv = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glVertexAttribI2uiv")); + glVertexAttribI3uiv = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glVertexAttribI3uiv")); + glVertexAttribI4uiv = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glVertexAttribI4uiv")); + glVertexAttribI4bv = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glVertexAttribI4bv")); + glVertexAttribI4sv = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glVertexAttribI4sv")); + glVertexAttribI4ubv = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glVertexAttribI4ubv")); + glVertexAttribI4usv = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glVertexAttribI4usv")); + glGetUniformuiv = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glGetUniformuiv")); + glBindFragDataLocation = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glBindFragDataLocation")); + glGetFragDataLocation = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glGetFragDataLocation")); + glUniform1ui = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glUniform1ui")); + glUniform2ui = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glUniform2ui")); + glUniform3ui = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glUniform3ui")); + glUniform4ui = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glUniform4ui")); + glUniform1uiv = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glUniform1uiv")); + glUniform2uiv = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glUniform2uiv")); + glUniform3uiv = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glUniform3uiv")); + glUniform4uiv = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glUniform4uiv")); + glTexParameterIiv = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glTexParameterIiv")); + glTexParameterIuiv = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glTexParameterIuiv")); + glGetTexParameterIiv = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glGetTexParameterIiv")); + glGetTexParameterIuiv = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glGetTexParameterIuiv")); + glClearBufferiv = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glClearBufferiv")); + glClearBufferuiv = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glClearBufferuiv")); + glClearBufferfv = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glClearBufferfv")); + glClearBufferfi = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glClearBufferfi")); + glGetStringi = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glGetStringi")); + glIsRenderbuffer = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glIsRenderbuffer")); + glBindRenderbuffer = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glBindRenderbuffer")); + glDeleteRenderbuffers = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glDeleteRenderbuffers")); + glGenRenderbuffers = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glGenRenderbuffers")); + glRenderbufferStorage = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glRenderbufferStorage")); + glGetRenderbufferParameteriv = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glGetRenderbufferParameteriv")); + glIsFramebuffer = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glIsFramebuffer")); + glBindFramebuffer = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glBindFramebuffer")); + glDeleteFramebuffers = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glDeleteFramebuffers")); + glGenFramebuffers = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glGenFramebuffers")); + glCheckFramebufferStatus = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glCheckFramebufferStatus")); + glFramebufferTexture1D = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glFramebufferTexture1D")); + glFramebufferTexture2D = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glFramebufferTexture2D")); + glFramebufferTexture3D = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glFramebufferTexture3D")); + glFramebufferRenderbuffer = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glFramebufferRenderbuffer")); + glGetFramebufferAttachmentParameteriv = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glGetFramebufferAttachmentParameteriv")); + glGenerateMipmap = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glGenerateMipmap")); + glBlitFramebuffer = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glBlitFramebuffer")); + glRenderbufferStorageMultisample = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glRenderbufferStorageMultisample")); + glFramebufferTextureLayer = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glFramebufferTextureLayer")); + glMapBufferRange = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glMapBufferRange")); + glFlushMappedBufferRange = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glFlushMappedBufferRange")); + glBindVertexArray = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glBindVertexArray")); + glDeleteVertexArrays = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glDeleteVertexArrays")); + glGenVertexArrays = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glGenVertexArrays")); + glIsVertexArray = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glIsVertexArray")); + glDrawArraysInstanced = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glDrawArraysInstanced")); + glDrawElementsInstanced = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glDrawElementsInstanced")); + glTexBuffer = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glTexBuffer")); + glPrimitiveRestartIndex = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glPrimitiveRestartIndex")); + glCopyBufferSubData = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glCopyBufferSubData")); + glGetUniformIndices = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glGetUniformIndices")); + glGetActiveUniformsiv = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glGetActiveUniformsiv")); + glGetActiveUniformName = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glGetActiveUniformName")); + glGetUniformBlockIndex = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glGetUniformBlockIndex")); + glGetActiveUniformBlockiv = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glGetActiveUniformBlockiv")); + glGetActiveUniformBlockName = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glGetActiveUniformBlockName")); + glUniformBlockBinding = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glUniformBlockBinding")); + glDrawElementsBaseVertex = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glDrawElementsBaseVertex")); + glDrawRangeElementsBaseVertex = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glDrawRangeElementsBaseVertex")); + glDrawElementsInstancedBaseVertex = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glDrawElementsInstancedBaseVertex")); + glMultiDrawElementsBaseVertex = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glMultiDrawElementsBaseVertex")); + glProvokingVertex = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glProvokingVertex")); + glFenceSync = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glFenceSync")); + glIsSync = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glIsSync")); + glDeleteSync = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glDeleteSync")); + glClientWaitSync = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glClientWaitSync")); + glWaitSync = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glWaitSync")); + glGetInteger64v = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glGetInteger64v")); + glGetSynciv = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glGetSynciv")); + glGetInteger64i_v = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glGetInteger64i_v")); + glGetBufferParameteri64v = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glGetBufferParameteri64v")); + glFramebufferTexture = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glFramebufferTexture")); + glTexImage2DMultisample = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glTexImage2DMultisample")); + glTexImage3DMultisample = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glTexImage3DMultisample")); + glGetMultisamplefv = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glGetMultisamplefv")); + glSampleMaski = Marshal.GetDelegateForFunctionPointer(loader.Invoke("glSampleMaski")); + } + + /// + /// Checks for any issues in this OpenGL Context and throws an exception if it detects one. + /// May throw OpenGLException. + /// + private void DetectGLError() { + OpenGL.ErrorCode code = GetError(); + if (code != OpenGL.ErrorCode.NoError) { + throw new OpenGLErrorException(code); + } + } + + protected virtual void Dispose(bool disposing) + { + if (!disposed) + { + if (disposing) + { + } + SDL.SDL_GL_DeleteContext(Handle); + disposed = true; + } + } + + ~GLContext() + { + Dispose(disposing: false); + } + + public void Dispose() + { + Dispose(disposing: true); + GC.SuppressFinalize(this); + } + } +} \ No newline at end of file diff --git a/src/SlatedGameToolkit.Framework/Graphics/OpenGL/OpenGL.cs b/src/SlatedGameToolkit.Framework/Graphics/OpenGL/OpenGL.cs new file mode 100644 index 0000000..e30d441 --- /dev/null +++ b/src/SlatedGameToolkit.Framework/Graphics/OpenGL/OpenGL.cs @@ -0,0 +1,3885 @@ +using System; +using System.Runtime.InteropServices; +using System.Security; +using System.Diagnostics.CodeAnalysis; + +namespace SlatedGameToolkit.Framework.Graphics.OpenGL +{ + public delegate IntPtr GetProcAddressHandler(string funcName); + public delegate void DebugProc(int source, int type, uint id, int severity, IntPtr length, byte[] message, IntPtr userParam); + public delegate void DebugProcAMD(uint id, int category, int severity, IntPtr length, byte[] message, IntPtr userParam); + public delegate void VulkanDebugProcNV(); + + + [Flags] + public enum AttribMask : uint + { + CurrentBit = 0x00000001, + PointBit = 0x00000002, + LineBit = 0x00000004, + PolygonBit = 0x00000008, + PolygonStippleBit = 0x00000010, + PixelModeBit = 0x00000020, + LightingBit = 0x00000040, + FogBit = 0x00000080, + DepthBufferBit = 0x00000100, + AccumBufferBit = 0x00000200, + StencilBufferBit = 0x00000400, + ViewportBit = 0x00000800, + TransformBit = 0x00001000, + EnableBit = 0x00002000, + ColorBufferBit = 0x00004000, + HintBit = 0x00008000, + EvalBit = 0x00010000, + ListBit = 0x00020000, + TextureBit = 0x00040000, + ScissorBit = 0x00080000, + MultisampleBit = 0x20000000, + MultisampleBitARB = 0x20000000, + MultisampleBitEXT = 0x20000000, + MultisampleBit3DFX = 0x20000000, + AllAttribBits = 0xFFFFFFFF + } + + [Flags] + public enum BufferStorageMask : uint + { + DynamicStorageBit = 0x0100, + DynamicStorageBitEXT = 0x0100, + ClientStorageBit = 0x0200, + ClientStorageBitEXT = 0x0200, + SparseStorageBitARB = 0x0400, + LgpuSeparateStorageBitNvx = 0x0800, + PerGpuStorageBitNV = 0x0800, + ExternalStorageBitNvx = 0x2000 + } + + [Flags] + public enum ClearBufferMask : uint + { + ColorBufferBit = 0x00004000, + DepthBufferBit = 0x00000100, + AccumBufferBit = 0x00000200, + StencilBufferBit = 0x00000400, + + } + + [Flags] + public enum ClientAttribMask : uint + { + ClientPixelStoreBit = 0x00000001, + ClientVertexArrayBit = 0x00000002, + ClientAllAttribBits = 0xFFFFFFFF + } + + [Flags] + public enum ContextFlagMask : uint + { + ContextFlagForwardCompatibleBit = 0x00000001, + ContextFlagDebugBit = 0x00000002, + ContextFlagDebugBitKhr = 0x00000002, + ContextFlagRobustAccessBit = 0x00000004, + ContextFlagRobustAccessBitARB = 0x00000004, + ContextFlagNoErrorBit = 0x00000008, + ContextFlagNoErrorBitKhr = 0x00000008, + ContextFlagProtectedContentBitEXT = 0x00000010 + } + + [Flags] + public enum ContextProfileMask : uint + { + ContextCoreProfileBit = 0x00000001, + ContextCompatibilityProfileBit = 0x00000002 + } + + [Flags] + public enum MapBufferAccessMask : uint + { + MapReadBit = 0x0001, + MapReadBitEXT = 0x0001, + MapWriteBit = 0x0002, + MapWriteBitEXT = 0x0002, + MapInvalidateRangeBit = 0x0004, + MapInvalidateRangeBitEXT = 0x0004, + MapInvalidateBufferBit = 0x0008, + MapInvalidateBufferBitEXT = 0x0008, + MapFlushExplicitBit = 0x0010, + MapFlushExplicitBitEXT = 0x0010, + MapUnsynchronizedBit = 0x0020, + MapUnsynchronizedBitEXT = 0x0020, + MapPersistentBit = 0x0040, + MapPersistentBitEXT = 0x0040, + MapCoherentBit = 0x0080, + MapCoherentBitEXT = 0x0080 + } + + [Flags] + public enum MemoryBarrierMask : uint + { + VertexAttribArrayBarrierBit = 0x00000001, + VertexAttribArrayBarrierBitEXT = 0x00000001, + ElementArrayBarrierBit = 0x00000002, + ElementArrayBarrierBitEXT = 0x00000002, + UniformBarrierBit = 0x00000004, + UniformBarrierBitEXT = 0x00000004, + TextureFetchBarrierBit = 0x00000008, + TextureFetchBarrierBitEXT = 0x00000008, + ShaderGlobalAccessBarrierBitNV = 0x00000010, + ShaderImageAccessBarrierBit = 0x00000020, + ShaderImageAccessBarrierBitEXT = 0x00000020, + CommandBarrierBit = 0x00000040, + CommandBarrierBitEXT = 0x00000040, + PixelBufferBarrierBit = 0x00000080, + PixelBufferBarrierBitEXT = 0x00000080, + TextureUpdateBarrierBit = 0x00000100, + TextureUpdateBarrierBitEXT = 0x00000100, + BufferUpdateBarrierBit = 0x00000200, + BufferUpdateBarrierBitEXT = 0x00000200, + FramebufferBarrierBit = 0x00000400, + FramebufferBarrierBitEXT = 0x00000400, + TransformFeedbackBarrierBit = 0x00000800, + TransformFeedbackBarrierBitEXT = 0x00000800, + AtomicCounterBarrierBit = 0x00001000, + AtomicCounterBarrierBitEXT = 0x00001000, + ShaderStorageBarrierBit = 0x00002000, + ClientMappedBufferBarrierBit = 0x00004000, + ClientMappedBufferBarrierBitEXT = 0x00004000, + QueryBufferBarrierBit = 0x00008000, + AllBarrierBits = 0xFFFFFFFF, + AllBarrierBitsEXT = 0xFFFFFFFF + } + + [Flags] + public enum OcclusionQueryEventMaskAMD : uint + { + QueryDepthPassEventBitAMD = 0x00000001, + QueryDepthFailEventBitAMD = 0x00000002, + QueryStencilFailEventBitAMD = 0x00000004, + QueryDepthBoundsFailEventBitAMD = 0x00000008, + QueryAllEventBitsAMD = 0xFFFFFFFF + } + + [Flags] + public enum SyncObjectMask : uint + { + SyncFlushCommandsBit = 0x00000001, + SyncFlushCommandsBitAPPLE = 0x00000001 + } + + [Flags] + public enum UseProgramStageMask : uint + { + VertexShaderBit = 0x00000001, + VertexShaderBitEXT = 0x00000001, + FragmentShaderBit = 0x00000002, + FragmentShaderBitEXT = 0x00000002, + GeometryShaderBit = 0x00000004, + GeometryShaderBitEXT = 0x00000004, + GeometryShaderBitOES = 0x00000004, + TessControlShaderBit = 0x00000008, + TessControlShaderBitEXT = 0x00000008, + TessControlShaderBitOES = 0x00000008, + TessEvaluationShaderBit = 0x00000010, + TessEvaluationShaderBitEXT = 0x00000010, + TessEvaluationShaderBitOES = 0x00000010, + ComputeShaderBit = 0x00000020, + MeshShaderBitNV = 0x00000040, + TaskShaderBitNV = 0x00000080, + AllShaderBits = 0xFFFFFFFF, + AllShaderBitsEXT = 0xFFFFFFFF + } + + [Flags] + public enum TextureStorageMaskAMD : uint + { + TextureStorageSparseBitAMD = 0x00000001 + } + + [Flags] + public enum FragmentShaderDestMaskATI : uint + { + RedBitATI = 0x00000001, + GreenBitATI = 0x00000002, + BlueBitATI = 0x00000004 + } + + [Flags] + public enum FragmentShaderDestModMaskATI : uint + { + TwoXBitATI = 0x00000001, + FourXBitATI = 0x00000002, + EightXBitATI = 0x00000004, + HalfBitATI = 0x00000008, + QuarterBitATI = 0x00000010, + EighthBitATI = 0x00000020, + SaturateBitATI = 0x00000040 + } + + [Flags] + public enum FragmentShaderColorModMaskATI : uint + { + CompBitATI = 0x00000002, + NegateBitATI = 0x00000004, + BiasBitATI = 0x00000008 + } + + [Flags] + public enum TraceMaskMESA : uint + { + TraceOperationsBitMESA = 0x0001, + TracePrimitivesBitMESA = 0x0002, + TraceArraysBitMESA = 0x0004, + TraceTexturesBitMESA = 0x0008, + TracePixelsBitMESA = 0x0010, + TraceErrorsBitMESA = 0x0020, + TraceAllBitsMESA = 0xFFFF + } + + [Flags] + public enum PathRenderingMaskNV : uint + { + BoldBitNV = 0x01, + ItalicBitNV = 0x02, + GlyphWidthBitNV = 0x01, + GlyphHeightBitNV = 0x02, + GlyphHorizontalBearingXBitNV = 0x04, + GlyphHorizontalBearingYBitNV = 0x08, + GlyphHorizontalBearingAdvanceBitNV = 0x10, + GlyphVerticalBearingXBitNV = 0x20, + GlyphVerticalBearingYBitNV = 0x40, + GlyphVerticalBearingAdvanceBitNV = 0x80, + GlyphHasKerningBitNV = 0x100, + FontXMinBoundsBitNV = 0x00010000, + FontYMinBoundsBitNV = 0x00020000, + FontXMaxBoundsBitNV = 0x00040000, + FontYMaxBoundsBitNV = 0x00080000, + FontUnitsPerEmBitNV = 0x00100000, + FontAscenderBitNV = 0x00200000, + FontDescenderBitNV = 0x00400000, + FontHeightBitNV = 0x00800000, + FontMaxAdvanceWidthBitNV = 0x01000000, + FontMaxAdvanceHeightBitNV = 0x02000000, + FontUnderlinePositionBitNV = 0x04000000, + FontUnderlineThicknessBitNV = 0x08000000, + FontHasKerningBitNV = 0x10000000, + FontNumGlyphIndicesBitNV = 0x20000000 + } + + [Flags] + public enum PerformanceQueryCapsMaskINTEL : uint + { + PerfquerySingleContextINTEL = 0x00000000, + PerfqueryGlobalContextINTEL = 0x00000001 + } + + [Flags] + public enum VertexHintsMaskPGI : uint + { + Vertex23BitPGI = 0x00000004, + Vertex4BitPGI = 0x00000008, + Color3BitPGI = 0x00010000, + Color4BitPGI = 0x00020000, + EdgeflagBitPGI = 0x00040000, + IndexBitPGI = 0x00080000, + MatAmbientBitPGI = 0x00100000, + MatAmbientAndDiffuseBitPGI = 0x00200000, + MatDiffuseBitPGI = 0x00400000, + MatEmissionBitPGI = 0x00800000, + MatColorIndexesBitPGI = 0x01000000, + MatShininessBitPGI = 0x02000000, + MatSpecularBitPGI = 0x04000000, + NormalBitPGI = 0x08000000, + Texcoord1BitPGI = 0x10000000, + Texcoord2BitPGI = 0x20000000, + Texcoord3BitPGI = 0x40000000, + Texcoord4BitPGI = 0x80000000 + } + + [Flags] + public enum BufferBitQCOM : uint + { + ColorBufferBit0QCOM = 0x00000001, + ColorBufferBit1QCOM = 0x00000002, + ColorBufferBit2QCOM = 0x00000004, + ColorBufferBit3QCOM = 0x00000008, + ColorBufferBit4QCOM = 0x00000010, + ColorBufferBit5QCOM = 0x00000020, + ColorBufferBit6QCOM = 0x00000040, + ColorBufferBit7QCOM = 0x00000080, + DepthBufferBit0QCOM = 0x00000100, + DepthBufferBit1QCOM = 0x00000200, + DepthBufferBit2QCOM = 0x00000400, + DepthBufferBit3QCOM = 0x00000800, + DepthBufferBit4QCOM = 0x00001000, + DepthBufferBit5QCOM = 0x00002000, + DepthBufferBit6QCOM = 0x00004000, + DepthBufferBit7QCOM = 0x00008000, + StencilBufferBit0QCOM = 0x00010000, + StencilBufferBit1QCOM = 0x00020000, + StencilBufferBit2QCOM = 0x00040000, + StencilBufferBit3QCOM = 0x00080000, + StencilBufferBit4QCOM = 0x00100000, + StencilBufferBit5QCOM = 0x00200000, + StencilBufferBit6QCOM = 0x00400000, + StencilBufferBit7QCOM = 0x00800000, + MultisampleBufferBit0QCOM = 0x01000000, + MultisampleBufferBit1QCOM = 0x02000000, + MultisampleBufferBit2QCOM = 0x04000000, + MultisampleBufferBit3QCOM = 0x08000000, + MultisampleBufferBit4QCOM = 0x10000000, + MultisampleBufferBit5QCOM = 0x20000000, + MultisampleBufferBit6QCOM = 0x40000000, + MultisampleBufferBit7QCOM = 0x80000000 + } + + [Flags] + public enum FoveationConfigBitQCOM : uint + { + FoveationEnableBitQCOM = 0x00000001, + FoveationScaledBinMethodBitQCOM = 0x00000002, + FoveationSubsampledLayoutMethodBitQCOM = 0x00000004 + } + + [Flags] + public enum FfdMaskSGIX : uint + { + TextureDeformationBitSGIX = 0x00000001, + GeometryDeformationBitSGIX = 0x00000002 + } + + public enum CommandOpcodesNV + { + TerminateSequenceCommandNV = 0x0000, + NopCommandNV = 0x0001, + DrawElementsCommandNV = 0x0002, + DrawArraysCommandNV = 0x0003, + DrawElementsStripCommandNV = 0x0004, + DrawArraysStripCommandNV = 0x0005, + DrawElementsInstancedCommandNV = 0x0006, + DrawArraysInstancedCommandNV = 0x0007, + ElementAddressCommandNV = 0x0008, + AttributeAddressCommandNV = 0x0009, + UniformAddressCommandNV = 0x000A, + BlendColorCommandNV = 0x000B, + StencilRefCommandNV = 0x000C, + LineWidthCommandNV = 0x000D, + PolygonOffsetCommandNV = 0x000E, + AlphaRefCommandNV = 0x000F, + ViewportCommandNV = 0x0010, + ScissorCommandNV = 0x0011, + FrontFaceCommandNV = 0x0012 + } + + public enum MapTextureFormatINTEL + { + LayoutDefaultINTEL = 0, + LayoutLinearINTEL = 1, + LayoutLinearCpuCachedINTEL = 2 + } + + public enum PathRenderingTokenNV + { + ClosePathNV = 0x00, + MoveToNV = 0x02, + RelativeMoveToNV = 0x03, + LineToNV = 0x04, + RelativeLineToNV = 0x05, + HorizontalLineToNV = 0x06, + RelativeHorizontalLineToNV = 0x07, + VerticalLineToNV = 0x08, + RelativeVerticalLineToNV = 0x09, + QuadraticCurveToNV = 0x0A, + RelativeQuadraticCurveToNV = 0x0B, + CubicCurveToNV = 0x0C, + RelativeCubicCurveToNV = 0x0D, + SmoothQuadraticCurveToNV = 0x0E, + RelativeSmoothQuadraticCurveToNV = 0x0F, + SmoothCubicCurveToNV = 0x10, + RelativeSmoothCubicCurveToNV = 0x11, + SmallCcwArcToNV = 0x12, + RelativeSmallCcwArcToNV = 0x13, + SmallCwArcToNV = 0x14, + RelativeSmallCwArcToNV = 0x15, + LargeCcwArcToNV = 0x16, + RelativeLargeCcwArcToNV = 0x17, + LargeCwArcToNV = 0x18, + RelativeLargeCwArcToNV = 0x19, + ConicCurveToNV = 0x1A, + RelativeConicCurveToNV = 0x1B, + SharedEdgeNV = 0xC0, + RoundedRectNV = 0xE8, + RelativeRoundedRectNV = 0xE9, + RoundedRect2NV = 0xEA, + RelativeRoundedRect2NV = 0xEB, + RoundedRect4NV = 0xEC, + RelativeRoundedRect4NV = 0xED, + RoundedRect8NV = 0xEE, + RelativeRoundedRect8NV = 0xEF, + RestartPathNV = 0xF0, + DupFirstCubicCurveToNV = 0xF2, + DupLastCubicCurveToNV = 0xF4, + RectNV = 0xF6, + RelativeRectNV = 0xF7, + CircularCcwArcToNV = 0xF8, + CircularCwArcToNV = 0xFA, + CircularTangentArcToNV = 0xFC, + ArcToNV = 0xFE, + RelativeArcToNV = 0xFF + } + + public enum TransformFeedbackTokenNV + { + NextBufferNV = -2, + SkipComponents4NV = -3, + SkipComponents3NV = -4, + SkipComponents2NV = -5, + SkipComponents1NV = -6 + } + + public enum TriangleListSUN + { + RestartSUN = 0x0001, + ReplaceMiddleSUN = 0x0002, + ReplaceOldestSUN = 0x0003 + } + + public enum RegisterCombinerPname + { + Combine = 0x8570, + CombineARB = 0x8570, + CombineEXT = 0x8570, + CombineRgb = 0x8571, + CombineRgbARB = 0x8571, + CombineRgbEXT = 0x8571, + CombineAlpha = 0x8572, + CombineAlphaARB = 0x8572, + CombineAlphaEXT = 0x8572, + RgbScale = 0x8573, + RgbScaleARB = 0x8573, + RgbScaleEXT = 0x8573, + AddSigned = 0x8574, + AddSignedARB = 0x8574, + AddSignedEXT = 0x8574, + Interpolate = 0x8575, + InterpolateARB = 0x8575, + InterpolateEXT = 0x8575, + Constant = 0x8576, + ConstantARB = 0x8576, + ConstantEXT = 0x8576, + ConstantNV = 0x8576, + PrimaryColor = 0x8577, + PrimaryColorARB = 0x8577, + PrimaryColorEXT = 0x8577, + Previous = 0x8578, + PreviousARB = 0x8578, + PreviousEXT = 0x8578, + Source0Rgb = 0x8580, + Source0RgbARB = 0x8580, + Source0RgbEXT = 0x8580, + Src0Rgb = 0x8580, + Source1Rgb = 0x8581, + Source1RgbARB = 0x8581, + Source1RgbEXT = 0x8581, + Src1Rgb = 0x8581, + Source2Rgb = 0x8582, + Source2RgbARB = 0x8582, + Source2RgbEXT = 0x8582, + Src2Rgb = 0x8582, + Source3RgbNV = 0x8583, + Source0Alpha = 0x8588, + Source0AlphaARB = 0x8588, + Source0AlphaEXT = 0x8588, + Src0Alpha = 0x8588, + Source1Alpha = 0x8589, + Source1AlphaARB = 0x8589, + Source1AlphaEXT = 0x8589, + Src1Alpha = 0x8589, + Src1AlphaEXT = 0x8589, + Source2Alpha = 0x858A, + Source2AlphaARB = 0x858A, + Source2AlphaEXT = 0x858A, + Src2Alpha = 0x858A, + Source3AlphaNV = 0x858B, + Operand0Rgb = 0x8590, + Operand0RgbARB = 0x8590, + Operand0RgbEXT = 0x8590, + Operand1Rgb = 0x8591, + Operand1RgbARB = 0x8591, + Operand1RgbEXT = 0x8591, + Operand2Rgb = 0x8592, + Operand2RgbARB = 0x8592, + Operand2RgbEXT = 0x8592, + Operand3RgbNV = 0x8593, + Operand0Alpha = 0x8598, + Operand0AlphaARB = 0x8598, + Operand0AlphaEXT = 0x8598, + Operand1Alpha = 0x8599, + Operand1AlphaARB = 0x8599, + Operand1AlphaEXT = 0x8599, + Operand2Alpha = 0x859A, + Operand2AlphaARB = 0x859A, + Operand2AlphaEXT = 0x859A, + Operand3AlphaNV = 0x859B + } + + public enum ShaderType + { + FragmentShader = 0x8B30, + FragmentShaderARB = 0x8B30, + VertexShader = 0x8B31, + VertexShaderARB = 0x8B31 + } + + public enum ContainerType + { + ProgramObjectARB = 0x8B40, + ProgramObjectEXT = 0x8B40 + } + + public enum AttributeType + { + FloatVec2 = 0x8B50, + FloatVec2ARB = 0x8B50, + FloatVec3 = 0x8B51, + FloatVec3ARB = 0x8B51, + FloatVec4 = 0x8B52, + FloatVec4ARB = 0x8B52, + IntVec2 = 0x8B53, + IntVec2ARB = 0x8B53, + IntVec3 = 0x8B54, + IntVec3ARB = 0x8B54, + IntVec4 = 0x8B55, + IntVec4ARB = 0x8B55, + Bool = 0x8B56, + BoolARB = 0x8B56, + BoolVec2 = 0x8B57, + BoolVec2ARB = 0x8B57, + BoolVec3 = 0x8B58, + BoolVec3ARB = 0x8B58, + BoolVec4 = 0x8B59, + BoolVec4ARB = 0x8B59, + FloatMat2 = 0x8B5A, + FloatMat2ARB = 0x8B5A, + FloatMat3 = 0x8B5B, + FloatMat3ARB = 0x8B5B, + FloatMat4 = 0x8B5C, + FloatMat4ARB = 0x8B5C, + Sampler1D = 0x8B5D, + Sampler1DARB = 0x8B5D, + Sampler2D = 0x8B5E, + Sampler2DARB = 0x8B5E, + Sampler3D = 0x8B5F, + Sampler3DARB = 0x8B5F, + Sampler3DOES = 0x8B5F, + SamplerCube = 0x8B60, + SamplerCubeARB = 0x8B60, + Sampler1DShadow = 0x8B61, + Sampler1DShadowARB = 0x8B61, + Sampler2DShadow = 0x8B62, + Sampler2DShadowARB = 0x8B62, + Sampler2DShadowEXT = 0x8B62, + Sampler2DRect = 0x8B63, + Sampler2DRectARB = 0x8B63, + Sampler2DRectShadow = 0x8B64, + Sampler2DRectShadowARB = 0x8B64, + FloatMat2x3 = 0x8B65, + FloatMat2x3NV = 0x8B65, + FloatMat2x4 = 0x8B66, + FloatMat2x4NV = 0x8B66, + FloatMat3x2 = 0x8B67, + FloatMat3x2NV = 0x8B67, + FloatMat3x4 = 0x8B68, + FloatMat3x4NV = 0x8B68, + FloatMat4x2 = 0x8B69, + FloatMat4x2NV = 0x8B69, + FloatMat4x3 = 0x8B6A, + FloatMat4x3NV = 0x8B6A + } + public enum AccumOp + { + Accum = 0x0100, + Load = 0x0101, + Return = 0x0102, + Mult = 0x0103, + Add = 0x0104, + } + + public enum AlphaFunction + { + Always = 0x0207, + Equal = 0x0202, + Gequal = 0x0206, + Greater = 0x0204, + Lequal = 0x0203, + Less = 0x0201, + Never = 0x0200, + Notequal = 0x0205, + } + + public enum BlendEquationModeEXT + { + AlphaMaxSGIX = 0x8321, + AlphaMinSGIX = 0x8320, + FuncAdd = 0x8006, + FuncAddEXT = 0x8006, + FuncReverseSubtract = 0x800B, + FuncReverseSubtractEXT = 0x800B, + FuncSubtract = 0x800A, + FuncSubtractEXT = 0x800A, + Max = 0x8008, + MaxEXT = 0x8008, + Min = 0x8007, + MinEXT = 0x8007, + } + + public enum Boolean + { + False = 0, + True = 1, + } + + public enum BufferTargetARB + { + ArrayBuffer = 0x8892, + AtomicCounterBuffer = 0x92C0, + CopyReadBuffer = 0x8F36, + CopyWriteBuffer = 0x8F37, + DispatchIndirectBuffer = 0x90EE, + DrawIndirectBuffer = 0x8F3F, + ElementArrayBuffer = 0x8893, + PixelPackBuffer = 0x88EB, + PixelUnpackBuffer = 0x88EC, + QueryBuffer = 0x9192, + ShaderStorageBuffer = 0x90D2, + TextureBuffer = 0x8C2A, + TransformFeedbackBuffer = 0x8C8E, + UniformBuffer = 0x8A11, + ParameterBuffer = 0x80EE, + } + + public enum BufferUsageARB + { + StreamDraw = 0x88E0, + StreamRead = 0x88E1, + StreamCopy = 0x88E2, + StaticDraw = 0x88E4, + StaticRead = 0x88E5, + StaticCopy = 0x88E6, + DynamicDraw = 0x88E8, + DynamicRead = 0x88E9, + DynamicCopy = 0x88EA, + } + + public enum BufferAccessARB + { + ReadOnly = 0x88B8, + WriteOnly = 0x88B9, + ReadWrite = 0x88BA, + } + + public enum ClipPlaneName + { + ClipDistance0 = 0x3000, + ClipDistance1 = 0x3001, + ClipDistance2 = 0x3002, + ClipDistance3 = 0x3003, + ClipDistance4 = 0x3004, + ClipDistance5 = 0x3005, + ClipDistance6 = 0x3006, + ClipDistance7 = 0x3007, + ClipPlane0 = 0x3000, + ClipPlane1 = 0x3001, + ClipPlane2 = 0x3002, + ClipPlane3 = 0x3003, + ClipPlane4 = 0x3004, + ClipPlane5 = 0x3005, + } + + public enum ColorMaterialFace + { + Back = 0x0405, + Front = 0x0404, + FrontAndBack = 0x0408, + } + + public enum ColorMaterialParameter + { + Ambient = 0x1200, + AmbientAndDiffuse = 0x1602, + Diffuse = 0x1201, + Emission = 0x1600, + Specular = 0x1202, + } + + public enum ColorPointerType + { + Byte = 0x1400, + Double = 0x140A, + Float = 0x1406, + Int = 0x1404, + Short = 0x1402, + UnsignedByte = 0x1401, + UnsignedInt = 0x1405, + UnsignedShort = 0x1403, + } + + public enum ColorTableParameterPNameSGI + { + ColorTableBias = 0x80D7, + ColorTableBiasSGI = 0x80D7, + ColorTableScale = 0x80D6, + ColorTableScaleSGI = 0x80D6, + } + + public enum ColorTableTargetSGI + { + ColorTable = 0x80D0, + ColorTableSGI = 0x80D0, + PostColorMatrixColorTable = 0x80D2, + PostColorMatrixColorTableSGI = 0x80D2, + PostConvolutionColorTable = 0x80D1, + PostConvolutionColorTableSGI = 0x80D1, + ProxyColorTable = 0x80D3, + ProxyColorTableSGI = 0x80D3, + ProxyPostColorMatrixColorTable = 0x80D5, + ProxyPostColorMatrixColorTableSGI = 0x80D5, + ProxyPostConvolutionColorTable = 0x80D4, + ProxyPostConvolutionColorTableSGI = 0x80D4, + ProxyTextureColorTableSGI = 0x80BD, + TextureColorTableSGI = 0x80BC, + } + + public enum ConvolutionBorderModeEXT + { + Reduce = 0x8016, + ReduceEXT = 0x8016, + } + + public enum ConvolutionParameterEXT + { + ConvolutionBorderMode = 0x8013, + ConvolutionBorderModeEXT = 0x8013, + ConvolutionFilterBias = 0x8015, + ConvolutionFilterBiasEXT = 0x8015, + ConvolutionFilterScale = 0x8014, + ConvolutionFilterScaleEXT = 0x8014, + } + + public enum ConvolutionTargetEXT + { + Convolution1D = 0x8010, + Convolution1DEXT = 0x8010, + Convolution2D = 0x8011, + Convolution2DEXT = 0x8011, + } + + public enum CullFaceMode + { + Back = 0x0405, + Front = 0x0404, + FrontAndBack = 0x0408, + } + + public enum DataType + { + } + + public enum DepthFunction + { + Always = 0x0207, + Equal = 0x0202, + Gequal = 0x0206, + Greater = 0x0204, + Lequal = 0x0203, + Less = 0x0201, + Never = 0x0200, + Notequal = 0x0205, + } + + public enum DrawBufferMode + { + Aux0 = 0x0409, + Aux1 = 0x040A, + Aux2 = 0x040B, + Aux3 = 0x040C, + Back = 0x0405, + BackLeft = 0x0402, + BackRight = 0x0403, + Front = 0x0404, + FrontAndBack = 0x0408, + FrontLeft = 0x0400, + FrontRight = 0x0401, + Left = 0x0406, + None = 0, + NoneOES = 0, + Right = 0x0407, + } + + public enum DrawElementsType + { + UnsignedByte = 0x1401, + UnsignedShort = 0x1403, + UnsignedInt = 0x1405, + } + + public enum EnableCap + { + AlphaTest = 0x0BC0, + AsyncDrawPixelsSGIX = 0x835D, + AsyncHistogramSGIX = 0x832C, + AsyncReadPixelsSGIX = 0x835E, + AsyncTexImageSGIX = 0x835C, + AutoNormal = 0x0D80, + Blend = 0x0BE2, + CalligraphicFragmentSGIX = 0x8183, + ClipPlane0 = 0x3000, + ClipPlane1 = 0x3001, + ClipPlane2 = 0x3002, + ClipPlane3 = 0x3003, + ClipPlane4 = 0x3004, + ClipPlane5 = 0x3005, + ColorArray = 0x8076, + ColorLogicOp = 0x0BF2, + ColorMaterial = 0x0B57, + ColorTableSGI = 0x80D0, + Convolution1DEXT = 0x8010, + Convolution2DEXT = 0x8011, + CullFace = 0x0B44, + DebugOutput = 0x92E0, + DebugOutputSynchronous = 0x8242, + DepthClamp = 0x864F, + DepthTest = 0x0B71, + Dither = 0x0BD0, + EdgeFlagArray = 0x8079, + Fog = 0x0B60, + FogOffsetSGIX = 0x8198, + FragmentColorMaterialSGIX = 0x8401, + FragmentLight0SGIX = 0x840C, + FragmentLight1SGIX = 0x840D, + FragmentLight2SGIX = 0x840E, + FragmentLight3SGIX = 0x840F, + FragmentLight4SGIX = 0x8410, + FragmentLight5SGIX = 0x8411, + FragmentLight6SGIX = 0x8412, + FragmentLight7SGIX = 0x8413, + FragmentLightingSGIX = 0x8400, + FramebufferSrgb = 0x8DB9, + FramezoomSGIX = 0x818B, + HistogramEXT = 0x8024, + IndexArray = 0x8077, + IndexLogicOp = 0x0BF1, + InterlaceSGIX = 0x8094, + IrInstrument1SGIX = 0x817F, + Light0 = 0x4000, + Light1 = 0x4001, + Light2 = 0x4002, + Light3 = 0x4003, + Light4 = 0x4004, + Light5 = 0x4005, + Light6 = 0x4006, + Light7 = 0x4007, + Lighting = 0x0B50, + LineSmooth = 0x0B20, + LineStipple = 0x0B24, + Map1Color4 = 0x0D90, + Map1Index = 0x0D91, + Map1Normal = 0x0D92, + Map1TextureCoord1 = 0x0D93, + Map1TextureCoord2 = 0x0D94, + Map1TextureCoord3 = 0x0D95, + Map1TextureCoord4 = 0x0D96, + Map1Vertex3 = 0x0D97, + Map1Vertex4 = 0x0D98, + Map2Color4 = 0x0DB0, + Map2Index = 0x0DB1, + Map2Normal = 0x0DB2, + Map2TextureCoord1 = 0x0DB3, + Map2TextureCoord2 = 0x0DB4, + Map2TextureCoord3 = 0x0DB5, + Map2TextureCoord4 = 0x0DB6, + Map2Vertex3 = 0x0DB7, + Map2Vertex4 = 0x0DB8, + MinmaxEXT = 0x802E, + Multisample = 0x809D, + MultisampleSgis = 0x809D, + Normalize = 0x0BA1, + NormalArray = 0x8075, + PixelTextureSgis = 0x8353, + PixelTexGenSGIX = 0x8139, + PointSmooth = 0x0B10, + PolygonOffsetFill = 0x8037, + PolygonOffsetLine = 0x2A02, + PolygonOffsetPoint = 0x2A01, + PolygonSmooth = 0x0B41, + PolygonStipple = 0x0B42, + PostColorMatrixColorTableSGI = 0x80D2, + PostConvolutionColorTableSGI = 0x80D1, + PrimitiveRestart = 0x8F9D, + PrimitiveRestartFixedIndex = 0x8D69, + ProgramPointSize = 0x8642, + RasterizerDiscard = 0x8C89, + ReferencePlaneSGIX = 0x817D, + RescaleNormalEXT = 0x803A, + SampleAlphaToCoverage = 0x809E, + SampleAlphaToMaskSgis = 0x809E, + SampleAlphaToOne = 0x809F, + SampleAlphaToOneSgis = 0x809F, + SampleCoverage = 0x80A0, + SampleMask = 0x8E51, + SampleMaskSgis = 0x80A0, + SampleShading = 0x8C36, + ScissorTest = 0x0C11, + Separable2DEXT = 0x8012, + SharedTexturePaletteEXT = 0x81FB, + SpriteSGIX = 0x8148, + StencilTest = 0x0B90, + Texture1D = 0x0DE0, + Texture2D = 0x0DE1, + Texture3DEXT = 0x806F, + Texture4dSgis = 0x8134, + TextureColorTableSGI = 0x80BC, + TextureCoordArray = 0x8078, + TextureCubeMapSeamless = 0x884F, + TextureGenQ = 0x0C63, + TextureGenR = 0x0C62, + TextureGenS = 0x0C60, + TextureGenT = 0x0C61, + VertexArray = 0x8074, + } + + public enum ErrorCode + { + InvalidEnum = 0x0500, + InvalidFramebufferOperation = 0x0506, + InvalidFramebufferOperationEXT = 0x0506, + InvalidFramebufferOperationOES = 0x0506, + InvalidOperation = 0x0502, + InvalidValue = 0x0501, + NoError = 0, + OutOfMemory = 0x0505, + StackOverflow = 0x0503, + StackUnderflow = 0x0504, + TableTooLarge = 0x8031, + TableTooLargeEXT = 0x8031, + TextureTooLargeEXT = 0x8065, + } + + public enum ExternalHandleType + { + HandleTypeOpaqueFdEXT = 0x9586, + HandleTypeOpaqueWin32EXT = 0x9587, + HandleTypeOpaqueWin32KmtEXT = 0x9588, + HandleTypeD3d12TilepoolEXT = 0x9589, + HandleTypeD3d12ResourceEXT = 0x958A, + HandleTypeD3d11ImageEXT = 0x958B, + HandleTypeD3d11ImageKmtEXT = 0x958C, + HandleTypeD3d12FenceEXT = 0x9594, + } + + public enum FeedbackType + { + Feedback2D = 0x0600, + Feedback3D = 0x0601, + Feedback3DColor = 0x0602, + Feedback3DColorTexture = 0x0603, + Feedback4dColorTexture = 0x0604, + } + + public enum FeedBackToken + { + BitmapToken = 0x0704, + CopyPixelToken = 0x0706, + DrawPixelToken = 0x0705, + LineResetToken = 0x0707, + LineToken = 0x0702, + PassThroughToken = 0x0700, + PointToken = 0x0701, + PolygonToken = 0x0703, + } + + public enum FfdTargetSGIX + { + GeometryDeformationSGIX = 0x8194, + TextureDeformationSGIX = 0x8195, + } + + public enum FogCoordinatePointerType + { + Float = 0x1406, + Double = 0x140A, + } + + public enum FogMode + { + Exp = 0x0800, + Exp2 = 0x0801, + FogFuncSgis = 0x812A, + Linear = 0x2601, + } + + public enum FogParameter + { + FogColor = 0x0B66, + FogDensity = 0x0B62, + FogEnd = 0x0B64, + FogIndex = 0x0B61, + FogMode = 0x0B65, + FogOffsetValueSGIX = 0x8199, + FogStart = 0x0B63, + } + + public enum FogPointerTypeEXT + { + Float = 0x1406, + Double = 0x140A, + } + + public enum FogPointerTypeIBM + { + Float = 0x1406, + Double = 0x140A, + } + + public enum FragmentLightModelParameterSGIX + { + FragmentLightModelAmbientSGIX = 0x840A, + FragmentLightModelLocalViewerSGIX = 0x8408, + FragmentLightModelNormalInterpolationSGIX = 0x840B, + FragmentLightModelTwoSideSGIX = 0x8409, + } + + public enum FramebufferFetchNoncoherent + { + FramebufferFetchNoncoherentQCOM = 0x96A2, + } + + public enum FrontFaceDirection + { + Ccw = 0x0901, + Cw = 0x0900, + } + + public enum GetColorTableParameterPNameSGI + { + ColorTableAlphaSizeSGI = 0x80DD, + ColorTableBiasSGI = 0x80D7, + ColorTableBlueSizeSGI = 0x80DC, + ColorTableFormatSGI = 0x80D8, + ColorTableGreenSizeSGI = 0x80DB, + ColorTableIntensitySizeSGI = 0x80DF, + ColorTableLuminanceSizeSGI = 0x80DE, + ColorTableRedSizeSGI = 0x80DA, + ColorTableScaleSGI = 0x80D6, + ColorTableWidthSGI = 0x80D9, + ColorTableBias = 0x80D7, + ColorTableScale = 0x80D6, + ColorTableFormat = 0x80D8, + ColorTableWidth = 0x80D9, + ColorTableRedSize = 0x80DA, + ColorTableGreenSize = 0x80DB, + ColorTableBlueSize = 0x80DC, + ColorTableAlphaSize = 0x80DD, + ColorTableLuminanceSize = 0x80DE, + ColorTableIntensitySize = 0x80DF, + } + + public enum GetConvolutionParameter + { + ConvolutionBorderModeEXT = 0x8013, + ConvolutionFilterBiasEXT = 0x8015, + ConvolutionFilterScaleEXT = 0x8014, + ConvolutionFormatEXT = 0x8017, + ConvolutionHeightEXT = 0x8019, + ConvolutionWidthEXT = 0x8018, + MaxConvolutionHeightEXT = 0x801B, + MaxConvolutionWidthEXT = 0x801A, + ConvolutionBorderMode = 0x8013, + ConvolutionBorderColor = 0x8154, + ConvolutionFilterScale = 0x8014, + ConvolutionFilterBias = 0x8015, + ConvolutionFormat = 0x8017, + ConvolutionWidth = 0x8018, + ConvolutionHeight = 0x8019, + MaxConvolutionWidth = 0x801A, + MaxConvolutionHeight = 0x801B, + } + + public enum GetHistogramParameterPNameEXT + { + HistogramAlphaSizeEXT = 0x802B, + HistogramBlueSizeEXT = 0x802A, + HistogramFormatEXT = 0x8027, + HistogramGreenSizeEXT = 0x8029, + HistogramLuminanceSizeEXT = 0x802C, + HistogramRedSizeEXT = 0x8028, + HistogramSinkEXT = 0x802D, + HistogramWidthEXT = 0x8026, + HistogramWidth = 0x8026, + HistogramFormat = 0x8027, + HistogramRedSize = 0x8028, + HistogramGreenSize = 0x8029, + HistogramBlueSize = 0x802A, + HistogramAlphaSize = 0x802B, + HistogramLuminanceSize = 0x802C, + HistogramSink = 0x802D, + } + + public enum GetMapQuery + { + Coeff = 0x0A00, + Domain = 0x0A02, + Order = 0x0A01, + } + + public enum GetMinmaxParameterPNameEXT + { + MinmaxFormat = 0x802F, + MinmaxFormatEXT = 0x802F, + MinmaxSink = 0x8030, + MinmaxSinkEXT = 0x8030, + } + + public enum GetPixelMap + { + PixelMapAToA = 0x0C79, + PixelMapBToB = 0x0C78, + PixelMapGToG = 0x0C77, + PixelMapIToA = 0x0C75, + PixelMapIToB = 0x0C74, + PixelMapIToG = 0x0C73, + PixelMapIToI = 0x0C70, + PixelMapIToR = 0x0C72, + PixelMapRToR = 0x0C76, + PixelMapSToS = 0x0C71, + } + + public enum GetPName + { + AccumAlphaBits = 0x0D5B, + AccumBlueBits = 0x0D5A, + AccumClearValue = 0x0B80, + AccumGreenBits = 0x0D59, + AccumRedBits = 0x0D58, + ActiveTexture = 0x84E0, + AliasedLineWidthRange = 0x846E, + AliasedPointSizeRange = 0x846D, + AlphaBias = 0x0D1D, + AlphaBits = 0x0D55, + AlphaScale = 0x0D1C, + AlphaTest = 0x0BC0, + AlphaTestFunc = 0x0BC1, + AlphaTestFuncQCOM = 0x0BC1, + AlphaTestQCOM = 0x0BC0, + AlphaTestRef = 0x0BC2, + AlphaTestRefQCOM = 0x0BC2, + ArrayBufferBinding = 0x8894, + AsyncDrawPixelsSGIX = 0x835D, + AsyncHistogramSGIX = 0x832C, + AsyncMarkerSGIX = 0x8329, + AsyncReadPixelsSGIX = 0x835E, + AsyncTexImageSGIX = 0x835C, + AttribStackDepth = 0x0BB0, + AutoNormal = 0x0D80, + AuxBuffers = 0x0C00, + Blend = 0x0BE2, + BlendColor = 0x8005, + BlendColorEXT = 0x8005, + BlendDst = 0x0BE0, + BlendDstAlpha = 0x80CA, + BlendDstRgb = 0x80C8, + BlendEquationAlpha = 0x883D, + BlendEquationEXT = 0x8009, + BlendEquationRgb = 0x8009, + BlendSrc = 0x0BE1, + BlendSrcAlpha = 0x80CB, + BlendSrcRgb = 0x80C9, + BlueBias = 0x0D1B, + BlueBits = 0x0D54, + BlueScale = 0x0D1A, + CalligraphicFragmentSGIX = 0x8183, + ClientAttribStackDepth = 0x0BB1, + ClipPlane0 = 0x3000, + ClipPlane1 = 0x3001, + ClipPlane2 = 0x3002, + ClipPlane3 = 0x3003, + ClipPlane4 = 0x3004, + ClipPlane5 = 0x3005, + ColorArray = 0x8076, + ColorArrayCountEXT = 0x8084, + ColorArraySize = 0x8081, + ColorArrayStride = 0x8083, + ColorArrayType = 0x8082, + ColorClearValue = 0x0C22, + ColorLogicOp = 0x0BF2, + ColorMaterial = 0x0B57, + ColorMaterialFace = 0x0B55, + ColorMaterialParameter = 0x0B56, + ColorMatrixSGI = 0x80B1, + ColorMatrixStackDepthSGI = 0x80B2, + ColorTableSGI = 0x80D0, + ColorWritemask = 0x0C23, + CompressedTextureFormats = 0x86A3, + ContextFlags = 0x821E, + Convolution1DEXT = 0x8010, + Convolution2DEXT = 0x8011, + ConvolutionHintSGIX = 0x8316, + CullFace = 0x0B44, + CullFaceMode = 0x0B45, + CurrentColor = 0x0B00, + CurrentIndex = 0x0B01, + CurrentNormal = 0x0B02, + CurrentProgram = 0x8B8D, + CurrentRasterColor = 0x0B04, + CurrentRasterDistance = 0x0B09, + CurrentRasterIndex = 0x0B05, + CurrentRasterPosition = 0x0B07, + CurrentRasterPositionValid = 0x0B08, + CurrentRasterTextureCoords = 0x0B06, + CurrentTextureCoords = 0x0B03, + DebugGroupStackDepth = 0x826D, + DeformationsMaskSGIX = 0x8196, + DepthBias = 0x0D1F, + DepthBits = 0x0D56, + DepthClearValue = 0x0B73, + DepthFunc = 0x0B74, + DepthRange = 0x0B70, + DepthScale = 0x0D1E, + DepthTest = 0x0B71, + DepthWritemask = 0x0B72, + DetailTexture2DBindingSgis = 0x8096, + DeviceLuidEXT = 0x9599, + DeviceNodeMaskEXT = 0x959A, + DeviceUuidEXT = 0x9597, + DispatchIndirectBufferBinding = 0x90EF, + DistanceAttenuationSgis = 0x8129, + Dither = 0x0BD0, + Doublebuffer = 0x0C32, + DrawBuffer = 0x0C01, + DrawBufferEXT = 0x0C01, + DrawFramebufferBinding = 0x8CA6, + DriverUuidEXT = 0x9598, + EdgeFlag = 0x0B43, + EdgeFlagArray = 0x8079, + EdgeFlagArrayCountEXT = 0x808D, + EdgeFlagArrayStride = 0x808C, + ElementArrayBufferBinding = 0x8895, + FeedbackBufferSize = 0x0DF1, + FeedbackBufferType = 0x0DF2, + Fog = 0x0B60, + FogColor = 0x0B66, + FogDensity = 0x0B62, + FogEnd = 0x0B64, + FogFuncPointsSgis = 0x812B, + FogHint = 0x0C54, + FogIndex = 0x0B61, + FogMode = 0x0B65, + FogOffsetSGIX = 0x8198, + FogOffsetValueSGIX = 0x8199, + FogStart = 0x0B63, + FragmentColorMaterialFaceSGIX = 0x8402, + FragmentColorMaterialParameterSGIX = 0x8403, + FragmentColorMaterialSGIX = 0x8401, + FragmentLight0SGIX = 0x840C, + FragmentLightingSGIX = 0x8400, + FragmentLightModelAmbientSGIX = 0x840A, + FragmentLightModelLocalViewerSGIX = 0x8408, + FragmentLightModelNormalInterpolationSGIX = 0x840B, + FragmentLightModelTwoSideSGIX = 0x8409, + FragmentShaderDerivativeHint = 0x8B8B, + FramezoomFactorSGIX = 0x818C, + FramezoomSGIX = 0x818B, + FrontFace = 0x0B46, + GenerateMipmapHintSgis = 0x8192, + GreenBias = 0x0D19, + GreenBits = 0x0D53, + GreenScale = 0x0D18, + HistogramEXT = 0x8024, + ImplementationColorReadFormat = 0x8B9B, + ImplementationColorReadType = 0x8B9A, + IndexArray = 0x8077, + IndexArrayCountEXT = 0x8087, + IndexArrayStride = 0x8086, + IndexArrayType = 0x8085, + IndexBits = 0x0D51, + IndexClearValue = 0x0C20, + IndexLogicOp = 0x0BF1, + IndexMode = 0x0C30, + IndexOffset = 0x0D13, + IndexShift = 0x0D12, + IndexWritemask = 0x0C21, + InstrumentMeasurementsSGIX = 0x8181, + InterlaceSGIX = 0x8094, + IrInstrument1SGIX = 0x817F, + LayerProvokingVertex = 0x825E, + Light0 = 0x4000, + Light1 = 0x4001, + Light2 = 0x4002, + Light3 = 0x4003, + Light4 = 0x4004, + Light5 = 0x4005, + Light6 = 0x4006, + Light7 = 0x4007, + Lighting = 0x0B50, + LightEnvModeSGIX = 0x8407, + LightModelAmbient = 0x0B53, + LightModelColorControl = 0x81F8, + LightModelLocalViewer = 0x0B51, + LightModelTwoSide = 0x0B52, + LineSmooth = 0x0B20, + LineSmoothHint = 0x0C52, + LineStipple = 0x0B24, + LineStipplePattern = 0x0B25, + LineStippleRepeat = 0x0B26, + LineWidth = 0x0B21, + LineWidthGranularity = 0x0B23, + LineWidthRange = 0x0B22, + ListBase = 0x0B32, + ListIndex = 0x0B33, + ListMode = 0x0B30, + LogicOp = 0x0BF1, + LogicOpMode = 0x0BF0, + MajorVersion = 0x821B, + Map1Color4 = 0x0D90, + Map1GridDomain = 0x0DD0, + Map1GridSegments = 0x0DD1, + Map1Index = 0x0D91, + Map1Normal = 0x0D92, + Map1TextureCoord1 = 0x0D93, + Map1TextureCoord2 = 0x0D94, + Map1TextureCoord3 = 0x0D95, + Map1TextureCoord4 = 0x0D96, + Map1Vertex3 = 0x0D97, + Map1Vertex4 = 0x0D98, + Map2Color4 = 0x0DB0, + Map2GridDomain = 0x0DD2, + Map2GridSegments = 0x0DD3, + Map2Index = 0x0DB1, + Map2Normal = 0x0DB2, + Map2TextureCoord1 = 0x0DB3, + Map2TextureCoord2 = 0x0DB4, + Map2TextureCoord3 = 0x0DB5, + Map2TextureCoord4 = 0x0DB6, + Map2Vertex3 = 0x0DB7, + Map2Vertex4 = 0x0DB8, + MapColor = 0x0D10, + MapStencil = 0x0D11, + MatrixMode = 0x0BA0, + Max3DTextureSize = 0x8073, + Max3DTextureSizeEXT = 0x8073, + Max4dTextureSizeSgis = 0x8138, + MaxActiveLightsSGIX = 0x8405, + MaxArrayTextureLayers = 0x88FF, + MaxAsyncDrawPixelsSGIX = 0x8360, + MaxAsyncHistogramSGIX = 0x832D, + MaxAsyncReadPixelsSGIX = 0x8361, + MaxAsyncTexImageSGIX = 0x835F, + MaxAttribStackDepth = 0x0D35, + MaxClientAttribStackDepth = 0x0D3B, + MaxClipmapDepthSGIX = 0x8177, + MaxClipmapVirtualDepthSGIX = 0x8178, + MaxClipDistances = 0x0D32, + MaxClipPlanes = 0x0D32, + MaxColorMatrixStackDepthSGI = 0x80B3, + MaxColorTextureSamples = 0x910E, + MaxCombinedAtomicCounters = 0x92D7, + MaxCombinedComputeUniformComponents = 0x8266, + MaxCombinedFragmentUniformComponents = 0x8A33, + MaxCombinedGeometryUniformComponents = 0x8A32, + MaxCombinedShaderStorageBlocks = 0x90DC, + MaxCombinedTextureImageUnits = 0x8B4D, + MaxCombinedUniformBlocks = 0x8A2E, + MaxCombinedVertexUniformComponents = 0x8A31, + MaxComputeAtomicCounters = 0x8265, + MaxComputeAtomicCounterBuffers = 0x8264, + MaxComputeShaderStorageBlocks = 0x90DB, + MaxComputeTextureImageUnits = 0x91BC, + MaxComputeUniformBlocks = 0x91BB, + MaxComputeUniformComponents = 0x8263, + MaxComputeWorkGroupCount = 0x91BE, + MaxComputeWorkGroupInvocations = 0x90EB, + MaxComputeWorkGroupSize = 0x91BF, + MaxCubeMapTextureSize = 0x851C, + MaxDebugGroupStackDepth = 0x826C, + MaxDepthTextureSamples = 0x910F, + MaxDrawBuffers = 0x8824, + MaxDualSourceDrawBuffers = 0x88FC, + MaxElementsIndices = 0x80E9, + MaxElementsVertices = 0x80E8, + MaxElementIndex = 0x8D6B, + MaxEvalOrder = 0x0D30, + MaxFogFuncPointsSgis = 0x812C, + MaxFragmentAtomicCounters = 0x92D6, + MaxFragmentInputComponents = 0x9125, + MaxFragmentLightsSGIX = 0x8404, + MaxFragmentShaderStorageBlocks = 0x90DA, + MaxFragmentUniformBlocks = 0x8A2D, + MaxFragmentUniformComponents = 0x8B49, + MaxFragmentUniformVectors = 0x8DFD, + MaxFramebufferHeight = 0x9316, + MaxFramebufferLayers = 0x9317, + MaxFramebufferSamples = 0x9318, + MaxFramebufferWidth = 0x9315, + MaxFramezoomFactorSGIX = 0x818D, + MaxGeometryAtomicCounters = 0x92D5, + MaxGeometryInputComponents = 0x9123, + MaxGeometryOutputComponents = 0x9124, + MaxGeometryShaderStorageBlocks = 0x90D7, + MaxGeometryTextureImageUnits = 0x8C29, + MaxGeometryUniformBlocks = 0x8A2C, + MaxGeometryUniformComponents = 0x8DDF, + MaxIntegerSamples = 0x9110, + MaxLabelLength = 0x82E8, + MaxLights = 0x0D31, + MaxListNesting = 0x0B31, + MaxModelviewStackDepth = 0x0D36, + MaxNameStackDepth = 0x0D37, + MaxPixelMapTable = 0x0D34, + MaxProgramTexelOffset = 0x8905, + MaxProjectionStackDepth = 0x0D38, + MaxRectangleTextureSize = 0x84F8, + MaxRenderbufferSize = 0x84E8, + MaxSampleMaskWords = 0x8E59, + MaxServerWaitTimeout = 0x9111, + MaxShaderStorageBufferBindings = 0x90DD, + MaxTessControlAtomicCounters = 0x92D3, + MaxTessControlShaderStorageBlocks = 0x90D8, + MaxTessEvaluationAtomicCounters = 0x92D4, + MaxTessEvaluationShaderStorageBlocks = 0x90D9, + MaxTextureBufferSize = 0x8C2B, + MaxTextureImageUnits = 0x8872, + MaxTextureLodBias = 0x84FD, + MaxTextureSize = 0x0D33, + MaxTextureStackDepth = 0x0D39, + MaxUniformBlockSize = 0x8A30, + MaxUniformBufferBindings = 0x8A2F, + MaxUniformLocations = 0x826E, + MaxVaryingComponents = 0x8B4B, + MaxVaryingFloats = 0x8B4B, + MaxVaryingVectors = 0x8DFC, + MaxVertexAtomicCounters = 0x92D2, + MaxVertexAttribs = 0x8869, + MaxVertexAttribBindings = 0x82DA, + MaxVertexAttribRelativeOffset = 0x82D9, + MaxVertexOutputComponents = 0x9122, + MaxVertexShaderStorageBlocks = 0x90D6, + MaxVertexTextureImageUnits = 0x8B4C, + MaxVertexUniformBlocks = 0x8A2B, + MaxVertexUniformComponents = 0x8B4A, + MaxVertexUniformVectors = 0x8DFB, + MaxViewports = 0x825B, + MaxViewportDims = 0x0D3A, + MinmaxEXT = 0x802E, + MinorVersion = 0x821C, + MinMapBufferAlignment = 0x90BC, + MinProgramTexelOffset = 0x8904, + Modelview0MatrixEXT = 0x0BA6, + Modelview0StackDepthEXT = 0x0BA3, + ModelviewMatrix = 0x0BA6, + ModelviewStackDepth = 0x0BA3, + MultisampleSgis = 0x809D, + NameStackDepth = 0x0D70, + Normalize = 0x0BA1, + NormalArray = 0x8075, + NormalArrayCountEXT = 0x8080, + NormalArrayStride = 0x807F, + NormalArrayType = 0x807E, + NumCompressedTextureFormats = 0x86A2, + NumDeviceUuidsEXT = 0x9596, + NumExtensions = 0x821D, + NumProgramBinaryFormats = 0x87FE, + NumShaderBinaryFormats = 0x8DF9, + PackAlignment = 0x0D05, + PackCmykHintEXT = 0x800E, + PackImageDepthSgis = 0x8131, + PackImageHeight = 0x806C, + PackImageHeightEXT = 0x806C, + PackLsbFirst = 0x0D01, + PackResampleSGIX = 0x842E, + PackRowLength = 0x0D02, + PackSkipImages = 0x806B, + PackSkipImagesEXT = 0x806B, + PackSkipPixels = 0x0D04, + PackSkipRows = 0x0D03, + PackSkipVolumesSgis = 0x8130, + PackSubsampleRateSGIX = 0x85A0, + PackSwapBytes = 0x0D00, + PerspectiveCorrectionHint = 0x0C50, + PixelMapAToASize = 0x0CB9, + PixelMapBToBSize = 0x0CB8, + PixelMapGToGSize = 0x0CB7, + PixelMapIToASize = 0x0CB5, + PixelMapIToBSize = 0x0CB4, + PixelMapIToGSize = 0x0CB3, + PixelMapIToISize = 0x0CB0, + PixelMapIToRSize = 0x0CB2, + PixelMapRToRSize = 0x0CB6, + PixelMapSToSSize = 0x0CB1, + PixelPackBufferBinding = 0x88ED, + PixelTextureSgis = 0x8353, + PixelTexGenModeSGIX = 0x832B, + PixelTexGenSGIX = 0x8139, + PixelTileBestAlignmentSGIX = 0x813E, + PixelTileCacheIncrementSGIX = 0x813F, + PixelTileCacheSizeSGIX = 0x8145, + PixelTileGridDepthSGIX = 0x8144, + PixelTileGridHeightSGIX = 0x8143, + PixelTileGridWidthSGIX = 0x8142, + PixelTileHeightSGIX = 0x8141, + PixelTileWidthSGIX = 0x8140, + PixelUnpackBufferBinding = 0x88EF, + PointFadeThresholdSize = 0x8128, + PointFadeThresholdSizeSgis = 0x8128, + PointSize = 0x0B11, + PointSizeGranularity = 0x0B13, + PointSizeMaxSgis = 0x8127, + PointSizeMinSgis = 0x8126, + PointSizeRange = 0x0B12, + PointSmooth = 0x0B10, + PointSmoothHint = 0x0C51, + PolygonMode = 0x0B40, + PolygonOffsetBiasEXT = 0x8039, + PolygonOffsetFactor = 0x8038, + PolygonOffsetFill = 0x8037, + PolygonOffsetLine = 0x2A02, + PolygonOffsetPoint = 0x2A01, + PolygonOffsetUnits = 0x2A00, + PolygonSmooth = 0x0B41, + PolygonSmoothHint = 0x0C53, + PolygonStipple = 0x0B42, + PostColorMatrixAlphaBiasSGI = 0x80BB, + PostColorMatrixAlphaScaleSGI = 0x80B7, + PostColorMatrixBlueBiasSGI = 0x80BA, + PostColorMatrixBlueScaleSGI = 0x80B6, + PostColorMatrixColorTableSGI = 0x80D2, + PostColorMatrixGreenBiasSGI = 0x80B9, + PostColorMatrixGreenScaleSGI = 0x80B5, + PostColorMatrixRedBiasSGI = 0x80B8, + PostColorMatrixRedScaleSGI = 0x80B4, + PostConvolutionAlphaBiasEXT = 0x8023, + PostConvolutionAlphaScaleEXT = 0x801F, + PostConvolutionBlueBiasEXT = 0x8022, + PostConvolutionBlueScaleEXT = 0x801E, + PostConvolutionColorTableSGI = 0x80D1, + PostConvolutionGreenBiasEXT = 0x8021, + PostConvolutionGreenScaleEXT = 0x801D, + PostConvolutionRedBiasEXT = 0x8020, + PostConvolutionRedScaleEXT = 0x801C, + PostTextureFilterBiasRangeSGIX = 0x817B, + PostTextureFilterScaleRangeSGIX = 0x817C, + PrimitiveRestartIndex = 0x8F9E, + ProgramBinaryFormats = 0x87FF, + ProgramPipelineBinding = 0x825A, + ProgramPointSize = 0x8642, + ProjectionMatrix = 0x0BA7, + ProjectionStackDepth = 0x0BA4, + ProvokingVertex = 0x8E4F, + ReadBuffer = 0x0C02, + ReadBufferEXT = 0x0C02, + ReadBufferNV = 0x0C02, + ReadFramebufferBinding = 0x8CAA, + RedBias = 0x0D15, + RedBits = 0x0D52, + RedScale = 0x0D14, + ReferencePlaneEquationSGIX = 0x817E, + ReferencePlaneSGIX = 0x817D, + RenderbufferBinding = 0x8CA7, + RenderMode = 0x0C40, + RescaleNormalEXT = 0x803A, + RgbaMode = 0x0C31, + SamplerBinding = 0x8919, + Samples = 0x80A9, + SamplesSgis = 0x80A9, + SampleAlphaToMaskSgis = 0x809E, + SampleAlphaToOneSgis = 0x809F, + SampleBuffers = 0x80A8, + SampleBuffersSgis = 0x80A8, + SampleCoverageInvert = 0x80AB, + SampleCoverageValue = 0x80AA, + SampleMaskInvertSgis = 0x80AB, + SampleMaskSgis = 0x80A0, + SampleMaskValueSgis = 0x80AA, + SamplePatternSgis = 0x80AC, + ScissorBox = 0x0C10, + ScissorTest = 0x0C11, + SelectionBufferSize = 0x0DF4, + Separable2DEXT = 0x8012, + ShaderCompiler = 0x8DFA, + ShaderStorageBufferBinding = 0x90D3, + ShaderStorageBufferOffsetAlignment = 0x90DF, + ShaderStorageBufferSize = 0x90D5, + ShaderStorageBufferStart = 0x90D4, + ShadeModel = 0x0B54, + SharedTexturePaletteEXT = 0x81FB, + SmoothLineWidthGranularity = 0x0B23, + SmoothLineWidthRange = 0x0B22, + SmoothPointSizeGranularity = 0x0B13, + SmoothPointSizeRange = 0x0B12, + SpriteAxisSGIX = 0x814A, + SpriteModeSGIX = 0x8149, + SpriteSGIX = 0x8148, + SpriteTranslationSGIX = 0x814B, + StencilBackFail = 0x8801, + StencilBackFunc = 0x8800, + StencilBackPassDepthFail = 0x8802, + StencilBackPassDepthPass = 0x8803, + StencilBackRef = 0x8CA3, + StencilBackValueMask = 0x8CA4, + StencilBackWritemask = 0x8CA5, + StencilBits = 0x0D57, + StencilClearValue = 0x0B91, + StencilFail = 0x0B94, + StencilFunc = 0x0B92, + StencilPassDepthFail = 0x0B95, + StencilPassDepthPass = 0x0B96, + StencilRef = 0x0B97, + StencilTest = 0x0B90, + StencilValueMask = 0x0B93, + StencilWritemask = 0x0B98, + Stereo = 0x0C33, + SubpixelBits = 0x0D50, + Texture1D = 0x0DE0, + Texture2D = 0x0DE1, + Texture3DBindingEXT = 0x806A, + Texture3DEXT = 0x806F, + Texture4dBindingSgis = 0x814F, + Texture4dSgis = 0x8134, + TextureBinding1D = 0x8068, + TextureBinding1DArray = 0x8C1C, + TextureBinding2D = 0x8069, + TextureBinding2DArray = 0x8C1D, + TextureBinding2DMultisample = 0x9104, + TextureBinding2DMultisampleArray = 0x9105, + TextureBinding3D = 0x806A, + TextureBindingBuffer = 0x8C2C, + TextureBindingCubeMap = 0x8514, + TextureBindingRectangle = 0x84F6, + TextureBufferOffsetAlignment = 0x919F, + TextureColorTableSGI = 0x80BC, + TextureCompressionHint = 0x84EF, + TextureCoordArray = 0x8078, + TextureCoordArrayCountEXT = 0x808B, + TextureCoordArraySize = 0x8088, + TextureCoordArrayStride = 0x808A, + TextureCoordArrayType = 0x8089, + TextureGenQ = 0x0C63, + TextureGenR = 0x0C62, + TextureGenS = 0x0C60, + TextureGenT = 0x0C61, + TextureMatrix = 0x0BA8, + TextureStackDepth = 0x0BA5, + Timestamp = 0x8E28, + TransformFeedbackBufferBinding = 0x8C8F, + TransformFeedbackBufferSize = 0x8C85, + TransformFeedbackBufferStart = 0x8C84, + UniformBufferBinding = 0x8A28, + UniformBufferOffsetAlignment = 0x8A34, + UniformBufferSize = 0x8A2A, + UniformBufferStart = 0x8A29, + UnpackAlignment = 0x0CF5, + UnpackCmykHintEXT = 0x800F, + UnpackImageDepthSgis = 0x8133, + UnpackImageHeight = 0x806E, + UnpackImageHeightEXT = 0x806E, + UnpackLsbFirst = 0x0CF1, + UnpackResampleSGIX = 0x842F, + UnpackRowLength = 0x0CF2, + UnpackSkipImages = 0x806D, + UnpackSkipImagesEXT = 0x806D, + UnpackSkipPixels = 0x0CF4, + UnpackSkipRows = 0x0CF3, + UnpackSkipVolumesSgis = 0x8132, + UnpackSubsampleRateSGIX = 0x85A1, + UnpackSwapBytes = 0x0CF0, + VertexArray = 0x8074, + VertexArrayBinding = 0x85B5, + VertexArrayCountEXT = 0x807D, + VertexArraySize = 0x807A, + VertexArrayStride = 0x807C, + VertexArrayType = 0x807B, + VertexBindingDivisor = 0x82D6, + VertexBindingOffset = 0x82D7, + VertexBindingStride = 0x82D8, + VertexPreclipHintSGIX = 0x83EF, + VertexPreclipSGIX = 0x83EE, + Viewport = 0x0BA2, + ViewportBoundsRange = 0x825D, + ViewportIndexProvokingVertex = 0x825F, + ViewportSubpixelBits = 0x825C, + ZoomX = 0x0D16, + ZoomY = 0x0D17, + } + + public enum GetPointervPName + { + ColorArrayPointer = 0x8090, + ColorArrayPointerEXT = 0x8090, + EdgeFlagArrayPointer = 0x8093, + EdgeFlagArrayPointerEXT = 0x8093, + FeedbackBufferPointer = 0x0DF0, + IndexArrayPointer = 0x8091, + IndexArrayPointerEXT = 0x8091, + InstrumentBufferPointerSGIX = 0x8180, + NormalArrayPointer = 0x808F, + NormalArrayPointerEXT = 0x808F, + SelectionBufferPointer = 0x0DF3, + TextureCoordArrayPointer = 0x8092, + TextureCoordArrayPointerEXT = 0x8092, + VertexArrayPointer = 0x808E, + VertexArrayPointerEXT = 0x808E, + DebugCallbackFunction = 0x8244, + DebugCallbackUserParam = 0x8245, + } + + public enum GetTextureParameter + { + DetailTextureFuncPointsSgis = 0x809C, + DetailTextureLevelSgis = 0x809A, + DetailTextureModeSgis = 0x809B, + DualTextureSelectSgis = 0x8124, + GenerateMipmapSgis = 0x8191, + PostTextureFilterBiasSGIX = 0x8179, + PostTextureFilterScaleSGIX = 0x817A, + QuadTextureSelectSgis = 0x8125, + ShadowAmbientSGIX = 0x80BF, + SharpenTextureFuncPointsSgis = 0x80B0, + Texture4dsizeSgis = 0x8136, + TextureAlphaSize = 0x805F, + TextureBaseLevelSgis = 0x813C, + TextureBlueSize = 0x805E, + TextureBorder = 0x1005, + TextureBorderColor = 0x1004, + TextureBorderColorNV = 0x1004, + TextureClipmapCenterSGIX = 0x8171, + TextureClipmapDepthSGIX = 0x8176, + TextureClipmapFrameSGIX = 0x8172, + TextureClipmapLodOffsetSGIX = 0x8175, + TextureClipmapOffsetSGIX = 0x8173, + TextureClipmapVirtualDepthSGIX = 0x8174, + TextureCompareOperatorSGIX = 0x819B, + TextureCompareSGIX = 0x819A, + TextureComponents = 0x1003, + TextureDepthEXT = 0x8071, + TextureFilter4SizeSgis = 0x8147, + TextureGequalRSGIX = 0x819D, + TextureGreenSize = 0x805D, + TextureHeight = 0x1001, + TextureIntensitySize = 0x8061, + TextureInternalFormat = 0x1003, + TextureLequalRSGIX = 0x819C, + TextureLodBiasRSGIX = 0x8190, + TextureLodBiasSSGIX = 0x818E, + TextureLodBiasTSGIX = 0x818F, + TextureLuminanceSize = 0x8060, + TextureMagFilter = 0x2800, + TextureMaxClampRSGIX = 0x836B, + TextureMaxClampSSGIX = 0x8369, + TextureMaxClampTSGIX = 0x836A, + TextureMaxLevelSgis = 0x813D, + TextureMaxLodSgis = 0x813B, + TextureMinFilter = 0x2801, + TextureMinLodSgis = 0x813A, + TexturePriority = 0x8066, + TextureRedSize = 0x805C, + TextureResident = 0x8067, + TextureWidth = 0x1000, + TextureWrapQSgis = 0x8137, + TextureWrapREXT = 0x8072, + TextureWrapS = 0x2802, + TextureWrapT = 0x2803, + } + + public enum HintMode + { + DontCare = 0x1100, + Fastest = 0x1101, + Nicest = 0x1102, + } + + public enum HintTarget + { + AllowDrawFrgHintPGI = 0x1A210, + AllowDrawMemHintPGI = 0x1A211, + AllowDrawObjHintPGI = 0x1A20E, + AllowDrawWinHintPGI = 0x1A20F, + AlwaysFastHintPGI = 0x1A20C, + AlwaysSoftHintPGI = 0x1A20D, + BackNormalsHintPGI = 0x1A223, + BinningControlHintQCOM = 0x8FB0, + ClipFarHintPGI = 0x1A221, + ClipNearHintPGI = 0x1A220, + ClipVolumeClippingHintEXT = 0x80F0, + ConserveMemoryHintPGI = 0x1A1FD, + ConvolutionHintSGIX = 0x8316, + FogHint = 0x0C54, + FragmentShaderDerivativeHint = 0x8B8B, + FragmentShaderDerivativeHintARB = 0x8B8B, + FragmentShaderDerivativeHintOES = 0x8B8B, + FullStippleHintPGI = 0x1A219, + GenerateMipmapHint = 0x8192, + GenerateMipmapHintSgis = 0x8192, + LineQualityHintSGIX = 0x835B, + LineSmoothHint = 0x0C52, + MaterialSideHintPGI = 0x1A22C, + MaxVertexHintPGI = 0x1A22D, + MultisampleFilterHintNV = 0x8534, + NativeGraphicsBeginHintPGI = 0x1A203, + NativeGraphicsEndHintPGI = 0x1A204, + PackCmykHintEXT = 0x800E, + PerspectiveCorrectionHint = 0x0C50, + PhongHintWin = 0x80EB, + PointSmoothHint = 0x0C51, + PolygonSmoothHint = 0x0C53, + PreferDoublebufferHintPGI = 0x1A1F8, + ProgramBinaryRetrievableHint = 0x8257, + ReclaimMemoryHintPGI = 0x1A1FE, + ScalebiasHintSGIX = 0x8322, + StrictDepthfuncHintPGI = 0x1A216, + StrictLightingHintPGI = 0x1A217, + StrictScissorHintPGI = 0x1A218, + TextureCompressionHint = 0x84EF, + TextureCompressionHintARB = 0x84EF, + TextureMultiBufferHintSGIX = 0x812E, + TextureStorageHintAPPLE = 0x85BC, + TransformHintAPPLE = 0x85B1, + UnpackCmykHintEXT = 0x800F, + VertexArrayStorageHintAPPLE = 0x851F, + VertexConsistentHintPGI = 0x1A22B, + VertexDataHintPGI = 0x1A22A, + VertexPreclipHintSGIX = 0x83EF, + VertexPreclipSGIX = 0x83EE, + WideLineHintPGI = 0x1A222, + } + + public enum HistogramTargetEXT + { + Histogram = 0x8024, + HistogramEXT = 0x8024, + ProxyHistogram = 0x8025, + ProxyHistogramEXT = 0x8025, + } + + public enum IndexPointerType + { + Double = 0x140A, + Float = 0x1406, + Int = 0x1404, + Short = 0x1402, + } + + public enum InterleavedArrayFormat + { + C3fV3f = 0x2A24, + C4fN3fV3f = 0x2A26, + C4ubV2f = 0x2A22, + C4ubV3f = 0x2A23, + N3fV3f = 0x2A25, + T2fC3fV3f = 0x2A2A, + T2fC4fN3fV3f = 0x2A2C, + T2fC4ubV3f = 0x2A29, + T2fN3fV3f = 0x2A2B, + T2fV3f = 0x2A27, + T4fC4fN3fV4f = 0x2A2D, + T4fV4f = 0x2A28, + V2f = 0x2A20, + V3f = 0x2A21, + } + + public enum LightEnvModeSGIX + { + Add = 0x0104, + Modulate = 0x2100, + Replace = 0x1E01, + } + + public enum LightEnvParameterSGIX + { + LightEnvModeSGIX = 0x8407, + } + + public enum LightModelColorControl + { + SeparateSpecularColor = 0x81FA, + SeparateSpecularColorEXT = 0x81FA, + SingleColor = 0x81F9, + SingleColorEXT = 0x81F9, + } + + public enum LightModelParameter + { + LightModelAmbient = 0x0B53, + LightModelColorControl = 0x81F8, + LightModelColorControlEXT = 0x81F8, + LightModelLocalViewer = 0x0B51, + LightModelTwoSide = 0x0B52, + } + + public enum LightName + { + FragmentLight0SGIX = 0x840C, + FragmentLight1SGIX = 0x840D, + FragmentLight2SGIX = 0x840E, + FragmentLight3SGIX = 0x840F, + FragmentLight4SGIX = 0x8410, + FragmentLight5SGIX = 0x8411, + FragmentLight6SGIX = 0x8412, + FragmentLight7SGIX = 0x8413, + Light0 = 0x4000, + Light1 = 0x4001, + Light2 = 0x4002, + Light3 = 0x4003, + Light4 = 0x4004, + Light5 = 0x4005, + Light6 = 0x4006, + Light7 = 0x4007, + } + + public enum LightParameter + { + Ambient = 0x1200, + ConstantAttenuation = 0x1207, + Diffuse = 0x1201, + LinearAttenuation = 0x1208, + Position = 0x1203, + QuadraticAttenuation = 0x1209, + Specular = 0x1202, + SpotCutoff = 0x1206, + SpotDirection = 0x1204, + SpotExponent = 0x1205, + } + + public enum ListMode + { + Compile = 0x1300, + CompileAndExecute = 0x1301, + } + + public enum ListNameType + { + Type2Bytes = 0x1407, + Type3Bytes = 0x1408, + Type4Bytes = 0x1409, + Byte = 0x1400, + Float = 0x1406, + Int = 0x1404, + Short = 0x1402, + UnsignedByte = 0x1401, + UnsignedInt = 0x1405, + UnsignedShort = 0x1403, + } + + public enum ListParameterName + { + ListPrioritySGIX = 0x8182, + } + + public enum LogicOp + { + And = 0x1501, + AndInverted = 0x1504, + AndReverse = 0x1502, + Clear = 0x1500, + Copy = 0x1503, + CopyInverted = 0x150C, + Equiv = 0x1509, + Invert = 0x150A, + Nand = 0x150E, + Noop = 0x1505, + Nor = 0x1508, + Or = 0x1507, + OrInverted = 0x150D, + OrReverse = 0x150B, + Set = 0x150F, + Xor = 0x1506, + } + + public enum MapTarget + { + GeometryDeformationSGIX = 0x8194, + Map1Color4 = 0x0D90, + Map1Index = 0x0D91, + Map1Normal = 0x0D92, + Map1TextureCoord1 = 0x0D93, + Map1TextureCoord2 = 0x0D94, + Map1TextureCoord3 = 0x0D95, + Map1TextureCoord4 = 0x0D96, + Map1Vertex3 = 0x0D97, + Map1Vertex4 = 0x0D98, + Map2Color4 = 0x0DB0, + Map2Index = 0x0DB1, + Map2Normal = 0x0DB2, + Map2TextureCoord1 = 0x0DB3, + Map2TextureCoord2 = 0x0DB4, + Map2TextureCoord3 = 0x0DB5, + Map2TextureCoord4 = 0x0DB6, + Map2Vertex3 = 0x0DB7, + Map2Vertex4 = 0x0DB8, + TextureDeformationSGIX = 0x8195, + } + + public enum MaterialFace + { + Back = 0x0405, + Front = 0x0404, + FrontAndBack = 0x0408, + } + + public enum MaterialParameter + { + Ambient = 0x1200, + AmbientAndDiffuse = 0x1602, + ColorIndexes = 0x1603, + Diffuse = 0x1201, + Emission = 0x1600, + Shininess = 0x1601, + Specular = 0x1202, + } + + public enum MatrixMode + { + Modelview = 0x1700, + Modelview0EXT = 0x1700, + Projection = 0x1701, + Texture = 0x1702, + } + + public enum MemoryObjectParameterName + { + DedicatedMemoryObjectEXT = 0x9581, + ProtectedMemoryObjectEXT = 0x959B, + } + + public enum MeshMode1 + { + Line = 0x1B01, + Point = 0x1B00, + } + + public enum MeshMode2 + { + Fill = 0x1B02, + Line = 0x1B01, + Point = 0x1B00, + } + + public enum MinmaxTargetEXT + { + Minmax = 0x802E, + MinmaxEXT = 0x802E, + } + + public enum NormalPointerType + { + Byte = 0x1400, + Double = 0x140A, + Float = 0x1406, + Int = 0x1404, + Short = 0x1402, + } + + public enum PixelCopyType + { + Color = 0x1800, + ColorEXT = 0x1800, + Depth = 0x1801, + DepthEXT = 0x1801, + Stencil = 0x1802, + StencilEXT = 0x1802, + } + + public enum PixelFormat + { + AbgrEXT = 0x8000, + Alpha = 0x1906, + Bgr = 0x80E0, + BgrInteger = 0x8D9A, + Bgra = 0x80E1, + BgraInteger = 0x8D9B, + Blue = 0x1905, + BlueInteger = 0x8D96, + CmykaEXT = 0x800D, + CmykEXT = 0x800C, + ColorIndex = 0x1900, + DepthComponent = 0x1902, + DepthStencil = 0x84F9, + Green = 0x1904, + GreenInteger = 0x8D95, + Luminance = 0x1909, + LuminanceAlpha = 0x190A, + Red = 0x1903, + RedEXT = 0x1903, + RedInteger = 0x8D94, + Rg = 0x8227, + RgInteger = 0x8228, + Rgb = 0x1907, + RgbInteger = 0x8D98, + Rgba = 0x1908, + RgbaInteger = 0x8D99, + StencilIndex = 0x1901, + UnsignedInt = 0x1405, + UnsignedShort = 0x1403, + Ycrcb422SGIX = 0x81BB, + Ycrcb444SGIX = 0x81BC, + } + + public enum InternalFormat + { + Alpha12 = 0x803D, + Alpha16 = 0x803E, + Alpha4 = 0x803B, + Alpha8 = 0x803C, + DualAlpha12Sgis = 0x8112, + DualAlpha16Sgis = 0x8113, + DualAlpha4Sgis = 0x8110, + DualAlpha8Sgis = 0x8111, + DualIntensity12Sgis = 0x811A, + DualIntensity16Sgis = 0x811B, + DualIntensity4Sgis = 0x8118, + DualIntensity8Sgis = 0x8119, + DualLuminance12Sgis = 0x8116, + DualLuminance16Sgis = 0x8117, + DualLuminance4Sgis = 0x8114, + DualLuminance8Sgis = 0x8115, + DualLuminanceAlpha4Sgis = 0x811C, + DualLuminanceAlpha8Sgis = 0x811D, + Intensity = 0x8049, + Intensity12 = 0x804C, + Intensity16 = 0x804D, + Intensity4 = 0x804A, + Intensity8 = 0x804B, + Luminance12 = 0x8041, + Luminance12Alpha12 = 0x8047, + Luminance12Alpha4 = 0x8046, + Luminance16 = 0x8042, + Luminance16Alpha16 = 0x8048, + Luminance4 = 0x803F, + Luminance4Alpha4 = 0x8043, + Luminance6Alpha2 = 0x8044, + Luminance8 = 0x8040, + Luminance8Alpha8 = 0x8045, + QuadAlpha4Sgis = 0x811E, + QuadAlpha8Sgis = 0x811F, + QuadIntensity4Sgis = 0x8122, + QuadIntensity8Sgis = 0x8123, + QuadLuminance4Sgis = 0x8120, + QuadLuminance8Sgis = 0x8121, + Red = 0x1903, + RedEXT = 0x1903, + R8 = 0x8229, + R8EXT = 0x8229, + R8Snorm = 0x8F94, + R16 = 0x822A, + R16EXT = 0x822A, + R16Snorm = 0x8F98, + R16SnormEXT = 0x8F98, + R16f = 0x822D, + R16fEXT = 0x822D, + R32f = 0x822E, + R32fEXT = 0x822E, + R8i = 0x8231, + R16i = 0x8233, + R32i = 0x8235, + R8ui = 0x8232, + R16ui = 0x8234, + R32ui = 0x8236, + Rg = 0x8227, + Rg8 = 0x822B, + Rg8EXT = 0x822B, + Rg8Snorm = 0x8F95, + Rg16 = 0x822C, + Rg16EXT = 0x822C, + Rg16Snorm = 0x8F99, + Rg16SnormEXT = 0x8F99, + Rg16f = 0x822F, + Rg16fEXT = 0x822F, + Rg32f = 0x8230, + Rg32fEXT = 0x8230, + Rg8i = 0x8237, + Rg16i = 0x8239, + Rg32i = 0x823B, + Rg8ui = 0x8238, + Rg16ui = 0x823A, + Rg32ui = 0x823C, + Rgb = 0x1907, + Rgb2EXT = 0x804E, + Rgb4 = 0x804F, + Rgb4EXT = 0x804F, + Rgb5 = 0x8050, + Rgb5EXT = 0x8050, + Rgb8 = 0x8051, + Rgb8EXT = 0x8051, + Rgb8OES = 0x8051, + Rgb8Snorm = 0x8F96, + Rgb10 = 0x8052, + Rgb10EXT = 0x8052, + Rgb12 = 0x8053, + Rgb12EXT = 0x8053, + Rgb16 = 0x8054, + Rgb16EXT = 0x8054, + Rgb16f = 0x881B, + Rgb16fARB = 0x881B, + Rgb16fEXT = 0x881B, + Rgb16Snorm = 0x8F9A, + Rgb16SnormEXT = 0x8F9A, + Rgb8i = 0x8D8F, + Rgb16i = 0x8D89, + Rgb32i = 0x8D83, + Rgb8ui = 0x8D7D, + Rgb16ui = 0x8D77, + Rgb32ui = 0x8D71, + Srgb = 0x8C40, + SrgbEXT = 0x8C40, + SrgbAlpha = 0x8C42, + SrgbAlphaEXT = 0x8C42, + Srgb8 = 0x8C41, + Srgb8EXT = 0x8C41, + Srgb8NV = 0x8C41, + Srgb8Alpha8 = 0x8C43, + Srgb8Alpha8EXT = 0x8C43, + R3G3B2 = 0x2A10, + R11fG11fB10f = 0x8C3A, + R11fG11fB10fAPPLE = 0x8C3A, + R11fG11fB10fEXT = 0x8C3A, + Rgb9E5 = 0x8C3D, + Rgb9E5APPLE = 0x8C3D, + Rgb9E5EXT = 0x8C3D, + Rgba = 0x1908, + Rgba4 = 0x8056, + Rgba4EXT = 0x8056, + Rgba4OES = 0x8056, + Rgb5A1 = 0x8057, + Rgb5A1EXT = 0x8057, + Rgb5A1OES = 0x8057, + Rgba8 = 0x8058, + Rgba8EXT = 0x8058, + Rgba8OES = 0x8058, + Rgba8Snorm = 0x8F97, + Rgb10A2 = 0x8059, + Rgb10A2EXT = 0x8059, + Rgba12 = 0x805A, + Rgba12EXT = 0x805A, + Rgba16 = 0x805B, + Rgba16EXT = 0x805B, + Rgba16f = 0x881A, + Rgba16fARB = 0x881A, + Rgba16fEXT = 0x881A, + Rgba32f = 0x8814, + Rgba32fARB = 0x8814, + Rgba32fEXT = 0x8814, + Rgba8i = 0x8D8E, + Rgba16i = 0x8D88, + Rgba32i = 0x8D82, + Rgba8ui = 0x8D7C, + Rgba16ui = 0x8D76, + Rgba32ui = 0x8D70, + Rgb10A2ui = 0x906F, + DepthComponent = 0x1902, + DepthComponent16 = 0x81A5, + DepthComponent16ARB = 0x81A5, + DepthComponent16OES = 0x81A5, + DepthComponent16SGIX = 0x81A5, + DepthComponent24ARB = 0x81A6, + DepthComponent24OES = 0x81A6, + DepthComponent24SGIX = 0x81A6, + DepthComponent32ARB = 0x81A7, + DepthComponent32OES = 0x81A7, + DepthComponent32SGIX = 0x81A7, + DepthComponent32f = 0x8CAC, + DepthComponent32fNV = 0x8DAB, + DepthStencil = 0x84F9, + DepthStencilEXT = 0x84F9, + DepthStencilMESA = 0x8750, + DepthStencilNV = 0x84F9, + DepthStencilOES = 0x84F9, + Depth24Stencil8 = 0x88F0, + Depth24Stencil8EXT = 0x88F0, + Depth24Stencil8OES = 0x88F0, + Depth32fStencil8 = 0x8CAD, + Depth32fStencil8NV = 0x8DAC, + CompressedRed = 0x8225, + CompressedRg = 0x8226, + CompressedRgb = 0x84ED, + CompressedRgba = 0x84EE, + CompressedSrgb = 0x8C48, + CompressedSrgbAlpha = 0x8C49, + CompressedRedRgtc1 = 0x8DBB, + CompressedRedRgtc1EXT = 0x8DBB, + CompressedSignedRedRgtc1 = 0x8DBC, + CompressedSignedRedRgtc1EXT = 0x8DBC, + CompressedR11Eac = 0x9270, + CompressedSignedR11Eac = 0x9271, + CompressedRgRgtc2 = 0x8DBD, + CompressedSignedRgRgtc2 = 0x8DBE, + CompressedRgbaBptcUnorm = 0x8E8C, + CompressedSrgbAlphaBptcUnorm = 0x8E8D, + CompressedRgbBptcSignedFloat = 0x8E8E, + CompressedRgbBptcUnsignedFloat = 0x8E8F, + CompressedRgb8Etc2 = 0x9274, + CompressedSrgb8Etc2 = 0x9275, + CompressedRgb8PunchthroughAlpha1Etc2 = 0x9276, + CompressedSrgb8PunchthroughAlpha1Etc2 = 0x9277, + CompressedRgba8Etc2Eac = 0x9278, + CompressedSrgb8Alpha8Etc2Eac = 0x9279, + CompressedRg11Eac = 0x9272, + CompressedSignedRg11Eac = 0x9273, + CompressedRgbS3tcDxt1EXT = 0x83F0, + CompressedSrgbS3tcDxt1EXT = 0x8C4C, + CompressedRgbaS3tcDxt1EXT = 0x83F1, + CompressedSrgbAlphaS3tcDxt1EXT = 0x8C4D, + CompressedRgbaS3tcDxt3EXT = 0x83F2, + CompressedSrgbAlphaS3tcDxt3EXT = 0x8C4E, + CompressedRgbaS3tcDxt5EXT = 0x83F3, + CompressedSrgbAlphaS3tcDxt5EXT = 0x8C4F, + } + + public enum PixelMap + { + PixelMapAToA = 0x0C79, + PixelMapBToB = 0x0C78, + PixelMapGToG = 0x0C77, + PixelMapIToA = 0x0C75, + PixelMapIToB = 0x0C74, + PixelMapIToG = 0x0C73, + PixelMapIToI = 0x0C70, + PixelMapIToR = 0x0C72, + PixelMapRToR = 0x0C76, + PixelMapSToS = 0x0C71, + } + + public enum PixelStoreParameter + { + PackAlignment = 0x0D05, + PackImageDepthSgis = 0x8131, + PackImageHeight = 0x806C, + PackImageHeightEXT = 0x806C, + PackLsbFirst = 0x0D01, + PackResampleOML = 0x8984, + PackResampleSGIX = 0x842E, + PackRowLength = 0x0D02, + PackSkipImages = 0x806B, + PackSkipImagesEXT = 0x806B, + PackSkipPixels = 0x0D04, + PackSkipRows = 0x0D03, + PackSkipVolumesSgis = 0x8130, + PackSubsampleRateSGIX = 0x85A0, + PackSwapBytes = 0x0D00, + PixelTileCacheSizeSGIX = 0x8145, + PixelTileGridDepthSGIX = 0x8144, + PixelTileGridHeightSGIX = 0x8143, + PixelTileGridWidthSGIX = 0x8142, + PixelTileHeightSGIX = 0x8141, + PixelTileWidthSGIX = 0x8140, + UnpackAlignment = 0x0CF5, + UnpackImageDepthSgis = 0x8133, + UnpackImageHeight = 0x806E, + UnpackImageHeightEXT = 0x806E, + UnpackLsbFirst = 0x0CF1, + UnpackResampleOML = 0x8985, + UnpackResampleSGIX = 0x842F, + UnpackRowLength = 0x0CF2, + UnpackRowLengthEXT = 0x0CF2, + UnpackSkipImages = 0x806D, + UnpackSkipImagesEXT = 0x806D, + UnpackSkipPixels = 0x0CF4, + UnpackSkipPixelsEXT = 0x0CF4, + UnpackSkipRows = 0x0CF3, + UnpackSkipRowsEXT = 0x0CF3, + UnpackSkipVolumesSgis = 0x8132, + UnpackSubsampleRateSGIX = 0x85A1, + UnpackSwapBytes = 0x0CF0, + } + + public enum PixelStoreResampleMode + { + ResampleDecimateSGIX = 0x8430, + ResampleReplicateSGIX = 0x8433, + ResampleZeroFillSGIX = 0x8434, + } + + public enum PixelStoreSubsampleRate + { + PixelSubsample2424SGIX = 0x85A3, + PixelSubsample4242SGIX = 0x85A4, + PixelSubsample4444SGIX = 0x85A2, + } + + public enum PixelTexGenMode + { + Luminance = 0x1909, + LuminanceAlpha = 0x190A, + None = 0, + PixelTexGenAlphaLsSGIX = 0x8189, + PixelTexGenAlphaMSSGIX = 0x818A, + PixelTexGenAlphaNoReplaceSGIX = 0x8188, + PixelTexGenAlphaReplaceSGIX = 0x8187, + Rgb = 0x1907, + Rgba = 0x1908, + } + + public enum PixelTexGenParameterNameSGIS + { + PixelFragmentAlphaSourceSgis = 0x8355, + PixelFragmentRgbSourceSgis = 0x8354, + } + + public enum PixelTransferParameter + { + AlphaBias = 0x0D1D, + AlphaScale = 0x0D1C, + BlueBias = 0x0D1B, + BlueScale = 0x0D1A, + DepthBias = 0x0D1F, + DepthScale = 0x0D1E, + GreenBias = 0x0D19, + GreenScale = 0x0D18, + IndexOffset = 0x0D13, + IndexShift = 0x0D12, + MapColor = 0x0D10, + MapStencil = 0x0D11, + PostColorMatrixAlphaBias = 0x80BB, + PostColorMatrixAlphaBiasSGI = 0x80BB, + PostColorMatrixAlphaScale = 0x80B7, + PostColorMatrixAlphaScaleSGI = 0x80B7, + PostColorMatrixBlueBias = 0x80BA, + PostColorMatrixBlueBiasSGI = 0x80BA, + PostColorMatrixBlueScale = 0x80B6, + PostColorMatrixBlueScaleSGI = 0x80B6, + PostColorMatrixGreenBias = 0x80B9, + PostColorMatrixGreenBiasSGI = 0x80B9, + PostColorMatrixGreenScale = 0x80B5, + PostColorMatrixGreenScaleSGI = 0x80B5, + PostColorMatrixRedBias = 0x80B8, + PostColorMatrixRedBiasSGI = 0x80B8, + PostColorMatrixRedScale = 0x80B4, + PostColorMatrixRedScaleSGI = 0x80B4, + PostConvolutionAlphaBias = 0x8023, + PostConvolutionAlphaBiasEXT = 0x8023, + PostConvolutionAlphaScale = 0x801F, + PostConvolutionAlphaScaleEXT = 0x801F, + PostConvolutionBlueBias = 0x8022, + PostConvolutionBlueBiasEXT = 0x8022, + PostConvolutionBlueScale = 0x801E, + PostConvolutionBlueScaleEXT = 0x801E, + PostConvolutionGreenBias = 0x8021, + PostConvolutionGreenBiasEXT = 0x8021, + PostConvolutionGreenScale = 0x801D, + PostConvolutionGreenScaleEXT = 0x801D, + PostConvolutionRedBias = 0x8020, + PostConvolutionRedBiasEXT = 0x8020, + PostConvolutionRedScale = 0x801C, + PostConvolutionRedScaleEXT = 0x801C, + RedBias = 0x0D15, + RedScale = 0x0D14, + } + + public enum PixelType + { + Bitmap = 0x1A00, + Byte = 0x1400, + Float = 0x1406, + Int = 0x1404, + Short = 0x1402, + UnsignedByte = 0x1401, + UnsignedByte332 = 0x8032, + UnsignedByte332EXT = 0x8032, + UnsignedInt = 0x1405, + UnsignedInt1010102 = 0x8036, + UnsignedInt1010102EXT = 0x8036, + UnsignedInt8888 = 0x8035, + UnsignedInt8888EXT = 0x8035, + UnsignedShort = 0x1403, + UnsignedShort4444 = 0x8033, + UnsignedShort4444EXT = 0x8033, + UnsignedShort5551 = 0x8034, + UnsignedShort5551EXT = 0x8034, + } + + public enum PointParameterNameSGIS + { + DistanceAttenuationEXT = 0x8129, + DistanceAttenuationSgis = 0x8129, + PointDistanceAttenuation = 0x8129, + PointDistanceAttenuationARB = 0x8129, + PointFadeThresholdSize = 0x8128, + PointFadeThresholdSizeARB = 0x8128, + PointFadeThresholdSizeEXT = 0x8128, + PointFadeThresholdSizeSgis = 0x8128, + PointSizeMax = 0x8127, + PointSizeMaxARB = 0x8127, + PointSizeMaxEXT = 0x8127, + PointSizeMaxSgis = 0x8127, + PointSizeMin = 0x8126, + PointSizeMinARB = 0x8126, + PointSizeMinEXT = 0x8126, + PointSizeMinSgis = 0x8126, + } + + public enum PolygonMode + { + Fill = 0x1B02, + Line = 0x1B01, + Point = 0x1B00, + } + + public enum PrimitiveType + { + Lines = 0x0001, + LinesAdjacency = 0x000A, + LinesAdjacencyARB = 0x000A, + LinesAdjacencyEXT = 0x000A, + LineLoop = 0x0002, + LineStrip = 0x0003, + LineStripAdjacency = 0x000B, + LineStripAdjacencyARB = 0x000B, + LineStripAdjacencyEXT = 0x000B, + Patches = 0x000E, + PatchesEXT = 0x000E, + Points = 0x0000, + Polygon = 0x0009, + Quads = 0x0007, + QuadsEXT = 0x0007, + QuadStrip = 0x0008, + Triangles = 0x0004, + TrianglesAdjacency = 0x000C, + TrianglesAdjacencyARB = 0x000C, + TrianglesAdjacencyEXT = 0x000C, + TriangleFan = 0x0006, + TriangleStrip = 0x0005, + TriangleStripAdjacency = 0x000D, + TriangleStripAdjacencyARB = 0x000D, + TriangleStripAdjacencyEXT = 0x000D, + } + + public enum ReadBufferMode + { + Aux0 = 0x0409, + Aux1 = 0x040A, + Aux2 = 0x040B, + Aux3 = 0x040C, + Back = 0x0405, + BackLeft = 0x0402, + BackRight = 0x0403, + Front = 0x0404, + FrontLeft = 0x0400, + FrontRight = 0x0401, + Left = 0x0406, + Right = 0x0407, + } + + public enum RenderingMode + { + Feedback = 0x1C01, + Render = 0x1C00, + Select = 0x1C02, + } + + public enum SamplePatternSGIS + { + pattern1passEXT = 0x80A1, + pattern1passSgis = 0x80A1, + pattern2pass0EXT = 0x80A2, + pattern2pass0Sgis = 0x80A2, + pattern2pass1EXT = 0x80A3, + pattern2pass1Sgis = 0x80A3, + pattern4pass0EXT = 0x80A4, + pattern4pass0Sgis = 0x80A4, + pattern4pass1EXT = 0x80A5, + pattern4pass1Sgis = 0x80A5, + pattern4pass2EXT = 0x80A6, + pattern4pass2Sgis = 0x80A6, + pattern4pass3EXT = 0x80A7, + pattern4pass3Sgis = 0x80A7, + } + + public enum SemaphoreParameterName + { + D3d12FenceValueEXT = 0x9595, + } + + public enum SeparableTargetEXT + { + Separable2D = 0x8012, + Separable2DEXT = 0x8012, + } + + public enum ShadingModel + { + Flat = 0x1D00, + Smooth = 0x1D01, + } + + public enum StencilFaceDirection + { + Front = 0x0404, + Back = 0x0405, + FrontAndBack = 0x0408, + } + + public enum StencilFunction + { + Always = 0x0207, + Equal = 0x0202, + Gequal = 0x0206, + Greater = 0x0204, + Lequal = 0x0203, + Less = 0x0201, + Never = 0x0200, + Notequal = 0x0205, + } + + public enum StencilOp + { + Decr = 0x1E03, + DecrWrap = 0x8508, + Incr = 0x1E02, + IncrWrap = 0x8507, + Invert = 0x150A, + Keep = 0x1E00, + Replace = 0x1E01, + Zero = 0, + } + + public enum StringName + { + Extensions = 0x1F03, + Renderer = 0x1F01, + Vendor = 0x1F00, + Version = 0x1F02, + ShadingLanguageVersion = 0x8B8C, + } + + public enum TexCoordPointerType + { + Double = 0x140A, + Float = 0x1406, + Int = 0x1404, + Short = 0x1402, + } + + public enum TextureCoordName + { + S = 0x2000, + T = 0x2001, + R = 0x2002, + Q = 0x2003, + } + + public enum TextureEnvMode + { + Add = 0x0104, + Blend = 0x0BE2, + Decal = 0x2101, + Modulate = 0x2100, + ReplaceEXT = 0x8062, + TextureEnvBiasSGIX = 0x80BE, + } + + public enum TextureEnvParameter + { + TextureEnvColor = 0x2201, + TextureEnvMode = 0x2200, + } + + public enum TextureEnvTarget + { + TextureEnv = 0x2300, + } + + public enum TextureFilterFuncSGIS + { + Filter4Sgis = 0x8146, + } + + public enum TextureGenMode + { + EyeDistanceToLineSgis = 0x81F2, + EyeDistanceToPointSgis = 0x81F0, + EyeLinear = 0x2400, + ObjectDistanceToLineSgis = 0x81F3, + ObjectDistanceToPointSgis = 0x81F1, + ObjectLinear = 0x2401, + SphereMap = 0x2402, + } + + public enum TextureGenParameter + { + EyeLineSgis = 0x81F6, + EyePlane = 0x2502, + EyePointSgis = 0x81F4, + ObjectLineSgis = 0x81F7, + ObjectPlane = 0x2501, + ObjectPointSgis = 0x81F5, + TextureGenMode = 0x2500, + } + + public enum TextureMagFilter + { + Filter4Sgis = 0x8146, + Linear = 0x2601, + LinearDetailAlphaSgis = 0x8098, + LinearDetailColorSgis = 0x8099, + LinearDetailSgis = 0x8097, + LinearSharpenAlphaSgis = 0x80AE, + LinearSharpenColorSgis = 0x80AF, + LinearSharpenSgis = 0x80AD, + Nearest = 0x2600, + PixelTexGenQCeilingSGIX = 0x8184, + PixelTexGenQFloorSGIX = 0x8186, + PixelTexGenQRoundSGIX = 0x8185, + } + + public enum TextureMinFilter + { + Filter4Sgis = 0x8146, + Linear = 0x2601, + LinearClipmapLinearSGIX = 0x8170, + LinearClipmapNearestSGIX = 0x844F, + LinearMipmapLinear = 0x2703, + LinearMipmapNearest = 0x2701, + Nearest = 0x2600, + NearestClipmapLinearSGIX = 0x844E, + NearestClipmapNearestSGIX = 0x844D, + NearestMipmapLinear = 0x2702, + NearestMipmapNearest = 0x2700, + PixelTexGenQCeilingSGIX = 0x8184, + PixelTexGenQFloorSGIX = 0x8186, + PixelTexGenQRoundSGIX = 0x8185, + } + + public enum TextureParameterName + { + DetailTextureLevelSgis = 0x809A, + DetailTextureModeSgis = 0x809B, + DualTextureSelectSgis = 0x8124, + GenerateMipmap = 0x8191, + GenerateMipmapSgis = 0x8191, + PostTextureFilterBiasSGIX = 0x8179, + PostTextureFilterScaleSGIX = 0x817A, + QuadTextureSelectSgis = 0x8125, + ShadowAmbientSGIX = 0x80BF, + TextureBorderColor = 0x1004, + TextureClipmapCenterSGIX = 0x8171, + TextureClipmapDepthSGIX = 0x8176, + TextureClipmapFrameSGIX = 0x8172, + TextureClipmapLodOffsetSGIX = 0x8175, + TextureClipmapOffsetSGIX = 0x8173, + TextureClipmapVirtualDepthSGIX = 0x8174, + TextureCompareSGIX = 0x819A, + TextureLodBiasRSGIX = 0x8190, + TextureLodBiasSSGIX = 0x818E, + TextureLodBiasTSGIX = 0x818F, + TextureMagFilter = 0x2800, + TextureMaxClampRSGIX = 0x836B, + TextureMaxClampSSGIX = 0x8369, + TextureMaxClampTSGIX = 0x836A, + TextureMinFilter = 0x2801, + TexturePriority = 0x8066, + TexturePriorityEXT = 0x8066, + TextureWrapQSgis = 0x8137, + TextureWrapR = 0x8072, + TextureWrapREXT = 0x8072, + TextureWrapROES = 0x8072, + TextureWrapS = 0x2802, + TextureWrapT = 0x2803, + TextureBaseLevel = 0x813C, + TextureCompareMode = 0x884C, + TextureCompareFunc = 0x884D, + TextureLodBias = 0x8501, + TextureMinLod = 0x813A, + TextureMaxLod = 0x813B, + TextureMaxLevel = 0x813D, + TextureSwizzleR = 0x8E42, + TextureSwizzleG = 0x8E43, + TextureSwizzleB = 0x8E44, + TextureSwizzleA = 0x8E45, + TextureSwizzleRgba = 0x8E46, + TextureTilingEXT = 0x9580, + DepthStencilTextureMode = 0x90EA, + DetailTextureFuncPointsSgis = 0x809C, + SharpenTextureFuncPointsSgis = 0x80B0, + Texture4dsizeSgis = 0x8136, + TextureAlphaSize = 0x805F, + TextureBaseLevelSgis = 0x813C, + TextureBlueSize = 0x805E, + TextureBorder = 0x1005, + TextureBorderColorNV = 0x1004, + TextureCompareOperatorSGIX = 0x819B, + TextureComponents = 0x1003, + TextureDepthEXT = 0x8071, + TextureFilter4SizeSgis = 0x8147, + TextureGequalRSGIX = 0x819D, + TextureGreenSize = 0x805D, + TextureHeight = 0x1001, + TextureIntensitySize = 0x8061, + TextureInternalFormat = 0x1003, + TextureLequalRSGIX = 0x819C, + TextureLuminanceSize = 0x8060, + TextureMaxLevelSgis = 0x813D, + TextureMaxLodSgis = 0x813B, + TextureMinLodSgis = 0x813A, + TextureRedSize = 0x805C, + TextureResident = 0x8067, + TextureWidth = 0x1000, + } + + public enum TextureTarget + { + DetailTexture2DSgis = 0x8095, + ProxyTexture1D = 0x8063, + ProxyTexture1DArray = 0x8C19, + ProxyTexture1DArrayEXT = 0x8C19, + ProxyTexture1DEXT = 0x8063, + ProxyTexture2D = 0x8064, + ProxyTexture2DArray = 0x8C1B, + ProxyTexture2DArrayEXT = 0x8C1B, + ProxyTexture2DEXT = 0x8064, + ProxyTexture2DMultisample = 0x9101, + ProxyTexture2DMultisampleArray = 0x9103, + ProxyTexture3D = 0x8070, + ProxyTexture3DEXT = 0x8070, + ProxyTexture4dSgis = 0x8135, + ProxyTextureCubeMap = 0x851B, + ProxyTextureCubeMapARB = 0x851B, + ProxyTextureCubeMapEXT = 0x851B, + ProxyTextureCubeMapArray = 0x900B, + ProxyTextureCubeMapArrayARB = 0x900B, + ProxyTextureRectangle = 0x84F7, + ProxyTextureRectangleARB = 0x84F7, + ProxyTextureRectangleNV = 0x84F7, + Texture1D = 0x0DE0, + Texture2D = 0x0DE1, + Texture3D = 0x806F, + Texture3DEXT = 0x806F, + Texture3DOES = 0x806F, + Texture4dSgis = 0x8134, + TextureRectangle = 0x84F5, + TextureCubeMap = 0x8513, + TextureCubeMapPositiveX = 0x8515, + TextureCubeMapNegativeX = 0x8516, + TextureCubeMapPositiveY = 0x8517, + TextureCubeMapNegativeY = 0x8518, + TextureCubeMapPositiveZ = 0x8519, + TextureCubeMapNegativeZ = 0x851A, + TextureCubeMapArray = 0x9009, + TextureCubeMapArrayARB = 0x9009, + TextureCubeMapArrayEXT = 0x9009, + TextureCubeMapArrayOES = 0x9009, + Texture1DArray = 0x8C18, + Texture2DArray = 0x8C1A, + Texture2DMultisample = 0x9100, + Texture2DMultisampleArray = 0x9102, + } + + public enum TextureWrapMode + { + Clamp = 0x2900, + ClampToBorder = 0x812D, + ClampToBorderARB = 0x812D, + ClampToBorderNV = 0x812D, + ClampToBorderSgis = 0x812D, + ClampToEdge = 0x812F, + ClampToEdgeSgis = 0x812F, + Repeat = 0x2901, + } + + public enum VertexPointerType + { + Double = 0x140A, + Float = 0x1406, + Int = 0x1404, + Short = 0x1402, + } + + public enum FramebufferAttachment + { + MaxColorAttachments = 0x8CDF, + MaxColorAttachmentsEXT = 0x8CDF, + MaxColorAttachmentsNV = 0x8CDF, + ColorAttachment0 = 0x8CE0, + ColorAttachment0EXT = 0x8CE0, + ColorAttachment0NV = 0x8CE0, + ColorAttachment0OES = 0x8CE0, + ColorAttachment1 = 0x8CE1, + ColorAttachment1EXT = 0x8CE1, + ColorAttachment1NV = 0x8CE1, + ColorAttachment2 = 0x8CE2, + ColorAttachment2EXT = 0x8CE2, + ColorAttachment2NV = 0x8CE2, + ColorAttachment3 = 0x8CE3, + ColorAttachment3EXT = 0x8CE3, + ColorAttachment3NV = 0x8CE3, + ColorAttachment4 = 0x8CE4, + ColorAttachment4EXT = 0x8CE4, + ColorAttachment4NV = 0x8CE4, + ColorAttachment5 = 0x8CE5, + ColorAttachment5EXT = 0x8CE5, + ColorAttachment5NV = 0x8CE5, + ColorAttachment6 = 0x8CE6, + ColorAttachment6EXT = 0x8CE6, + ColorAttachment6NV = 0x8CE6, + ColorAttachment7 = 0x8CE7, + ColorAttachment7EXT = 0x8CE7, + ColorAttachment7NV = 0x8CE7, + ColorAttachment8 = 0x8CE8, + ColorAttachment8EXT = 0x8CE8, + ColorAttachment8NV = 0x8CE8, + ColorAttachment9 = 0x8CE9, + ColorAttachment9EXT = 0x8CE9, + ColorAttachment9NV = 0x8CE9, + ColorAttachment10 = 0x8CEA, + ColorAttachment10EXT = 0x8CEA, + ColorAttachment10NV = 0x8CEA, + ColorAttachment11 = 0x8CEB, + ColorAttachment11EXT = 0x8CEB, + ColorAttachment11NV = 0x8CEB, + ColorAttachment12 = 0x8CEC, + ColorAttachment12EXT = 0x8CEC, + ColorAttachment12NV = 0x8CEC, + ColorAttachment13 = 0x8CED, + ColorAttachment13EXT = 0x8CED, + ColorAttachment13NV = 0x8CED, + ColorAttachment14 = 0x8CEE, + ColorAttachment14EXT = 0x8CEE, + ColorAttachment14NV = 0x8CEE, + ColorAttachment15 = 0x8CEF, + ColorAttachment15EXT = 0x8CEF, + ColorAttachment15NV = 0x8CEF, + ColorAttachment16 = 0x8CF0, + ColorAttachment17 = 0x8CF1, + ColorAttachment18 = 0x8CF2, + ColorAttachment19 = 0x8CF3, + ColorAttachment20 = 0x8CF4, + ColorAttachment21 = 0x8CF5, + ColorAttachment22 = 0x8CF6, + ColorAttachment23 = 0x8CF7, + ColorAttachment24 = 0x8CF8, + ColorAttachment25 = 0x8CF9, + ColorAttachment26 = 0x8CFA, + ColorAttachment27 = 0x8CFB, + ColorAttachment28 = 0x8CFC, + ColorAttachment29 = 0x8CFD, + ColorAttachment30 = 0x8CFE, + ColorAttachment31 = 0x8CFF, + DepthAttachment = 0x8D00, + DepthStencilAttachment = 0x821A, + DepthAttachmentEXT = 0x8D00, + DepthAttachmentOES = 0x8D00, + } + + public enum RenderbufferTarget + { + Renderbuffer = 0x8D41, + } + + public enum FramebufferTarget + { + Framebuffer = 0x8D40, + DrawFramebuffer = 0x8CA9, + ReadFramebuffer = 0x8CA8, + } + + public enum TextureUnit + { + Texture0 = 0x84C0, + Texture1 = 0x84C1, + Texture2 = 0x84C2, + Texture3 = 0x84C3, + Texture4 = 0x84C4, + Texture5 = 0x84C5, + Texture6 = 0x84C6, + Texture7 = 0x84C7, + Texture8 = 0x84C8, + Texture9 = 0x84C9, + Texture10 = 0x84CA, + Texture11 = 0x84CB, + Texture12 = 0x84CC, + Texture13 = 0x84CD, + Texture14 = 0x84CE, + Texture15 = 0x84CF, + Texture16 = 0x84D0, + Texture17 = 0x84D1, + Texture18 = 0x84D2, + Texture19 = 0x84D3, + Texture20 = 0x84D4, + Texture21 = 0x84D5, + Texture22 = 0x84D6, + Texture23 = 0x84D7, + Texture24 = 0x84D8, + Texture25 = 0x84D9, + Texture26 = 0x84DA, + Texture27 = 0x84DB, + Texture28 = 0x84DC, + Texture29 = 0x84DD, + Texture30 = 0x84DE, + Texture31 = 0x84DF, + } + + public enum TypeEnum + { + QueryWait = 0x8E13, + QueryNoWait = 0x8E14, + QueryByRegionWait = 0x8E15, + QueryByRegionNoWait = 0x8E16, + } + + public enum FragmentOpATI + { + MovATI = 0x8961, + AddATI = 0x8963, + MulATI = 0x8964, + SubATI = 0x8965, + Dot3ATI = 0x8966, + Dot4ATI = 0x8967, + MadATI = 0x8968, + LerpATI = 0x8969, + CndATI = 0x896A, + Cnd0ATI = 0x896B, + Dot2AddATI = 0x896C, + } + + public enum FramebufferStatus + { + FramebufferComplete = 0x8CD5, + FramebufferUndefined = 0x8219, + FramebufferIncompleteAttachment = 0x8CD6, + FramebufferIncompleteMissingAttachment = 0x8CD7, + FramebufferIncompleteDrawBuffer = 0x8CDB, + FramebufferIncompleteReadBuffer = 0x8CDC, + FramebufferUnsupported = 0x8CDD, + FramebufferIncompleteMultisample = 0x8D56, + FramebufferIncompleteLayerTargets = 0x8DA8, + } + + public enum GraphicsResetStatus + { + NoError = 0, + GuiltyContextReset = 0x8253, + InnocentContextReset = 0x8254, + UnknownContextReset = 0x8255, + } + + public enum SyncStatus + { + AlreadySignaled = 0x911A, + TimeoutExpired = 0x911B, + ConditionSatisfied = 0x911C, + WaitFailed = 0x911D, + } + + public enum QueryTarget + { + SamplesPassed = 0x8914, + AnySamplesPassed = 0x8C2F, + AnySamplesPassedConservative = 0x8D6A, + PrimitivesGenerated = 0x8C87, + TransformFeedbackPrimitivesWritten = 0x8C88, + TimeElapsed = 0x88BF, + } + + public enum QueryCounterTarget + { + Timestamp = 0x8E28, + } + + public enum ConvolutionTarget + { + Convolution1D = 0x8010, + Convolution2D = 0x8011, + } + + public enum PathFillMode + { + Invert = 0x150A, + CountUpNV = 0x9088, + CountDownNV = 0x9089, + PathFillModeNV = 0x9080, + } + + public enum ColorTableTarget + { + ColorTable = 0x80D0, + PostConvolutionColorTable = 0x80D1, + PostColorMatrixColorTable = 0x80D2, + } + + public enum VertexBufferObjectParameter + { + BufferAccess = 0x88BB, + BufferAccessFlags = 0x911F, + BufferImmutableStorage = 0x821F, + BufferMapped = 0x88BC, + BufferMapLength = 0x9120, + BufferMapOffset = 0x9121, + BufferSize = 0x8764, + BufferStorageFlags = 0x8220, + BufferUsage = 0x8765, + } + + public enum RenderbufferParameterName + { + RenderbufferWidth = 0x8D42, + RenderbufferHeight = 0x8D43, + RenderbufferInternalFormat = 0x8D44, + RenderbufferSamples = 0x8CAB, + RenderbufferRedSize = 0x8D50, + RenderbufferGreenSize = 0x8D51, + RenderbufferBlueSize = 0x8D52, + RenderbufferAlphaSize = 0x8D53, + RenderbufferDepthSize = 0x8D54, + RenderbufferStencilSize = 0x8D55, + } + + public enum VertexBufferObjectUsage + { + StreamDraw = 0x88E0, + StreamRead = 0x88E1, + StreamCopy = 0x88E2, + StaticDraw = 0x88E4, + StaticRead = 0x88E5, + StaticCopy = 0x88E6, + DynamicDraw = 0x88E8, + DynamicRead = 0x88E9, + DynamicCopy = 0x88EA, + } + + public enum FramebufferParameterName + { + FramebufferDefaultWidth = 0x9310, + FramebufferDefaultHeight = 0x9311, + FramebufferDefaultLayers = 0x9312, + FramebufferDefaultSamples = 0x9313, + FramebufferDefaultFixedSampleLocations = 0x9314, + } + + public enum ProgramParameterPName + { + ProgramBinaryRetrievableHint = 0x8257, + ProgramSeparable = 0x8258, + } + + public enum BlendingFactor + { + Zero = 0, + One = 1, + SrcColor = 0x0300, + OneMinusSrcColor = 0x0301, + DstColor = 0x0306, + OneMinusDstColor = 0x0307, + SrcAlpha = 0x0302, + OneMinusSrcAlpha = 0x0303, + DstAlpha = 0x0304, + OneMinusDstAlpha = 0x0305, + ConstantColor = 0x8001, + OneMinusConstantColor = 0x8002, + ConstantAlpha = 0x8003, + OneMinusConstantAlpha = 0x8004, + SrcAlphaSaturate = 0x0308, + Src1Color = 0x88F9, + OneMinusSrc1Color = 0x88FA, + Src1Alpha = 0x8589, + OneMinusSrc1Alpha = 0x88FB, + } + + public enum BindTransformFeedbackTarget + { + TransformFeedback = 0x8E22, + } + + public enum BlitFramebufferFilter + { + Nearest = 0x2600, + Linear = 0x2601, + } + + public enum BufferStorageTarget + { + ArrayBuffer = 0x8892, + AtomicCounterBuffer = 0x92C0, + CopyReadBuffer = 0x8F36, + CopyWriteBuffer = 0x8F37, + DispatchIndirectBuffer = 0x90EE, + DrawIndirectBuffer = 0x8F3F, + ElementArrayBuffer = 0x8893, + PixelPackBuffer = 0x88EB, + PixelUnpackBuffer = 0x88EC, + QueryBuffer = 0x9192, + ShaderStorageBuffer = 0x90D2, + TextureBuffer = 0x8C2A, + TransformFeedbackBuffer = 0x8C8E, + UniformBuffer = 0x8A11, + } + + public enum CheckFramebufferStatusTarget + { + DrawFramebuffer = 0x8CA9, + ReadFramebuffer = 0x8CA8, + Framebuffer = 0x8D40, + } + + public enum Buffer + { + Color = 0x1800, + Depth = 0x1801, + Stencil = 0x1802, + } + + public enum ClipControlOrigin + { + LowerLeft = 0x8CA1, + UpperLeft = 0x8CA2, + } + + public enum ClipControlDepth + { + NegativeOneToOne = 0x935E, + ZeroToOne = 0x935F, + } + + public enum CopyBufferSubDataTarget + { + ArrayBuffer = 0x8892, + AtomicCounterBuffer = 0x92C0, + CopyReadBuffer = 0x8F36, + CopyWriteBuffer = 0x8F37, + DispatchIndirectBuffer = 0x90EE, + DrawIndirectBuffer = 0x8F3F, + ElementArrayBuffer = 0x8893, + PixelPackBuffer = 0x88EB, + PixelUnpackBuffer = 0x88EC, + QueryBuffer = 0x9192, + ShaderStorageBuffer = 0x90D2, + TextureBuffer = 0x8C2A, + TransformFeedbackBuffer = 0x8C8E, + UniformBuffer = 0x8A11, + } + + public enum DebugSource + { + DebugSourceApi = 0x8246, + DebugSourceWindowSystem = 0x8247, + DebugSourceShaderCompiler = 0x8248, + DebugSourceThirdParty = 0x8249, + DebugSourceApplication = 0x824A, + DebugSourceOther = 0x824B, + DontCare = 0x1100, + } + + public enum DebugType + { + DebugTypeError = 0x824C, + DebugTypeDeprecatedBehavior = 0x824D, + DebugTypeUndefinedBehavior = 0x824E, + DebugTypePortability = 0x824F, + DebugTypePerformance = 0x8250, + DebugTypeMarker = 0x8268, + DebugTypePushGroup = 0x8269, + DebugTypePopGroup = 0x826A, + DebugTypeOther = 0x8251, + DontCare = 0x1100, + } + + public enum DebugSeverity + { + DebugSeverityLow = 0x9148, + DebugSeverityMedium = 0x9147, + DebugSeverityHigh = 0x9146, + DebugSeverityNotification = 0x826B, + DontCare = 0x1100, + } + + public enum SyncCondition + { + SyncGpuCommandsComplete = 0x9117, + } + + public enum FogPName + { + FogMode = 0x0B65, + FogDensity = 0x0B62, + FogStart = 0x0B63, + FogEnd = 0x0B64, + FogIndex = 0x0B61, + FogCoordSrc = 0x8450, + } + + public enum AtomicCounterBufferPName + { + AtomicCounterBufferBinding = 0x92C1, + AtomicCounterBufferDataSize = 0x92C4, + AtomicCounterBufferActiveAtomicCounters = 0x92C5, + AtomicCounterBufferActiveAtomicCounterIndices = 0x92C6, + AtomicCounterBufferReferencedByVertexShader = 0x92C7, + AtomicCounterBufferReferencedByTessControlShader = 0x92C8, + AtomicCounterBufferReferencedByTessEvaluationShader = 0x92C9, + AtomicCounterBufferReferencedByGeometryShader = 0x92CA, + AtomicCounterBufferReferencedByFragmentShader = 0x92CB, + AtomicCounterBufferReferencedByComputeShader = 0x90ED, + } + + public enum UniformBlockPName + { + UniformBlockBinding = 0x8A3F, + UniformBlockDataSize = 0x8A40, + UniformBlockNameLength = 0x8A41, + UniformBlockActiveUniforms = 0x8A42, + UniformBlockActiveUniformIndices = 0x8A43, + UniformBlockReferencedByVertexShader = 0x8A44, + UniformBlockReferencedByTessControlShader = 0x84F0, + UniformBlockReferencedByTessEvaluationShader = 0x84F1, + UniformBlockReferencedByGeometryShader = 0x8A45, + UniformBlockReferencedByFragmentShader = 0x8A46, + UniformBlockReferencedByComputeShader = 0x90EC, + } + + public enum UniformPName + { + UniformType = 0x8A37, + UniformSize = 0x8A38, + UniformNameLength = 0x8A39, + UniformBlockIndex = 0x8A3A, + UniformOffset = 0x8A3B, + UniformArrayStride = 0x8A3C, + UniformMatrixStride = 0x8A3D, + UniformIsRowMajor = 0x8A3E, + UniformAtomicCounterBufferIndex = 0x92DA, + } + + public enum SamplerParameterName + { + TextureWrapS = 0x2802, + TextureWrapT = 0x2803, + TextureWrapR = 0x8072, + TextureMinFilter = 0x2801, + TextureMagFilter = 0x2800, + TextureBorderColor = 0x1004, + TextureMinLod = 0x813A, + TextureMaxLod = 0x813B, + TextureCompareMode = 0x884C, + TextureCompareFunc = 0x884D, + } + + public enum VertexProvokingMode + { + FirstVertexConvention = 0x8E4D, + LastVertexConvention = 0x8E4E, + } + + public enum PatchParameterName + { + PatchVertices = 0x8E72, + PatchDefaultOuterLevel = 0x8E74, + PatchDefaultInnerLevel = 0x8E73, + } + + public enum ObjectIdentifier + { + Buffer = 0x82E0, + Shader = 0x82E1, + Program = 0x82E2, + VertexArray = 0x8074, + Query = 0x82E3, + ProgramPipeline = 0x82E4, + TransformFeedback = 0x8E22, + Sampler = 0x82E6, + Texture = 0x1702, + Renderbuffer = 0x8D41, + Framebuffer = 0x8D40, + } + + public enum ColorBuffer + { + None = 0, + FrontLeft = 0x0400, + FrontRight = 0x0401, + BackLeft = 0x0402, + BackRight = 0x0403, + Front = 0x0404, + Back = 0x0405, + Left = 0x0406, + Right = 0x0407, + FrontAndBack = 0x0408, + ColorAttachment0 = 0x8CE0, + ColorAttachment1 = 0x8CE1, + ColorAttachment2 = 0x8CE2, + ColorAttachment3 = 0x8CE3, + ColorAttachment4 = 0x8CE4, + ColorAttachment5 = 0x8CE5, + ColorAttachment6 = 0x8CE6, + ColorAttachment7 = 0x8CE7, + ColorAttachment8 = 0x8CE8, + ColorAttachment9 = 0x8CE9, + ColorAttachment10 = 0x8CEA, + ColorAttachment11 = 0x8CEB, + ColorAttachment12 = 0x8CEC, + ColorAttachment13 = 0x8CED, + ColorAttachment14 = 0x8CEE, + ColorAttachment15 = 0x8CEF, + ColorAttachment16 = 0x8CF0, + ColorAttachment17 = 0x8CF1, + ColorAttachment18 = 0x8CF2, + ColorAttachment19 = 0x8CF3, + ColorAttachment20 = 0x8CF4, + ColorAttachment21 = 0x8CF5, + ColorAttachment22 = 0x8CF6, + ColorAttachment23 = 0x8CF7, + ColorAttachment24 = 0x8CF8, + ColorAttachment25 = 0x8CF9, + ColorAttachment26 = 0x8CFA, + ColorAttachment27 = 0x8CFB, + ColorAttachment28 = 0x8CFC, + ColorAttachment29 = 0x8CFD, + ColorAttachment30 = 0x8CFE, + ColorAttachment31 = 0x8CFF, + } + + public enum MapQuery + { + Coeff = 0x0A00, + Order = 0x0A01, + Domain = 0x0A02, + } + + public enum VertexArrayPName + { + VertexAttribArrayEnabled = 0x8622, + VertexAttribArraySize = 0x8623, + VertexAttribArrayStride = 0x8624, + VertexAttribArrayType = 0x8625, + VertexAttribArrayNormalized = 0x886A, + VertexAttribArrayInteger = 0x88FD, + VertexAttribArrayLong = 0x874E, + VertexAttribArrayDivisor = 0x88FE, + VertexAttribRelativeOffset = 0x82D5, + } + + public enum TransformFeedbackPName + { + TransformFeedbackBufferBinding = 0x8C8F, + TransformFeedbackBufferStart = 0x8C84, + TransformFeedbackBufferSize = 0x8C85, + TransformFeedbackPaused = 0x8E23, + TransformFeedbackActive = 0x8E24, + } + + public enum SyncParameterName + { + ObjectType = 0x9112, + SyncStatus = 0x9114, + SyncCondition = 0x9113, + SyncFlags = 0x9115, + } + + public enum ShaderParameterName + { + ShaderType = 0x8B4F, + DeleteStatus = 0x8B80, + CompileStatus = 0x8B81, + InfoLogLength = 0x8B84, + ShaderSourceLength = 0x8B88, + } + + public enum QueryObjectParameterName + { + QueryResultAvailable = 0x8867, + QueryResult = 0x8866, + QueryResultNoWait = 0x9194, + QueryTarget = 0x82EA, + } + + public enum QueryParameterName + { + CurrentQuery = 0x8865, + QueryCounterBits = 0x8864, + } + + public enum ProgramStagePName + { + ActiveSubroutineUniforms = 0x8DE6, + ActiveSubroutineUniformLocations = 0x8E47, + ActiveSubroutines = 0x8DE5, + ActiveSubroutineUniformMaxLength = 0x8E49, + ActiveSubroutineMaxLength = 0x8E48, + } + + public enum PipelineParameterName + { + ActiveProgram = 0x8259, + VertexShader = 0x8B31, + TessControlShader = 0x8E88, + TessEvaluationShader = 0x8E87, + GeometryShader = 0x8DD9, + FragmentShader = 0x8B30, + InfoLogLength = 0x8B84, + } + + public enum ProgramInterface + { + Uniform = 0x92E1, + UniformBlock = 0x92E2, + ProgramInput = 0x92E3, + ProgramOutput = 0x92E4, + VertexSubroutine = 0x92E8, + TessControlSubroutine = 0x92E9, + TessEvaluationSubroutine = 0x92EA, + GeometrySubroutine = 0x92EB, + FragmentSubroutine = 0x92EC, + ComputeSubroutine = 0x92ED, + VertexSubroutineUniform = 0x92EE, + TessControlSubroutineUniform = 0x92EF, + TessEvaluationSubroutineUniform = 0x92F0, + GeometrySubroutineUniform = 0x92F1, + FragmentSubroutineUniform = 0x92F2, + ComputeSubroutineUniform = 0x92F3, + TransformFeedbackVarying = 0x92F4, + TransformFeedbackBuffer = 0x8C8E, + BufferVariable = 0x92E5, + ShaderStorageBlock = 0x92E6, + } + + public enum VertexAttribEnum + { + VertexAttribArrayBufferBinding = 0x889F, + VertexAttribArrayEnabled = 0x8622, + VertexAttribArraySize = 0x8623, + VertexAttribArrayStride = 0x8624, + VertexAttribArrayType = 0x8625, + VertexAttribArrayNormalized = 0x886A, + VertexAttribArrayInteger = 0x88FD, + VertexAttribArrayDivisor = 0x88FE, + CurrentVertexAttrib = 0x8626, + } + + public enum VertexAttribType + { + Byte = 0x1400, + Short = 0x1402, + Int = 0x1404, + Fixed = 0x140C, + Float = 0x1406, + HalfFloat = 0x140B, + Double = 0x140A, + UnsignedByte = 0x1401, + UnsignedShort = 0x1403, + UnsignedInt = 0x1405, + Int2101010Rev = 0x8D9F, + UnsignedInt2101010Rev = 0x8368, + UnsignedInt10f11f11fRev = 0x8C3B, + } + + public enum InternalFormatPName + { + NumSampleCounts = 0x9380, + Samples = 0x80A9, + InternalformatSupported = 0x826F, + InternalformatPreferred = 0x8270, + InternalformatRedSize = 0x8271, + InternalformatGreenSize = 0x8272, + InternalformatBlueSize = 0x8273, + InternalformatAlphaSize = 0x8274, + InternalformatDepthSize = 0x8275, + InternalformatStencilSize = 0x8276, + InternalformatSharedSize = 0x8277, + InternalformatRedType = 0x8278, + InternalformatGreenType = 0x8279, + InternalformatBlueType = 0x827A, + InternalformatAlphaType = 0x827B, + InternalformatDepthType = 0x827C, + InternalformatStencilType = 0x827D, + MaxWidth = 0x827E, + MaxHeight = 0x827F, + MaxDepth = 0x8280, + MaxLayers = 0x8281, + ColorComponents = 0x8283, + ColorRenderable = 0x8286, + DepthRenderable = 0x8287, + StencilRenderable = 0x8288, + FramebufferRenderable = 0x8289, + FramebufferRenderableLayered = 0x828A, + FramebufferBlend = 0x828B, + ReadPixels = 0x828C, + ReadPixelsFormat = 0x828D, + ReadPixelsType = 0x828E, + TextureImageFormat = 0x828F, + TextureImageType = 0x8290, + GetTextureImageFormat = 0x8291, + GetTextureImageType = 0x8292, + Mipmap = 0x8293, + GenerateMipmap = 0x8191, + AutoGenerateMipmap = 0x8295, + ColorEncoding = 0x8296, + SrgbRead = 0x8297, + SrgbWrite = 0x8298, + Filter = 0x829A, + VertexTexture = 0x829B, + TessControlTexture = 0x829C, + TessEvaluationTexture = 0x829D, + GeometryTexture = 0x829E, + FragmentTexture = 0x829F, + ComputeTexture = 0x82A0, + TextureShadow = 0x82A1, + TextureGather = 0x82A2, + TextureGatherShadow = 0x82A3, + ShaderImageLoad = 0x82A4, + ShaderImageStore = 0x82A5, + ShaderImageAtomic = 0x82A6, + ImageTexelSize = 0x82A7, + ImageCompatibilityClass = 0x82A8, + ImagePixelFormat = 0x82A9, + ImagePixelType = 0x82AA, + ImageFormatCompatibilityType = 0x90C7, + SimultaneousTextureAndDepthTest = 0x82AC, + SimultaneousTextureAndStencilTest = 0x82AD, + SimultaneousTextureAndDepthWrite = 0x82AE, + SimultaneousTextureAndStencilWrite = 0x82AF, + TextureCompressed = 0x86A1, + TextureCompressedBlockWidth = 0x82B1, + TextureCompressedBlockHeight = 0x82B2, + TextureCompressedBlockSize = 0x82B3, + ClearBuffer = 0x82B4, + TextureView = 0x82B5, + ViewCompatibilityClass = 0x82B6, + ClearTexture = 0x9365, + } + + public enum FramebufferAttachmentParameterName + { + FramebufferAttachmentRedSize = 0x8212, + FramebufferAttachmentGreenSize = 0x8213, + FramebufferAttachmentBlueSize = 0x8214, + FramebufferAttachmentAlphaSize = 0x8215, + FramebufferAttachmentDepthSize = 0x8216, + FramebufferAttachmentStencilSize = 0x8217, + FramebufferAttachmentComponentType = 0x8211, + FramebufferAttachmentColorEncoding = 0x8210, + FramebufferAttachmentObjectName = 0x8CD1, + FramebufferAttachmentTextureLevel = 0x8CD2, + FramebufferAttachmentTextureCubeMapFace = 0x8CD3, + FramebufferAttachmentLayered = 0x8DA7, + FramebufferAttachmentTextureLayer = 0x8CD4, + } + + public enum ProgramInterfacePName + { + ActiveResources = 0x92F5, + MaxNameLength = 0x92F6, + MaxNumActiveVariables = 0x92F7, + MaxNumCompatibleSubroutines = 0x92F8, + } + + public enum PrecisionType + { + LowFloat = 0x8DF0, + MediumFloat = 0x8DF1, + HighFloat = 0x8DF2, + LowInt = 0x8DF3, + MediumInt = 0x8DF4, + HighInt = 0x8DF5, + } + + public enum VertexAttribPointerType + { + Byte = 0x1400, + UnsignedByte = 0x1401, + Short = 0x1402, + UnsignedShort = 0x1403, + Int = 0x1404, + UnsignedInt = 0x1405, + Float = 0x1406, + Double = 0x140A, + HalfFloat = 0x140B, + Fixed = 0x140C, + Int2101010Rev = 0x8D9F, + UnsignedInt2101010Rev = 0x8368, + UnsignedInt10f11f11fRev = 0x8C3B, + } + + public enum SubroutineParameterName + { + NumCompatibleSubroutines = 0x8E4A, + CompatibleSubroutines = 0x8E4B, + UniformSize = 0x8A38, + UniformNameLength = 0x8A39, + } + + public enum GetFramebufferParameter + { + FramebufferDefaultWidth = 0x9310, + FramebufferDefaultHeight = 0x9311, + FramebufferDefaultLayers = 0x9312, + FramebufferDefaultSamples = 0x9313, + FramebufferDefaultFixedSampleLocations = 0x9314, + Doublebuffer = 0x0C32, + ImplementationColorReadFormat = 0x8B9B, + ImplementationColorReadType = 0x8B9A, + Samples = 0x80A9, + SampleBuffers = 0x80A8, + Stereo = 0x0C33, + } + + public enum PathStringFormat + { + PathFormatSvgNV = 0x9070, + PathFormatPsNV = 0x9071, + } + + public enum PathFontTarget + { + StandardFontNameNV = 0x9072, + SystemFontNameNV = 0x9073, + FileNameNV = 0x9074, + } + + public enum PathHandleMissingGlyphs + { + SkipMissingGlyphNV = 0x90A9, + UseMissingGlyphNV = 0x90AA, + } + + public enum PathParameter + { + PathStrokeWidthNV = 0x9075, + PathInitialEndCapNV = 0x9077, + PathTerminalEndCapNV = 0x9078, + PathJoinStyleNV = 0x9079, + PathMiterLimitNV = 0x907A, + PathInitialDashCapNV = 0x907C, + PathTerminalDashCapNV = 0x907D, + PathDashOffsetNV = 0x907E, + PathClientLengthNV = 0x907F, + PathDashOffsetResetNV = 0x90B4, + PathFillModeNV = 0x9080, + PathFillMaskNV = 0x9081, + PathFillCoverModeNV = 0x9082, + PathStrokeCoverModeNV = 0x9083, + PathStrokeMaskNV = 0x9084, + PathEndCapsNV = 0x9076, + PathDashCapsNV = 0x907B, + PathCommandCountNV = 0x909D, + PathCoordCountNV = 0x909E, + PathDashArrayCountNV = 0x909F, + PathComputedLengthNV = 0x90A0, + PathObjectBoundingBoxNV = 0x908A, + PathFillBoundingBoxNV = 0x90A1, + PathStrokeBoundingBoxNV = 0x90A2, + } + + public enum PathColor + { + PrimaryColor = 0x8577, + PrimaryColorNV = 0x852C, + SecondaryColorNV = 0x852D, + } + + public enum PathGenMode + { + None = 0, + EyeLinear = 0x2400, + ObjectLinear = 0x2401, + PathObjectBoundingBoxNV = 0x908A, + Constant = 0x8576, + } + + public enum TextureLayout + { + LayoutGeneralEXT = 0x958D, + LayoutColorAttachmentEXT = 0x958E, + LayoutDepthStencilAttachmentEXT = 0x958F, + LayoutDepthStencilReadOnlyEXT = 0x9590, + LayoutShaderReadOnlyEXT = 0x9591, + LayoutTransferSrcEXT = 0x9592, + LayoutTransferDstEXT = 0x9593, + LayoutDepthReadOnlyStencilAttachmentEXT = 0x9530, + LayoutDepthAttachmentStencilReadOnlyEXT = 0x9531, + } + + public enum PathTransformType + { + None = 0, + TranslateXNV = 0x908E, + TranslateYNV = 0x908F, + Translate2DNV = 0x9090, + Translate3DNV = 0x9091, + Affine2DNV = 0x9092, + Affine3DNV = 0x9094, + TransposeAffine2DNV = 0x9096, + TransposeAffine3DNV = 0x9098, + } + + public enum PathElementType + { + Utf8NV = 0x909A, + Utf16NV = 0x909B, + } + + public enum PathCoverMode + { + ConvexHullNV = 0x908B, + BoundingBoxNV = 0x908D, + BoundingBoxOfBoundingBoxesNV = 0x909C, + PathFillCoverModeNV = 0x9082, + } + + public enum PathFontStyle + { + None = 0, + BoldBitNV = 0x01, + ItalicBitNV = 0x02, + } + + public enum PathMetricMask + { + GlyphWidthBitNV = 0x01, + GlyphHeightBitNV = 0x02, + GlyphHorizontalBearingXBitNV = 0x04, + GlyphHorizontalBearingYBitNV = 0x08, + GlyphHorizontalBearingAdvanceBitNV = 0x10, + GlyphVerticalBearingXBitNV = 0x20, + GlyphVerticalBearingYBitNV = 0x40, + GlyphVerticalBearingAdvanceBitNV = 0x80, + GlyphHasKerningBitNV = 0x100, + FontXMinBoundsBitNV = 0x00010000, + FontYMinBoundsBitNV = 0x00020000, + FontXMaxBoundsBitNV = 0x00040000, + FontYMaxBoundsBitNV = 0x00080000, + FontUnitsPerEmBitNV = 0x00100000, + FontAscenderBitNV = 0x00200000, + FontDescenderBitNV = 0x00400000, + FontHeightBitNV = 0x00800000, + FontMaxAdvanceWidthBitNV = 0x01000000, + FontMaxAdvanceHeightBitNV = 0x02000000, + FontUnderlinePositionBitNV = 0x04000000, + FontUnderlineThicknessBitNV = 0x08000000, + FontHasKerningBitNV = 0x10000000, + FontNumGlyphIndicesBitNV = 0x20000000, + } + + public enum PathListMode + { + AccumAdjacentPairsNV = 0x90AD, + AdjacentPairsNV = 0x90AE, + FirstToRestNV = 0x90AF, + } + + public enum ProgramPropertyARB + { + DeleteStatus = 0x8B80, + LinkStatus = 0x8B82, + ValidateStatus = 0x8B83, + InfoLogLength = 0x8B84, + AttachedShaders = 0x8B85, + ActiveAtomicCounterBuffers = 0x92D9, + ActiveAttributes = 0x8B89, + ActiveAttributeMaxLength = 0x8B8A, + ActiveUniforms = 0x8B86, + ActiveUniformBlocks = 0x8A36, + ActiveUniformBlockMaxNameLength = 0x8A35, + ActiveUniformMaxLength = 0x8B87, + ComputeWorkGroupSize = 0x8267, + ProgramBinaryLength = 0x8741, + TransformFeedbackBufferMode = 0x8C7F, + TransformFeedbackVaryings = 0x8C83, + TransformFeedbackVaryingMaxLength = 0x8C76, + GeometryVerticesOut = 0x8916, + GeometryInputType = 0x8917, + GeometryOutputType = 0x8918, + } +} diff --git a/src/SlatedGameToolkit.Framework/Graphics/Programs/GLProgram.cs b/src/SlatedGameToolkit.Framework/Graphics/Programs/GLProgram.cs deleted file mode 100644 index 3413fd8..0000000 --- a/src/SlatedGameToolkit.Framework/Graphics/Programs/GLProgram.cs +++ /dev/null @@ -1,105 +0,0 @@ -using System; -using System.Numerics; -using System.Runtime.InteropServices; -using System.Text; -using SDL2; -using SlatedGameToolkit.Framework.Exceptions; -using SlatedGameToolkit.Framework.Graphics; -using SlatedGameToolkit.Framework.Graphics.Window; - -namespace SlatedGameToolkit.Framework.Graphics.Programs -{ - /// - /// Represents a GL Program. - /// This class is abstract and serves as a parent to the possible types of programs. - /// Gives access to common OpenGL program associated function calls. - /// - public abstract class GLProgram : IDisposable - { - private WindowContext context; - protected readonly UIntPtr handle; - protected GLCreateProgram createProgram; - protected GLDeleteProgram deleteProgram; - protected GLLinkProgram linkProgram; - protected GLGetProgramInfoLog getProgramInfoLog; - protected GLProgramParameter programParameter; - private GLUseProgram useProgram; - private readonly GLGetAttribLocation getAttribLocation; - private readonly GLGetUniformLocation getUniformLocation; - private readonly GLUniformMatrix4fv uniformMatrix4Fv; - - - /// - /// Creates an OpenGL program. - /// - /// This is bound to the current context. - /// - internal GLProgram() { - this.context = WindowContextsManager.CurrentWindowContext; - createProgram = OpenGL.RetrieveGLDelegate("glCreateProgram"); - deleteProgram = OpenGL.RetrieveGLDelegate("glDeleteProgram"); - linkProgram = OpenGL.RetrieveGLDelegate("glLinkProgram"); - getProgramInfoLog = OpenGL.RetrieveGLDelegate("glGetProgramInfoLog"); - programParameter = OpenGL.RetrieveGLDelegate("glProgramParameteri"); - useProgram = OpenGL.RetrieveGLDelegate("glUseProgram"); - getAttribLocation = OpenGL.RetrieveGLDelegate("glGetAttribLocation"); - getUniformLocation = OpenGL.RetrieveGLDelegate("glGetUniformLocation"); - uniformMatrix4Fv = OpenGL.RetrieveGLDelegate("glUniformMatrix4fv"); - - handle = createProgram(); - OpenGLErrorException.CheckGLErrorStatus(); - } - - - public int GetAttributeLocation(string name) { - int res = getAttribLocation(handle, name); - OpenGLErrorException.CheckGLErrorStatus(); - return res; - } - - public int GetUniformLocation(string name) { - int res = getUniformLocation(handle, name); - OpenGLErrorException.CheckGLErrorStatus(); - return res; - } - - public void SetUniformMatrix4x4(int location, Matrix4x4 matrix, bool transpose = false) { - Use(); - float[] mat4 = new float[] { - matrix.M11, matrix.M21, matrix.M31, matrix.M41, - matrix.M21, matrix.M22, matrix.M23, matrix.M24, - matrix.M31, matrix.M32, matrix.M33, matrix.M34, - matrix.M41, matrix.M42, matrix.M43, matrix.M44 - }; - uniformMatrix4Fv(location, 1, transpose, mat4); - OpenGLErrorException.CheckGLErrorStatus(); - } - - /// - /// Binds this program. - /// - public virtual void Use() { - useProgram(handle); - uint written; - byte[] log = new byte[2048]; - getProgramInfoLog(handle, (uint)log.Length, out written, log); - if (written > 0) { - throw new OpenGLException(Encoding.UTF8.GetString(log)); - } - OpenGLErrorException.CheckGLErrorStatus(); - } - - /// - /// Disposes of the program. - /// - public virtual void Dispose() - { - deleteProgram(handle); - OpenGLErrorException.CheckGLErrorStatus(); - } - - ~GLProgram() { - Dispose(); - } - } -} \ No newline at end of file diff --git a/src/SlatedGameToolkit.Framework/Graphics/Programs/GLShaderProgram.cs b/src/SlatedGameToolkit.Framework/Graphics/Programs/GLShaderProgram.cs deleted file mode 100644 index 9a46d16..0000000 --- a/src/SlatedGameToolkit.Framework/Graphics/Programs/GLShaderProgram.cs +++ /dev/null @@ -1,61 +0,0 @@ -using System; -using System.Text; -using SlatedGameToolkit.Framework.Exceptions; -using SlatedGameToolkit.Framework.Graphics; -using SlatedGameToolkit.Framework.Graphics.Shaders; - -namespace SlatedGameToolkit.Framework.Graphics.Programs -{ - public class GLShaderProgram : GLProgram - { - private readonly GLShader[] shaders; - private readonly GLAttachShader attachShader; - private readonly GLDetachShader detachShader; - public GLShaderProgram(params GLShader[] shaders) : base() { - if (shaders.Length == 0) throw new ArgumentException("Requires at least one shader for shader program."); - this.shaders = shaders; - - attachShader = OpenGL.RetrieveGLDelegate("glAttachShader"); - detachShader = OpenGL.RetrieveGLDelegate("glDetachShader"); - - - foreach (GLShader shader in shaders) - { - attachShader(handle, shader.Handle); - OpenGLErrorException.CheckGLErrorStatus(); - } - - linkProgram(handle); - uint length; - byte[] log = new byte[2048]; - getProgramInfoLog(handle, (uint)log.Length, out length, log); - if (length > 0) { - Dispose(); - throw new OpenGLException(Encoding.UTF8.GetString(log)); - } - OpenGLErrorException.CheckGLErrorStatus(); - - foreach (GLShader shader in shaders) - { - detachShader(handle, shader.Handle); - OpenGLErrorException.CheckGLErrorStatus(); - } - } - - - /// - /// Disposes of the shaders and this program. - /// - public override void Dispose() { - foreach (GLShader shader in shaders) - { - shader.Dispose(); - } - base.Dispose(); - } - - ~GLShaderProgram() { - Dispose(); - } - } -} \ No newline at end of file diff --git a/src/SlatedGameToolkit.Framework/Graphics/Render/Batch.cs b/src/SlatedGameToolkit.Framework/Graphics/Render/Batch.cs deleted file mode 100644 index 0e63711..0000000 --- a/src/SlatedGameToolkit.Framework/Graphics/Render/Batch.cs +++ /dev/null @@ -1,121 +0,0 @@ -using System; -using System.Drawing; -using System.Numerics; -using SlatedGameToolkit.Framework.Graphics.Meshes; -using SlatedGameToolkit.Framework.Graphics; -using SlatedGameToolkit.Framework.Graphics.Textures; -using SlatedGameToolkit.Framework.Graphics.Shaders; -using SlatedGameToolkit.Framework.Graphics.Programs; -using SlatedGameToolkit.Framework.Exceptions; - -namespace SlatedGameToolkit.Framework.Graphics.Render -{ - public class Batch : IDisposable { - private int projLoc, viewLoc, modelLoc; - private Camera camera; - private GLShaderProgram shaderProgram; - private Texture texture; - private bool disposed; - private VertexArray vertexArray; - private const int VERTEX_LENGTH = 9; - private GLMultiDrawElements multiDrawElements; - public bool Batching { get; private set; } - - private Matrix4x4 modelsMatrix; - private float[] data; - private uint[] indices; - private uint[] lengths; - private uint[] offsets; - private uint dataIndex, indicesIndex, lengthsIndex; - - public Batch(Camera camera, GLShaderProgram shaderProgram, uint BatchVertexSize = 4096) { - multiDrawElements = OpenGL.RetrieveGLDelegate("glMultiDrawElements"); - this.camera = camera; - this.shaderProgram = shaderProgram; - indices = new uint[BatchVertexSize]; - lengths = new uint[BatchVertexSize]; - offsets = new uint[BatchVertexSize]; - data = new float[BatchVertexSize * VERTEX_LENGTH]; - vertexArray = new VertexArray(); - GLGetAttribLocation attribLocation = OpenGL.RetrieveGLDelegate("glGetAttribLocation"); - VertexAttributeDefinition[] definitions = new VertexAttributeDefinition[3]; - definitions[0] = new VertexAttributeDefinition((uint)shaderProgram.GetAttributeLocation("aPosition"), 3, 3 * sizeof(float), 0); - definitions[1] = new VertexAttributeDefinition((uint)shaderProgram.GetAttributeLocation("aColor"), 4, 4 * sizeof(float), 3 * sizeof(float)); - definitions[2] = new VertexAttributeDefinition((uint)shaderProgram.GetAttributeLocation("aTexCoord"), 2, 2 * sizeof(float), (4 + 3) * sizeof(float)); - modelLoc = shaderProgram.GetUniformLocation("models"); - viewLoc = shaderProgram.GetUniformLocation("view"); - projLoc = shaderProgram.GetUniformLocation("projection"); - vertexArray.defineVertexAttributes(definitions: definitions); - } - - public virtual void Begin(Texture texture, Matrix4x4 modelsMatrix) { - if (Batching) throw new InvalidOperationException("This batch is already started."); - this.texture = texture ?? throw new ArgumentNullException("texture"); - this.Batching = true; - this.modelsMatrix = modelsMatrix; - } - - public virtual void Dispose() - { - if (disposed) return; - if (Batching) End(); - disposed = true; - vertexArray.Dispose(); - } - - public virtual void Add(IMeshable meshable, Color color) { - ValueTuple[] vertices = meshable.Vertices; - uint[] indices = meshable.Elements; - if (vertices.Length * VERTEX_LENGTH + dataIndex >= data.Length || indices.Length + indicesIndex >= indicesIndex) Flush(); - for (int i = 0; i < vertices.Length; i++) { - data[dataIndex] = vertices[i].Item1.X; - dataIndex++; - data[dataIndex] = vertices[i].Item1.Y; - dataIndex++; - data[dataIndex] = vertices[i].Item1.Z; - dataIndex++; - - data[dataIndex] = (float) color.A / byte.MaxValue; - dataIndex++; - data[dataIndex] = (float) color.R / byte.MaxValue; - dataIndex++; - data[dataIndex] = (float) color.G / byte.MaxValue; - dataIndex++; - data[dataIndex] = (float) color.B / byte.MaxValue; - dataIndex++; - - data[dataIndex] = vertices[i].Item2.X; - dataIndex++; - data[dataIndex] = vertices[i].Item2.Y; - dataIndex++; - - uint elementsCount = (uint)indices.Length; - Array.Copy(indices, indices, elementsCount); - indicesIndex += elementsCount; - - lengths[lengthsIndex] = elementsCount; - lengthsIndex ++; - } - } - - public virtual void End() { - if (!Batching) throw new InvalidOperationException("This batch was never started."); - this.Batching = false; - Flush(); - } - - protected virtual void Flush() { - texture.Use(); - vertexArray.Use(); - vertexArray.BufferVertices(data); - vertexArray.BufferIndices(indices); - dataIndex = 0; - indicesIndex = 0; - lengthsIndex = 0; - shaderProgram.SetUniformMatrix4x4(modelLoc, modelsMatrix); - shaderProgram.SetUniformMatrix4x4(viewLoc, camera.ViewMatrix); - shaderProgram.SetUniformMatrix4x4(projLoc, camera.ProjectionMatrix); - multiDrawElements(GLEnum.GL_TRIANGLE_STRIP, lengths, GLEnum.GL_UNSIGNED_INT, offsets, lengths.Length); - } - } -} \ No newline at end of file diff --git a/src/SlatedGameToolkit.Framework/Graphics/Render/Camera.cs b/src/SlatedGameToolkit.Framework/Graphics/Render/Camera.cs index 74bc458..016418d 100644 --- a/src/SlatedGameToolkit.Framework/Graphics/Render/Camera.cs +++ b/src/SlatedGameToolkit.Framework/Graphics/Render/Camera.cs @@ -1,36 +1,53 @@ +using System; using System.Numerics; +using SlatedGameToolkit.Framework.Utilities; namespace SlatedGameToolkit.Framework.Graphics.Render { public class Camera { - private bool viewUpdated, projectionUpdated; - public virtual Vector3 Up { get; set; } - private Vector3 trans, lookAt; - private float nearField, farField; + private bool viewUpdated = true, projectionUpdated = true, orthographic; + public virtual Vector3 Up { get; set; } = Vector3.UnitY; + private Vector3 position, lookAt; + private float nearField = 0.01f, farField = 100f; private float width, height; - private Matrix4x4 lookAtMatrix; - private Matrix4x4 view, projection; - public virtual bool Orthographic { get; set; } - - public virtual Vector3 Position { + private Matrix4x4 lookAtMatrix = Matrix4x4.Identity; + private Matrix4x4 view = Matrix4x4.Identity, projection; + public bool Orthographic { get { - return trans; - } - + return orthographic; + } + set { - this.trans = value; + orthographic = value; + projectionUpdated = true; + } + } + + public Vector3 Position { + get { + return position; + } + set { + this.position = value; viewUpdated = true; } } + public Vector3 CameraFront { + get { + return (LookAt - Position).NormalizeSafe(default(Vector3)); + } + set { + LookAt = (position + value.NormalizeSafe(default(Vector3))); + } + } + public Vector3 LookAt { get { return lookAt; } - set { this.lookAt = value; - lookAtMatrix = Matrix4x4.CreateLookAt(-trans, value, Up); viewUpdated = true; } } @@ -61,10 +78,10 @@ namespace SlatedGameToolkit.Framework.Graphics.Render get { return width; } - set { - width = value; - projectionUpdated = true; - } + set { + width = value; + projectionUpdated = true; + } } public virtual float Height { get { @@ -79,7 +96,7 @@ namespace SlatedGameToolkit.Framework.Graphics.Render public Matrix4x4 ViewMatrix { get { if (viewUpdated) { - view = Matrix4x4.CreateTranslation(-trans) * lookAtMatrix; + view = Matrix4x4.CreateLookAt(Position, LookAt, Up); viewUpdated = false; } return view; @@ -99,5 +116,14 @@ namespace SlatedGameToolkit.Framework.Graphics.Render return projection; } } + + public Camera(float width, float height) { + if (width <= 0) throw new ArgumentException("Width can't be less than or equal to 0."); + if (height <= 0) throw new ArgumentException("Height can't be less than or equal to 0."); + this.Width = width; + this.Height = height; + this.Position = new Vector3(0, 0, 3); + this.CameraFront = -Vector3.UnitZ; + } } } \ No newline at end of file diff --git a/src/SlatedGameToolkit.Framework/Graphics/Render/Camera2D.cs b/src/SlatedGameToolkit.Framework/Graphics/Render/Camera2D.cs index a54058d..83ac06a 100644 --- a/src/SlatedGameToolkit.Framework/Graphics/Render/Camera2D.cs +++ b/src/SlatedGameToolkit.Framework/Graphics/Render/Camera2D.cs @@ -9,14 +9,13 @@ namespace SlatedGameToolkit.Framework.Graphics.Render } set { - base.Position = new Vector3(value, 0); + base.Position = new Vector3(value, base.Position.Z); + base.CameraFront = -Vector3.UnitZ; } } - public Camera2D() { + public Camera2D(int width, int height) : base(width, height) { this.Orthographic = true; - this.Up = Vector3.UnitY; - this.LookAt = new Vector3(0, 0, 1); } } } \ No newline at end of file diff --git a/src/SlatedGameToolkit.Framework/Graphics/Render/IRenderable.cs b/src/SlatedGameToolkit.Framework/Graphics/Render/IRenderable.cs deleted file mode 100644 index a26f383..0000000 --- a/src/SlatedGameToolkit.Framework/Graphics/Render/IRenderable.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System.Drawing; -using SlatedGameToolkit.Framework.Graphics.Meshes; -using SlatedGameToolkit.Framework.Graphics.Textures; - -namespace SlatedGameToolkit.Framework.Graphics.Render -{ - public interface IRenderable : IMeshable - { - Texture Texture { get; } - Color Color { get; } - } -} \ No newline at end of file diff --git a/src/SlatedGameToolkit.Framework/Graphics/Render/MeshBatch.cs b/src/SlatedGameToolkit.Framework/Graphics/Render/MeshBatch.cs new file mode 100644 index 0000000..43951c6 --- /dev/null +++ b/src/SlatedGameToolkit.Framework/Graphics/Render/MeshBatch.cs @@ -0,0 +1,166 @@ +using System; +using System.Drawing; +using System.Numerics; +using SlatedGameToolkit.Framework.Graphics.Meshes; +using SlatedGameToolkit.Framework.Graphics.OpenGL; +using SlatedGameToolkit.Framework.Graphics.Render.Programs; +using SlatedGameToolkit.Framework.Graphics.Render.Shaders; +using SlatedGameToolkit.Framework.Graphics.Textures; +using SlatedGameToolkit.Framework.Graphics.Window; +using SlatedGameToolkit.Framework.Utilities; + +namespace SlatedGameToolkit.Framework.Graphics.Render +{ + public class MeshBatch : IDisposable { + public GLContext GLContext {get; private set; } + private const int VERTEX_LENGTH = 9; + private int projLoc, viewLoc, modelLoc; + private Camera camera; + private RenderProgram renderProgram; + private Texture texture; + private Texture fillerTexture; + private bool disposed; + private VertexArrayBuffers vertexBuffers; + public bool Batching { get; private set; } + + private Matrix4x4 modelsMatrix; + private float[] data; + private uint[] indices; + private int[] lengths; + private int[] indiceOffsets; + private int[] verticeOffsets; + private int dataIndex, indicesIndex, offsetIndex; + + public MeshBatch(Camera camera, RenderProgram renderProgram = null, uint BatchVertexSize = 4096) { + if (renderProgram == null) { + VertexShader vert = new VertexShader(EmbeddedResourceUtils.ReadEmbeddedResourceText("default.vert")); + FragmentShader frag = new FragmentShader(EmbeddedResourceUtils.ReadEmbeddedResourceText("default.frag")); + renderProgram = new RenderProgram(null, vert, frag); + } + this.renderProgram = renderProgram; + this.GLContext = renderProgram.GLContext; + this.camera = camera; + indices = new uint[BatchVertexSize]; + lengths = new int[BatchVertexSize]; + indiceOffsets = new int[BatchVertexSize]; + data = new float[BatchVertexSize * VERTEX_LENGTH]; + verticeOffsets = new int[BatchVertexSize]; + vertexBuffers = new VertexArrayBuffers(GLContext); + VertexAttributeDefinition[] definitions = new VertexAttributeDefinition[3]; + definitions[0] = new VertexAttributeDefinition((uint)GLContext.GetAttribLocation(renderProgram.Handle, "aPosition"), 3); + definitions[1] = new VertexAttributeDefinition((uint)GLContext.GetAttribLocation(renderProgram.Handle, "aColor"), 4); + definitions[2] = new VertexAttributeDefinition((uint)GLContext.GetAttribLocation(renderProgram.Handle, "aTexCoord"), 2); + renderProgram.Use(); + modelLoc = GLContext.GetUniformLocation(renderProgram.Handle, "models"); + viewLoc = GLContext.GetUniformLocation(renderProgram.Handle, "view"); + projLoc = GLContext.GetUniformLocation(renderProgram.Handle, "projection"); + vertexBuffers.defineVertexAttributes(definitions: definitions); + + fillerTexture = new Texture(GameEngine.FillerTextureData); + } + + public virtual void Begin(Matrix4x4 modelsMatrix) { + if (Batching) throw new InvalidOperationException("This batch is already started."); + this.Batching = true; + this.modelsMatrix = modelsMatrix; + } + + public virtual void Draw(IMeshable meshable) { + if (meshable.Texture != this.texture) { + if (this.texture != null) { + Flush(); + } + this.texture = meshable.Texture ?? fillerTexture; + } + ValueTuple[] vertices = meshable.Vertices; + uint[] indices = meshable.Elements; + if (vertices.Length * VERTEX_LENGTH + dataIndex >= data.Length || indices.Length + indicesIndex >= this.indices.Length) + Flush(); + for (int i = 0; i < vertices.Length; i++) { + data[dataIndex] = vertices[i].Item1.X; + dataIndex++; + data[dataIndex] = vertices[i].Item1.Y; + dataIndex++; + data[dataIndex] = vertices[i].Item1.Z; + dataIndex++; + + data[dataIndex] = meshable.Color.RedAsFloat(); + dataIndex++; + data[dataIndex] = meshable.Color.GreenAsFloat(); + dataIndex++; + data[dataIndex] = meshable.Color.BlueAsFloat(); + dataIndex++; + data[dataIndex] = meshable.Color.AlphaAsFloat(); + dataIndex++; + + data[dataIndex] = vertices[i].Item2.X; + dataIndex++; + data[dataIndex] = vertices[i].Item2.Y; + dataIndex++; + } + int elementsCount = indices.Length; + Array.Copy(indices, 0, this.indices, indicesIndex, elementsCount); + indicesIndex += elementsCount; + if (offsetIndex + 1 < verticeOffsets.Length) { + verticeOffsets[offsetIndex + 1] = verticeOffsets[offsetIndex] + vertices.Length; + indiceOffsets[offsetIndex + 1] = indicesIndex * sizeof(int); + } + lengths[offsetIndex] = elementsCount; + offsetIndex++; + } + + public virtual void End() { + if (!Batching) throw new InvalidOperationException("This batch was never started."); + this.Batching = false; + Flush(); + } + + protected virtual void Flush() { + texture.Use(); + renderProgram.Use(); + vertexBuffers.BufferVertices(data, true); + vertexBuffers.BufferIndices(indices, true); + GLContext.UniformMatrix4fv(modelLoc, 1, false, modelsMatrix.ToColumnMajorArray()); + GLContext.UniformMatrix4fv(viewLoc, 1, false, camera.ViewMatrix.ToColumnMajorArray()); + GLContext.UniformMatrix4fv(projLoc, 1, false, camera.ProjectionMatrix.ToColumnMajorArray()); + // GLContext.UniformMatrix4fv(modelLoc, 1, false, Matrix4x4.Identity.ToColumnMajorArray()); + // GLContext.UniformMatrix4fv(viewLoc, 1, false, Matrix4x4.Identity.ToColumnMajorArray()); + // GLContext.UniformMatrix4fv(projLoc, 1, false, Matrix4x4.Identity.ToColumnMajorArray()); + GLContext.MultiDrawElementsBaseVertex(PrimitiveType.Triangles, lengths, DrawElementsType.UnsignedInt, indiceOffsets, offsetIndex, verticeOffsets); + dataIndex = 0; + indicesIndex = 0; + offsetIndex = 0; + } + + protected virtual void Dispose(bool disposing) + { + if (!disposed) + { + if (disposing) + { + } + if (disposed) return; + if (Batching) End(); + disposed = true; + vertexBuffers.Dispose(); + renderProgram.Dispose(); + fillerTexture.Dispose(); + data = null; + indices = null; + lengths = null; + verticeOffsets = null; + } + } + + ~MeshBatch() + { + Dispose(disposing: false); + } + + public void Dispose() + { + Dispose(disposing: true); + GC.SuppressFinalize(this); + } + } +} \ No newline at end of file diff --git a/src/SlatedGameToolkit.Framework/Graphics/Render/Programs/RenderProgram.cs b/src/SlatedGameToolkit.Framework/Graphics/Render/Programs/RenderProgram.cs new file mode 100644 index 0000000..2b097d7 --- /dev/null +++ b/src/SlatedGameToolkit.Framework/Graphics/Render/Programs/RenderProgram.cs @@ -0,0 +1,70 @@ +using System; +using System.Text; +using SlatedGameToolkit.Framework.Exceptions; +using SlatedGameToolkit.Framework.Graphics.OpenGL; +using SlatedGameToolkit.Framework.Graphics.Render.Shaders; +using SlatedGameToolkit.Framework.Graphics.Window; + +namespace SlatedGameToolkit.Framework.Graphics.Render.Programs +{ + public class RenderProgram : IDisposable + { + public GLContext GLContext {get; private set; } + private bool disposed; + + public uint Handle { get; private set; } + public RenderProgram(GLContext context = null, params IShadeable[] shaders) { + this.GLContext = context ?? WindowContextsManager.CurrentGL; + Handle = GLContext.CreateProgram(); + foreach (IShadeable shader in shaders) + { + if (this.GLContext != shader.GLContext) throw new FrameworkUsageException("OpenGL contexts between attached shaders and program must match."); + GLContext.AttachShader(Handle, shader.Handle); + } + GLContext.LinkProgram(Handle); + int status; + GLContext.GetProgramiv(Handle, ProgramPropertyARB.LinkStatus, out status); + if ((OpenGL.Boolean)status == OpenGL.Boolean.False) { + int logLength; + GLContext.GetProgramiv(Handle, ProgramPropertyARB.InfoLogLength, out logLength); + byte[] logData = new byte[logLength]; + int byteCount; + GLContext.GetProgramInfoLog(Handle, logLength, out byteCount, logData); + throw new FrameworkUsageException(Encoding.UTF8.GetString(logData)); + } + + foreach (IShadeable shader in shaders) + { + shader.Dispose(); + } + } + + public void Use() { + GLContext.UseProgram(Handle); + } + + protected virtual void Dispose(bool disposing) + { + if (!disposed) + { + if (disposing) + { + } + + GLContext.DeleteProgram(Handle); + disposed = true; + } + } + + ~RenderProgram() + { + Dispose(false); + } + + public void Dispose() + { + Dispose(disposing: true); + GC.SuppressFinalize(this); + } + } +} \ No newline at end of file diff --git a/src/SlatedGameToolkit.Framework/Graphics/Render/Renderer.cs b/src/SlatedGameToolkit.Framework/Graphics/Render/Renderer.cs deleted file mode 100644 index a538632..0000000 --- a/src/SlatedGameToolkit.Framework/Graphics/Render/Renderer.cs +++ /dev/null @@ -1,41 +0,0 @@ -using System; -using System.Drawing; -using System.Numerics; -using SlatedGameToolkit.Framework.Exceptions; -using SlatedGameToolkit.Framework.Graphics.Programs; -using SlatedGameToolkit.Framework.Graphics.Textures; - -namespace SlatedGameToolkit.Framework.Graphics.Render -{ - public class Renderer : IDisposable - { - private Batch batch; - private Texture currentTexture; - - public Renderer(Batch batch) { - this.batch = batch; - } - - public Renderer(Camera camera, GLShaderProgram program, uint BatchVertexSize = 4096) { - this.batch = new Batch(camera, program, BatchVertexSize); - } - - public void Dispose() - { - batch.Dispose(); - } - - public void Queue(IRenderable renderable, Matrix4x4 modelsMatrix) { - if (renderable.Texture != currentTexture) { - if (batch.Batching) batch.End(); - currentTexture = renderable.Texture; - batch.Begin(currentTexture, modelsMatrix); - } - batch.Add(renderable, renderable.Color); - } - - public void Render() { - if (batch.Batching) batch.End(); - } - } -} \ No newline at end of file diff --git a/src/SlatedGameToolkit.Framework/Graphics/Render/Shaders/FragmentShader.cs b/src/SlatedGameToolkit.Framework/Graphics/Render/Shaders/FragmentShader.cs new file mode 100644 index 0000000..1c1f997 --- /dev/null +++ b/src/SlatedGameToolkit.Framework/Graphics/Render/Shaders/FragmentShader.cs @@ -0,0 +1,57 @@ +using System; +using System.Text; +using SlatedGameToolkit.Framework.Exceptions; +using SlatedGameToolkit.Framework.Graphics.OpenGL; +using SlatedGameToolkit.Framework.Graphics.Window; + +namespace SlatedGameToolkit.Framework.Graphics.Render.Shaders +{ + public class FragmentShader : IShadeable + { + public GLContext GLContext {get; private set; } + private bool disposed; + + public uint Handle { get; private set; } + + public FragmentShader(string program, GLContext context = null) { + this.GLContext = context ?? WindowContextsManager.CurrentGL; + Handle = GLContext.CreateShader(ShaderType.FragmentShader); + GLContext.ShaderSource(Handle, 1, new string[] {program}, null); + GLContext.CompileShader(Handle); + int status; + GLContext.GetShaderiv(Handle, ShaderParameterName.CompileStatus, out status); + if ((OpenGL.Boolean)status == OpenGL.Boolean.False) { + int logLength; + GLContext.GetShaderiv(Handle, ShaderParameterName.InfoLogLength, out logLength); + byte[] logData = new byte[logLength]; + int byteCount; + GLContext.GetShaderInfoLog(Handle, logLength, out byteCount, logData); + throw new FrameworkUsageException(string.Format("Error compiling shader: {0}", Encoding.UTF8.GetString(logData))); + } + } + + protected virtual void Dispose(bool disposing) + { + if (!disposed) + { + if (disposing) + { + } + + GLContext.DeleteShader(Handle); + disposed = true; + } + } + + ~FragmentShader() + { + Dispose(disposing: false); + } + + public void Dispose() + { + Dispose(disposing: true); + GC.SuppressFinalize(this); + } + } +} \ No newline at end of file diff --git a/src/SlatedGameToolkit.Framework/Graphics/Render/Shaders/IShadeable.cs b/src/SlatedGameToolkit.Framework/Graphics/Render/Shaders/IShadeable.cs new file mode 100644 index 0000000..a444e2a --- /dev/null +++ b/src/SlatedGameToolkit.Framework/Graphics/Render/Shaders/IShadeable.cs @@ -0,0 +1,11 @@ +using System; +using SlatedGameToolkit.Framework.Graphics.OpenGL; + +namespace SlatedGameToolkit.Framework.Graphics.Render.Shaders +{ + public interface IShadeable : IDisposable + { + GLContext GLContext {get;} + uint Handle { get; } + } +} \ No newline at end of file diff --git a/src/SlatedGameToolkit.Framework/Graphics/Render/Shaders/VertexShader.cs b/src/SlatedGameToolkit.Framework/Graphics/Render/Shaders/VertexShader.cs new file mode 100644 index 0000000..67d64f7 --- /dev/null +++ b/src/SlatedGameToolkit.Framework/Graphics/Render/Shaders/VertexShader.cs @@ -0,0 +1,55 @@ +using System; +using System.Text; +using SlatedGameToolkit.Framework.Exceptions; +using SlatedGameToolkit.Framework.Graphics.OpenGL; +using SlatedGameToolkit.Framework.Graphics.Window; + +namespace SlatedGameToolkit.Framework.Graphics.Render.Shaders +{ + public class VertexShader : IShadeable + { + public GLContext GLContext {get; private set;} + private bool disposed; + + public uint Handle { get; private set; } + + public VertexShader(string program, GLContext context = null) { + this.GLContext = context ?? WindowContextsManager.CurrentGL; + Handle = GLContext.CreateShader(ShaderType.VertexShader); + GLContext.ShaderSource(Handle, 1, new string[] {program}, null); + GLContext.CompileShader(Handle); + int status; + GLContext.GetShaderiv(Handle, ShaderParameterName.CompileStatus, out status); + if ((OpenGL.Boolean)status == OpenGL.Boolean.False) { + int logLength; + GLContext.GetShaderiv(Handle, ShaderParameterName.InfoLogLength, out logLength); + byte[] logData = new byte[logLength]; + int byteCount; + GLContext.GetShaderInfoLog(Handle, logLength, out byteCount, logData); + throw new FrameworkUsageException(string.Format("Error compiling shader: {0}", Encoding.UTF8.GetString(logData))); + } + } + + protected virtual void Dispose(bool disposing) + { + if (!disposed) + { + if (disposing) + { + } + GLContext.DeleteShader(Handle); + disposed = true; + } + } + + public void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + + ~VertexShader() { + Dispose(false); + } + } +} \ No newline at end of file diff --git a/src/SlatedGameToolkit.Framework/Graphics/Render/Sprite2D.cs b/src/SlatedGameToolkit.Framework/Graphics/Render/Sprite2D.cs index 6aff36f..1625018 100644 --- a/src/SlatedGameToolkit.Framework/Graphics/Render/Sprite2D.cs +++ b/src/SlatedGameToolkit.Framework/Graphics/Render/Sprite2D.cs @@ -4,27 +4,25 @@ using SlatedGameToolkit.Framework.Graphics.Textures; namespace SlatedGameToolkit.Framework.Graphics.Render { - public class Sprite2D : RectangleMesh, IRenderable + public class Sprite2D : RectangleMesh { - public Texture Texture { get; private set; } - - public Color Color { get; private set; } - public Sprite2D(Texture texture, Color color) { this.Texture = texture; - this.textureCoords[0].X = -1; - this.textureCoords[0].Y = -1; + this.textureCoords[0].X = 0; + this.textureCoords[0].Y = 1; this.textureCoords[1].X = 1; - this.textureCoords[1].Y = -1; + this.textureCoords[1].Y = 1; this.textureCoords[2].X = 1; - this.textureCoords[2].Y = 1; + this.textureCoords[2].Y = 0; - this.textureCoords[3].X = -1; - this.textureCoords[3].Y = 1; + this.textureCoords[3].X = 0; + this.textureCoords[3].Y = 0; this.Color = color; + this.Width = 1f; + this.Height = 1f; } } } \ No newline at end of file diff --git a/src/SlatedGameToolkit.Framework/Graphics/Render/VertexArrayBuffers.cs b/src/SlatedGameToolkit.Framework/Graphics/Render/VertexArrayBuffers.cs new file mode 100644 index 0000000..0fe0d79 --- /dev/null +++ b/src/SlatedGameToolkit.Framework/Graphics/Render/VertexArrayBuffers.cs @@ -0,0 +1,123 @@ +using System; +using SlatedGameToolkit.Framework.Graphics.OpenGL; +using SlatedGameToolkit.Framework.Graphics.Window; + +namespace SlatedGameToolkit.Framework.Graphics.Render +{ + /// + /// A set of two buffers, one for the vertices, and one for the indices. Also defines an vertex array that defines the attributes of the buffers. + /// + public class VertexArrayBuffers : IDisposable { + private GLContext glContext; + private bool disposed; + private uint vertexBufferHandle, vertexArrayHandle, indexBufferHandle; + public VertexArrayBuffers(GLContext context) { + this.glContext = context ?? WindowContextsManager.CurrentGL; + + uint[] vertexArrays = new uint[1]; + glContext.GenVertexArrays(1, vertexArrays); + vertexArrayHandle = vertexArrays[0]; + + uint[] vertexBuffers = new uint[2]; + glContext.GenBuffers(2, vertexBuffers); + vertexBufferHandle = vertexBuffers[0]; + indexBufferHandle = vertexBuffers[1]; + } + + public void Use() { + if (disposed) throw new ObjectDisposedException("VertexArrayBuffers"); + glContext.BindVertexArray(vertexArrayHandle); + glContext.BindBuffer(BufferTargetARB.ElementArrayBuffer, indexBufferHandle); + glContext.BindBuffer(BufferTargetARB.ArrayBuffer, vertexBufferHandle); + } + + public unsafe void BufferVertices(float[] data, bool dynamic) { + Use(); + fixed (void* pointer = &data[0]) { + glContext.BufferData(OpenGL.BufferTargetARB.ArrayBuffer, (uint) (sizeof(float) * data.Length), new IntPtr(pointer), dynamic ? OpenGL.BufferUsageARB.DynamicDraw : OpenGL.BufferUsageARB.StaticDraw); + } + } + + public unsafe void BufferIndices(uint[] data, bool dynamic) { + Use(); + fixed (void* pointer = &data[0]) { + glContext.BufferData(OpenGL.BufferTargetARB.ElementArrayBuffer, (uint) (sizeof(uint) * data.Length), new IntPtr(pointer), dynamic ? OpenGL.BufferUsageARB.DynamicDraw : OpenGL.BufferUsageARB.StaticDraw); + } + } + + /// + /// Defines the vertex attributes in an OpenGL vertex array object. + /// Sends as floats. + /// + /// Whether or not to automatically enable the attributes that are being defined. Defaults to true. + /// The definitions for the vertex array object. + public void defineVertexAttributes(bool enableAttributes = true, params VertexAttributeDefinition[] definitions) { + Use(); + int offset = 0; + uint stride = 0; + foreach (VertexAttributeDefinition definition in definitions) + { + stride += (uint)definition.size * sizeof(float); + } + foreach (VertexAttributeDefinition definition in definitions) + { + glContext.VertexAttribPointer(definition.attributeIndex, definition.size, OpenGL.VertexAttribPointerType.Float, false, stride, new IntPtr(offset)); + offset += definition.size * sizeof(float); + if (enableAttributes) glContext.EnableVertexAttribArray(definition.attributeIndex); + } + } + + /// + /// Enaables the vertex array object's definitions at the given attribute indices. + /// + /// The attribute indices to be enabled. + public void EnableAttributes(params uint[] attributeIndices) { + Use(); + foreach (uint attrib in attributeIndices) + { + glContext.EnableVertexAttribArray(attrib); + } + } + + /// + /// Disables the vertex array object's definitions at the given attribute indices. + /// + /// The attribute indices to be disabled. + public void DisableAttributes(params uint[] attributeIndices) { + Use(); + foreach (uint attrib in attributeIndices) + { + glContext.DisableVertexAttribArray(attrib); + } + } + + protected virtual void Dispose(bool disposing) + { + if (this.disposed) return; + if (disposing) { + } + this.disposed = true; + glContext.DeleteVertexArrays(1, new uint[] {vertexArrayHandle}); + glContext.DeleteBuffers(2, new uint[] {indexBufferHandle, vertexBufferHandle}); + } + + public void Dispose() { + Dispose(true); + GC.SuppressFinalize(this); + } + + ~VertexArrayBuffers() { + Dispose(false); + } + } + + public struct VertexAttributeDefinition { + public uint attributeIndex; + public int size; + + public VertexAttributeDefinition(uint attributeIndex, int size) { + this.attributeIndex = attributeIndex; + this.size = size; + } + } +} \ No newline at end of file diff --git a/src/SlatedGameToolkit.Framework/Graphics/Shaders/GLFragmentShader.cs b/src/SlatedGameToolkit.Framework/Graphics/Shaders/GLFragmentShader.cs deleted file mode 100644 index 407a4ba..0000000 --- a/src/SlatedGameToolkit.Framework/Graphics/Shaders/GLFragmentShader.cs +++ /dev/null @@ -1,27 +0,0 @@ -using System.Text; -using SlatedGameToolkit.Framework.Exceptions; -using SlatedGameToolkit.Framework.Graphics; - -namespace SlatedGameToolkit.Framework.Graphics.Shaders -{ - public class GLFragmentShader : GLShader { - - /// - /// Creates an OpenGL fragment shader. - /// - /// A string representing the GLSL code to run. - public GLFragmentShader(string shader) : base() { - Handle = createShader(GLEnum.GL_FRAGMENT_SHADER); - shaderSource(Handle, 1, new string[] {shader}, null); - compileShader(Handle); - uint logLength; - byte[] log = new byte[2048]; - getShaderInfoLog(Handle, (uint)log.Length, out logLength, log); - if (logLength > 0) { - Dispose(); - throw new OpenGLException(Encoding.UTF8.GetString(log)); - } - OpenGLErrorException.CheckGLErrorStatus(); - } - } -} \ No newline at end of file diff --git a/src/SlatedGameToolkit.Framework/Graphics/Shaders/GLShader.cs b/src/SlatedGameToolkit.Framework/Graphics/Shaders/GLShader.cs deleted file mode 100644 index 03d17e9..0000000 --- a/src/SlatedGameToolkit.Framework/Graphics/Shaders/GLShader.cs +++ /dev/null @@ -1,44 +0,0 @@ -using System; -using System.Runtime.InteropServices; -using SDL2; -using SlatedGameToolkit.Framework.Exceptions; -using SlatedGameToolkit.Framework.Graphics; -using SlatedGameToolkit.Framework.Graphics.Programs; -using SlatedGameToolkit.Framework.Graphics.Window; - -namespace SlatedGameToolkit.Framework.Graphics.Shaders -{ - public abstract class GLShader : IDisposable { - private WindowContext context; - public virtual UIntPtr Handle { get; protected set; } - - protected GLCreateShader createShader; - protected GLShaderSource shaderSource; - protected GLCompileShader compileShader; - protected GLGetShaderInfoLog getShaderInfoLog; - private GLDeleteShader deleteShader; - - public GLShader() { - context = WindowContextsManager.CurrentWindowContext; - createShader = OpenGL.RetrieveGLDelegate("glCreateShader"); - shaderSource = OpenGL.RetrieveGLDelegate("glShaderSource"); - compileShader = OpenGL.RetrieveGLDelegate("glCompileShader"); - getShaderInfoLog = OpenGL.RetrieveGLDelegate("glGetShaderInfoLog"); - deleteShader = OpenGL.RetrieveGLDelegate("glDeleteShader"); - } - - - /// - /// Disposes of the shader at the handle. - /// - public virtual void Dispose() - { - deleteShader(Handle); - OpenGLErrorException.CheckGLErrorStatus(); - } - - ~GLShader() { - Dispose(); - } - } -} \ No newline at end of file diff --git a/src/SlatedGameToolkit.Framework/Graphics/Shaders/GLVertexArraySet.cs b/src/SlatedGameToolkit.Framework/Graphics/Shaders/GLVertexArraySet.cs deleted file mode 100644 index 52001a2..0000000 --- a/src/SlatedGameToolkit.Framework/Graphics/Shaders/GLVertexArraySet.cs +++ /dev/null @@ -1,140 +0,0 @@ -using System; -using System.Runtime.InteropServices; -using SlatedGameToolkit.Framework.Exceptions; -using SlatedGameToolkit.Framework.Graphics; - -namespace SlatedGameToolkit.Framework.Graphics.Shaders -{ - public sealed class GLVertexArraySet : IDisposable { - private bool disposed; - public int Count { get; private set; } - private UIntPtr[] arrayBufferHandles; - private UIntPtr[] vertexArrayHandles; - private UIntPtr[] indexArrayHandles; - private GLBindBuffer bindBuffer; - private GLGenBuffers genBuffers; - private GLDeleteBuffers deleteBuffers; - private GLGenVertexArrays genVertexArrays; - private GLBindVertexArray bindVertexArray; - private GLDeleteVertexArrays deleteVertexArrays; - private GLVertexAttribPointer vertexAttribPointer; - private GLEnableVertexAttribArray enableVertexAttribArray; - private GLDisableVertexAttribArray disableVertexAttribArray; - private GLBufferData bufferData; - public GLVertexArraySet(uint amount) { - if (amount > int.MaxValue) throw new ArgumentOutOfRangeException("amount"); - this.Count = (int)amount; - genBuffers = OpenGL.RetrieveGLDelegate("glGenBuffers"); - deleteBuffers = OpenGL.RetrieveGLDelegate("glDeleteBuffers"); - bindBuffer = OpenGL.RetrieveGLDelegate("glBindBuffer"); - genVertexArrays = OpenGL.RetrieveGLDelegate("glGenVertexArrays"); - bindVertexArray = OpenGL.RetrieveGLDelegate("glBindVertexArray"); - deleteVertexArrays = OpenGL.RetrieveGLDelegate("glDeleteVertexArrays"); - vertexAttribPointer = OpenGL.RetrieveGLDelegate("glVertexAttribPointer"); - enableVertexAttribArray = OpenGL.RetrieveGLDelegate("glEnableVertexAttribArray"); - disableVertexAttribArray = OpenGL.RetrieveGLDelegate("glDisableVertexAttribArray"); - bufferData = OpenGL.RetrieveGLDelegate("glBufferData"); - arrayBufferHandles = new UIntPtr[amount]; - vertexArrayHandles = new UIntPtr[amount]; - indexArrayHandles = new UIntPtr[amount]; - genBuffers(amount, arrayBufferHandles); - OpenGLErrorException.CheckGLErrorStatus(); - genVertexArrays(amount, vertexArrayHandles); - OpenGLErrorException.CheckGLErrorStatus(); - genBuffers(amount, indexArrayHandles); - OpenGLErrorException.CheckGLErrorStatus(); - } - - public void Use(uint index) { - bindVertexArray(vertexArrayHandles[index]); - OpenGLErrorException.CheckGLErrorStatus(); - bindBuffer(GLEnum.GL_ELEMENT_ARRAY_BUFFER, indexArrayHandles[index]); - bindBuffer(GLEnum.GL_ARRAY_BUFFER, arrayBufferHandles[index]); - OpenGLErrorException.CheckGLErrorStatus(); - } - - public unsafe void BufferVertices(uint index, float[] data, bool dynamic) { - Use(index); - bufferData(GLEnum.GL_ARRAY_BUFFER, (uint) (sizeof(float) * data.Length), data, dynamic ? GLEnum.GL_DYNAMIC_DRAW : GLEnum.GL_STATIC_DRAW); - OpenGLErrorException.CheckGLErrorStatus(); - } - - public unsafe void BufferIndices(uint index, uint[] data, bool dynamic) { - Use(index); - bufferData(GLEnum.GL_ELEMENT_ARRAY_BUFFER, (uint) (sizeof(float) * data.Length), data, dynamic ? GLEnum.GL_DYNAMIC_DRAW : GLEnum.GL_STATIC_DRAW); - OpenGLErrorException.CheckGLErrorStatus(); - } - - /// - /// Defines the vertex attributes in an OpenGL vertex array object. - /// Sends as floats. - /// - /// The buffer in this set to affect. - /// Whether or not to automatically enable the attributes that are being defined. Defaults to true. - /// The definitions for the vertex array object. - public void defineVertexAttributes(uint bufferIndex, bool enableAttributes = true, params VertexAttributeDefinition[] definitions) { - Use(bufferIndex); - foreach (VertexAttributeDefinition definition in definitions) - { - vertexAttribPointer(definition.attributeIndex, definition.size, GLEnum.GL_FLOAT, false, definition.stride, definition.offset); - OpenGLErrorException.CheckGLErrorStatus(); - if (enableAttributes) enableVertexAttribArray(definition.attributeIndex); - } - } - - /// - /// Enaables the vertex array object's definitions at the given attribute indices. - /// - /// The buffer index in this set this should affect. - /// The attribute indices to be enabled. - public void EnableAttributes(uint bufferIndex, params uint[] attributeIndices) { - Use(bufferIndex); - foreach (uint attrib in attributeIndices) - { - enableVertexAttribArray(attrib); - } - } - - /// - /// Disables the vertex array object's definitions at the given attribute indices. - /// - /// The buffer index in this set that should be affected. - /// The attribute indices to be disabled. - public void DisableAttributes(uint bufferIndex, params uint[] attributeIndices) { - Use(bufferIndex); - foreach (uint attrib in attributeIndices) - { - disableVertexAttribArray(attrib); - } - } - - public void Dispose() - { - if (this.disposed) return; - this.disposed = true; - deleteBuffers((uint)arrayBufferHandles.Length, arrayBufferHandles); - OpenGLErrorException.CheckGLErrorStatus(); - deleteVertexArrays((uint)vertexArrayHandles.Length, vertexArrayHandles); - OpenGLErrorException.CheckGLErrorStatus(); - GC.SuppressFinalize(this); - } - - ~GLVertexArraySet() { - Dispose(); - } - } - - public struct VertexAttributeDefinition { - public uint attributeIndex; - public int size; - public uint stride; - public uint offset; - - public VertexAttributeDefinition(uint attributeIndex, int size, uint stride, uint offset) { - this.attributeIndex = attributeIndex; - this.size = size; - this.stride = stride; - this.offset = offset; - } - } -} \ No newline at end of file diff --git a/src/SlatedGameToolkit.Framework/Graphics/Shaders/GLVertexShader.cs b/src/SlatedGameToolkit.Framework/Graphics/Shaders/GLVertexShader.cs deleted file mode 100644 index 89e0ef9..0000000 --- a/src/SlatedGameToolkit.Framework/Graphics/Shaders/GLVertexShader.cs +++ /dev/null @@ -1,26 +0,0 @@ -using System.Text; -using SlatedGameToolkit.Framework.Exceptions; - -namespace SlatedGameToolkit.Framework.Graphics.Shaders -{ - public class GLVertexShader : GLShader { - - /// - /// Creates an OpenGL vertex shader. - /// - /// A string representing the GLSL code. - public GLVertexShader(string shader) : base() { - Handle = createShader(GLEnum.GL_VERTEX_SHADER); - shaderSource(Handle, 1, new string[] {shader}, null); - compileShader(Handle); - uint logLength; - byte[] log = new byte[2048]; - getShaderInfoLog(Handle, (uint)log.Length, out logLength, log); - if (logLength > 0) { - Dispose(); - throw new OpenGLException(Encoding.UTF8.GetString(log)); - } - OpenGLErrorException.CheckGLErrorStatus(); - } - } -} \ No newline at end of file diff --git a/src/SlatedGameToolkit.Framework/Graphics/Shaders/NormalFragmentShader.cs b/src/SlatedGameToolkit.Framework/Graphics/Shaders/NormalFragmentShader.cs deleted file mode 100644 index 3718113..0000000 --- a/src/SlatedGameToolkit.Framework/Graphics/Shaders/NormalFragmentShader.cs +++ /dev/null @@ -1,21 +0,0 @@ -using System; -using System.IO; -using System.Reflection; - -namespace SlatedGameToolkit.Framework.Graphics.Shaders -{ - public class NormalFragmentShader : GLShader - { - private GLFragmentShader shader; - public NormalFragmentShader() { - using (Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("SlatedGameToolkit.Framework.Resources.default.frag")) - { - using (StreamReader reader = new StreamReader(stream)) - { - shader = new GLFragmentShader(reader.ReadToEnd()); - } - } - this.Handle = shader.Handle; - } - } -} \ No newline at end of file diff --git a/src/SlatedGameToolkit.Framework/Graphics/Shaders/NormalVertexShader.cs b/src/SlatedGameToolkit.Framework/Graphics/Shaders/NormalVertexShader.cs deleted file mode 100644 index aa071a5..0000000 --- a/src/SlatedGameToolkit.Framework/Graphics/Shaders/NormalVertexShader.cs +++ /dev/null @@ -1,20 +0,0 @@ -using System; -using System.IO; -using System.Reflection; - -namespace SlatedGameToolkit.Framework.Graphics.Shaders { - public class NormalVertexShader : GLShader - { - private GLVertexShader shader; - - public NormalVertexShader() { - using (Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("SlatedGameToolkit.Framework.Resources.default.vert")) - { - using (StreamReader reader = new StreamReader(stream)) { - shader = new GLVertexShader(reader.ReadToEnd()); - } - } - Handle = shader.Handle; - } - } -} \ No newline at end of file diff --git a/src/SlatedGameToolkit.Framework/Graphics/Shaders/VertexArray.cs b/src/SlatedGameToolkit.Framework/Graphics/Shaders/VertexArray.cs deleted file mode 100644 index d2e020e..0000000 --- a/src/SlatedGameToolkit.Framework/Graphics/Shaders/VertexArray.cs +++ /dev/null @@ -1,63 +0,0 @@ -using System; - -namespace SlatedGameToolkit.Framework.Graphics.Shaders -{ - public class VertexArray : IDisposable - { - private GLVertexArraySet glVertexArraySet; - private uint index; - - public VertexArray(GLVertexArraySet gLVertexArraySet, uint index) { - this.glVertexArraySet = gLVertexArraySet; - this.index = index; - } - - public VertexArray() { - this.glVertexArraySet = new GLVertexArraySet(1); - this.index = 0; - } - - public void BufferVertices(float[] data, bool dynamic = true) { - glVertexArraySet.BufferVertices(index, data, dynamic); - } - - public void BufferIndices(uint[] data, bool dynamic = true) { - glVertexArraySet.BufferIndices(index, data, dynamic); - } - - /// - /// Defines the vertex attributes in an OpenGL vertex array object. - /// Sends as floats. - /// - /// Whether or not to automatically enable the attributes that are being defined. Defaults to true. - /// The definitions for the vertex array object. - public void defineVertexAttributes(bool enableAttributes = true, params VertexAttributeDefinition[] definitions) { - this.glVertexArraySet.defineVertexAttributes(index, enableAttributes, definitions); - } - - /// - /// Enaables the vertex array object's definitions at the given attribute indices. - /// - /// The attribute indices to be enabled. - public void EnableAttributes(params uint[] attributeIndices) { - glVertexArraySet.EnableAttributes(index, attributeIndices); - } - - /// - /// Disables the vertex array object's definitions at the given attribute indices. - /// - /// The attribute indices to be disabled. - public void DisableAttributes(params uint[] attributeIndices) { - glVertexArraySet.DisableAttributes(index, attributeIndices); - } - - public void Use() { - glVertexArraySet.Use(index); - } - - public void Dispose() - { - this.glVertexArraySet.Dispose(); - } - } -} \ No newline at end of file diff --git a/src/SlatedGameToolkit.Framework/Graphics/Textures/GLTexture2DSet.cs b/src/SlatedGameToolkit.Framework/Graphics/Textures/GLTexture2DSet.cs deleted file mode 100644 index 661bf67..0000000 --- a/src/SlatedGameToolkit.Framework/Graphics/Textures/GLTexture2DSet.cs +++ /dev/null @@ -1,81 +0,0 @@ -using System; -using SlatedGameToolkit.Framework.Exceptions; -using SlatedGameToolkit.Framework.Graphics; -using SlatedGameToolkit.Framework.Graphics.Textures; - -namespace SlatedGameToolkit.Framework.Graphics -{ - public sealed class GLTexture2DSet : IDisposable - { - private bool disposed; - public int Count { get; private set; } - private GLGenTextures genTextures; - private GLTexParameteri texParameteri; - private GLTexParameterfv texParameterfv; - private GLDeleteTextures deleteTextures; - private GLTexImage2D texImage2D; - private GLBindTexture bindTexture; - private GLGenerateMipmap generateMipmap; - private readonly UIntPtr[] handle; - public GLTexture2DSet(TextureData[] textureDatas, bool linear = false, bool mipmap = false) - { - genTextures = OpenGL.RetrieveGLDelegate("glGenTextures"); - deleteTextures = OpenGL.RetrieveGLDelegate("glDeleteTextures"); - bindTexture = OpenGL.RetrieveGLDelegate("glBindTexture"); - texParameteri = OpenGL.RetrieveGLDelegate("glTexParameteri"); - texParameterfv = OpenGL.RetrieveGLDelegate("glTexParameterfv"); - texImage2D = OpenGL.RetrieveGLDelegate("glTexImage2D"); - generateMipmap = OpenGL.RetrieveGLDelegate("glGenerateMipmap"); - handle = new UIntPtr[textureDatas.Length]; - genTextures((uint)textureDatas.Length, handle); - for (uint i = 0; i < textureDatas.Length; i++) { - Setup(i, textureDatas[i]); - } - bindTexture(GLEnum.GL_TEXTURE_2D, UIntPtr.Zero); - OpenGLErrorException.CheckGLErrorStatus(); - - this.Count = textureDatas.Length; - } - - private void Setup(uint index, TextureData textureData) { - Bind(index); - texImage2D(GLEnum.GL_TEXTURE_2D, 0, (int)GLEnum.GL_RGBA, textureData.width, textureData.height, 0, GLEnum.GL_RGBA, GLEnum.GL_UNSIGNED_BYTE, textureData.data); - OpenGLErrorException.CheckGLErrorStatus(); - generateMipmap(GLEnum.GL_TEXTURE_2D); - OpenGLErrorException.CheckGLErrorStatus(); - } - - /// - /// Binds the given index's texture. - /// Sets the properties given the index of the OpenGL 2D texture. - /// - /// The index of the texture. - /// Whether or not to have linear filtering. - /// Whether or not to use MipMap - public void SetProperties(uint index, GLEnum min, GLEnum mag) { - Bind(index); - texParameteri(GLEnum.GL_TEXTURE_2D, GLEnum.GL_TEXTURE_WRAP_S, (int)GLEnum.GL_CLAMP_TO_EDGE); - texParameteri(GLEnum.GL_TEXTURE_2D, GLEnum.GL_TEXTURE_WRAP_T, (int)GLEnum.GL_CLAMP_TO_EDGE); - texParameteri(GLEnum.GL_TEXTURE_2D, GLEnum.GL_TEXTURE_MIN_FILTER, (int) min); - texParameteri(GLEnum.GL_TEXTURE_2D, GLEnum.GL_TEXTURE_MAG_FILTER, (int) mag); - } - - /// - /// Binds a GL texture to the active unit. - /// - /// The index of the texture in this set. - public void Bind(uint index) { - bindTexture(GLEnum.GL_TEXTURE_2D, handle[index]); - OpenGLErrorException.CheckGLErrorStatus(); - } - - public void Dispose() - { - if (disposed) return; - this.disposed = true; - deleteTextures((uint)handle.Length, handle); - OpenGLErrorException.CheckGLErrorStatus(); - GC.SuppressFinalize(this); - } - } -} \ No newline at end of file diff --git a/src/SlatedGameToolkit.Framework/Graphics/Textures/Texture.cs b/src/SlatedGameToolkit.Framework/Graphics/Textures/Texture.cs index 5979a84..e3f5f1d 100644 --- a/src/SlatedGameToolkit.Framework/Graphics/Textures/Texture.cs +++ b/src/SlatedGameToolkit.Framework/Graphics/Textures/Texture.cs @@ -1,32 +1,54 @@ -using SlatedGameToolkit.Framework.Exceptions; +using System; +using SlatedGameToolkit.Framework.Graphics.OpenGL; +using SlatedGameToolkit.Framework.Graphics.Window; using SlatedGameToolkit.Framework.Loader; namespace SlatedGameToolkit.Framework.Graphics.Textures { - public class Texture : IAssetUseable - { - private readonly GLTexture2DSet glTexture2DSet; - private readonly uint index; + public class Texture : IAssetUseable { + public readonly int width, height; + private bool disposed; + private GLContext glContext; + private uint handle; - public Texture(GLTexture2DSet set, uint index) { - this.glTexture2DSet = set; - this.index = index; - } - - public Texture(TextureData textureData, bool linear = true, bool mipmap = true) { - TextureData[] textureDatas = new TextureData[] {textureData}; - this.glTexture2DSet = new GLTexture2DSet(textureDatas, linear, mipmap); - OpenGLErrorException.CheckGLErrorStatus(); - this.index = 0; + /// + /// Creates an OpenGL Texture2D in the given GL Context. + /// + /// The texture data to use to create the Texture2D. + /// The openGL context to associate this with. If null, will use the currently active context. Defaults to null. + public unsafe Texture(TextureData textureData, GLContext context = null) { + this.glContext = context ?? WindowContextsManager.CurrentGL; + this.width = textureData.width; + this.height = textureData.height; + uint[] handles = new uint[1]; + glContext.GenTextures(1, handles); + this.handle = handles[0]; + Use(); + glContext.TexParameteri(TextureTarget.Texture2D, TextureParameterName.TextureWrapS, (int)TextureWrapMode.Repeat); + glContext.TexParameteri(TextureTarget.Texture2D, TextureParameterName.TextureWrapT, (int)TextureWrapMode.Repeat); + glContext.TexParameteri(TextureTarget.Texture2D, TextureParameterName.TextureMinFilter, (int)TextureMinFilter.LinearMipmapLinear); + glContext.TexParameteri(TextureTarget.Texture2D, TextureParameterName.TextureMagFilter, (int)TextureMagFilter.Linear); + fixed(void* p = &textureData.data[0]) { + glContext.TexImage2D(TextureTarget.Texture2D, 0, InternalFormat.Rgba, (uint)textureData.width, (uint)textureData.height, 0, PixelFormat.Rgba, PixelType.UnsignedByte, new IntPtr(p)); + } + glContext.GenerateMipmap(OpenGL.TextureTarget.Texture2D); } public void Use() { - this.glTexture2DSet.Bind(index); + if (disposed) throw new ObjectDisposedException("Texture"); + glContext.BindTexture(OpenGL.TextureTarget.Texture2D, handle); } public void Dispose() { - this.glTexture2DSet.Dispose(); + if (disposed) return; + disposed = true; + glContext.DeleteTextures(1, new uint[] {handle}); + GC.SuppressFinalize(this); + } + + ~Texture() { + Dispose(); } } } \ No newline at end of file diff --git a/src/SlatedGameToolkit.Framework/Graphics/Textures/TextureData.cs b/src/SlatedGameToolkit.Framework/Graphics/Textures/TextureData.cs index 03a453d..d667f93 100644 --- a/src/SlatedGameToolkit.Framework/Graphics/Textures/TextureData.cs +++ b/src/SlatedGameToolkit.Framework/Graphics/Textures/TextureData.cs @@ -4,8 +4,14 @@ namespace SlatedGameToolkit.Framework.Graphics.Textures { public class TextureData { - public byte[] data; - public uint width; - public uint height; + public readonly byte[] data; + public readonly int width; + public readonly int height; + + public TextureData(int width, int height, byte[] data) { + this.data = data; + this.width = width; + this.height = height; + } } } \ No newline at end of file diff --git a/src/SlatedGameToolkit.Framework/Graphics/Window/WindowContext.cs b/src/SlatedGameToolkit.Framework/Graphics/Window/WindowContext.cs index 88e3ec0..cd0f853 100644 --- a/src/SlatedGameToolkit.Framework/Graphics/Window/WindowContext.cs +++ b/src/SlatedGameToolkit.Framework/Graphics/Window/WindowContext.cs @@ -5,6 +5,7 @@ using System.Runtime.InteropServices; using SDL2; using SlatedGameToolkit.Framework.Exceptions; using SlatedGameToolkit.Framework.Graphics; +using SlatedGameToolkit.Framework.Graphics.OpenGL; namespace SlatedGameToolkit.Framework.Graphics.Window { @@ -34,6 +35,7 @@ namespace SlatedGameToolkit.Framework.Graphics.Window /// public sealed class WindowContext : IDisposable { + public GLContext Context { get; private set; } /// /// The pointer referencing the SDL window. /// @@ -42,7 +44,6 @@ namespace SlatedGameToolkit.Framework.Graphics.Window /// /// The pointer referencing the OpenGL context. /// - private readonly IntPtr glContextHandle; public event WindowOperation focusGainedEvent, focusLostEvent; /// @@ -54,13 +55,7 @@ namespace SlatedGameToolkit.Framework.Graphics.Window /// Event for when the window is being interacted with. /// public event WindowRegionHit windowRegionHitEvent; - - internal readonly GLClearColour clearColour; - internal readonly GLClear clear; - internal readonly GLViewport viewport; - private readonly GLGetError getError; - - + /// /// Whether or not to show this window. /// @@ -258,7 +253,7 @@ namespace SlatedGameToolkit.Framework.Graphics.Window } /// - /// Instantiates a window handle. + /// Instantiates a window with the given OpenGL context, or a new context. /// public WindowContext(string title, int x = -1, int y = -1, int width = 640, int height = 480, bool specialRegions = false, SDL.SDL_WindowFlags options = default(SDL.SDL_WindowFlags)) { GameEngine.Logger.Information(String.Format("Starting openGL window with title \"{0}\"", title)); @@ -266,15 +261,7 @@ namespace SlatedGameToolkit.Framework.Graphics.Window if (windowHandle == null) { throw new FrameworkSDLException(); } - glContextHandle = SDL.SDL_GL_CreateContext(windowHandle); - if (glContextHandle == null) { - throw new FrameworkSDLException(); - } - - clear = OpenGL.RetrieveGLDelegate("glClear"); - clearColour = OpenGL.RetrieveGLDelegate("glClearColor"); - viewport = OpenGL.RetrieveGLDelegate("glViewport"); - getError = OpenGL.RetrieveGLDelegate("glGetError"); + this.Context = new GLContext(windowHandle); if (specialRegions) { if (SDL.SDL_SetWindowHitTest(windowHandle, SpecialRegionHit, IntPtr.Zero) < 0) { @@ -286,7 +273,9 @@ namespace SlatedGameToolkit.Framework.Graphics.Window MakeCurrent(); Vector2 drawable = GetDrawableDimensions(); - viewport(0, 0, (int)drawable.X, (int)drawable.Y); + this.Context.Viewport(0, 0, (int)drawable.X, (int)drawable.Y); + this.Context.Enable(EnableCap.Blend); + Context.BlendFunc(BlendingFactor.SrcAlpha, BlendingFactor.OneMinusSrcAlpha); } private SDL.SDL_HitTestResult SpecialRegionHit(IntPtr window, IntPtr hitPtr, IntPtr data) { @@ -312,14 +301,6 @@ namespace SlatedGameToolkit.Framework.Graphics.Window internal void OnFocusGained() { focusGainedEvent?.Invoke(); } - - /// - /// Gets the current GL error code. - /// - /// The unsigned int representing the status of OpenGL. - public uint GetGLStatus() { - return getError(); - } /// /// Gets the current drawable area of the window. @@ -337,7 +318,7 @@ namespace SlatedGameToolkit.Framework.Graphics.Window /// public void MakeCurrent() { if (WindowContextsManager.CurrentWindowContext != this) { - SDL.SDL_GL_MakeCurrent(windowHandle, glContextHandle); + SDL.SDL_GL_MakeCurrent(windowHandle, Context.Handle); WindowContextsManager.current = this; } } @@ -365,13 +346,21 @@ namespace SlatedGameToolkit.Framework.Graphics.Window /// public void Dispose() { + Dispose(true); + GC.SuppressFinalize(this); + } + + public void Dispose(bool disposing) { + if (disposing) + { + } WindowContextsManager.DeregisterWindow(this); - SDL.SDL_GL_DeleteContext(glContextHandle); SDL.SDL_DestroyWindow(windowHandle); + Context.Dispose(); } ~WindowContext() { - Dispose(); + Dispose(false); } } } \ No newline at end of file diff --git a/src/SlatedGameToolkit.Framework/Graphics/Window/WindowContextsManager.cs b/src/SlatedGameToolkit.Framework/Graphics/Window/WindowContextsManager.cs index 93e2b77..0a3095b 100644 --- a/src/SlatedGameToolkit.Framework/Graphics/Window/WindowContextsManager.cs +++ b/src/SlatedGameToolkit.Framework/Graphics/Window/WindowContextsManager.cs @@ -1,4 +1,7 @@ +using System; using System.Collections.Generic; +using System.Collections.ObjectModel; +using SlatedGameToolkit.Framework.Graphics.OpenGL; namespace SlatedGameToolkit.Framework.Graphics.Window { @@ -15,6 +18,25 @@ namespace SlatedGameToolkit.Framework.Graphics.Window } } private static Dictionary existingWindows = new Dictionary(); + + /// + /// The currently loaded windows. + /// + /// The ID of the window. + /// The window context. + /// A readonly dictionary of all the window contexts that were created. + public static ReadOnlyDictionary LoadedWindows { get; private set; } = new ReadOnlyDictionary(existingWindows); + + /// + /// The OpenGL context of the active window. + /// Equivalent to retrieving the current window context, and then using the context from that instance. + /// + /// The currently active window's OpenGL context. + public static GLContext CurrentGL { + get { + return CurrentWindowContext.Context; + } + } internal static void RegisterWindow(WindowContext windowHandle) { GameEngine.Logger.Debug("Registering window: " + windowHandle.WindowID); @@ -29,5 +51,16 @@ namespace SlatedGameToolkit.Framework.Graphics.Window public static WindowContext ContextFromWindowID(uint ID) { return existingWindows[ID]; } + + /// + /// Disposes all the created window contexts. + /// This includes their OpenGL contexts. + /// + public static void DisposeAllWindowContexts() { + foreach (WindowContext context in LoadedWindows.Values) + { + context.Dispose(); + } + } } } \ No newline at end of file diff --git a/src/SlatedGameToolkit.Framework/Input/Devices/Keyboard.cs b/src/SlatedGameToolkit.Framework/Input/Devices/Keyboard.cs index 3c3d9b7..bf2c932 100644 --- a/src/SlatedGameToolkit.Framework/Input/Devices/Keyboard.cs +++ b/src/SlatedGameToolkit.Framework/Input/Devices/Keyboard.cs @@ -1,25 +1,26 @@ using System.Collections.Generic; +using SDL2; namespace SlatedGameToolkit.Framework.Input.Devices { - public delegate void keyboardUpdate(Key keys, bool pressed); + public delegate void keyboardUpdate(SDL.SDL_Keycode keys, bool pressed); public static class Keyboard { - private static HashSet pressedKeys = new HashSet(); + private static HashSet pressedKeys = new HashSet(); /// /// Whenever a keyboard update occurs. /// public static event keyboardUpdate keyboardUpdateEvent; - public static bool IsKeyPressed(Key key) { + public static bool IsKeyPressed(SDL.SDL_Keycode key) { return pressedKeys.Contains(key); } - internal static void OnKeyPressed(Key key) { + internal static void OnKeyPressed(SDL.SDL_Keycode key) { pressedKeys.Add(key); keyboardUpdateEvent?.Invoke(key, true); } - internal static void OnKeyReleased(Key key) { + internal static void OnKeyReleased(SDL.SDL_Keycode key) { pressedKeys.Remove(key); keyboardUpdateEvent?.Invoke(key, false); } diff --git a/src/SlatedGameToolkit.Framework/Input/Key.cs b/src/SlatedGameToolkit.Framework/Input/Key.cs deleted file mode 100644 index 0b481df..0000000 --- a/src/SlatedGameToolkit.Framework/Input/Key.cs +++ /dev/null @@ -1,262 +0,0 @@ -using SDL2; - -namespace SlatedGameToolkit.Framework.Input -{ - public enum Key - { - K_RETURN = SDL.SDL_Keycode.SDLK_RETURN, - K_ESCAPE = SDL.SDL_Keycode.SDLK_ESCAPE, // '\033' - K_BACKSPACE = SDL.SDL_Keycode.SDLK_BACKSPACE, - K_TAB = SDL.SDL_Keycode.SDLK_TAB, - K_SPACE = SDL.SDL_Keycode.SDLK_SPACE, - K_EXCLAIM = SDL.SDL_Keycode.SDLK_EXCLAIM, - K_QUOTEDBL = SDL.SDL_Keycode.SDLK_QUOTEDBL, - K_HASH = SDL.SDL_Keycode.SDLK_HASH, - K_PERCENT = SDL.SDL_Keycode.SDLK_PERCENT, - K_DOLLAR = SDL.SDL_Keycode.SDLK_DOLLAR, - K_AMPERSAND = SDL.SDL_Keycode.SDLK_AMPERSAND, - K_QUOTE = SDL.SDL_Keycode.SDLK_QUOTE, - K_LEFTPAREN = SDL.SDL_Keycode.SDLK_KP_LEFTPAREN, - K_RIGHTPAREN = SDL.SDL_Keycode.SDLK_RIGHTPAREN, - K_ASTERISK = SDL.SDL_Keycode.SDLK_ASTERISK, - K_PLUS = SDL.SDL_Keycode.SDLK_PLUS, - K_COMMA = SDL.SDL_Keycode.SDLK_COMMA, - K_MINUS = SDL.SDL_Keycode.SDLK_MINUS, - K_PERIOD = SDL.SDL_Keycode.SDLK_PERIOD, - K_SLASH = SDL.SDL_Keycode.SDLK_SLASH, - K_0 = SDL.SDL_Keycode.SDLK_0, - K_1 = SDL.SDL_Keycode.SDLK_1, - K_2 = SDL.SDL_Keycode.SDLK_2, - K_3 = SDL.SDL_Keycode.SDLK_3, - K_4 = SDL.SDL_Keycode.SDLK_4, - K_5 = SDL.SDL_Keycode.SDLK_5, - K_6 = SDL.SDL_Keycode.SDLK_6, - K_7 = SDL.SDL_Keycode.SDLK_7, - K_8 = SDL.SDL_Keycode.SDLK_8, - K_9 = SDL.SDL_Keycode.SDLK_9, - K_COLON = SDL.SDL_Keycode.SDLK_COLON, - K_SEMICOLON = SDL.SDL_Keycode.SDLK_SEMICOLON, - K_LESS = SDL.SDL_Keycode.SDLK_LESS, - K_EQUALS = SDL.SDL_Keycode.SDLK_EQUALS, - K_GREATER = SDL.SDL_Keycode.SDLK_GREATER, - K_QUESTION = SDL.SDL_Keycode.SDLK_QUESTION, - K_AT = SDL.SDL_Keycode.SDLK_AT, - /* - Skip uppercase letters - */ - K_LEFTBRACKET = SDL.SDL_Keycode.SDLK_LEFTBRACKET, - K_BACKSLASH = SDL.SDL_Keycode.SDLK_BACKSLASH, - K_RIGHTBRACKET = SDL.SDL_Keycode.SDLK_RIGHTBRACKET, - K_CARET = SDL.SDL_Keycode.SDLK_CARET, - K_UNDERSCORE = SDL.SDL_Keycode.SDLK_UNDERSCORE, - K_BACKQUOTE = SDL.SDL_Keycode.SDLK_BACKQUOTE, - K_a = SDL.SDL_Keycode.SDLK_a, - K_b = SDL.SDL_Keycode.SDLK_b, - K_c = SDL.SDL_Keycode.SDLK_c, - K_d = SDL.SDL_Keycode.SDLK_d, - K_e = SDL.SDL_Keycode.SDLK_e, - K_f = SDL.SDL_Keycode.SDLK_f, - K_g = SDL.SDL_Keycode.SDLK_g, - K_h = SDL.SDL_Keycode.SDLK_h, - K_i = SDL.SDL_Keycode.SDLK_i, - K_j = SDL.SDL_Keycode.SDLK_j, - K_k = SDL.SDL_Keycode.SDLK_k, - K_l = SDL.SDL_Keycode.SDLK_l, - K_m = SDL.SDL_Keycode.SDLK_m, - K_n = SDL.SDL_Keycode.SDLK_n, - K_o = SDL.SDL_Keycode.SDLK_o, - K_p = SDL.SDL_Keycode.SDLK_p, - K_q = SDL.SDL_Keycode.SDLK_q, - K_r = SDL.SDL_Keycode.SDLK_r, - K_s = SDL.SDL_Keycode.SDLK_s, - K_t = SDL.SDL_Keycode.SDLK_t, - K_u = SDL.SDL_Keycode.SDLK_u, - K_v = SDL.SDL_Keycode.SDLK_v, - K_w = SDL.SDL_Keycode.SDLK_w, - K_x = SDL.SDL_Keycode.SDLK_x, - K_y = SDL.SDL_Keycode.SDLK_y, - K_z = SDL.SDL_Keycode.SDLK_z, - - K_CAPSLOCK = SDL.SDL_Keycode.SDLK_CAPSLOCK, - - K_F1 = SDL.SDL_Keycode.SDLK_F1, - K_F2 = SDL.SDL_Keycode.SDLK_F2, - K_F3 = SDL.SDL_Keycode.SDLK_F3, - K_F4 = SDL.SDL_Keycode.SDLK_F4, - K_F5 = SDL.SDL_Keycode.SDLK_F5, - K_F6 = SDL.SDL_Keycode.SDLK_F6, - K_F7 = SDL.SDL_Keycode.SDLK_F7, - K_F8 = SDL.SDL_Keycode.SDLK_F8, - K_F9 = SDL.SDL_Keycode.SDLK_F9, - K_F10 = SDL.SDL_Keycode.SDLK_F10, - K_F11 = SDL.SDL_Keycode.SDLK_F11, - K_F12 = SDL.SDL_Keycode.SDLK_F12, - - K_PRINTSCREEN = SDL.SDL_Keycode.SDLK_PRINTSCREEN, - K_SCROLLLOCK = SDL.SDL_Keycode.SDLK_SCROLLLOCK, - K_PAUSE = SDL.SDL_Keycode.SDLK_PAUSE, - K_INSERT = SDL.SDL_Keycode.SDLK_INSERT, - K_HOME = SDL.SDL_Keycode.SDLK_HOME, - K_PAGEUP = SDL.SDL_Keycode.SDLK_PAGEUP, - K_DELETE = SDL.SDL_Keycode.SDLK_DELETE, - K_END = SDL.SDL_Keycode.SDLK_END, - K_PAGEDOWN = SDL.SDL_Keycode.SDLK_PAGEDOWN, - K_RIGHT = SDL.SDL_Keycode.SDLK_RIGHT, - K_LEFT = SDL.SDL_Keycode.SDLK_LEFT, - K_DOWN = SDL.SDL_Keycode.SDLK_DOWN, - K_UP = SDL.SDL_Keycode.SDLK_UP, - - K_NUMLOCKCLEAR = SDL.SDL_Keycode.SDLK_NUMLOCKCLEAR, - K_KP_DIVIDE = SDL.SDL_Keycode.SDLK_KP_DIVIDE, - K_KP_MULTIPLY = SDL.SDL_Keycode.SDLK_KP_MULTIPLY, - K_KP_MINUS = SDL.SDL_Keycode.SDLK_MINUS, - K_KP_PLUS = SDL.SDL_Keycode.SDLK_KP_PLUS, - K_KP_ENTER = SDL.SDL_Keycode.SDLK_KP_ENTER, - K_KP_1 = SDL.SDL_Keycode.SDLK_KP_1, - K_KP_2 = SDL.SDL_Keycode.SDLK_KP_2, - K_KP_3 = SDL.SDL_Keycode.SDLK_KP_3, - K_KP_4 = SDL.SDL_Keycode.SDLK_KP_4, - K_KP_5 = SDL.SDL_Keycode.SDLK_KP_5, - K_KP_6 = SDL.SDL_Keycode.SDLK_KP_6, - K_KP_7 = SDL.SDL_Keycode.SDLK_KP_7, - K_KP_8 = SDL.SDL_Keycode.SDLK_KP_8, - K_KP_9 = SDL.SDL_Keycode.SDLK_KP_9, - K_KP_0 = SDL.SDL_Keycode.SDLK_KP_0, - K_KP_PERIOD = SDL.SDL_Keycode.SDLK_KP_0, - - K_APPLICATION = SDL.SDL_Keycode.SDLK_APPLICATION, - K_POWER = SDL.SDL_Keycode.SDLK_POWER, - K_KP_EQUALS = SDL.SDL_Keycode.SDLK_EQUALS, - K_F13 = SDL.SDL_Keycode.SDLK_F13, - K_F14 = SDL.SDL_Keycode.SDLK_F14, - K_F15 = SDL.SDL_Keycode.SDLK_F15, - K_F16 = SDL.SDL_Keycode.SDLK_F16, - K_F17 = SDL.SDL_Keycode.SDLK_F17, - K_F18 = SDL.SDL_Keycode.SDLK_F18, - K_F19 = SDL.SDL_Keycode.SDLK_F19, - K_F20 = SDL.SDL_Keycode.SDLK_F20, - K_F21 = SDL.SDL_Keycode.SDLK_F21, - K_F22 = SDL.SDL_Keycode.SDLK_F22, - K_F23 = SDL.SDL_Keycode.SDLK_F23, - K_F24 = SDL.SDL_Keycode.SDLK_F24, - K_EXECUTE = SDL.SDL_Keycode.SDLK_EXECUTE, - K_HELP = SDL.SDL_Keycode.SDLK_HELP, - K_MENU = SDL.SDL_Keycode.SDLK_MENU, - K_SELECT = SDL.SDL_Keycode.SDLK_SELECT, - K_STOP = SDL.SDL_Keycode.SDLK_STOP, - K_AGAIN = SDL.SDL_Keycode.SDLK_AGAIN, - K_UNDO = SDL.SDL_Keycode.SDLK_UNDO, - K_CUT = SDL.SDL_Keycode.SDLK_CUT, - K_COPY = SDL.SDL_Keycode.SDLK_COPY, - K_PASTE = SDL.SDL_Keycode.SDLK_PASTE, - K_FIND = SDL.SDL_Keycode.SDLK_FIND, - K_MUTE = SDL.SDL_Keycode.SDLK_MUTE, - K_VOLUMEUP = SDL.SDL_Keycode.SDLK_VOLUMEUP, - K_VOLUMEDOWN = SDL.SDL_Keycode.SDLK_VOLUMEDOWN, - K_KP_COMMA = SDL.SDL_Keycode.SDLK_COMMA, - K_KP_EQUALSAS400 = SDL.SDL_Keycode.SDLK_KP_EQUALSAS400, - - K_ALTERASE = SDL.SDL_Keycode.SDLK_ALTERASE, - K_SYSREQ = SDL.SDL_Keycode.SDLK_SYSREQ, - K_CANCEL = SDL.SDL_Keycode.SDLK_CANCEL, - K_CLEAR = SDL.SDL_Keycode.SDLK_CLEAR, - K_PRIOR = SDL.SDL_Keycode.SDLK_PRIOR, - K_RETURN2 = SDL.SDL_Keycode.SDLK_RETURN2, - K_SEPARATOR = SDL.SDL_Keycode.SDLK_SEPARATOR, - K_OUT = SDL.SDL_Keycode.SDLK_OUT, - K_OPER = SDL.SDL_Keycode.SDLK_OPER, - K_CLEARAGAIN = SDL.SDL_Keycode.SDLK_CLEARAGAIN, - K_CRSEL = SDL.SDL_Keycode.SDLK_CRSEL, - K_EXSEL = SDL.SDL_Keycode.SDLK_EXSEL, - - K_KP_00 = SDL.SDL_Keycode.SDLK_KP_00, - K_KP_000 = SDL.SDL_Keycode.SDLK_KP_000, - K_THOUSANDSSEPARATOR = SDL.SDL_Keycode.SDLK_THOUSANDSSEPARATOR, - K_DECIMALSEPARATOR = SDL.SDL_Keycode.SDLK_DECIMALSEPARATOR, - K_CURRENCYUNIT = SDL.SDL_Keycode.SDLK_CURRENCYUNIT, - K_CURRENCYSUBUNIT = SDL.SDL_Keycode.SDLK_CURRENCYSUBUNIT, - K_KP_LEFTPAREN = SDL.SDL_Keycode.SDLK_LEFTPAREN, - K_KP_RIGHTPAREN = SDL.SDL_Keycode.SDLK_KP_RIGHTPAREN, - K_KP_LEFTBRACE = SDL.SDL_Keycode.SDLK_KP_LEFTBRACE, - K_KP_RIGHTBRACE = SDL.SDL_Keycode.SDLK_KP_RIGHTBRACE, - K_KP_TAB = SDL.SDL_Keycode.SDLK_KP_TAB, - K_KP_BACKSPACE = SDL.SDL_Keycode.SDLK_BACKSPACE, - K_KP_A = SDL.SDL_Keycode.SDLK_KP_A, - K_KP_B = SDL.SDL_Keycode.SDLK_KP_B, - K_KP_C = SDL.SDL_Keycode.SDLK_KP_C, - K_KP_D = SDL.SDL_Keycode.SDLK_KP_D, - K_KP_E = SDL.SDL_Keycode.SDLK_KP_E, - K_KP_F = SDL.SDL_Keycode.SDLK_KP_F, - K_KP_XOR = SDL.SDL_Keycode.SDLK_KP_XOR, - K_KP_POWER = SDL.SDL_Keycode.SDLK_KP_POWER, - K_KP_PERCENT = SDL.SDL_Keycode.SDLK_KP_PERCENT, - K_KP_LESS = SDL.SDL_Keycode.SDLK_KP_LESS, - K_KP_GREATER = SDL.SDL_Keycode.SDLK_KP_GREATER, - K_KP_AMPERSAND = SDL.SDL_Keycode.SDLK_KP_AMPERSAND, - K_KP_DBLAMPERSAND = SDL.SDL_Keycode.SDLK_KP_DBLAMPERSAND, - K_KP_VERTICALBAR = SDL.SDL_Keycode.SDLK_KP_VERTICALBAR, - K_KP_DBLVERTICALBAR = SDL.SDL_Keycode.SDLK_KP_DBLVERTICALBAR, - K_KP_COLON = SDL.SDL_Keycode.SDLK_KP_COLON, - K_KP_HASH = SDL.SDL_Keycode.SDLK_KP_HASH, - K_KP_SPACE = SDL.SDL_Keycode.SDLK_KP_SPACE, - K_KP_AT = SDL.SDL_Keycode.SDLK_KP_AT, - K_KP_EXCLAM = SDL.SDL_Keycode.SDLK_KP_EXCLAM, - K_KP_MEMSTORE = SDL.SDL_Keycode.SDLK_KP_MEMSTORE, - K_KP_MEMRECALL = SDL.SDL_Keycode.SDLK_KP_MEMRECALL, - K_KP_MEMCLEAR = SDL.SDL_Keycode.SDLK_KP_MEMCLEAR, - K_KP_MEMADD = SDL.SDL_Keycode.SDLK_KP_MEMADD, - K_KP_MEMSUBTRACT = SDL.SDL_Keycode.SDLK_KP_MEMSUBTRACT, - K_KP_MEMMULTIPLY = SDL.SDL_Keycode.SDLK_KP_MEMMULTIPLY, - K_KP_MEMDIVIDE = SDL.SDL_Keycode.SDLK_KP_MEMDIVIDE, - K_KP_PLUSMINUS = SDL.SDL_Keycode.SDLK_KP_PLUSMINUS, - K_KP_CLEAR = SDL.SDL_Keycode.SDLK_KP_CLEAR, - K_KP_CLEARENTRY = SDL.SDL_Keycode.SDLK_KP_CLEARENTRY, - K_KP_BINARY = SDL.SDL_Keycode.SDLK_KP_BINARY, - K_KP_OCTAL = SDL.SDL_Keycode.SDLK_KP_OCTAL, - K_KP_DECIMAL = SDL.SDL_Keycode.SDLK_KP_DECIMAL, - K_KP_HEXADECIMAL = SDL.SDL_Keycode.SDLK_KP_HEXADECIMAL, - - K_LCTRL = SDL.SDL_Keycode.SDLK_LCTRL, - K_LSHIFT = SDL.SDL_Keycode.SDLK_LSHIFT, - K_LALT = SDL.SDL_Keycode.SDLK_LALT, - K_LGUI = SDL.SDL_Keycode.SDLK_LGUI, - K_RCTRL = SDL.SDL_Keycode.SDLK_RCTRL, - K_RSHIFT = SDL.SDL_Keycode.SDLK_RSHIFT, - K_RALT = SDL.SDL_Keycode.SDLK_RALT, - K_RGUI = SDL.SDL_Keycode.SDLK_RGUI, - - K_MODE = SDL.SDL_Keycode.SDLK_MODE, - - K_AUDIONEXT = SDL.SDL_Keycode.SDLK_AUDIONEXT, - K_AUDIOPREV = SDL.SDL_Keycode.SDLK_AUDIOPREV, - K_AUDIOSTOP = SDL.SDL_Keycode.SDLK_AUDIOSTOP, - K_AUDIOPLAY = SDL.SDL_Keycode.SDLK_AUDIOPLAY, - K_AUDIOMUTE = SDL.SDL_Keycode.SDLK_AUDIOMUTE, - K_MEDIASELECT = SDL.SDL_Keycode.SDLK_MEDIASELECT, - K_WWW = SDL.SDL_Keycode.SDLK_WWW, - K_MAIL = SDL.SDL_Keycode.SDLK_MAIL, - K_CALCULATOR = SDL.SDL_Keycode.SDLK_CALCULATOR, - K_COMPUTER = SDL.SDL_Keycode.SDLK_COMPUTER, - K_AC_SEARCH = SDL.SDL_Keycode.SDLK_AC_SEARCH, - K_AC_HOME = SDL.SDL_Keycode.SDLK_AC_HOME, - K_AC_BACK = SDL.SDL_Keycode.SDLK_AC_BACK, - K_AC_FORWARD = SDL.SDL_Keycode.SDLK_AC_FORWARD, - K_AC_STOP = SDL.SDL_Keycode.SDLK_AC_STOP, - K_AC_REFRESH = SDL.SDL_Keycode.SDLK_AC_REFRESH, - K_AC_BOOKMARKS = SDL.SDL_Keycode.SDLK_AC_BOOKMARKS, - - K_BRIGHTNESSDOWN = SDL.SDL_Keycode.SDLK_BRIGHTNESSDOWN, - K_BRIGHTNESSUP = SDL.SDL_Keycode.SDLK_BRIGHTNESSUP, - K_DISPLAYSWITCH = SDL.SDL_Keycode.SDLK_DISPLAYSWITCH, - K_KBDILLUMTOGGLE = SDL.SDL_Keycode.SDLK_KBDILLUMTOGGLE, - K_KBDILLUMDOWN = SDL.SDL_Keycode.SDLK_KBDILLUMDOWN, - K_KBDILLUMUP = SDL.SDL_Keycode.SDLK_KBDILLUMUP, - K_EJECT = SDL.SDL_Keycode.SDLK_EJECT, - K_SLEEP = SDL.SDL_Keycode.SDLK_SLEEP, - K_APP1 = SDL.SDL_Keycode.SDLK_APP1, - K_APP2 = SDL.SDL_Keycode.SDLK_APP2, - - K_AUDIOREWIND = SDL.SDL_Keycode.SDLK_AUDIOREWIND, - K_AUDIOFASTFORWARD = SDL.SDL_Keycode.SDLK_AUDIOFASTFORWARD - } -} \ No newline at end of file diff --git a/src/SlatedGameToolkit.Framework/Loader/AssetManager.cs b/src/SlatedGameToolkit.Framework/Loader/AssetManager.cs index fef2a15..786b324 100644 --- a/src/SlatedGameToolkit.Framework/Loader/AssetManager.cs +++ b/src/SlatedGameToolkit.Framework/Loader/AssetManager.cs @@ -1,13 +1,31 @@ using System; using System.Collections.Concurrent; using System.Collections.Generic; +using System.IO; using System.Threading; +using SlatedGameToolkit.Framework.Exceptions; +using SlatedGameToolkit.Framework.Graphics.OpenGL; +using SlatedGameToolkit.Framework.Graphics.Window; namespace SlatedGameToolkit.Framework.Loader { - public class AssetManager : IDisposable { + /// + /// A delegate that should modify a given path. + /// + /// A path to modify. + /// The modified path. + public delegate string ModifyPath(string path); + /// + /// A delegate that performs the loading of the specific asset. + /// + /// The path of the asset. + /// The context to be used. May be null if called by user. + /// The type of the resulting asset. + /// A loaded, useable asset. + public delegate T LoadAsset(string path, GLContext glContext) where T : IAssetUseable; + public class AssetManager { private readonly object assetThreadLock = new object(); private Thread thread; - private ConcurrentQueue> loadables; + private ConcurrentQueue<(string, GLContext)> loadables; private volatile bool load; public bool Complete { get { @@ -15,36 +33,58 @@ namespace SlatedGameToolkit.Framework.Loader { } } private ConcurrentDictionary assets; - public ConcurrentDictionary PathModifiers {get; private set; } + + /// + /// A concurrent dictionary containing all the path modifier's in association with their extension. + /// This is what the manager uses to determine how to modify a filename or path dependent on it's extension. + /// + /// A dictionary of file extension associated with respective paths. + public ConcurrentDictionary PathModifiers { get; private set; } + + /// + /// A dictionary containing associations between file extensions and their loaders. + /// All file extensions will be requested in lower cases, and therefore, the extension key in this dictionary should also be all lowercase. + /// + /// The dictionary that associates the loaders to their file extensions. + public ConcurrentDictionary> Loaders { get ; private set; } public AssetManager() { - this.loadables = new ConcurrentQueue>(); + this.loadables = new ConcurrentQueue<(string, GLContext)>(); this.assets = new ConcurrentDictionary(); - this.PathModifiers = new ConcurrentDictionary(); - thread = new Thread(Process); + this.PathModifiers = new ConcurrentDictionary(); + this.Loaders = new ConcurrentDictionary>(); + + thread = new Thread(Run); this.load = true; thread.Name = "Asset-Loader"; thread.IsBackground = true; thread.Start(); + + RegisterCommonLoaders(); + } + + private void RegisterCommonLoaders() { + Loaders["png"] = CommonLoaders.LoadTexture; } /// /// Queue's the loadable for batched loading. /// The file name of the loadable is the one the loadable is saved under. /// - /// The loadable. - public void QueueLoad(ILoadable loadable) { - loadables.Enqueue(loadable); + /// path of file. + public void QueueLoad(string name, GLContext glContext = null) { + if (glContext == null) glContext = WindowContextsManager.CurrentGL; + loadables.Enqueue((name, glContext)); } - private void Process() { - lock (assetThreadLock) - { - ILoadable loadable; - while (load) { + private void Run() { + while (load) { + lock (assetThreadLock) + { + ValueTuple loadable; while (loadables.TryDequeue(out loadable)) { - Load(loadable); + Load(loadable.Item1, loadable.Item2); } - Monitor.Pulse(loadable); + if (load) Monitor.Wait(assetThreadLock); } } } @@ -52,10 +92,16 @@ namespace SlatedGameToolkit.Framework.Loader { /// /// Loads the loadable and stores it under the filename given to the loadable. /// - /// The loadable to load. - public void Load(ILoadable loadable) { - string name = loadable.FileName; - assets[name] = loadable.Load(PathModifiers[loadable.GetType()]); + /// The loadable to load. + /// The OpenGL context to associate with the loaded asset if the loaded asset requires it. May be null, in which the currently active context will be associated with it. + public void Load(string name, GLContext glContext = null) { + if (glContext == null) glContext = WindowContextsManager.CurrentGL; + string ext = Path.GetExtension(name).ToLower(); + if (PathModifiers.ContainsKey(ext)) { + name = PathModifiers[ext](name); + } + if (!Loaders.ContainsKey(ext)) throw new FrameworkUsageException(string.Format("Failed to find associated loader for file \"{0}\" with extension \"{1}\".", name, ext)); + assets[name] = Loaders[ext](name, glContext); } /// @@ -87,18 +133,5 @@ namespace SlatedGameToolkit.Framework.Loader { Unload(name); } } - - /// - /// Disposes of all the stored assets. - /// - public void Dispose() - { - load = false; - UnloadAll(); - } - - ~AssetManager() { - Dispose(); - } } } \ No newline at end of file diff --git a/src/SlatedGameToolkit.Framework/Loader/CommonLoaders.cs b/src/SlatedGameToolkit.Framework/Loader/CommonLoaders.cs new file mode 100644 index 0000000..1ecdb0a --- /dev/null +++ b/src/SlatedGameToolkit.Framework/Loader/CommonLoaders.cs @@ -0,0 +1,46 @@ +using System; +using System.IO; +using System.Runtime.InteropServices; +using SDL2; +using SlatedGameToolkit.Framework.Exceptions; +using SlatedGameToolkit.Framework.Graphics.OpenGL; +using SlatedGameToolkit.Framework.Graphics.Textures; +using SlatedGameToolkit.Framework.Loader; + +namespace SlatedGameToolkit.Framework.Loader +{ + public static class CommonLoaders + { + /// + /// Loads a texture using SDL2's image library. + /// Therefore, technically, this function should be able to laod any format SDL2 Image can load. + /// + /// The path of the texture to load. + /// The OpenGL context the texture is to be associated with. + /// An OpenGL Texture associated with the given context. + public static Texture LoadTexture(string path, GLContext glContext) + { + IntPtr ptr = SDL_image.IMG_Load(path); + if (ptr.Equals(IntPtr.Zero)) throw new FrameworkSDLException("Could not find texture file at path: " + path); + SDL.SDL_Surface surface = Marshal.PtrToStructure(ptr); + SDL.SDL_PixelFormat pixelFormat = Marshal.PtrToStructure(surface.format); + if (pixelFormat.format != SDL.SDL_PIXELFORMAT_ABGR8888) { + GameEngine.Logger.Warning(string.Format("Texture \"{0}\" is of format {1}. Converting to ABGR8888. Consider saving files in such a data format for faster load times.", path, SDL.SDL_GetPixelFormatName(pixelFormat.format).Remove(0, 16))); + IntPtr convertedPtr = SDL.SDL_ConvertSurfaceFormat(ptr, SDL.SDL_PIXELFORMAT_ABGR8888, 0); + if (convertedPtr == null) throw new OptionalSDLException(); + SDL.SDL_FreeSurface(ptr); + ptr = convertedPtr; + surface = Marshal.PtrToStructure(ptr); + } + + byte[] data = new byte[surface.pitch * surface.h]; + Marshal.Copy(surface.pixels, data, 0, data.Length); + + TextureData textureData = new TextureData(surface.w, surface.h, data); + + Texture useable = new Texture(textureData, glContext); + SDL.SDL_FreeSurface(ptr); + return useable; + } + } +} \ No newline at end of file diff --git a/src/SlatedGameToolkit.Framework/Loader/ILoadable.cs b/src/SlatedGameToolkit.Framework/Loader/ILoadable.cs deleted file mode 100644 index 99521ef..0000000 --- a/src/SlatedGameToolkit.Framework/Loader/ILoadable.cs +++ /dev/null @@ -1,31 +0,0 @@ -namespace SlatedGameToolkit.Framework.Loader -{ - /// - /// The method should modify the path. - /// - /// The path to modify. - /// The modified path. - public delegate string PathModifier(string path); - - /// - /// A loader is to load an asset the game uses. - /// It is created whenever the asset needs to be loaded with a string representing the path to the file to actually load. - /// - public interface ILoadable where UseableT : IAssetUseable - { - /// - /// The name of the file to load. - /// This is what the asset manager stores the results under. - /// - /// A string representing the name to load. - string FileName { get; } - - /// - /// Loads the asset. - /// - /// Modifies the path. May be null. Default is null. - /// The loadable type. - /// The loadable type. - UseableT Load(PathModifier pathModifier = null); - } -} \ No newline at end of file diff --git a/src/SlatedGameToolkit.Framework/Loader/TextureLoader.cs b/src/SlatedGameToolkit.Framework/Loader/TextureLoader.cs deleted file mode 100644 index 4c97591..0000000 --- a/src/SlatedGameToolkit.Framework/Loader/TextureLoader.cs +++ /dev/null @@ -1,29 +0,0 @@ -using System; -using System.Runtime.InteropServices; -using SDL2; -using SlatedGameToolkit.Framework.Exceptions; -using SlatedGameToolkit.Framework.Graphics.Textures; -using SlatedGameToolkit.Framework.Loader; - -namespace SlatedGameToolkit.Framework.Loader -{ - public class TextureLoader : ILoadable - { - public string FileName {get; private set; } - public TextureLoader(string path) { - this.FileName = path; - } - - public Texture Load(PathModifier pathModifier = null) - { - IntPtr ptr = SDL_image.IMG_Load(pathModifier == null ? FileName : pathModifier(FileName)); - if (ptr.Equals(IntPtr.Zero)) throw new FrameworkSDLException(); - SDL.SDL_Surface surface = Marshal.PtrToStructure(ptr); - TextureData textureData = new TextureData(); - textureData.data = new byte[surface.pitch * surface.h]; - Marshal.Copy(surface.pixels, textureData.data, 0, textureData.data.Length); - Texture useable = new Texture(textureData); - return useable; - } - } -} \ No newline at end of file diff --git a/src/SlatedGameToolkit.Framework/Resources/default.frag b/src/SlatedGameToolkit.Framework/Resources/default.frag index f7ad5c1..4ac67a2 100644 --- a/src/SlatedGameToolkit.Framework/Resources/default.frag +++ b/src/SlatedGameToolkit.Framework/Resources/default.frag @@ -1,4 +1,4 @@ -#version 330 core +#version 330 out vec4 outputColor; in vec2 texCoord; diff --git a/src/SlatedGameToolkit.Framework/Resources/default.vert b/src/SlatedGameToolkit.Framework/Resources/default.vert index d98073a..a02eaf5 100644 --- a/src/SlatedGameToolkit.Framework/Resources/default.vert +++ b/src/SlatedGameToolkit.Framework/Resources/default.vert @@ -1,10 +1,12 @@ -#version 330 core +#version 330 in vec3 aPosition; in vec4 aColor; in vec2 aTexCoord; + uniform mat4 models; uniform mat4 view; uniform mat4 projection; + out vec2 texCoord; out vec4 color; @@ -13,5 +15,5 @@ void main() texCoord = aTexCoord; color = aColor; - gl_Position = projection * view * models * vec4(aPosition, 1.0f); + gl_Position = projection * view * models * vec4(aPosition, 1.0); } \ No newline at end of file diff --git a/src/SlatedGameToolkit.Framework/Resources/filler.png b/src/SlatedGameToolkit.Framework/Resources/filler.png new file mode 100644 index 0000000000000000000000000000000000000000..b707848adc32f82f279a82ad29094b58c8c9fcd7 GIT binary patch literal 3130 zcmV-A48`+_P)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!ThLqS}RRhg@|2UVWCD%sWgFzr6g8p+1(kR_sltWXZOx!=WmzzZr(fR z%$=D#?{~iMobQ~OEqR_7z&Pl;BJgqeyRc~R75Lq-Xs`=j2j7CH;Bhz%UxowlEGz=8 zbhiE?BWA(R!}~1%3iTVKmYZP|`=GvW#Y1o_ycQM>T|fLN2zNjySd?J3>^b;f_#gO9 z7{ycui1IMp0PC;_1Z}oZ6z0PB!?)piDB&`I#H;)!9Dz~Hx7#G>fDgfwupiEWxsb~M zK@cp5Wm^@VfPaRr#kCb>5VgJxAg_obOKVDaA3O%vYe!aOG616Ij*X4|gyQq?t7d12 zGjKO_;lb;*0vHO+-|GFY3M|28#RP@Idn+V z2`0hUp>m6+`;0>(14uj~@3qxfaLfaQg6oyl5`Tlv2r_^=LQ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_K^#Q>t8 z>P7Ar;5zmr6#{QDVh$Kl>HcE=rzf)k&cnQ~^>H2hks9GhaBs?xh?yt&q{49mlh99| zfW?Dr*pJKz`-KPLc_Xpa- 0 ? args[0] : null)); } else { diff --git a/src/SlatedGameToolkit.Tools/Resources/Playground/filler.png b/src/SlatedGameToolkit.Tools/Resources/Playground/filler.png new file mode 100644 index 0000000000000000000000000000000000000000..3e6360cfb555a3e0df815b77ceb65c3a333898ac GIT binary patch literal 3080 zcmV+j4EOViP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D3!OVuHjJX30irwv!nfgh zDB&`I#H;=$9EMTMv1Jl0gb%`#upj0Qkz57{f?z2u+ote1{4;btu2Pgi)cZ1kydsJ$ zy(!^+P~*lr9mtAI20-+z(b3VLQhgq3z;ZYPcR?p!r945UJVEtO!x}6C@}5WFJ~&SY zrX1?^;o;#Elm^t#Q$+vxhv6Qm-Z=^n!$J5G`~%z%KLi~#1H{F9TD}2qf~kITl&}aF;BTPod5P96pt_7O z6{4G=@u00IOlkndd=l{voPQ_mw#^sdKcM1Xq9tBNP+JC?4y=avht+sYXaL-Kse0cw z6G7tx26&ijW%Yl-0q6!p8Np43(`5ib9jFX77O@6Ez$`}l?QsKMJ9Kt-c5}U3@Ms!* z6{`20A>;w0P$+r;oCwMu=ZDqth&6zEQ88_sse$Kg;Wu=>213pMZu)amq0;3FoQ|=!sey8SF)vnVi(sxhJaXi zNeh1OMvVD8s;i);NVgF3p|ZtO(0Q8vrWQL(;8Hjh-ff78 ztGC@isF3J{6G3BzZd6A57HnQY=E0q?G5AIeusYAc7X>{p7yCRj!UlR@VqS+bg6cAW z#se*2+CkIieee@-B5z3xg;whln%>`w5psjo;YkX)d^0`(KLf9W+9#X~(?GqZ6=w4) zFbhw>u^E9Io@eepClG&{B2K&@mtO=I+j2Hc3mHLEYn-UG)Ib}C05_d$+H)X;dT{xd zZL=8~{4@@@sW3}i>-t-uLL)D3wWW#KeWnX@fDlS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zi+3 zh#B4vV8AGiY`#^&_mYGA9{%%d2VqkT9daOHy92mNM~}Oy`})ZjKe#Fltt>d~I~*Ia z!`CTzq%Rwp>v8JdNiD5QK&5}O(G;knDEPl*P2DBLA3yKJXDykWMCp+6pXs&9&p2{6 z)boPNA|XULx8U&dO)2c5<`!WnK3q0@aop7PeZM54FjjdKg#KB=0gL;91v|ue3KXYn zy0mPacuz9+_ZDljR-h{3vlo8*&VUi|>OoA%(mfFa)jReL97Q?8>#s~WpNd~CTEbBO zGl^RXmDs-7c{RL(S8#sVWap@qNZA{snb%?^#&J#;^>Ew^5oPSsnC|5WAth9cusT+= zZ+8nP2>nS(cJ!3rTrnA27=DQkvhB>u@2_qhUq7FaikjqJu$!JUB;)zo+rLjGLR diff --git a/src/SlatedGameToolkit.Tools/Utilities/Playground/MainState.cs b/src/SlatedGameToolkit.Tools/Utilities/Playground/MainState.cs index 6b80852..48d8922 100644 --- a/src/SlatedGameToolkit.Tools/Utilities/Playground/MainState.cs +++ b/src/SlatedGameToolkit.Tools/Utilities/Playground/MainState.cs @@ -1,12 +1,13 @@ using System; using System.Drawing; using System.Numerics; -using SlatedGameToolkit.Framework.Exceptions; -using SlatedGameToolkit.Framework.Graphics.Programs; +using SDL2; using SlatedGameToolkit.Framework.Graphics.Render; -using SlatedGameToolkit.Framework.Graphics.Shaders; +using SlatedGameToolkit.Framework.Graphics.Render.Programs; using SlatedGameToolkit.Framework.Graphics.Textures; using SlatedGameToolkit.Framework.Graphics.Window; +using SlatedGameToolkit.Framework.Input; +using SlatedGameToolkit.Framework.Input.Devices; using SlatedGameToolkit.Framework.Loader; using SlatedGameToolkit.Framework.StateSystem; using SlatedGameToolkit.Framework.StateSystem.States; @@ -16,9 +17,8 @@ namespace SlatedGameToolkit.Tools.Utilities.Playground public class MainState : IState { private WindowContext window; - private GLShaderProgram program; private Camera2D camera; - private Renderer renderer; + private MeshBatch renderer; private Texture texture; private Sprite2D sprite; @@ -36,10 +36,9 @@ namespace SlatedGameToolkit.Tools.Utilities.Playground public void Deinitialize() { - window.Dispose(); - program.Dispose(); texture.Dispose(); renderer.Dispose(); + window.Dispose(); } public string getName() @@ -50,25 +49,35 @@ namespace SlatedGameToolkit.Tools.Utilities.Playground public void Initialize(StateManager manager) { window = new WindowContext("SlatedGameToolkit Playground"); - camera = new Camera2D(); - camera.Width = window.WindowBoundaries.Width; - camera.Height = window.WindowBoundaries.Height; - camera.Position = new Vector2(camera.Width / 2, camera.Height / 2); - program = new GLShaderProgram(new NormalVertexShader(), new NormalFragmentShader()); - renderer = new Renderer(camera, program); - texture = new TextureLoader("Resources/Playground/yhdnbgnc.png").Load(); + camera = new Camera2D(2, 2); + renderer = new MeshBatch(camera); + texture = CommonLoaders.LoadTexture("Resources/Playground/yhdnbgnc.png", null); sprite = new Sprite2D(texture, Color.White); + sprite.X = -0.5f; + sprite.Y = -0.5f; } public void Render(double delta) { - OpenGLErrorException.CheckGLErrorStatus(); - renderer.Queue(sprite, Matrix4x4.Identity); - renderer.Render(); + renderer.Begin(Matrix4x4.Identity); + renderer.Draw(sprite); + renderer.End(); } public void Update(double delta) { + if (Keyboard.IsKeyPressed(SDL.SDL_Keycode.SDLK_DOWN)) { + camera.Position += new Vector2(0, (float)(-0.5f * delta)); + } + if (Keyboard.IsKeyPressed(SDL.SDL_Keycode.SDLK_UP)) { + camera.Position += new Vector2(0, (float)(0.5f * delta)); + } + if (Keyboard.IsKeyPressed(SDL.SDL_Keycode.SDLK_LEFT)) { + camera.Position += new Vector2((float)(-0.5f * delta), 0); + } + if (Keyboard.IsKeyPressed(SDL.SDL_Keycode.SDLK_RIGHT)) { + camera.Position += new Vector2((float)(0.5f * delta), 0); + } } } } \ No newline at end of file