112 lines
4.3 KiB
C#
112 lines
4.3 KiB
C#
// <auto-generated>
|
|
// Generated by StgSharp.GenerateGL on 2026-08-25 09:22:55Z
|
|
// Version: 4.4
|
|
// </auto-generated>
|
|
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 BindBuffersBase(uint target, uint first, ReadOnlySpan<uint> buffers)
|
|
{
|
|
fixed (uint* buffersPtr = buffers)
|
|
{
|
|
Context.glBindBuffersBase(target, first, checked((int)buffers.Length), buffersPtr);
|
|
}
|
|
}
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public void BindBuffersRange(uint target, uint first, ReadOnlySpan<uint> buffers, ReadOnlySpan<nint> offsets, ReadOnlySpan<nint> sizes)
|
|
{
|
|
if (offsets.Length != buffers.Length) {
|
|
throw new ArgumentException("Span lengths controlled by count must match.", nameof(offsets));
|
|
}
|
|
if (sizes.Length != buffers.Length) {
|
|
throw new ArgumentException("Span lengths controlled by count must match.", nameof(sizes));
|
|
}
|
|
fixed (uint* buffersPtr = buffers)
|
|
{
|
|
fixed (nint* offsetsPtr = offsets)
|
|
{
|
|
fixed (nint* sizesPtr = sizes)
|
|
{
|
|
Context.glBindBuffersRange(target, first, checked((int)buffers.Length), buffersPtr, offsetsPtr, sizesPtr);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public void BindImageTextures(uint first, ReadOnlySpan<uint> textures)
|
|
{
|
|
fixed (uint* texturesPtr = textures)
|
|
{
|
|
Context.glBindImageTextures(first, checked((int)textures.Length), texturesPtr);
|
|
}
|
|
}
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public void BindSamplers(uint first, ReadOnlySpan<uint> samplers)
|
|
{
|
|
fixed (uint* samplersPtr = samplers)
|
|
{
|
|
Context.glBindSamplers(first, checked((int)samplers.Length), samplersPtr);
|
|
}
|
|
}
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public void BindTextures(uint first, ReadOnlySpan<uint> textures)
|
|
{
|
|
fixed (uint* texturesPtr = textures)
|
|
{
|
|
Context.glBindTextures(first, checked((int)textures.Length), texturesPtr);
|
|
}
|
|
}
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public void BindVertexBuffers(uint first, ReadOnlySpan<uint> buffers, ReadOnlySpan<nint> offsets, ReadOnlySpan<int> strides)
|
|
{
|
|
if (offsets.Length != buffers.Length) {
|
|
throw new ArgumentException("Span lengths controlled by count must match.", nameof(offsets));
|
|
}
|
|
if (strides.Length != buffers.Length) {
|
|
throw new ArgumentException("Span lengths controlled by count must match.", nameof(strides));
|
|
}
|
|
fixed (uint* buffersPtr = buffers)
|
|
{
|
|
fixed (nint* offsetsPtr = offsets)
|
|
{
|
|
fixed (int* stridesPtr = strides)
|
|
{
|
|
Context.glBindVertexBuffers(first, checked((int)buffers.Length), buffersPtr, offsetsPtr, stridesPtr);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public void BufferStorage(uint target, nint size, void* data, uint flags)
|
|
{
|
|
Context.glBufferStorage(target, size, data, flags);
|
|
}
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public void ClearTexImage(GlHandle texture, int level, uint format, uint type, void* data)
|
|
{
|
|
Context.glClearTexImage(texture.Value, level, format, type, data);
|
|
}
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public void ClearTexSubImage(GlHandle texture, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, uint format, uint type, void* data)
|
|
{
|
|
Context.glClearTexSubImage(texture.Value, level, xoffset, yoffset, zoffset, width, height, depth, format, type, data);
|
|
}
|
|
|
|
}
|
|
}
|