// // Generated by StgSharp.GenerateGL on 2026-08-25 09:22:55Z // Version: 3.3 // using System; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using StgSharp.Graphics.OpenGL; namespace StgSharp.Graphics.OpenGL { public unsafe partial class OpenGLFunction { [MethodImpl(MethodImplOptions.AggressiveInlining)] public void ActiveTexture(uint texture) { Context.glActiveTexture(texture); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void AttachShader(GlHandle program, GlHandle shader) { Context.glAttachShader(program.Value, shader.Value); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void BeginConditionalRender(uint id, uint mode) { Context.glBeginConditionalRender(id, mode); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void BeginQuery(uint target, uint id) { Context.glBeginQuery(target, id); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void BeginTransformFeedback(uint primitiveMode) { Context.glBeginTransformFeedback(primitiveMode); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void BindAttribLocation(GlHandle program, uint index, ReadOnlySpan name) { fixed (byte* namePtr = name) { Context.glBindAttribLocation(program.Value, index, namePtr); } } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void BindBuffer(uint target, GlHandle buffer) { Context.glBindBuffer(target, buffer.Value); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void BindBufferBase(uint target, uint index, GlHandle buffer) { Context.glBindBufferBase(target, index, buffer.Value); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void BindBufferRange(uint target, uint index, GlHandle buffer, nint offset, nint size) { Context.glBindBufferRange(target, index, buffer.Value, offset, size); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void BindFragDataLocation(GlHandle program, uint color, ReadOnlySpan name) { fixed (byte* namePtr = name) { Context.glBindFragDataLocation(program.Value, color, namePtr); } } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void BindFragDataLocationIndexed(GlHandle program, uint colorNumber, uint index, ReadOnlySpan name) { fixed (byte* namePtr = name) { Context.glBindFragDataLocationIndexed(program.Value, colorNumber, index, namePtr); } } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void BindFramebuffer(uint target, GlHandle framebuffer) { Context.glBindFramebuffer(target, framebuffer.Value); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void BindRenderbuffer(uint target, GlHandle renderbuffer) { Context.glBindRenderbuffer(target, renderbuffer.Value); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void BindSampler(uint unit, GlHandle sampler) { Context.glBindSampler(unit, sampler.Value); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void BindTexture(uint target, GlHandle texture) { Context.glBindTexture(target, texture.Value); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void BindVertexArray(uint array) { Context.glBindVertexArray(array); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void BlendColor(float red, float green, float blue, float alpha) { Context.glBlendColor(red, green, blue, alpha); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void BlendEquation(uint mode) { Context.glBlendEquation(mode); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void BlendEquationSeparate(uint modeRGB, uint modeAlpha) { Context.glBlendEquationSeparate(modeRGB, modeAlpha); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void BlendFunc(uint sfactor, uint dfactor) { Context.glBlendFunc(sfactor, dfactor); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void BlendFuncSeparate(uint sfactorRGB, uint dfactorRGB, uint sfactorAlpha, uint dfactorAlpha) { Context.glBlendFuncSeparate(sfactorRGB, dfactorRGB, sfactorAlpha, dfactorAlpha); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void BlitFramebuffer(int srcX0, int srcY0, int srcX1, int srcY1, int dstX0, int dstY0, int dstX1, int dstY1, uint mask, uint filter) { Context.glBlitFramebuffer(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void BufferData(uint target, nint size, void* data, uint usage) { Context.glBufferData(target, size, data, usage); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void BufferSubData(uint target, nint offset, nint size, void* data) { Context.glBufferSubData(target, offset, size, data); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public uint CheckFramebufferStatus(uint target) { return Context.glCheckFramebufferStatus(target); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void ClampColor(uint target, uint clamp) { Context.glClampColor(target, clamp); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void Clear(uint mask) { Context.glClear(mask); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void ClearBuffer(uint buffer, int drawbuffer, float depth, int stencil) { Context.glClearBufferfi(buffer, drawbuffer, depth, stencil); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void ClearBuffer(uint buffer, int drawbuffer, ReadOnlySpan value) { fixed (float* valuePtr = value) { Context.glClearBufferfv(buffer, drawbuffer, valuePtr); } } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void ClearBuffer(uint buffer, int drawbuffer, ReadOnlySpan value) { fixed (int* valuePtr = value) { Context.glClearBufferiv(buffer, drawbuffer, valuePtr); } } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void ClearBuffer(uint buffer, int drawbuffer, ReadOnlySpan value) { fixed (uint* valuePtr = value) { Context.glClearBufferuiv(buffer, drawbuffer, valuePtr); } } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void ClearColor(float red, float green, float blue, float alpha) { Context.glClearColor(red, green, blue, alpha); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void ClearDepth(double depth) { Context.glClearDepth(depth); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void ClearStencil(int s) { Context.glClearStencil(s); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public uint ClientWaitSync(glSync sync, uint flags, ulong timeout) { return Context.glClientWaitSync(sync, flags, timeout); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void ColorMask(byte red, byte green, byte blue, byte alpha) { Context.glColorMask(red, green, blue, alpha); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void ColorMask(uint index, byte r, byte g, byte b, byte a) { Context.glColorMaski(index, r, g, b, a); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void CompileShader(GlHandle shader) { Context.glCompileShader(shader.Value); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void CompressedTexImage1D(uint target, int level, uint internalformat, int width, int border, int imageSize, void* data) { Context.glCompressedTexImage1D(target, level, internalformat, width, border, imageSize, data); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void CompressedTexImage2D(uint target, int level, uint internalformat, int width, int height, int border, int imageSize, void* data) { Context.glCompressedTexImage2D(target, level, internalformat, width, height, border, imageSize, data); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void CompressedTexImage3D(uint target, int level, uint internalformat, int width, int height, int depth, int border, int imageSize, void* data) { Context.glCompressedTexImage3D(target, level, internalformat, width, height, depth, border, imageSize, data); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void CompressedTexSubImage1D(uint target, int level, int xoffset, int width, uint format, int imageSize, void* data) { Context.glCompressedTexSubImage1D(target, level, xoffset, width, format, imageSize, data); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void CompressedTexSubImage2D(uint target, int level, int xoffset, int yoffset, int width, int height, uint format, int imageSize, void* data) { Context.glCompressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, imageSize, data); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void CompressedTexSubImage3D(uint target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, uint format, int imageSize, void* data) { Context.glCompressedTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void CopyBufferSubData(uint readTarget, uint writeTarget, nint readOffset, nint writeOffset, nint size) { Context.glCopyBufferSubData(readTarget, writeTarget, readOffset, writeOffset, size); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void CopyTexImage1D(uint target, int level, uint internalformat, int x, int y, int width, int border) { Context.glCopyTexImage1D(target, level, internalformat, x, y, width, border); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void CopyTexImage2D(uint target, int level, uint internalformat, int x, int y, int width, int height, int border) { Context.glCopyTexImage2D(target, level, internalformat, x, y, width, height, border); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void CopyTexSubImage1D(uint target, int level, int xoffset, int x, int y, int width) { Context.glCopyTexSubImage1D(target, level, xoffset, x, y, width); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void CopyTexSubImage2D(uint target, int level, int xoffset, int yoffset, int x, int y, int width, int height) { Context.glCopyTexSubImage2D(target, level, xoffset, yoffset, x, y, width, height); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void CopyTexSubImage3D(uint target, int level, int xoffset, int yoffset, int zoffset, int x, int y, int width, int height) { Context.glCopyTexSubImage3D(target, level, xoffset, yoffset, zoffset, x, y, width, height); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public GlHandle CreateProgram() { return GlHandle.Create(Context.glCreateProgram()); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public GlHandle CreateShader(uint type) { return GlHandle.Create(Context.glCreateShader(type)); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void CullFace(uint mode) { Context.glCullFace(mode); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void DeleteBuffers(ReadOnlySpan buffers) { fixed (uint* buffersPtr = buffers) { Context.glDeleteBuffers(checked((int)buffers.Length), buffersPtr); } } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void DeleteFramebuffers(ReadOnlySpan framebuffers) { fixed (uint* framebuffersPtr = framebuffers) { Context.glDeleteFramebuffers(checked((int)framebuffers.Length), framebuffersPtr); } } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void DeleteProgram(GlHandle program) { Context.glDeleteProgram(program.Value); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void DeleteQueries(ReadOnlySpan ids) { fixed (uint* idsPtr = ids) { Context.glDeleteQueries(checked((int)ids.Length), idsPtr); } } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void DeleteRenderbuffers(ReadOnlySpan renderbuffers) { fixed (uint* renderbuffersPtr = renderbuffers) { Context.glDeleteRenderbuffers(checked((int)renderbuffers.Length), renderbuffersPtr); } } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void DeleteSamplers(ReadOnlySpan samplers) { fixed (uint* samplersPtr = samplers) { Context.glDeleteSamplers(checked((int)samplers.Length), samplersPtr); } } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void DeleteShader(GlHandle shader) { Context.glDeleteShader(shader.Value); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void DeleteSync(glSync sync) { Context.glDeleteSync(sync); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void DeleteTextures(ReadOnlySpan textures) { fixed (uint* texturesPtr = textures) { Context.glDeleteTextures(checked((int)textures.Length), texturesPtr); } } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void DeleteVertexArrays(ReadOnlySpan arrays) { fixed (uint* arraysPtr = arrays) { Context.glDeleteVertexArrays(checked((int)arrays.Length), arraysPtr); } } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void DepthFunc(uint func) { Context.glDepthFunc(func); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void DepthMask(byte flag) { Context.glDepthMask(flag); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void DepthRange(double n, double f) { Context.glDepthRange(n, f); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void DetachShader(GlHandle program, GlHandle shader) { Context.glDetachShader(program.Value, shader.Value); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void Disable(uint cap) { Context.glDisable(cap); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void DisableVertexAttribArray(uint index) { Context.glDisableVertexAttribArray(index); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void Disable(uint target, uint index) { Context.glDisablei(target, index); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void DrawArrays(uint mode, int first, int count) { Context.glDrawArrays(mode, first, count); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void DrawArraysInstanced(uint mode, int first, int count, int instancecount) { Context.glDrawArraysInstanced(mode, first, count, instancecount); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void DrawBuffer(uint buf) { Context.glDrawBuffer(buf); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void DrawBuffers(ReadOnlySpan bufs) { fixed (uint* bufsPtr = bufs) { Context.glDrawBuffers(checked((int)bufs.Length), bufsPtr); } } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void DrawElements(uint mode, int count, uint type, void* indices) { Context.glDrawElements(mode, count, type, indices); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void DrawElementsBaseVertex(uint mode, int count, uint type, void* indices, int basevertex) { Context.glDrawElementsBaseVertex(mode, count, type, indices, basevertex); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void DrawElementsInstanced(uint mode, int count, uint type, void* indices, int instancecount) { Context.glDrawElementsInstanced(mode, count, type, indices, instancecount); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void DrawElementsInstancedBaseVertex(uint mode, int count, uint type, void* indices, int instancecount, int basevertex) { Context.glDrawElementsInstancedBaseVertex(mode, count, type, indices, instancecount, basevertex); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void DrawRangeElements(uint mode, uint start, uint end, int count, uint type, void* indices) { Context.glDrawRangeElements(mode, start, end, count, type, indices); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void DrawRangeElementsBaseVertex(uint mode, uint start, uint end, int count, uint type, void* indices, int basevertex) { Context.glDrawRangeElementsBaseVertex(mode, start, end, count, type, indices, basevertex); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void Enable(uint cap) { Context.glEnable(cap); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void EnableVertexAttribArray(uint index) { Context.glEnableVertexAttribArray(index); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void Enable(uint target, uint index) { Context.glEnablei(target, index); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void EndConditionalRender() { Context.glEndConditionalRender(); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void EndQuery(uint target) { Context.glEndQuery(target); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void EndTransformFeedback() { Context.glEndTransformFeedback(); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public glSync FenceSync(uint condition, uint flags) { return Context.glFenceSync(condition, flags); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void Finish() { Context.glFinish(); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void Flush() { Context.glFlush(); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void FlushMappedBufferRange(uint target, nint offset, nint length) { Context.glFlushMappedBufferRange(target, offset, length); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void FramebufferRenderbuffer(uint target, uint attachment, uint renderbuffertarget, GlHandle renderbuffer) { Context.glFramebufferRenderbuffer(target, attachment, renderbuffertarget, renderbuffer.Value); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void FramebufferTexture(uint target, uint attachment, GlHandle texture, int level) { Context.glFramebufferTexture(target, attachment, texture.Value, level); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void FramebufferTexture1D(uint target, uint attachment, uint textarget, GlHandle texture, int level) { Context.glFramebufferTexture1D(target, attachment, textarget, texture.Value, level); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void FramebufferTexture2D(uint target, uint attachment, uint textarget, GlHandle texture, int level) { Context.glFramebufferTexture2D(target, attachment, textarget, texture.Value, level); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void FramebufferTexture3D(uint target, uint attachment, uint textarget, GlHandle texture, int level, int zoffset) { Context.glFramebufferTexture3D(target, attachment, textarget, texture.Value, level, zoffset); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void FramebufferTextureLayer(uint target, uint attachment, GlHandle texture, int level, int layer) { Context.glFramebufferTextureLayer(target, attachment, texture.Value, level, layer); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void FrontFace(uint mode) { Context.glFrontFace(mode); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void GenBuffers(Span buffers) { fixed (uint* buffersPtr = buffers) { Context.glGenBuffers(checked((int)buffers.Length), buffersPtr); } } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void GenFramebuffers(Span framebuffers) { fixed (uint* framebuffersPtr = framebuffers) { Context.glGenFramebuffers(checked((int)framebuffers.Length), framebuffersPtr); } } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void GenQueries(Span ids) { fixed (uint* idsPtr = ids) { Context.glGenQueries(checked((int)ids.Length), idsPtr); } } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void GenRenderbuffers(Span renderbuffers) { fixed (uint* renderbuffersPtr = renderbuffers) { Context.glGenRenderbuffers(checked((int)renderbuffers.Length), renderbuffersPtr); } } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void GenSamplers(Span samplers) { fixed (uint* samplersPtr = samplers) { Context.glGenSamplers(checked((int)samplers.Length), samplersPtr); } } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void GenTextures(Span textures) { fixed (uint* texturesPtr = textures) { Context.glGenTextures(checked((int)textures.Length), texturesPtr); } } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void GenVertexArrays(Span arrays) { fixed (uint* arraysPtr = arrays) { Context.glGenVertexArrays(checked((int)arrays.Length), arraysPtr); } } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void GenerateMipmap(uint target) { Context.glGenerateMipmap(target); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void GetActiveAttrib(GlHandle program, uint index, out int length, out int size, out uint type, Span name) { length = default; size = default; type = default; fixed (int* lengthPtr = &length) { fixed (int* sizePtr = &size) { fixed (uint* typePtr = &type) { fixed (byte* namePtr = name) { Context.glGetActiveAttrib(program.Value, index, checked((int)name.Length), lengthPtr, sizePtr, typePtr, namePtr); } } } } } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void GetActiveUniform(GlHandle program, uint index, out int length, out int size, out uint type, Span name) { length = default; size = default; type = default; fixed (int* lengthPtr = &length) { fixed (int* sizePtr = &size) { fixed (uint* typePtr = &type) { fixed (byte* namePtr = name) { Context.glGetActiveUniform(program.Value, index, checked((int)name.Length), lengthPtr, sizePtr, typePtr, namePtr); } } } } } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void GetActiveUniformBlockName(GlHandle program, uint uniformBlockIndex, out int length, Span uniformBlockName) { length = default; fixed (int* lengthPtr = &length) { fixed (byte* uniformBlockNamePtr = uniformBlockName) { Context.glGetActiveUniformBlockName(program.Value, uniformBlockIndex, checked((int)uniformBlockName.Length), lengthPtr, uniformBlockNamePtr); } } } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void GetActiveUniformBlockiv(GlHandle program, uint uniformBlockIndex, uint pname, Span @params) { fixed (int* @paramsPtr = @params) { Context.glGetActiveUniformBlockiv(program.Value, uniformBlockIndex, pname, @paramsPtr); } } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void GetActiveUniformName(GlHandle program, uint uniformIndex, out int length, Span uniformName) { length = default; fixed (int* lengthPtr = &length) { fixed (byte* uniformNamePtr = uniformName) { Context.glGetActiveUniformName(program.Value, uniformIndex, checked((int)uniformName.Length), lengthPtr, uniformNamePtr); } } } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void GetActiveUniformsiv(GlHandle program, ReadOnlySpan uniformIndices, uint pname, Span @params) { fixed (uint* uniformIndicesPtr = uniformIndices) { fixed (int* @paramsPtr = @params) { Context.glGetActiveUniformsiv(program.Value, checked((int)uniformIndices.Length), uniformIndicesPtr, pname, @paramsPtr); } } } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void GetAttachedShaders(GlHandle program, out int count, Span shaders) { count = default; fixed (int* countPtr = &count) { fixed (uint* shadersPtr = shaders) { Context.glGetAttachedShaders(program.Value, checked((int)shaders.Length), countPtr, shadersPtr); } } } [MethodImpl(MethodImplOptions.AggressiveInlining)] public int GetAttribLocation(GlHandle program, ReadOnlySpan name) { fixed (byte* namePtr = name) { return Context.glGetAttribLocation(program.Value, namePtr); } } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void GetBooleani_v(uint target, uint index, Span data) { fixed (byte* dataPtr = data) { Context.glGetBooleani_v(target, index, dataPtr); } } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void GetBooleanv(uint pname, Span data) { fixed (byte* dataPtr = data) { Context.glGetBooleanv(pname, dataPtr); } } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void GetBufferParameter(uint target, uint pname, Span @params) { fixed (long* @paramsPtr = @params) { Context.glGetBufferParameteri64v(target, pname, @paramsPtr); } } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void GetBufferParameter(uint target, uint pname, Span @params) { fixed (int* @paramsPtr = @params) { Context.glGetBufferParameteriv(target, pname, @paramsPtr); } } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void GetBufferPointerv(uint target, uint pname, void** @params) { Context.glGetBufferPointerv(target, pname, @params); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void GetBufferSubData(uint target, nint offset, nint size, void* data) { Context.glGetBufferSubData(target, offset, size, data); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void GetCompressedTexImage(uint target, int level, void* img) { Context.glGetCompressedTexImage(target, level, img); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void GetDoublev(uint pname, Span data) { fixed (double* dataPtr = data) { Context.glGetDoublev(pname, dataPtr); } } [MethodImpl(MethodImplOptions.AggressiveInlining)] public uint GetError() { return Context.glGetError(); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void GetFloatv(uint pname, Span data) { fixed (float* dataPtr = data) { Context.glGetFloatv(pname, dataPtr); } } [MethodImpl(MethodImplOptions.AggressiveInlining)] public int GetFragDataIndex(GlHandle program, ReadOnlySpan name) { fixed (byte* namePtr = name) { return Context.glGetFragDataIndex(program.Value, namePtr); } } [MethodImpl(MethodImplOptions.AggressiveInlining)] public int GetFragDataLocation(GlHandle program, ReadOnlySpan name) { fixed (byte* namePtr = name) { return Context.glGetFragDataLocation(program.Value, namePtr); } } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void GetFramebufferAttachmentParameteriv(uint target, uint attachment, uint pname, Span @params) { fixed (int* @paramsPtr = @params) { Context.glGetFramebufferAttachmentParameteriv(target, attachment, pname, @paramsPtr); } } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void GetInteger64i_v(uint target, uint index, Span data) { fixed (long* dataPtr = data) { Context.glGetInteger64i_v(target, index, dataPtr); } } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void GetInteger64v(uint pname, Span data) { fixed (long* dataPtr = data) { Context.glGetInteger64v(pname, dataPtr); } } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void GetIntegeri_v(uint target, uint index, Span data) { fixed (int* dataPtr = data) { Context.glGetIntegeri_v(target, index, dataPtr); } } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void GetIntegerv(uint pname, Span data) { fixed (int* dataPtr = data) { Context.glGetIntegerv(pname, dataPtr); } } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void GetMultisamplefv(uint pname, uint index, Span val) { fixed (float* valPtr = val) { Context.glGetMultisamplefv(pname, index, valPtr); } } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void GetProgramInfoLog(GlHandle program, out int length, Span infoLog) { length = default; fixed (int* lengthPtr = &length) { fixed (byte* infoLogPtr = infoLog) { Context.glGetProgramInfoLog(program.Value, checked((int)infoLog.Length), lengthPtr, infoLogPtr); } } } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void GetProgramiv(GlHandle program, uint pname, Span @params) { fixed (int* @paramsPtr = @params) { Context.glGetProgramiv(program.Value, pname, @paramsPtr); } } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void GetQueryObject(uint id, uint pname, Span @params) { fixed (long* @paramsPtr = @params) { Context.glGetQueryObjecti64v(id, pname, @paramsPtr); } } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void GetQueryObject(uint id, uint pname, Span @params) { fixed (int* @paramsPtr = @params) { Context.glGetQueryObjectiv(id, pname, @paramsPtr); } } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void GetQueryObject(uint id, uint pname, Span @params) { fixed (ulong* @paramsPtr = @params) { Context.glGetQueryObjectui64v(id, pname, @paramsPtr); } } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void GetQueryObject(uint id, uint pname, Span @params) { fixed (uint* @paramsPtr = @params) { Context.glGetQueryObjectuiv(id, pname, @paramsPtr); } } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void GetQueryiv(uint target, uint pname, Span @params) { fixed (int* @paramsPtr = @params) { Context.glGetQueryiv(target, pname, @paramsPtr); } } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void GetRenderbufferParameteriv(uint target, uint pname, Span @params) { fixed (int* @paramsPtr = @params) { Context.glGetRenderbufferParameteriv(target, pname, @paramsPtr); } } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void GetSamplerParameterI(GlHandle sampler, uint pname, Span @params) { fixed (int* @paramsPtr = @params) { Context.glGetSamplerParameterIiv(sampler.Value, pname, @paramsPtr); } } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void GetSamplerParameterI(GlHandle sampler, uint pname, Span @params) { fixed (uint* @paramsPtr = @params) { Context.glGetSamplerParameterIuiv(sampler.Value, pname, @paramsPtr); } } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void GetSamplerParameter(GlHandle sampler, uint pname, Span @params) { fixed (float* @paramsPtr = @params) { Context.glGetSamplerParameterfv(sampler.Value, pname, @paramsPtr); } } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void GetSamplerParameter(GlHandle sampler, uint pname, Span @params) { fixed (int* @paramsPtr = @params) { Context.glGetSamplerParameteriv(sampler.Value, pname, @paramsPtr); } } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void GetShaderInfoLog(GlHandle shader, out int length, Span infoLog) { length = default; fixed (int* lengthPtr = &length) { fixed (byte* infoLogPtr = infoLog) { Context.glGetShaderInfoLog(shader.Value, checked((int)infoLog.Length), lengthPtr, infoLogPtr); } } } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void GetShaderSource(GlHandle shader, out int length, Span source) { length = default; fixed (int* lengthPtr = &length) { fixed (byte* sourcePtr = source) { Context.glGetShaderSource(shader.Value, checked((int)source.Length), lengthPtr, sourcePtr); } } } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void GetShaderiv(GlHandle shader, uint pname, Span @params) { fixed (int* @paramsPtr = @params) { Context.glGetShaderiv(shader.Value, pname, @paramsPtr); } } [MethodImpl(MethodImplOptions.AggressiveInlining)] public byte* GetString(uint name) { return Context.glGetString(name); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public byte* GetString(uint name, uint index) { return Context.glGetStringi(name, index); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void GetSynciv(glSync sync, uint pname, out int length, Span values) { length = default; fixed (int* lengthPtr = &length) { fixed (int* valuesPtr = values) { Context.glGetSynciv(sync, pname, checked((int)values.Length), lengthPtr, valuesPtr); } } } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void GetTexImage(uint target, int level, uint format, uint type, void* pixels) { Context.glGetTexImage(target, level, format, type, pixels); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void GetTexLevelParameter(uint target, int level, uint pname, Span @params) { fixed (float* @paramsPtr = @params) { Context.glGetTexLevelParameterfv(target, level, pname, @paramsPtr); } } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void GetTexLevelParameter(uint target, int level, uint pname, Span @params) { fixed (int* @paramsPtr = @params) { Context.glGetTexLevelParameteriv(target, level, pname, @paramsPtr); } } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void GetTexParameterI(uint target, uint pname, Span @params) { fixed (int* @paramsPtr = @params) { Context.glGetTexParameterIiv(target, pname, @paramsPtr); } } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void GetTexParameterI(uint target, uint pname, Span @params) { fixed (uint* @paramsPtr = @params) { Context.glGetTexParameterIuiv(target, pname, @paramsPtr); } } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void GetTexParameter(uint target, uint pname, Span @params) { fixed (float* @paramsPtr = @params) { Context.glGetTexParameterfv(target, pname, @paramsPtr); } } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void GetTexParameter(uint target, uint pname, Span @params) { fixed (int* @paramsPtr = @params) { Context.glGetTexParameteriv(target, pname, @paramsPtr); } } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void GetTransformFeedbackVarying(GlHandle program, uint index, out int length, out int size, out uint type, Span name) { length = default; size = default; type = default; fixed (int* lengthPtr = &length) { fixed (int* sizePtr = &size) { fixed (uint* typePtr = &type) { fixed (byte* namePtr = name) { Context.glGetTransformFeedbackVarying(program.Value, index, checked((int)name.Length), lengthPtr, sizePtr, typePtr, namePtr); } } } } } [MethodImpl(MethodImplOptions.AggressiveInlining)] public uint GetUniformBlockIndex(GlHandle program, ReadOnlySpan uniformBlockName) { fixed (byte* uniformBlockNamePtr = uniformBlockName) { return Context.glGetUniformBlockIndex(program.Value, uniformBlockNamePtr); } } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void GetUniformIndices(GlHandle program, int uniformCount, byte** uniformNames, Span uniformIndices) { fixed (uint* uniformIndicesPtr = uniformIndices) { Context.glGetUniformIndices(program.Value, uniformCount, uniformNames, uniformIndicesPtr); } } [MethodImpl(MethodImplOptions.AggressiveInlining)] public int GetUniformLocation(GlHandle program, ReadOnlySpan name) { fixed (byte* namePtr = name) { return Context.glGetUniformLocation(program.Value, namePtr); } } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void GetUniform(GlHandle program, int location, Span @params) { fixed (float* @paramsPtr = @params) { Context.glGetUniformfv(program.Value, location, @paramsPtr); } } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void GetUniform(GlHandle program, int location, Span @params) { fixed (int* @paramsPtr = @params) { Context.glGetUniformiv(program.Value, location, @paramsPtr); } } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void GetUniform(GlHandle program, int location, Span @params) { fixed (uint* @paramsPtr = @params) { Context.glGetUniformuiv(program.Value, location, @paramsPtr); } } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void GetVertexAttribI(uint index, uint pname, out int @params) { @params = default; fixed (int* @paramsPtr = &@params) { Context.glGetVertexAttribIiv(index, pname, @paramsPtr); } } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void GetVertexAttribI(uint index, uint pname, out uint @params) { @params = default; fixed (uint* @paramsPtr = &@params) { Context.glGetVertexAttribIuiv(index, pname, @paramsPtr); } } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void GetVertexAttribPointerv(uint index, uint pname, void** pointer) { Context.glGetVertexAttribPointerv(index, pname, pointer); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void GetVertexAttrib(uint index, uint pname, Span @params) { if (@params.Length < 4) { throw new ArgumentException("Span is shorter than the OpenGL length expression '4'.", nameof(@params)); } fixed (double* @paramsPtr = @params) { Context.glGetVertexAttribdv(index, pname, @paramsPtr); } } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void GetVertexAttrib(uint index, uint pname, Span @params) { if (@params.Length < 4) { throw new ArgumentException("Span is shorter than the OpenGL length expression '4'.", nameof(@params)); } fixed (float* @paramsPtr = @params) { Context.glGetVertexAttribfv(index, pname, @paramsPtr); } } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void GetVertexAttrib(uint index, uint pname, Span @params) { if (@params.Length < 4) { throw new ArgumentException("Span is shorter than the OpenGL length expression '4'.", nameof(@params)); } fixed (int* @paramsPtr = @params) { Context.glGetVertexAttribiv(index, pname, @paramsPtr); } } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void Hint(uint target, uint mode) { Context.glHint(target, mode); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public byte IsBuffer(GlHandle buffer) { return Context.glIsBuffer(buffer.Value); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public byte IsEnabled(uint cap) { return Context.glIsEnabled(cap); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public byte IsEnabled(uint target, uint index) { return Context.glIsEnabledi(target, index); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public byte IsFramebuffer(GlHandle framebuffer) { return Context.glIsFramebuffer(framebuffer.Value); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public byte IsProgram(GlHandle program) { return Context.glIsProgram(program.Value); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public byte IsQuery(uint id) { return Context.glIsQuery(id); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public byte IsRenderbuffer(GlHandle renderbuffer) { return Context.glIsRenderbuffer(renderbuffer.Value); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public byte IsSampler(GlHandle sampler) { return Context.glIsSampler(sampler.Value); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public byte IsShader(GlHandle shader) { return Context.glIsShader(shader.Value); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public byte IsSync(glSync sync) { return Context.glIsSync(sync); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public byte IsTexture(GlHandle texture) { return Context.glIsTexture(texture.Value); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public byte IsVertexArray(uint array) { return Context.glIsVertexArray(array); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void LineWidth(float width) { Context.glLineWidth(width); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void LinkProgram(GlHandle program) { Context.glLinkProgram(program.Value); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void LogicOp(uint opcode) { Context.glLogicOp(opcode); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void* MapBuffer(uint target, uint access) { return Context.glMapBuffer(target, access); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void* MapBufferRange(uint target, nint offset, nint length, uint access) { return Context.glMapBufferRange(target, offset, length, access); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void MultiDrawArrays(uint mode, ReadOnlySpan first, ReadOnlySpan count) { if (count.Length != first.Length) { throw new ArgumentException("Span lengths controlled by drawcount must match.", nameof(count)); } fixed (int* firstPtr = first) { fixed (int* countPtr = count) { Context.glMultiDrawArrays(mode, firstPtr, countPtr, checked((int)first.Length)); } } } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void MultiDrawElements(uint mode, ReadOnlySpan count, uint type, void** indices, int drawcount) { if (count.Length < checked((int)drawcount)) { throw new ArgumentException("Span is shorter than the OpenGL length expression 'drawcount'.", nameof(count)); } fixed (int* countPtr = count) { Context.glMultiDrawElements(mode, countPtr, type, indices, drawcount); } } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void MultiDrawElementsBaseVertex(uint mode, ReadOnlySpan count, uint type, void** indices, int drawcount, ReadOnlySpan basevertex) { if (count.Length < checked((int)drawcount)) { throw new ArgumentException("Span is shorter than the OpenGL length expression 'drawcount'.", nameof(count)); } if (basevertex.Length < checked((int)drawcount)) { throw new ArgumentException("Span is shorter than the OpenGL length expression 'drawcount'.", nameof(basevertex)); } fixed (int* countPtr = count) { fixed (int* basevertexPtr = basevertex) { Context.glMultiDrawElementsBaseVertex(mode, countPtr, type, indices, drawcount, basevertexPtr); } } } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void PixelStore(uint pname, float param) { Context.glPixelStoref(pname, param); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void PixelStore(uint pname, int param) { Context.glPixelStorei(pname, param); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void PointParameter(uint pname, float param) { Context.glPointParameterf(pname, param); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void PointParameter(uint pname, ReadOnlySpan @params) { fixed (float* @paramsPtr = @params) { Context.glPointParameterfv(pname, @paramsPtr); } } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void PointParameter(uint pname, int param) { Context.glPointParameteri(pname, param); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void PointParameter(uint pname, ReadOnlySpan @params) { fixed (int* @paramsPtr = @params) { Context.glPointParameteriv(pname, @paramsPtr); } } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void PointSize(float size) { Context.glPointSize(size); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void PolygonMode(uint face, uint mode) { Context.glPolygonMode(face, mode); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void PolygonOffset(float factor, float units) { Context.glPolygonOffset(factor, units); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void PrimitiveRestartIndex(uint index) { Context.glPrimitiveRestartIndex(index); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void ProvokingVertex(uint mode) { Context.glProvokingVertex(mode); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void QueryCounter(uint id, uint target) { Context.glQueryCounter(id, target); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void ReadBuffer(uint src) { Context.glReadBuffer(src); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void ReadPixels(int x, int y, int width, int height, uint format, uint type, void* pixels) { Context.glReadPixels(x, y, width, height, format, type, pixels); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void RenderbufferStorage(uint target, uint internalformat, int width, int height) { Context.glRenderbufferStorage(target, internalformat, width, height); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void RenderbufferStorageMultisample(uint target, int samples, uint internalformat, int width, int height) { Context.glRenderbufferStorageMultisample(target, samples, internalformat, width, height); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void SampleCoverage(float value, byte invert) { Context.glSampleCoverage(value, invert); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void SampleMaski(uint maskNumber, uint mask) { Context.glSampleMaski(maskNumber, mask); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void SamplerParameterI(GlHandle sampler, uint pname, ReadOnlySpan param) { fixed (int* paramPtr = param) { Context.glSamplerParameterIiv(sampler.Value, pname, paramPtr); } } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void SamplerParameterI(GlHandle sampler, uint pname, ReadOnlySpan param) { fixed (uint* paramPtr = param) { Context.glSamplerParameterIuiv(sampler.Value, pname, paramPtr); } } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void SamplerParameter(GlHandle sampler, uint pname, float param) { Context.glSamplerParameterf(sampler.Value, pname, param); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void SamplerParameter(GlHandle sampler, uint pname, ReadOnlySpan param) { fixed (float* paramPtr = param) { Context.glSamplerParameterfv(sampler.Value, pname, paramPtr); } } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void SamplerParameter(GlHandle sampler, uint pname, int param) { Context.glSamplerParameteri(sampler.Value, pname, param); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void SamplerParameter(GlHandle sampler, uint pname, ReadOnlySpan param) { fixed (int* paramPtr = param) { Context.glSamplerParameteriv(sampler.Value, pname, paramPtr); } } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void Scissor(int x, int y, int width, int height) { Context.glScissor(x, y, width, height); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void ShaderSource(GlHandle shader, int count, byte** @string, ReadOnlySpan length) { if (length.Length < checked((int)count)) { throw new ArgumentException("Span is shorter than the OpenGL length expression 'count'.", nameof(length)); } fixed (int* lengthPtr = length) { Context.glShaderSource(shader.Value, count, @string, lengthPtr); } } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void StencilFunc(uint func, int @ref, uint mask) { Context.glStencilFunc(func, @ref, mask); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void StencilFuncSeparate(uint face, uint func, int @ref, uint mask) { Context.glStencilFuncSeparate(face, func, @ref, mask); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void StencilMask(uint mask) { Context.glStencilMask(mask); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void StencilMaskSeparate(uint face, uint mask) { Context.glStencilMaskSeparate(face, mask); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void StencilOp(uint fail, uint zfail, uint zpass) { Context.glStencilOp(fail, zfail, zpass); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void StencilOpSeparate(uint face, uint sfail, uint dpfail, uint dppass) { Context.glStencilOpSeparate(face, sfail, dpfail, dppass); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void TexBuffer(uint target, uint internalformat, GlHandle buffer) { Context.glTexBuffer(target, internalformat, buffer.Value); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void TexImage1D(uint target, int level, int internalformat, int width, int border, uint format, uint type, void* pixels) { Context.glTexImage1D(target, level, internalformat, width, border, format, type, pixels); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void TexImage2D(uint target, int level, int internalformat, int width, int height, int border, uint format, uint type, void* pixels) { Context.glTexImage2D(target, level, internalformat, width, height, border, format, type, pixels); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void TexImage2DMultisample(uint target, int samples, uint internalformat, int width, int height, byte fixedsamplelocations) { Context.glTexImage2DMultisample(target, samples, internalformat, width, height, fixedsamplelocations); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void TexImage3D(uint target, int level, int internalformat, int width, int height, int depth, int border, uint format, uint type, void* pixels) { Context.glTexImage3D(target, level, internalformat, width, height, depth, border, format, type, pixels); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void TexImage3DMultisample(uint target, int samples, uint internalformat, int width, int height, int depth, byte fixedsamplelocations) { Context.glTexImage3DMultisample(target, samples, internalformat, width, height, depth, fixedsamplelocations); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void TexParameterI(uint target, uint pname, ReadOnlySpan @params) { fixed (int* @paramsPtr = @params) { Context.glTexParameterIiv(target, pname, @paramsPtr); } } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void TexParameterI(uint target, uint pname, ReadOnlySpan @params) { fixed (uint* @paramsPtr = @params) { Context.glTexParameterIuiv(target, pname, @paramsPtr); } } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void TexParameter(uint target, uint pname, float param) { Context.glTexParameterf(target, pname, param); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void TexParameter(uint target, uint pname, ReadOnlySpan @params) { fixed (float* @paramsPtr = @params) { Context.glTexParameterfv(target, pname, @paramsPtr); } } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void TexParameter(uint target, uint pname, int param) { Context.glTexParameteri(target, pname, param); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void TexParameter(uint target, uint pname, ReadOnlySpan @params) { fixed (int* @paramsPtr = @params) { Context.glTexParameteriv(target, pname, @paramsPtr); } } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void TexSubImage1D(uint target, int level, int xoffset, int width, uint format, uint type, void* pixels) { Context.glTexSubImage1D(target, level, xoffset, width, format, type, pixels); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void TexSubImage2D(uint target, int level, int xoffset, int yoffset, int width, int height, uint format, uint type, void* pixels) { Context.glTexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void TexSubImage3D(uint target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, uint format, uint type, void* pixels) { Context.glTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void TransformFeedbackVaryings(GlHandle program, int count, byte** varyings, uint bufferMode) { Context.glTransformFeedbackVaryings(program.Value, count, varyings, bufferMode); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void UniformBlockBinding(GlHandle program, uint uniformBlockIndex, uint uniformBlockBinding) { Context.glUniformBlockBinding(program.Value, uniformBlockIndex, uniformBlockBinding); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public byte UnmapBuffer(uint target) { return Context.glUnmapBuffer(target); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void UseProgram(GlHandle program) { Context.glUseProgram(program.Value); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void ValidateProgram(GlHandle program) { Context.glValidateProgram(program.Value); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void VertexAttrib(uint index, double x) { Context.glVertexAttrib1d(index, x); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void VertexAttrib(uint index, float x) { Context.glVertexAttrib1f(index, x); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void VertexAttrib(uint index, short x) { Context.glVertexAttrib1s(index, x); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void VertexAttrib(uint index, double x, double y) { Context.glVertexAttrib2d(index, x, y); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void VertexAttrib(uint index, float x, float y) { Context.glVertexAttrib2f(index, x, y); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void VertexAttrib(uint index, short x, short y) { Context.glVertexAttrib2s(index, x, y); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void VertexAttrib(uint index, double x, double y, double z) { Context.glVertexAttrib3d(index, x, y, z); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void VertexAttrib(uint index, float x, float y, float z) { Context.glVertexAttrib3f(index, x, y, z); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void VertexAttrib(uint index, short x, short y, short z) { Context.glVertexAttrib3s(index, x, y, z); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void VertexAttribNormalized(uint index, ReadOnlySpan v) { if (v.Length < 4) { throw new ArgumentException("Span is shorter than the OpenGL length expression '4'.", nameof(v)); } fixed (sbyte* vPtr = v) { Context.glVertexAttrib4Nbv(index, vPtr); } } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void VertexAttribNormalized(uint index, ReadOnlySpan v) { if (v.Length < 4) { throw new ArgumentException("Span is shorter than the OpenGL length expression '4'.", nameof(v)); } fixed (int* vPtr = v) { Context.glVertexAttrib4Niv(index, vPtr); } } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void VertexAttribNormalized(uint index, ReadOnlySpan v) { if (v.Length < 4) { throw new ArgumentException("Span is shorter than the OpenGL length expression '4'.", nameof(v)); } fixed (short* vPtr = v) { Context.glVertexAttrib4Nsv(index, vPtr); } } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void VertexAttribNormalized(uint index, byte x, byte y, byte z, byte w) { Context.glVertexAttrib4Nub(index, x, y, z, w); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void VertexAttribNormalized(uint index, ReadOnlySpan v) { if (v.Length < 4) { throw new ArgumentException("Span is shorter than the OpenGL length expression '4'.", nameof(v)); } fixed (uint* vPtr = v) { Context.glVertexAttrib4Nuiv(index, vPtr); } } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void VertexAttribNormalized(uint index, ReadOnlySpan v) { if (v.Length < 4) { throw new ArgumentException("Span is shorter than the OpenGL length expression '4'.", nameof(v)); } fixed (ushort* vPtr = v) { Context.glVertexAttrib4Nusv(index, vPtr); } } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void VertexAttrib(uint index, ReadOnlySpan v) { if (v.Length < 4) { throw new ArgumentException("Span is shorter than the OpenGL length expression '4'.", nameof(v)); } fixed (sbyte* vPtr = v) { Context.glVertexAttrib4bv(index, vPtr); } } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void VertexAttrib(uint index, double x, double y, double z, double w) { Context.glVertexAttrib4d(index, x, y, z, w); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void VertexAttrib(uint index, float x, float y, float z, float w) { Context.glVertexAttrib4f(index, x, y, z, w); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void VertexAttrib(uint index, ReadOnlySpan v) { if (v.Length < 4) { throw new ArgumentException("Span is shorter than the OpenGL length expression '4'.", nameof(v)); } fixed (int* vPtr = v) { Context.glVertexAttrib4iv(index, vPtr); } } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void VertexAttrib(uint index, short x, short y, short z, short w) { Context.glVertexAttrib4s(index, x, y, z, w); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void VertexAttrib(uint index, ReadOnlySpan v) { if (v.Length < 4) { throw new ArgumentException("Span is shorter than the OpenGL length expression '4'.", nameof(v)); } fixed (byte* vPtr = v) { Context.glVertexAttrib4ubv(index, vPtr); } } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void VertexAttrib(uint index, ReadOnlySpan v) { if (v.Length < 4) { throw new ArgumentException("Span is shorter than the OpenGL length expression '4'.", nameof(v)); } fixed (uint* vPtr = v) { Context.glVertexAttrib4uiv(index, vPtr); } } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void VertexAttrib(uint index, ReadOnlySpan v) { if (v.Length < 4) { throw new ArgumentException("Span is shorter than the OpenGL length expression '4'.", nameof(v)); } fixed (ushort* vPtr = v) { Context.glVertexAttrib4usv(index, vPtr); } } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void VertexAttribDivisor(uint index, uint divisor) { Context.glVertexAttribDivisor(index, divisor); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void VertexAttribI(uint index, int x) { Context.glVertexAttribI1i(index, x); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void VertexAttribI(uint index, uint x) { Context.glVertexAttribI1ui(index, x); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void VertexAttribI(uint index, int x, int y) { Context.glVertexAttribI2i(index, x, y); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void VertexAttribI(uint index, uint x, uint y) { Context.glVertexAttribI2ui(index, x, y); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void VertexAttribI(uint index, int x, int y, int z) { Context.glVertexAttribI3i(index, x, y, z); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void VertexAttribI(uint index, uint x, uint y, uint z) { Context.glVertexAttribI3ui(index, x, y, z); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void VertexAttribI(uint index, ReadOnlySpan v) { if (v.Length < 4) { throw new ArgumentException("Span is shorter than the OpenGL length expression '4'.", nameof(v)); } fixed (sbyte* vPtr = v) { Context.glVertexAttribI4bv(index, vPtr); } } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void VertexAttribI(uint index, int x, int y, int z, int w) { Context.glVertexAttribI4i(index, x, y, z, w); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void VertexAttribI(uint index, ReadOnlySpan v) { if (v.Length < 4) { throw new ArgumentException("Span is shorter than the OpenGL length expression '4'.", nameof(v)); } fixed (short* vPtr = v) { Context.glVertexAttribI4sv(index, vPtr); } } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void VertexAttribI(uint index, ReadOnlySpan v) { if (v.Length < 4) { throw new ArgumentException("Span is shorter than the OpenGL length expression '4'.", nameof(v)); } fixed (byte* vPtr = v) { Context.glVertexAttribI4ubv(index, vPtr); } } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void VertexAttribI(uint index, uint x, uint y, uint z, uint w) { Context.glVertexAttribI4ui(index, x, y, z, w); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void VertexAttribI(uint index, ReadOnlySpan v) { if (v.Length < 4) { throw new ArgumentException("Span is shorter than the OpenGL length expression '4'.", nameof(v)); } fixed (ushort* vPtr = v) { Context.glVertexAttribI4usv(index, vPtr); } } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void VertexAttribIPointer(uint index, int size, uint type, int stride, void* pointer) { Context.glVertexAttribIPointer(index, size, type, stride, pointer); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void VertexAttribP(uint index, uint type, byte normalized, uint value) { Context.glVertexAttribP1ui(index, type, normalized, value); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void VertexAttribP2(uint index, uint type, byte normalized, uint value) { Context.glVertexAttribP2ui(index, type, normalized, value); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void VertexAttribP3(uint index, uint type, byte normalized, uint value) { Context.glVertexAttribP3ui(index, type, normalized, value); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void VertexAttribP4(uint index, uint type, byte normalized, uint value) { Context.glVertexAttribP4ui(index, type, normalized, value); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void VertexAttribPointer(uint index, int size, uint type, byte normalized, int stride, void* pointer) { Context.glVertexAttribPointer(index, size, type, normalized, stride, pointer); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void Viewport(int x, int y, int width, int height) { Context.glViewport(x, y, width, height); } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void WaitSync(glSync sync, uint flags, ulong timeout) { Context.glWaitSync(sync, flags, timeout); } } }