587 lines
20 KiB
C#
587 lines
20 KiB
C#
//-----------------------------------------------------------------------
|
|
// -----------------------------------------------------------------------
|
|
// file="glFunction.v4_3"
|
|
// Project: StgSharp
|
|
// AuthorGroup: Nitload
|
|
// Copyright (c) Nitload. All rights reserved.
|
|
//
|
|
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
// of this software and associated documentation files (the "Software"), to deal
|
|
// in the Software without restriction, including without limitation the rights
|
|
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
// copies of the Software, and to permit persons to whom the Software is
|
|
// furnished to do so, subject to the following conditions:
|
|
//
|
|
// The above copyright notice and this permission notice shall be included in all
|
|
// copies or substantial portions of the Software.
|
|
//
|
|
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
// SOFTWARE.
|
|
//
|
|
// -----------------------------------------------------------------------
|
|
// -----------------------------------------------------------------------
|
|
// <auto-generated>
|
|
// Generated by StgSharp.GenerateGL on 2025-12-30 02:54:41Z
|
|
// Version: 4.3
|
|
// </auto-generated>
|
|
using StgSharp.Graphics.OpenGL;
|
|
using System;
|
|
using System.Runtime.CompilerServices;
|
|
using System.Runtime.InteropServices;
|
|
|
|
namespace StgSharp.Graphics.OpenGL
|
|
{
|
|
public unsafe partial class OpenGLFunction
|
|
{
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public void BindVertexBuffer(
|
|
uint bindingindex,
|
|
GlHandle buffer,
|
|
nint offset,
|
|
int stride
|
|
)
|
|
{
|
|
Context.glBindVertexBuffer(bindingindex, buffer.Value, offset, stride);
|
|
}
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public void ClearBufferData(
|
|
uint target,
|
|
uint internalformat,
|
|
uint format,
|
|
ShaderType type,
|
|
ReadOnlySpan<IntPtr> data
|
|
)
|
|
{
|
|
fixed (IntPtr* dataPtr = data) {
|
|
Context.glClearBufferData(target, internalformat, format, (uint)type, dataPtr);
|
|
}
|
|
}
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public void ClearBufferSubData(
|
|
uint target,
|
|
uint internalformat,
|
|
nint offset,
|
|
nuint size,
|
|
uint format,
|
|
ShaderType type,
|
|
ReadOnlySpan<IntPtr> data
|
|
)
|
|
{
|
|
fixed (IntPtr* dataPtr = data) {
|
|
Context.glClearBufferSubData(target, internalformat, offset, size, format,
|
|
(uint)type, dataPtr);
|
|
}
|
|
}
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public void CopyImageSubData(
|
|
uint srcName,
|
|
uint srcTarget,
|
|
int srcLevel,
|
|
int srcX,
|
|
int srcY,
|
|
int srcZ,
|
|
uint dstName,
|
|
uint dstTarget,
|
|
int dstLevel,
|
|
int dstX,
|
|
int dstY,
|
|
int dstZ,
|
|
int srcWidth,
|
|
int srcHeight,
|
|
int srcDepth
|
|
)
|
|
{
|
|
Context.glCopyImageSubData(srcName, srcTarget, srcLevel, srcX, srcY, srcZ, dstName,
|
|
dstTarget, dstLevel, dstX, dstY, dstZ, srcWidth, srcHeight,
|
|
srcDepth);
|
|
}
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public void DebugMessageCallback(
|
|
IntPtr callback,
|
|
ReadOnlySpan<IntPtr> userParam
|
|
)
|
|
{
|
|
fixed (IntPtr* userParamPtr = userParam) {
|
|
Context.glDebugMessageCallback(callback, userParamPtr);
|
|
}
|
|
}
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public void DebugMessageControl(
|
|
uint source,
|
|
ShaderType type,
|
|
uint severity,
|
|
int count,
|
|
ReadOnlySpan<uint> ids,
|
|
byte enabled
|
|
)
|
|
{
|
|
fixed (uint* idsPtr = ids) {
|
|
Context.glDebugMessageControl(source, (uint)type, severity, count, idsPtr, enabled);
|
|
}
|
|
}
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public void DebugMessageInsert(
|
|
uint source,
|
|
ShaderType type,
|
|
uint id,
|
|
uint severity,
|
|
int length,
|
|
ReadOnlySpan<byte> buf
|
|
)
|
|
{
|
|
fixed (byte* bufPtr = buf) {
|
|
Context.glDebugMessageInsert(source, (uint)type, id, severity, length, bufPtr);
|
|
}
|
|
}
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public void DispatchCompute(
|
|
uint num_groups_x,
|
|
uint num_groups_y,
|
|
uint num_groups_z
|
|
)
|
|
{
|
|
Context.glDispatchCompute(num_groups_x, num_groups_y, num_groups_z);
|
|
}
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public void DispatchComputeIndirect(
|
|
nint indirect
|
|
)
|
|
{
|
|
Context.glDispatchComputeIndirect(indirect);
|
|
}
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public void FramebufferParameteri(
|
|
uint target,
|
|
uint pname,
|
|
int param
|
|
)
|
|
{
|
|
Context.glFramebufferParameteri(target, pname, param);
|
|
}
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public uint GetDebugMessageLog(
|
|
uint count,
|
|
int bufSize,
|
|
uint* sources,
|
|
uint* types,
|
|
uint* ids,
|
|
uint* severities,
|
|
int* lengths,
|
|
byte* messageLog
|
|
)
|
|
{
|
|
return Context.glGetDebugMessageLog(count, bufSize, sources, types, ids, severities,
|
|
lengths, messageLog);
|
|
}
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public void GetFramebufferParameteriv(
|
|
uint target,
|
|
uint pname,
|
|
int* @params
|
|
)
|
|
{
|
|
Context.glGetFramebufferParameteriv(target, pname, @params);
|
|
}
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public void GetInternalformati64v(
|
|
uint target,
|
|
uint internalformat,
|
|
uint pname,
|
|
int count,
|
|
IntPtr* @params
|
|
)
|
|
{
|
|
Context.glGetInternalformati64v(target, internalformat, pname, count, @params);
|
|
}
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public void GetObjectLabel(
|
|
uint identifier,
|
|
uint name,
|
|
int bufSize,
|
|
int* length,
|
|
byte* label
|
|
)
|
|
{
|
|
Context.glGetObjectLabel(identifier, name, bufSize, length, label);
|
|
}
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public void GetObjectPtrLabel(
|
|
ReadOnlySpan<IntPtr> ptr,
|
|
int bufSize,
|
|
int* length,
|
|
byte* label
|
|
)
|
|
{
|
|
fixed (IntPtr* ptrPtr = ptr) {
|
|
Context.glGetObjectPtrLabel(ptrPtr, bufSize, length, label);
|
|
}
|
|
}
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public void GetProgramInterfaceiv(
|
|
GlHandle program,
|
|
uint programInterface,
|
|
uint pname,
|
|
int* @params
|
|
)
|
|
{
|
|
Context.glGetProgramInterfaceiv(program.Value, programInterface, pname, @params);
|
|
}
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public uint GetProgramResourceIndex(
|
|
GlHandle program,
|
|
uint programInterface,
|
|
ReadOnlySpan<byte> name
|
|
)
|
|
{
|
|
fixed (byte* namePtr = name) {
|
|
return Context.glGetProgramResourceIndex(program.Value, programInterface, namePtr);
|
|
}
|
|
}
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public void GetProgramResourceiv(
|
|
GlHandle program,
|
|
uint programInterface,
|
|
uint index,
|
|
int propCount,
|
|
ReadOnlySpan<uint> props,
|
|
int count,
|
|
int* length,
|
|
int* @params
|
|
)
|
|
{
|
|
fixed (uint* propsPtr = props) {
|
|
Context.glGetProgramResourceiv(program.Value, programInterface, index, propCount,
|
|
propsPtr, count, length, @params);
|
|
}
|
|
}
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public int GetProgramResourceLocation(
|
|
GlHandle program,
|
|
uint programInterface,
|
|
ReadOnlySpan<byte> name
|
|
)
|
|
{
|
|
fixed (byte* namePtr = name) {
|
|
return Context.glGetProgramResourceLocation(program.Value, programInterface, namePtr);
|
|
}
|
|
}
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public int GetProgramResourceLocationIndex(
|
|
GlHandle program,
|
|
uint programInterface,
|
|
ReadOnlySpan<byte> name
|
|
)
|
|
{
|
|
fixed (byte* namePtr = name) {
|
|
return Context.glGetProgramResourceLocationIndex(program.Value, programInterface, namePtr);
|
|
}
|
|
}
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public void GetProgramResourceName(
|
|
GlHandle program,
|
|
uint programInterface,
|
|
uint index,
|
|
int bufSize,
|
|
int* length,
|
|
byte* name
|
|
)
|
|
{
|
|
Context.glGetProgramResourceName(program.Value, programInterface, index, bufSize,
|
|
length, name);
|
|
}
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public void InvalidateBufferData(
|
|
GlHandle buffer
|
|
)
|
|
{
|
|
Context.glInvalidateBufferData(buffer.Value);
|
|
}
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public void InvalidateBufferSubData(
|
|
GlHandle buffer,
|
|
nint offset,
|
|
nuint length
|
|
)
|
|
{
|
|
Context.glInvalidateBufferSubData(buffer.Value, offset, length);
|
|
}
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public void InvalidateFramebuffer(
|
|
uint target,
|
|
int numAttachments,
|
|
ReadOnlySpan<uint> attachments
|
|
)
|
|
{
|
|
fixed (uint* attachmentsPtr = attachments) {
|
|
Context.glInvalidateFramebuffer(target, numAttachments, attachmentsPtr);
|
|
}
|
|
}
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public void InvalidateSubFramebuffer(
|
|
uint target,
|
|
int numAttachments,
|
|
ReadOnlySpan<uint> attachments,
|
|
int x,
|
|
int y,
|
|
int width,
|
|
int height
|
|
)
|
|
{
|
|
fixed (uint* attachmentsPtr = attachments) {
|
|
Context.glInvalidateSubFramebuffer(target, numAttachments, attachmentsPtr, x, y,
|
|
width, height);
|
|
}
|
|
}
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public void InvalidateTexImage(
|
|
GlHandle texture,
|
|
int level
|
|
)
|
|
{
|
|
Context.glInvalidateTexImage(texture.Value, level);
|
|
}
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public void InvalidateTexSubImage(
|
|
GlHandle texture,
|
|
int level,
|
|
int xoffset,
|
|
int yoffset,
|
|
int zoffset,
|
|
int width,
|
|
int height,
|
|
int depth
|
|
)
|
|
{
|
|
Context.glInvalidateTexSubImage(texture.Value, level, xoffset, yoffset, zoffset, width,
|
|
height, depth);
|
|
}
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public void MultiDrawArraysIndirect(
|
|
uint mode,
|
|
ReadOnlySpan<IntPtr> indirect,
|
|
int drawcount,
|
|
int stride
|
|
)
|
|
{
|
|
fixed (IntPtr* indirectPtr = indirect) {
|
|
Context.glMultiDrawArraysIndirect(mode, indirectPtr, drawcount, stride);
|
|
}
|
|
}
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public void MultiDrawElementsIndirect(
|
|
uint mode,
|
|
ShaderType type,
|
|
ReadOnlySpan<IntPtr> indirect,
|
|
int drawcount,
|
|
int stride
|
|
)
|
|
{
|
|
fixed (IntPtr* indirectPtr = indirect) {
|
|
Context.glMultiDrawElementsIndirect(mode, (uint)type, indirectPtr, drawcount,
|
|
stride);
|
|
}
|
|
}
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public void ObjectLabel(
|
|
uint identifier,
|
|
uint name,
|
|
int length,
|
|
ReadOnlySpan<byte> label
|
|
)
|
|
{
|
|
fixed (byte* labelPtr = label) {
|
|
Context.glObjectLabel(identifier, name, length, labelPtr);
|
|
}
|
|
}
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public void ObjectPtrLabel(
|
|
ReadOnlySpan<IntPtr> ptr,
|
|
int length,
|
|
ReadOnlySpan<byte> label
|
|
)
|
|
{
|
|
fixed (IntPtr* ptrPtr = ptr)
|
|
{
|
|
fixed (byte* labelPtr = label) {
|
|
Context.glObjectPtrLabel(ptrPtr, length, labelPtr);
|
|
}
|
|
}
|
|
}
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public void PopDebugGroup()
|
|
{
|
|
Context.glPopDebugGroup();
|
|
}
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public void PushDebugGroup(
|
|
uint source,
|
|
uint id,
|
|
int length,
|
|
ReadOnlySpan<byte> message
|
|
)
|
|
{
|
|
fixed (byte* messagePtr = message) {
|
|
Context.glPushDebugGroup(source, id, length, messagePtr);
|
|
}
|
|
}
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public void ShaderStorageBlockBinding(
|
|
GlHandle program,
|
|
uint storageBlockIndex,
|
|
uint storageBlockBinding
|
|
)
|
|
{
|
|
Context.glShaderStorageBlockBinding(program.Value, storageBlockIndex, storageBlockBinding);
|
|
}
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public void TexBufferRange(
|
|
uint target,
|
|
uint internalformat,
|
|
GlHandle buffer,
|
|
nint offset,
|
|
nuint size
|
|
)
|
|
{
|
|
Context.glTexBufferRange(target, internalformat, buffer.Value, offset, size);
|
|
}
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public void TexStorage2DMultisample(
|
|
uint target,
|
|
int samples,
|
|
uint internalformat,
|
|
int width,
|
|
int height,
|
|
byte fixedsamplelocations
|
|
)
|
|
{
|
|
Context.glTexStorage2DMultisample(target, samples, internalformat, width, height,
|
|
fixedsamplelocations);
|
|
}
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public void TexStorage3DMultisample(
|
|
uint target,
|
|
int samples,
|
|
uint internalformat,
|
|
int width,
|
|
int height,
|
|
int depth,
|
|
byte fixedsamplelocations
|
|
)
|
|
{
|
|
Context.glTexStorage3DMultisample(target, samples, internalformat, width, height, depth,
|
|
fixedsamplelocations);
|
|
}
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public void TextureView(
|
|
GlHandle texture,
|
|
uint target,
|
|
GlHandle origtexture,
|
|
uint internalformat,
|
|
uint minlevel,
|
|
uint numlevels,
|
|
uint minlayer,
|
|
uint numlayers
|
|
)
|
|
{
|
|
Context.glTextureView(texture.Value, target, origtexture.Value, internalformat,
|
|
minlevel, numlevels, minlayer, numlayers);
|
|
}
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public void VertexAttribBinding(
|
|
uint attribindex,
|
|
uint bindingindex
|
|
)
|
|
{
|
|
Context.glVertexAttribBinding(attribindex, bindingindex);
|
|
}
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public void VertexAttribFormat(
|
|
uint attribindex,
|
|
int size,
|
|
ShaderType type,
|
|
byte normalized,
|
|
uint relativeoffset
|
|
)
|
|
{
|
|
Context.glVertexAttribFormat(attribindex, size, (uint)type, normalized, relativeoffset);
|
|
}
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public void VertexAttribIFormat(
|
|
uint attribindex,
|
|
int size,
|
|
ShaderType type,
|
|
uint relativeoffset
|
|
)
|
|
{
|
|
Context.glVertexAttribIFormat(attribindex, size, (uint)type, relativeoffset);
|
|
}
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public void VertexAttribLFormat(
|
|
uint attribindex,
|
|
int size,
|
|
ShaderType type,
|
|
uint relativeoffset
|
|
)
|
|
{
|
|
Context.glVertexAttribLFormat(attribindex, size, (uint)type, relativeoffset);
|
|
}
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public void VertexBindingDivisor(
|
|
uint bindingindex,
|
|
uint divisor
|
|
)
|
|
{
|
|
Context.glVertexBindingDivisor(bindingindex, divisor);
|
|
}
|
|
|
|
}
|
|
}
|