switch root namespace name to NITLOAD
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
// -----------------------------------------------------------------------------
|
||||
// file="IImageProvider"
|
||||
// Project: StgSharp
|
||||
// Copyright (c) Nitload.
|
||||
// SPDX-License-Identifier: MIT
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace Nitload.Graphics
|
||||
{
|
||||
public interface IImageProvider
|
||||
{
|
||||
|
||||
Image ProvideImage();
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
// -----------------------------------------------------------------------------
|
||||
// file="ImageHelper"
|
||||
// Project: StgSharp
|
||||
// Copyright (c) Nitload.
|
||||
// SPDX-License-Identifier: MIT
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Text;
|
||||
|
||||
namespace Nitload.Graphics
|
||||
{
|
||||
public static class ImageHelper
|
||||
{
|
||||
|
||||
public static void Resize(
|
||||
Image i,
|
||||
int width,
|
||||
int height,
|
||||
ImageMovement move
|
||||
)
|
||||
{
|
||||
if (i == null) {
|
||||
throw new ArgumentNullException(nameof(i));
|
||||
}
|
||||
if (i.Size == (width, height)) {
|
||||
return;
|
||||
}
|
||||
if (!Enum.IsDefined(typeof(ImageMovement), move)) {
|
||||
throw new InvalidEnumArgumentException(nameof(move));
|
||||
}
|
||||
byte[] oldData = i.Data;
|
||||
i.Data = new byte[width * height * i.PixelSize];
|
||||
i.Height = height;
|
||||
i.Width = width;
|
||||
i.PixelUpdateCount++;
|
||||
switch (move)
|
||||
{
|
||||
case ImageMovement.Discard:
|
||||
break;
|
||||
case ImageMovement.Top:
|
||||
break;
|
||||
default:
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
[Flags]
|
||||
public enum ImageMovement
|
||||
{
|
||||
#pragma warning disable CA1008
|
||||
Discard = 0,
|
||||
#pragma warning restore CA1008
|
||||
Top = 1,
|
||||
Bottom = 2,
|
||||
Left = 4,
|
||||
Right = 8,
|
||||
TopLeft = Top | Left,
|
||||
BottomLeft = Bottom | Left,
|
||||
TopRight = Top | Right,
|
||||
BottomRight = Bottom | Right,
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
// -----------------------------------------------------------------------------
|
||||
// file="BufferObjectBase"
|
||||
// Project: StgSharp
|
||||
// Copyright (c) Nitload.
|
||||
// SPDX-License-Identifier: MIT
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
using Nitload.Graphics;
|
||||
using Nitload.Graphics.OpenGL;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Nitload.Graphics
|
||||
{
|
||||
/// <summary>
|
||||
/// Interface of all kinds OpenGL BufferHandle objects
|
||||
/// </summary>
|
||||
public abstract class BufferObjectBase : IDisposable
|
||||
{
|
||||
|
||||
protected GlHandle[] _bufferHandle;
|
||||
protected RenderStream binding;
|
||||
|
||||
/// <summary>
|
||||
/// Get the only handle to one of the Object instance
|
||||
/// </summary>
|
||||
/// <param _label="index">
|
||||
///
|
||||
/// </param>
|
||||
/// <returns>
|
||||
///
|
||||
/// </returns>
|
||||
public GlHandle this[
|
||||
int index
|
||||
] => _bufferHandle[index];
|
||||
|
||||
/// <summary>
|
||||
/// Bind a BufferHandle instance to OpenGL
|
||||
/// </summary>
|
||||
/// <param _label="index">
|
||||
/// Index of handle of the object in this instance to be bind
|
||||
/// </param>
|
||||
public abstract void Bind(
|
||||
int index
|
||||
);
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
Dispose(disposing:true);
|
||||
GC.SuppressFinalize(this);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override string ToString()
|
||||
{
|
||||
return $"This is a {GetType().FullName}, containing {_bufferHandle.Length} buffer handles: {_bufferHandle.ToString()}.";
|
||||
}
|
||||
|
||||
protected abstract void Dispose(
|
||||
bool disposing
|
||||
);
|
||||
|
||||
~BufferObjectBase()
|
||||
{
|
||||
Dispose(disposing:false);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
// -----------------------------------------------------------------------------
|
||||
// file="GraphicInitializer"
|
||||
// Project: StgSharp
|
||||
// Copyright (c) Nitload.
|
||||
// SPDX-License-Identifier: MIT
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
using Nitload;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Nitload.Graphics
|
||||
{
|
||||
public class GraphicModuel : IStaticModule
|
||||
{
|
||||
|
||||
public string ModuleName => "Graphics";
|
||||
|
||||
public void InitializeModule(
|
||||
IModuleInitializeConfiguration profile
|
||||
)
|
||||
{
|
||||
GraphicFramework.LoadGlfw();
|
||||
if (GraphicFramework.glfwInit() == 0) {
|
||||
throw new Exception("Failed to init system graphic environment.");
|
||||
}
|
||||
}
|
||||
|
||||
public void UninitializeModule()
|
||||
{
|
||||
GraphicFramework.glfwTerminate();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
// -----------------------------------------------------------------------------
|
||||
// file="Image.Native"
|
||||
// Project: StgSharp
|
||||
// Copyright (c) Nitload.
|
||||
// SPDX-License-Identifier: MIT
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
using Nitload.Common.Internal;
|
||||
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Nitload.Graphics
|
||||
{
|
||||
internal static unsafe partial class GraphicFramework
|
||||
{
|
||||
|
||||
[LibraryImport(
|
||||
Native.LibName,
|
||||
EntryPoint = "loadImageData",
|
||||
StringMarshalling = StringMarshalling.Utf8)]
|
||||
[UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
|
||||
internal static partial void InternalLoadImage(
|
||||
string fileName,
|
||||
ImageInfo* output,
|
||||
ImageLoader loader
|
||||
);
|
||||
|
||||
[LibraryImport(Native.LibName, EntryPoint = "unloadImageData")]
|
||||
[UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
|
||||
internal static partial void InternalUnloadImage(
|
||||
ImageInfo* output
|
||||
);
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,176 @@
|
||||
// -----------------------------------------------------------------------------
|
||||
// file="Image"
|
||||
// Project: StgSharp
|
||||
// Copyright (c) Nitload.
|
||||
// SPDX-License-Identifier: MIT
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
using Nitload.Graphics.OpenGL;
|
||||
|
||||
using System;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
namespace Nitload.Graphics
|
||||
{
|
||||
public class Image : IImageProvider
|
||||
{
|
||||
|
||||
private byte[] _data;
|
||||
private ImageInfo _rawInfo;
|
||||
private int _pixelUpdateCount = 0;
|
||||
|
||||
internal unsafe Image()
|
||||
{
|
||||
_rawInfo = new ImageInfo();
|
||||
}
|
||||
|
||||
internal Image(
|
||||
ImageInfo information
|
||||
)
|
||||
{
|
||||
_rawInfo = information;
|
||||
_data = [];
|
||||
|
||||
// int length = _rawInfo.width * _rawInfo.height * _rawInfo.channel;
|
||||
}
|
||||
|
||||
public (int width, int height) Size => (_rawInfo.Width, _rawInfo.Height);
|
||||
|
||||
public byte[] PixelBuffer
|
||||
{
|
||||
get
|
||||
{
|
||||
if ((_data.Length == 0) || (_data == null))
|
||||
{
|
||||
GetBytes();
|
||||
return _data!;
|
||||
}
|
||||
return _data;
|
||||
}
|
||||
}
|
||||
|
||||
public ImageChannel Channel => _rawInfo.Channel;
|
||||
|
||||
/// <summary>
|
||||
/// Hash code of time pixels updated last time.
|
||||
/// </summary>
|
||||
public int PixelUpdateCount
|
||||
{
|
||||
get => _pixelUpdateCount;
|
||||
internal set => _pixelUpdateCount = value;
|
||||
}
|
||||
|
||||
public int ChannelCount => _rawInfo.ChannelCount;
|
||||
|
||||
public int Height
|
||||
{
|
||||
get => _rawInfo.Height;
|
||||
internal set => _rawInfo.Height = value;
|
||||
}
|
||||
|
||||
public int Width
|
||||
{
|
||||
get => _rawInfo.Width;
|
||||
internal set => _rawInfo.Width = value;
|
||||
}
|
||||
|
||||
public int PixelSize => ImageInfo.GetPixelSize(_rawInfo.pixelLayout, _rawInfo.Channel);
|
||||
|
||||
public PixelChannelLayout PixelLayout
|
||||
{
|
||||
get => _rawInfo.pixelLayout;
|
||||
private set => _rawInfo.pixelLayout = value;
|
||||
}
|
||||
|
||||
internal ref byte[] Data => ref _data;
|
||||
|
||||
public void FromBytes(
|
||||
byte[] stream
|
||||
) { }
|
||||
|
||||
public static unsafe Image FromFile(
|
||||
string route,
|
||||
ImageLoader loader
|
||||
)
|
||||
{
|
||||
Image ret = new Image();
|
||||
fixed (ImageInfo* iptr = &ret._rawInfo) {
|
||||
GraphicFramework.InternalLoadImage(route, iptr, loader);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
public static Image FromMemory(
|
||||
(int width, int height) size,
|
||||
ImageChannel channel,
|
||||
byte[] stream
|
||||
)
|
||||
{
|
||||
ImageInfo _info = new ImageInfo
|
||||
{
|
||||
Height = size.height,
|
||||
Width = size.width,
|
||||
Channel = channel,
|
||||
StreamPtr = IntPtr.Zero
|
||||
};
|
||||
Image ret = new Image(_info);
|
||||
ret.PixelLayout = PixelChannelLayout.Byte;
|
||||
ret._data = stream;
|
||||
return ret;
|
||||
}
|
||||
|
||||
public static Image FromMemory(
|
||||
(int width, int height) size,
|
||||
ImageChannel channel,
|
||||
PixelChannelLayout layout,
|
||||
byte[] stream
|
||||
)
|
||||
{
|
||||
ImageInfo _info = new ImageInfo
|
||||
{
|
||||
Height = size.height,
|
||||
Width = size.width,
|
||||
Channel = channel,
|
||||
StreamPtr = IntPtr.Zero
|
||||
};
|
||||
Image ret = new Image(_info);
|
||||
ret.PixelLayout = layout;
|
||||
ret._data = stream;
|
||||
return ret;
|
||||
}
|
||||
|
||||
public unsafe byte[] GetBytes()
|
||||
{
|
||||
if (_data.Length == 0)
|
||||
{
|
||||
int size = Width * Height * ImageInfo.GetPixelSize(PixelLayout, Channel);
|
||||
_data = new Span<byte>((byte*)_rawInfo.StreamPtr, size).ToArray();
|
||||
fixed (ImageInfo* pptr = &_rawInfo) {
|
||||
GraphicFramework.InternalUnloadImage(pptr);
|
||||
}
|
||||
_rawInfo.StreamPtr = IntPtr.Zero;
|
||||
}
|
||||
return _data;
|
||||
}
|
||||
|
||||
public Image ProvideImage()
|
||||
{
|
||||
return this;
|
||||
}
|
||||
|
||||
internal static Image FromMemory(
|
||||
ImageInfo info,
|
||||
byte[] data,
|
||||
int operationCount
|
||||
)
|
||||
{
|
||||
return new Image
|
||||
{
|
||||
_rawInfo = info,
|
||||
_data = data,
|
||||
_pixelUpdateCount = operationCount
|
||||
};
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,142 @@
|
||||
// -----------------------------------------------------------------------------
|
||||
// file="ImageInfo"
|
||||
// Project: StgSharp
|
||||
// Copyright (c) Nitload.
|
||||
// SPDX-License-Identifier: MIT
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
using Nitload.Graphics.OpenGL;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
|
||||
namespace Nitload.Graphics
|
||||
{
|
||||
[UnmanagedFunctionPointer(CallingConvention.Cdecl, CharSet = CharSet.Ansi)]
|
||||
public delegate IntPtr ImageLoader(
|
||||
string name,
|
||||
ref int width,
|
||||
ref int height,
|
||||
ref int definedChannel,
|
||||
int desiredChannel
|
||||
);
|
||||
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
internal struct ImageInfo
|
||||
{
|
||||
|
||||
private ImageChannel channel;
|
||||
private int height;
|
||||
private int width;
|
||||
private IntPtr pixelPtr;
|
||||
internal PixelChannelLayout pixelLayout;
|
||||
|
||||
public ImageChannel Channel
|
||||
{
|
||||
get => channel;
|
||||
set => channel = value;
|
||||
}
|
||||
|
||||
public int ChannelCount => GetChannelCount(channel);
|
||||
|
||||
public int Height
|
||||
{
|
||||
get => height;
|
||||
set => height = value;
|
||||
}
|
||||
|
||||
public int StreamSize => width * height * GetPixelSize(
|
||||
pixelLayout, channel);
|
||||
|
||||
public int Width
|
||||
{
|
||||
get => width;
|
||||
set => width = value;
|
||||
}
|
||||
|
||||
public IntPtr StreamPtr
|
||||
{
|
||||
get => pixelPtr;
|
||||
internal set => pixelPtr = value;
|
||||
}
|
||||
|
||||
public override int GetHashCode()
|
||||
{
|
||||
int hash = 17;
|
||||
hash = (hash * 17) + width;
|
||||
hash = (hash * 17) + height;
|
||||
hash = (hash * 17) + (int)channel;
|
||||
return hash;
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return $"{channel}\t{width}\t{height}\t{(ulong)StreamPtr}";
|
||||
}
|
||||
|
||||
internal static int GetChannelCount(
|
||||
ImageChannel channel
|
||||
)
|
||||
{
|
||||
return channel switch
|
||||
{
|
||||
ImageChannel.SingleColor => 1,
|
||||
ImageChannel.DoubleColor => 2,
|
||||
ImageChannel.TripleColor => 3,
|
||||
ImageChannel.WithAlphaChannel => 4,
|
||||
_ => throw new InvalidCastException(
|
||||
"Unknown color channel decoding setting.")
|
||||
};
|
||||
}
|
||||
|
||||
internal static int GetPixelSize(
|
||||
PixelChannelLayout layout,
|
||||
ImageChannel channel
|
||||
)
|
||||
{
|
||||
return layout switch
|
||||
{
|
||||
PixelChannelLayout.UByte => sizeof(byte) * GetChannelCount(
|
||||
channel),
|
||||
PixelChannelLayout.Byte => sizeof(byte) * GetChannelCount(
|
||||
channel),
|
||||
PixelChannelLayout.UShort => sizeof(short) * GetChannelCount(
|
||||
channel),
|
||||
PixelChannelLayout.Short => sizeof(short) * GetChannelCount(
|
||||
channel),
|
||||
PixelChannelLayout.UInt => sizeof(int) * GetChannelCount(
|
||||
channel),
|
||||
PixelChannelLayout.Int => sizeof(int) * GetChannelCount(
|
||||
channel),
|
||||
PixelChannelLayout.Float => sizeof(float) * GetChannelCount(
|
||||
channel),
|
||||
PixelChannelLayout.UByte332 => sizeof(byte),
|
||||
PixelChannelLayout.UByte233Rev => sizeof(byte),
|
||||
PixelChannelLayout.UShort565 => sizeof(short),
|
||||
PixelChannelLayout.UShort565Rev => sizeof(short),
|
||||
PixelChannelLayout.UShort4444 => sizeof(short),
|
||||
PixelChannelLayout.UShort4444Rev => sizeof(short),
|
||||
PixelChannelLayout.UShort5551 => sizeof(short),
|
||||
PixelChannelLayout.UShort1555Rev => sizeof(short),
|
||||
PixelChannelLayout.UInt8888 => sizeof(int),
|
||||
PixelChannelLayout.UInt8888Rev => sizeof(int),
|
||||
PixelChannelLayout.UInt1010102 => sizeof(int),
|
||||
PixelChannelLayout.UInt2101010Rev => sizeof(int),
|
||||
_ => throw new ArgumentException("Unknown layout type"),
|
||||
};
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public enum ImageChannel : uint
|
||||
{
|
||||
|
||||
SingleColor = glConst.RED,
|
||||
DoubleColor = glConst.RG,
|
||||
TripleColor = glConst.RGB,
|
||||
WithAlphaChannel = glConst.RGBA,
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,149 @@
|
||||
// -----------------------------------------------------------------------------
|
||||
// file="AutoTexture"
|
||||
// Project: StgSharp
|
||||
// Copyright (c) Nitload.
|
||||
// SPDX-License-Identifier: MIT
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
using Nitload.Common.Collections;
|
||||
using Nitload.Graphics;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Linq;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Text;
|
||||
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Nitload.Graphics.OpenGL
|
||||
{
|
||||
/// <summary>
|
||||
/// A collection of a sets of OpenGL textures. The collection can automatically select one of
|
||||
/// the texture with minimum costs to upgrade pixels to BufferHandle. Usually <see ///
|
||||
/// cref="AutoTextureGL" /> is used for <see cref="IImageProvider" /> loading, but not for
|
||||
/// target of <see cref="OpenGLFunction.FrameBufferTexture2d(FrameBufferTarget, uint, ///
|
||||
/// Texture2DTarget, GlHandle, int)" />.
|
||||
/// </summary>
|
||||
public sealed class AutoTextureGL
|
||||
{
|
||||
|
||||
private TextureProperty[] propertyCache;
|
||||
private BidirectionalDictionary<Image, int> imageIndexMap = new BidirectionalDictionary<Image, int>(
|
||||
);
|
||||
private Dictionary<Image, int> imageUpdateIndex = new Dictionary<Image, int>();
|
||||
|
||||
private int _size, _currentIndex;
|
||||
private LinkedList<int> usedTextureIndex;
|
||||
private Queue<int> unusedTextureUnitIndex;
|
||||
private TextureGL texturePackage;
|
||||
|
||||
private TextureProperty _textureProperty;
|
||||
|
||||
private AutoTextureGL(
|
||||
TextureGL texture
|
||||
)
|
||||
{
|
||||
texturePackage = texture;
|
||||
_size = texture.Count;
|
||||
imageIndexMap = new BidirectionalDictionary<Image, int>();
|
||||
unusedTextureUnitIndex = new Queue<int>(Enumerable.Range(0, _size));
|
||||
usedTextureIndex = new LinkedList<int>();
|
||||
propertyCache = new TextureProperty[_size];
|
||||
}
|
||||
|
||||
public AutoTextureGL(
|
||||
int textureObjectSize,
|
||||
[NotNull]glRender binding
|
||||
)
|
||||
{
|
||||
this._size = textureObjectSize;
|
||||
imageIndexMap = new BidirectionalDictionary<Image, int>();
|
||||
texturePackage = new TextureGL(textureObjectSize, binding);
|
||||
unusedTextureUnitIndex = new Queue<int>(Enumerable.Range(0, _size));
|
||||
usedTextureIndex = new LinkedList<int>();
|
||||
propertyCache = new TextureProperty[_size];
|
||||
}
|
||||
|
||||
public TextureProperty DefaultTextureProperty
|
||||
{
|
||||
get => _textureProperty;
|
||||
set => _textureProperty = value;
|
||||
}
|
||||
|
||||
private OpenGLFunction GL => texturePackage.GL;
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void SelectTextureAndBind(
|
||||
Image i
|
||||
)
|
||||
{
|
||||
TextureProperty property = _textureProperty;
|
||||
|
||||
SelectTextureAndBind(i, property);
|
||||
}
|
||||
|
||||
public void SelectTextureAndBind(
|
||||
[NotNull]Image i,
|
||||
TextureProperty property
|
||||
)
|
||||
{
|
||||
// usable texture with image match
|
||||
if (imageIndexMap.TryGetValue(i, out int index))
|
||||
{
|
||||
// prop setting match
|
||||
if (propertyCache[index] == property)
|
||||
{
|
||||
_currentIndex = index; //GL.Assert(true);
|
||||
texturePackage.Bind2D(index); //GL.Assert(true);
|
||||
if (i.PixelUpdateCount != imageUpdateIndex[i])
|
||||
{
|
||||
texturePackage.LoadTexture(index, i); //GL.Assert(true);
|
||||
}
|
||||
} else
|
||||
{
|
||||
_currentIndex = index; //GL.Assert(true);
|
||||
texturePackage.Bind2D(index); //GL.Assert(true);
|
||||
texturePackage.Set2dProperty(index, property); //GL.Assert(true);
|
||||
if (i.PixelUpdateCount != imageUpdateIndex[i])
|
||||
{
|
||||
texturePackage.LoadTexture(index, i); //GL.Assert(true);
|
||||
}
|
||||
}
|
||||
} else
|
||||
{
|
||||
if (unusedTextureUnitIndex.TryDequeue(out int newIndex))
|
||||
{
|
||||
// has extra unused texture object
|
||||
imageIndexMap.Add(i, index);
|
||||
texturePackage.Bind2D(index);
|
||||
texturePackage.Set2dProperty(index, property);
|
||||
texturePackage.LoadTexture(index, i);
|
||||
usedTextureIndex.AddLast(newIndex);
|
||||
propertyCache[newIndex] = property;
|
||||
imageUpdateIndex[i] = i.PixelUpdateCount;
|
||||
} else
|
||||
{
|
||||
// recycle from current
|
||||
int reusedIndex = usedTextureIndex.First!.Value;
|
||||
usedTextureIndex.RemoveFirst();
|
||||
usedTextureIndex.AddLast(reusedIndex);
|
||||
imageIndexMap[i] = reusedIndex;
|
||||
propertyCache[newIndex] = property;
|
||||
imageUpdateIndex[i] = i.PixelUpdateCount;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static AutoTextureGL ToAuto(
|
||||
[NotNull]TextureGL texture
|
||||
)
|
||||
{
|
||||
if (texture.IndexOfCurrentTexture != -1) {
|
||||
throw new InvalidOperationException("Texture to be converted has been editted.");
|
||||
}
|
||||
return new AutoTextureGL(texture);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
// -----------------------------------------------------------------------------
|
||||
// file="GLBufferObjectBase"
|
||||
// Project: StgSharp
|
||||
// Copyright (c) Nitload.
|
||||
// SPDX-License-Identifier: MIT
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
using Nitload.Graphics.OpenGL;
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace Nitload.Graphics.OpenGL
|
||||
{
|
||||
public abstract class GlBufferObjectBase : BufferObjectBase
|
||||
{
|
||||
|
||||
private readonly glRender _contextBinding;
|
||||
|
||||
protected GlBufferObjectBase(
|
||||
glRender contextBinding
|
||||
)
|
||||
{
|
||||
binding = contextBinding;
|
||||
_contextBinding = contextBinding;
|
||||
}
|
||||
|
||||
protected OpenGLFunction GL => _contextBinding.GL;
|
||||
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,48 @@
|
||||
// -----------------------------------------------------------------------------
|
||||
// file="IglConvertable"
|
||||
// Project: StgSharp
|
||||
// Copyright (c) Nitload.
|
||||
// SPDX-License-Identifier: MIT
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
using Nitload.Graphics.OpenGL;
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Nitload.Graphics.ShaderEdit
|
||||
{
|
||||
public interface IglConvertable
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public void DisplayGLtypeDefinition();
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public void GainAllUniforms(
|
||||
ShaderProgram source,
|
||||
params string[] uniformName
|
||||
);
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <returns>
|
||||
///
|
||||
/// </returns>
|
||||
public ShaderStruct GetConvertedGLtype();
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public void SetAllUniforms();
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,665 @@
|
||||
// -----------------------------------------------------------------------------
|
||||
// file="glApiManager.Const"
|
||||
// Project: StgSharp
|
||||
// Copyright (c) Nitload.
|
||||
// SPDX-License-Identifier: MIT
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace Nitload.Graphics.OpenGL
|
||||
{
|
||||
public static partial class glManager
|
||||
{
|
||||
|
||||
#region coreVersion
|
||||
|
||||
private static bool core10 = false;
|
||||
private static bool core11 = false;
|
||||
private static bool core12 = false;
|
||||
private static bool core13 = false;
|
||||
private static bool core14 = false;
|
||||
private static bool core15 = false;
|
||||
private static bool core20 = false;
|
||||
private static bool core21 = false;
|
||||
private static bool core30 = false;
|
||||
private static bool core31 = false;
|
||||
private static bool core32 = false;
|
||||
private static bool core33 = false;
|
||||
private static bool core40 = false;
|
||||
private static bool core41 = false;
|
||||
private static bool core42 = false;
|
||||
private static bool core43 = false;
|
||||
private static bool core44 = false;
|
||||
private static bool core45 = false;
|
||||
private static bool core46 = false;
|
||||
|
||||
#endregion
|
||||
|
||||
#region extension
|
||||
|
||||
private static bool _3DFX_tbuffer;
|
||||
private static bool _3DFX_texture_compression_FXT1;
|
||||
private static bool _4DFX_multisample;
|
||||
private static bool AMD_blend_minmax_factor;
|
||||
private static bool AMD_conservative_depth;
|
||||
private static bool AMD_debug_output;
|
||||
private static bool AMD_depth_clamp_separate;
|
||||
private static bool AMD_draw_buffers_blend;
|
||||
private static bool AMD_framebuffer_multisample_advanced;
|
||||
private static bool AMD_framebuffer_sample_positions;
|
||||
private static bool AMD_gcn_shader;
|
||||
private static bool AMD_gpu_shader_half_float;
|
||||
private static bool AMD_gpu_shader_int16;
|
||||
private static bool AMD_gpu_shader_int64;
|
||||
private static bool AMD_interleaved_elements;
|
||||
private static bool AMD_multi_draw_indirect;
|
||||
private static bool AMD_name_gen_delete;
|
||||
private static bool AMD_occlusion_query_event;
|
||||
private static bool AMD_performance_monitor;
|
||||
private static bool AMD_pinned_memory;
|
||||
private static bool AMD_query_buffer_object;
|
||||
private static bool AMD_sample_positions;
|
||||
private static bool AMD_seamless_cubemap_per_texture;
|
||||
private static bool AMD_shader_atomic_counter_ops;
|
||||
private static bool AMD_shader_ballot;
|
||||
private static bool AMD_shader_explicit_vertex_parameter;
|
||||
private static bool AMD_shader_gpu_shader_half_float_fetch;
|
||||
private static bool AMD_shader_image_load_store_lod;
|
||||
private static bool AMD_shader_stencil_export;
|
||||
private static bool AMD_shader_trinary_minmax;
|
||||
private static bool AMD_sparse_texture;
|
||||
private static bool AMD_stencil_operation_extended;
|
||||
private static bool AMD_texture_gather_bias_lod;
|
||||
private static bool AMD_texture_texture4;
|
||||
private static bool AMD_transform_feedback3_lines_triangles;
|
||||
private static bool AMD_transform_feedback4;
|
||||
private static bool AMD_vertex_shader_layer;
|
||||
private static bool AMD_vertex_shader_tessellator;
|
||||
private static bool AMD_vertex_shader_viewport_index;
|
||||
private static bool APPLE_aux_depth_stencil;
|
||||
private static bool APPLE_client_storage;
|
||||
private static bool APPLE_element_array;
|
||||
private static bool APPLE_fence;
|
||||
private static bool APPLE_float_pixels;
|
||||
private static bool APPLE_flush_buffer_range;
|
||||
private static bool APPLE_object_purgeable;
|
||||
private static bool APPLE_rgb_422;
|
||||
private static bool APPLE_row_bytes;
|
||||
private static bool APPLE_specular_vector;
|
||||
private static bool APPLE_texture_range;
|
||||
private static bool APPLE_transform_hint;
|
||||
private static bool APPLE_vertex_array_object;
|
||||
private static bool APPLE_vertex_array_range;
|
||||
private static bool APPLE_vertex_program_evaluators;
|
||||
private static bool APPLE_ycbcr_422;
|
||||
private static bool ARB_arrays_of_arrays;
|
||||
private static bool ARB_base_instance;
|
||||
private static bool ARB_bindless_texture;
|
||||
private static bool ARB_blend_func_extended;
|
||||
private static bool ARB_buffer_storage;
|
||||
private static bool ARB_cl_event;
|
||||
private static bool ARB_clear_buffer_object;
|
||||
private static bool ARB_clear_texture;
|
||||
private static bool ARB_clip_control;
|
||||
private static bool ARB_color_buffer_float;
|
||||
private static bool ARB_compatibility;
|
||||
private static bool ARB_compressed_texture_pixel_storage;
|
||||
private static bool ARB_compute_shader;
|
||||
private static bool ARB_compute_variable_group_size;
|
||||
private static bool ARB_conditional_render_inverted;
|
||||
private static bool ARB_conservative_depth;
|
||||
private static bool ARB_copy_buffer;
|
||||
private static bool ARB_copy_image;
|
||||
private static bool ARB_cull_distance;
|
||||
private static bool ARB_debug_output;
|
||||
private static bool ARB_depth_buffer_float;
|
||||
private static bool ARB_depth_clamp;
|
||||
private static bool ARB_depth_texture;
|
||||
private static bool ARB_derivative_control;
|
||||
private static bool ARB_direct_state_access;
|
||||
private static bool ARB_draw_buffers;
|
||||
private static bool ARB_draw_buffers_blend;
|
||||
private static bool ARB_draw_elements_base_vertex;
|
||||
private static bool ARB_draw_indirect;
|
||||
private static bool ARB_draw_instanced;
|
||||
private static bool ARB_enhanced_layouts;
|
||||
private static bool ARB_ES2_compatibility;
|
||||
private static bool ARB_ES3_1_compatibility;
|
||||
private static bool ARB_ES3_2_compatibility;
|
||||
private static bool ARB_ES3_compatibility;
|
||||
private static bool ARB_explicit_attrib_location;
|
||||
private static bool ARB_explicit_uniform_location;
|
||||
private static bool ARB_fragment_coord_conventions;
|
||||
private static bool ARB_fragment_layer_viewport;
|
||||
private static bool ARB_fragment_program;
|
||||
private static bool ARB_fragment_program_shadow;
|
||||
private static bool ARB_fragment_shader;
|
||||
private static bool ARB_fragment_shader_interlock;
|
||||
private static bool ARB_framebuffer_no_attachments;
|
||||
private static bool ARB_framebuffer_object;
|
||||
private static bool ARB_framebuffer_sRGB;
|
||||
private static bool ARB_geometry_shader4;
|
||||
private static bool ARB_get_program_binary;
|
||||
private static bool ARB_get_texture_sub_image;
|
||||
private static bool ARB_gl_spirv;
|
||||
private static bool ARB_gpu_shader_fp64;
|
||||
private static bool ARB_gpu_shader_int64;
|
||||
private static bool ARB_gpu_shader5;
|
||||
private static bool ARB_half_float_pixel;
|
||||
private static bool ARB_half_float_vertex;
|
||||
private static bool ARB_imaging;
|
||||
private static bool ARB_indirect_parameters;
|
||||
private static bool ARB_instanced_arrays;
|
||||
private static bool ARB_internalformat_query;
|
||||
private static bool ARB_internalformat_query2;
|
||||
private static bool ARB_invalidate_subdata;
|
||||
private static bool ARB_map_buffer_alignment;
|
||||
private static bool ARB_map_buffer_range;
|
||||
private static bool ARB_matrix_palette;
|
||||
private static bool ARB_multi_bind;
|
||||
private static bool ARB_multi_draw_indirect;
|
||||
private static bool ARB_multisample;
|
||||
private static bool ARB_multitexture;
|
||||
private static bool ARB_occlusion_query;
|
||||
private static bool ARB_occlusion_query2;
|
||||
private static bool ARB_parallel_shader_compile;
|
||||
private static bool ARB_pipeline_statistics_query;
|
||||
private static bool ARB_pixel_buffer_object;
|
||||
private static bool ARB_point_parameters;
|
||||
private static bool ARB_point_sprite;
|
||||
private static bool ARB_polygon_offset_clamp;
|
||||
private static bool ARB_post_depth_coverage;
|
||||
private static bool ARB_program_interface_query;
|
||||
private static bool ARB_provoking_vertex;
|
||||
private static bool ARB_query_buffer_object;
|
||||
private static bool ARB_robust_buffer_access_behavior;
|
||||
private static bool ARB_robustness;
|
||||
private static bool ARB_robustness_isolation;
|
||||
private static bool ARB_sample_locations;
|
||||
private static bool ARB_sample_shading;
|
||||
private static bool ARB_sampler_objects;
|
||||
private static bool ARB_seamless_cube_map;
|
||||
private static bool ARB_seamless_cubemap_per_texture;
|
||||
private static bool ARB_separate_shader_objects;
|
||||
private static bool ARB_shader_atomic_counter_ops;
|
||||
private static bool ARB_shader_atomic_counters;
|
||||
private static bool ARB_shader_ballot;
|
||||
private static bool ARB_shader_bit_encoding;
|
||||
private static bool ARB_shader_clock;
|
||||
private static bool ARB_shader_draw_parameters;
|
||||
private static bool ARB_shader_group_vote;
|
||||
private static bool ARB_shader_image_load_store;
|
||||
private static bool ARB_shader_image_size;
|
||||
private static bool ARB_shader_objects;
|
||||
private static bool ARB_shader_precision;
|
||||
private static bool ARB_shader_stencil_export;
|
||||
private static bool ARB_shader_storage_buffer_object;
|
||||
private static bool ARB_shader_subroutine;
|
||||
private static bool ARB_shader_texture_image_samples;
|
||||
private static bool ARB_shader_texture_lod;
|
||||
private static bool ARB_shader_viewport_layer_array;
|
||||
private static bool ARB_shading_language_100;
|
||||
private static bool ARB_shading_language_420pack;
|
||||
private static bool ARB_shading_language_include;
|
||||
private static bool ARB_shading_language_packing;
|
||||
private static bool ARB_shadow;
|
||||
private static bool ARB_shadow_ambient;
|
||||
private static bool ARB_sparse_buffer;
|
||||
private static bool ARB_sparse_texture;
|
||||
private static bool ARB_sparse_texture_clamp;
|
||||
private static bool ARB_sparse_texture2;
|
||||
private static bool ARB_spirv_extensions;
|
||||
private static bool ARB_stencil_texturing;
|
||||
private static bool ARB_sync;
|
||||
private static bool ARB_tessellation_shader;
|
||||
private static bool ARB_texture_barrier;
|
||||
private static bool ARB_texture_border_clamp;
|
||||
private static bool ARB_texture_buffer_object;
|
||||
private static bool ARB_texture_buffer_object_rgb32;
|
||||
private static bool ARB_texture_buffer_range;
|
||||
private static bool ARB_texture_compression;
|
||||
private static bool ARB_texture_compression_bptc;
|
||||
private static bool ARB_texture_compression_rgtc;
|
||||
private static bool ARB_texture_cube_map;
|
||||
private static bool ARB_texture_cube_map_array;
|
||||
private static bool ARB_texture_env_add;
|
||||
private static bool ARB_texture_env_combine;
|
||||
private static bool ARB_texture_env_crossbar;
|
||||
private static bool ARB_texture_env_dot3;
|
||||
private static bool ARB_texture_filter_anisotropic;
|
||||
private static bool ARB_texture_filter_minmax;
|
||||
private static bool ARB_texture_float;
|
||||
private static bool ARB_texture_gather;
|
||||
private static bool ARB_texture_mirror_clamp_to_edge;
|
||||
private static bool ARB_texture_mirrored_repeat;
|
||||
private static bool ARB_texture_multisample;
|
||||
private static bool ARB_texture_non_power_of_two;
|
||||
private static bool ARB_texture_query_levels;
|
||||
private static bool ARB_texture_query_lod;
|
||||
private static bool ARB_texture_rectangle;
|
||||
private static bool ARB_texture_rg;
|
||||
private static bool ARB_texture_rgb10_a2ui;
|
||||
private static bool ARB_texture_stencil8;
|
||||
private static bool ARB_texture_storage;
|
||||
private static bool ARB_texture_storage_multisample;
|
||||
private static bool ARB_texture_swizzle;
|
||||
private static bool ARB_texture_view;
|
||||
private static bool ARB_timer_query;
|
||||
private static bool ARB_transform_feedback_instanced;
|
||||
private static bool ARB_transform_feedback_overflow_query;
|
||||
private static bool ARB_transform_feedback2;
|
||||
private static bool ARB_transform_feedback3;
|
||||
private static bool ARB_transpose_matrix;
|
||||
private static bool ARB_uniform_buffer_object;
|
||||
private static bool ARB_vertex_array_bgra;
|
||||
private static bool ARB_vertex_array_object;
|
||||
private static bool ARB_vertex_attrib_64bit;
|
||||
private static bool ARB_vertex_attrib_binding;
|
||||
private static bool ARB_vertex_blend;
|
||||
private static bool ARB_vertex_buffer_object;
|
||||
private static bool ARB_vertex_program;
|
||||
private static bool ARB_vertex_shader;
|
||||
private static bool ARB_vertex_type_10f_11f_11f_rev;
|
||||
private static bool ARB_vertex_type_2_10_10_10_rev;
|
||||
private static bool ARB_viewport_array;
|
||||
private static bool ARB_window_pos;
|
||||
private static bool ATI_draw_buffers;
|
||||
private static bool ATI_element_array;
|
||||
private static bool ATI_envmap_bumpmap;
|
||||
private static bool ATI_fragment_shader;
|
||||
private static bool ATI_map_object_buffer;
|
||||
private static bool ATI_meminfo;
|
||||
private static bool ATI_pixel_format_float;
|
||||
private static bool ATI_pn_triangles;
|
||||
private static bool ATI_separate_stencil;
|
||||
private static bool ATI_text_fragment_shader;
|
||||
private static bool ATI_texture_env_combine3;
|
||||
private static bool ATI_texture_float;
|
||||
private static bool ATI_texture_mirror_once;
|
||||
private static bool ATI_vertex_array_object;
|
||||
private static bool ATI_vertex_attrib_array_object;
|
||||
private static bool ATI_vertex_streams;
|
||||
private static bool EXT_422_pixels;
|
||||
private static bool EXT_abgr;
|
||||
private static bool EXT_bgra;
|
||||
private static bool EXT_bindable_uniform;
|
||||
private static bool EXT_blend_color;
|
||||
private static bool EXT_blend_equation_separate;
|
||||
private static bool EXT_blend_func_separate;
|
||||
private static bool EXT_blend_logic_op;
|
||||
private static bool EXT_blend_minmax;
|
||||
private static bool EXT_blend_subtract;
|
||||
private static bool EXT_clip_volume_hint;
|
||||
private static bool EXT_cmyka;
|
||||
private static bool EXT_color_subtable;
|
||||
private static bool EXT_compiled_vertex_array;
|
||||
private static bool EXT_convolution;
|
||||
private static bool EXT_coordinate_frame;
|
||||
private static bool EXT_copy_texture;
|
||||
private static bool EXT_cull_vertex;
|
||||
private static bool EXT_debug_label;
|
||||
private static bool EXT_debug_marker;
|
||||
private static bool EXT_depth_bounds_test;
|
||||
private static bool EXT_direct_state_access;
|
||||
private static bool EXT_draw_buffers2;
|
||||
private static bool EXT_draw_instanced;
|
||||
private static bool EXT_draw_range_elements;
|
||||
private static bool EXT_EGL_image_storage;
|
||||
private static bool EXT_EGL_sync;
|
||||
private static bool EXT_external_buffer;
|
||||
private static bool EXT_fog_coord;
|
||||
private static bool EXT_framebuffer_blit;
|
||||
private static bool EXT_framebuffer_blit_layers;
|
||||
private static bool EXT_framebuffer_multisample;
|
||||
private static bool EXT_framebuffer_multisample_blit_scaled;
|
||||
private static bool EXT_framebuffer_object;
|
||||
private static bool EXT_framebuffer_sRGB;
|
||||
private static bool EXT_geometry_shader4;
|
||||
private static bool EXT_gpu_program_parameters;
|
||||
private static bool EXT_gpu_shader4;
|
||||
private static bool EXT_histogram;
|
||||
private static bool EXT_index_array_formats;
|
||||
private static bool EXT_index_func;
|
||||
private static bool EXT_index_material;
|
||||
private static bool EXT_index_texture;
|
||||
private static bool EXT_light_texture;
|
||||
private static bool EXT_memory_object;
|
||||
private static bool EXT_memory_object_fd;
|
||||
private static bool EXT_memory_object_win32;
|
||||
private static bool EXT_misc_attribute;
|
||||
private static bool EXT_multi_draw_arrays;
|
||||
private static bool EXT_multisample;
|
||||
private static bool EXT_multiview_tessellation_geometry_shader;
|
||||
private static bool EXT_multiview_texture_multisample;
|
||||
private static bool EXT_multiview_timer_query;
|
||||
private static bool EXT_packed_depth_stencil;
|
||||
private static bool EXT_packed_float;
|
||||
private static bool EXT_packed_pixels;
|
||||
private static bool EXT_paletted_texture;
|
||||
private static bool EXT_pixel_buffer_object;
|
||||
private static bool EXT_pixel_transform;
|
||||
private static bool EXT_pixel_transform_color_table;
|
||||
private static bool EXT_point_parameters;
|
||||
private static bool EXT_polygon_offset;
|
||||
private static bool EXT_polygon_offset_clamp;
|
||||
private static bool EXT_post_depth_coverage;
|
||||
private static bool EXT_provoking_vertex;
|
||||
private static bool EXT_raster_multisample;
|
||||
private static bool EXT_rescale_normal;
|
||||
private static bool EXT_secondary_color;
|
||||
private static bool EXT_semaphore;
|
||||
private static bool EXT_semaphore_fd;
|
||||
private static bool EXT_semaphore_win32;
|
||||
private static bool EXT_separate_shader_objects;
|
||||
private static bool EXT_separate_specular_color;
|
||||
private static bool EXT_shader_framebuffer_fetch;
|
||||
private static bool EXT_shader_framebuffer_fetch_non_coherent;
|
||||
private static bool EXT_shader_image_load_formatted;
|
||||
private static bool EXT_shader_image_load_store;
|
||||
private static bool EXT_shader_integer_mix;
|
||||
private static bool EXT_shader_samples_identical;
|
||||
private static bool EXT_shadow_funcs;
|
||||
private static bool EXT_shared_texture_palette;
|
||||
private static bool EXT_sparse_texture2;
|
||||
private static bool EXT_stencil_clear_tag;
|
||||
private static bool EXT_stencil_two_side;
|
||||
private static bool EXT_stencil_wrap;
|
||||
private static bool EXT_subtexture;
|
||||
private static bool EXT_texture;
|
||||
private static bool EXT_texture_array;
|
||||
private static bool EXT_texture_buffer_object;
|
||||
private static bool EXT_texture_compression_latc;
|
||||
private static bool EXT_texture_compression_rgtc;
|
||||
private static bool EXT_texture_compression_s3tc;
|
||||
private static bool EXT_texture_cube_map;
|
||||
private static bool EXT_texture_env_add;
|
||||
private static bool EXT_texture_env_combine;
|
||||
private static bool EXT_texture_env_dot3;
|
||||
private static bool EXT_texture_filter_anisotropic;
|
||||
private static bool EXT_texture_filter_minmax;
|
||||
private static bool EXT_texture_integer;
|
||||
private static bool EXT_texture_lod_bias;
|
||||
private static bool EXT_texture_mirror_clamp;
|
||||
private static bool EXT_texture_object;
|
||||
private static bool EXT_texture_perturb_normal;
|
||||
private static bool EXT_texture_shadow_lod;
|
||||
private static bool EXT_texture_shared_exponent;
|
||||
private static bool EXT_texture_snorm;
|
||||
private static bool EXT_texture_sRGB;
|
||||
private static bool EXT_texture_sRGB_decode;
|
||||
private static bool EXT_texture_sRGB_R8;
|
||||
private static bool EXT_texture_sRGB_RG8;
|
||||
private static bool EXT_texture_storage;
|
||||
private static bool EXT_texture_swizzle;
|
||||
private static bool EXT_texture3D;
|
||||
private static bool EXT_timer_query;
|
||||
private static bool EXT_transform_feedback;
|
||||
private static bool EXT_vertex_array;
|
||||
private static bool EXT_vertex_array_bgra;
|
||||
private static bool EXT_vertex_attrib_64bit;
|
||||
private static bool EXT_vertex_shader;
|
||||
private static bool EXT_vertex_weighting;
|
||||
private static bool EXT_win32_keyed_mutex;
|
||||
private static bool EXT_window_rectangles;
|
||||
private static bool EXT_x11_sync_object;
|
||||
private static bool GREMEDY_frame_terminator;
|
||||
private static bool GREMEDY_string_marker;
|
||||
private static bool HP_convolution_border_modes;
|
||||
private static bool HP_image_transform;
|
||||
private static bool HP_occlusion_test;
|
||||
private static bool HP_texture_lighting;
|
||||
private static bool IBM_cull_vertex;
|
||||
private static bool IBM_multimode_draw_arrays;
|
||||
private static bool IBM_rasterpos_clip;
|
||||
private static bool IBM_static_data;
|
||||
private static bool IBM_texture_mirrored_repeat;
|
||||
private static bool IBM_vertex_array_lists;
|
||||
private static bool INGR_blend_func_separate;
|
||||
private static bool INGR_color_clamp;
|
||||
private static bool INGR_interlace_read;
|
||||
private static bool INTEL_blackhole_render;
|
||||
private static bool INTEL_conservative_rasterization;
|
||||
private static bool INTEL_fragment_shader_ordering;
|
||||
private static bool INTEL_framebuffer_CMAA;
|
||||
private static bool INTEL_map_texture;
|
||||
private static bool INTEL_parallel_arrays;
|
||||
private static bool INTEL_performance_query;
|
||||
private static bool KHR_blend_equation_advanced;
|
||||
private static bool KHR_blend_equation_advanced_coherent;
|
||||
private static bool KHR_context_flush_control;
|
||||
private static bool KHR_debug;
|
||||
private static bool KHR_no_error;
|
||||
private static bool KHR_parallel_shader_compile;
|
||||
private static bool KHR_robust_buffer_access_behavior;
|
||||
private static bool KHR_robustness;
|
||||
private static bool KHR_shader_subgroup;
|
||||
private static bool KHR_texture_compression_astc_hdr;
|
||||
private static bool KHR_texture_compression_astc_ldr;
|
||||
private static bool KHR_texture_compression_astc_sliced_3d;
|
||||
private static bool MESA_framebuffer_flip_x;
|
||||
private static bool MESA_framebuffer_flip_y;
|
||||
private static bool MESA_framebuffer_swap_xy;
|
||||
private static bool MESA_pack_invert;
|
||||
private static bool MESA_program_binary_formats;
|
||||
private static bool MESA_resize_buffers;
|
||||
private static bool MESA_shader_integer_functions;
|
||||
private static bool MESA_tile_raster_order;
|
||||
private static bool MESA_window_pos;
|
||||
private static bool MESA_ycbcr_texture;
|
||||
private static bool MESAX_texture_stack;
|
||||
private static bool NV_alpha_to_coverage_dither_control;
|
||||
private static bool NV_bindless_multi_draw_indirect;
|
||||
private static bool NV_bindless_multi_draw_indirect_count;
|
||||
private static bool NV_bindless_texture;
|
||||
private static bool NV_blend_equation_advanced;
|
||||
private static bool NV_blend_equation_advanced_coherent;
|
||||
private static bool NV_blend_minmax_factor;
|
||||
private static bool NV_blend_square;
|
||||
private static bool NV_clip_space_w_scaling;
|
||||
private static bool NV_command_list;
|
||||
private static bool NV_compute_program5;
|
||||
private static bool NV_compute_shader_derivatives;
|
||||
private static bool NV_conditional_render;
|
||||
private static bool NV_conservative_raster;
|
||||
private static bool NV_conservative_raster_dilate;
|
||||
private static bool NV_conservative_raster_pre_snap;
|
||||
private static bool NV_conservative_raster_pre_snap_triangles;
|
||||
private static bool NV_conservative_raster_underestimation;
|
||||
private static bool NV_copy_depth_to_color;
|
||||
private static bool NV_copy_image;
|
||||
private static bool NV_deep_texture3D;
|
||||
private static bool NV_depth_buffer_float;
|
||||
private static bool NV_depth_clamp;
|
||||
private static bool NV_draw_texture;
|
||||
private static bool NV_draw_vulkan_image;
|
||||
private static bool NV_evaluators;
|
||||
private static bool NV_explicit_multisample;
|
||||
private static bool NV_fence;
|
||||
private static bool NV_fill_rectangle;
|
||||
private static bool NV_float_buffer;
|
||||
private static bool NV_fog_distance;
|
||||
private static bool NV_fragment_coverage_to_color;
|
||||
private static bool NV_fragment_program;
|
||||
private static bool NV_fragment_program_option;
|
||||
private static bool NV_fragment_program2;
|
||||
private static bool NV_fragment_program4;
|
||||
private static bool NV_fragment_shader_barycentric;
|
||||
private static bool NV_fragment_shader_interlock;
|
||||
private static bool NV_framebuffer_mixed_samples;
|
||||
private static bool NV_framebuffer_multisample_coverage;
|
||||
private static bool NV_geometry_program4;
|
||||
private static bool NV_geometry_shader_passthrough;
|
||||
private static bool NV_geometry_shader4;
|
||||
private static bool NV_gpu_multicast;
|
||||
private static bool NV_gpu_program4;
|
||||
private static bool NV_gpu_program5;
|
||||
private static bool NV_gpu_program5_mem_extended;
|
||||
private static bool NV_gpu_shader5;
|
||||
private static bool NV_half_float;
|
||||
private static bool NV_internalformat_sample_query;
|
||||
private static bool NV_light_max_exponent;
|
||||
private static bool NV_memory_attachment;
|
||||
private static bool NV_memory_object_sparse;
|
||||
private static bool NV_mesh_shader;
|
||||
private static bool NV_multisample_coverage;
|
||||
private static bool NV_multisample_filter_hint;
|
||||
private static bool NV_occlusion_query;
|
||||
private static bool NV_packed_depth_stencil;
|
||||
private static bool NV_parameter_buffer_object;
|
||||
private static bool NV_parameter_buffer_object2;
|
||||
private static bool NV_path_rendering;
|
||||
private static bool NV_path_rendering_shared_edge;
|
||||
private static bool NV_pixel_data_range;
|
||||
private static bool NV_point_sprite;
|
||||
private static bool NV_present_video;
|
||||
private static bool NV_primitive_restart;
|
||||
private static bool NV_primitive_shading_rate;
|
||||
private static bool NV_query_resource;
|
||||
private static bool NV_query_resource_tag;
|
||||
private static bool NV_register_combiners;
|
||||
private static bool NV_register_combiners2;
|
||||
private static bool NV_representative_fragment_test;
|
||||
private static bool NV_robustness_video_memory_purge;
|
||||
private static bool NV_sample_locations;
|
||||
private static bool NV_sample_mask_override_coverage;
|
||||
private static bool NV_scissor_exclusive;
|
||||
private static bool NV_shader_atomic_counters;
|
||||
private static bool NV_shader_atomic_float;
|
||||
private static bool NV_shader_atomic_float64;
|
||||
private static bool NV_shader_atomic_fp16_vector;
|
||||
private static bool NV_shader_atomic_int64;
|
||||
private static bool NV_shader_buffer_load;
|
||||
private static bool NV_shader_buffer_store;
|
||||
private static bool NV_shader_storage_buffer_object;
|
||||
private static bool NV_shader_subgroup_partitioned;
|
||||
private static bool NV_shader_texture_footprint;
|
||||
private static bool NV_shader_thread_group;
|
||||
private static bool NV_shader_thread_shuffle;
|
||||
private static bool NV_shading_rate_image;
|
||||
private static bool NV_stereo_view_rendering;
|
||||
private static bool NV_tessellation_program5;
|
||||
private static bool NV_texgen_emboss;
|
||||
private static bool NV_texgen_reflection;
|
||||
private static bool NV_texture_barrier;
|
||||
private static bool NV_texture_compression_vtc;
|
||||
private static bool NV_texture_env_combine4;
|
||||
private static bool NV_texture_expand_normal;
|
||||
private static bool NV_texture_multisample;
|
||||
private static bool NV_texture_rectangle;
|
||||
private static bool NV_texture_rectangle_compressed;
|
||||
private static bool NV_texture_shader;
|
||||
private static bool NV_texture_shader2;
|
||||
private static bool NV_texture_shader3;
|
||||
private static bool NV_timeline_semaphore;
|
||||
private static bool NV_transform_feedback;
|
||||
private static bool NV_transform_feedback2;
|
||||
private static bool NV_uniform_buffer_std430_layout;
|
||||
private static bool NV_uniform_buffer_unified_memory;
|
||||
private static bool NV_vdpau_interop;
|
||||
private static bool NV_vdpau_interop2;
|
||||
private static bool NV_vertex_array_range;
|
||||
private static bool NV_vertex_array_range2;
|
||||
private static bool NV_vertex_attrib_integer_64bit;
|
||||
private static bool NV_vertex_buffer_unified_memory;
|
||||
private static bool NV_vertex_program;
|
||||
private static bool NV_vertex_program1_1;
|
||||
private static bool NV_vertex_program2;
|
||||
private static bool NV_vertex_program2_option;
|
||||
private static bool NV_vertex_program3;
|
||||
private static bool NV_vertex_program4;
|
||||
private static bool NV_video_capture;
|
||||
private static bool NV_viewport_array2;
|
||||
private static bool NV_viewport_swizzle;
|
||||
private static bool NVX_blend_equation_advanced_multi_draw_buffers;
|
||||
private static bool NVX_conditional_render;
|
||||
private static bool NVX_gpu_memory_info;
|
||||
private static bool NVX_gpu_multicast2;
|
||||
private static bool NVX_linked_gpu_multicast;
|
||||
private static bool NVX_progress_fence;
|
||||
private static bool OES_byte_coordinates;
|
||||
private static bool OES_compressed_paletted_texture;
|
||||
private static bool OES_fixed_point;
|
||||
private static bool OES_query_matrix;
|
||||
private static bool OES_read_format;
|
||||
private static bool OES_single_precision;
|
||||
private static bool OML_interlace;
|
||||
private static bool OML_resample;
|
||||
private static bool OML_subsample;
|
||||
private static bool OVR_multiview;
|
||||
private static bool OVR_multiview2;
|
||||
private static bool PGI_misc_hints;
|
||||
private static bool PGI_vertex_hints;
|
||||
private static bool REND_screen_coordinates;
|
||||
private static bool S3_s3tc;
|
||||
private static bool SGI_color_matrix;
|
||||
private static bool SGI_color_table;
|
||||
private static bool SGI_texture_color_table;
|
||||
private static bool SGIS_detail_texture;
|
||||
private static bool SGIS_fog_function;
|
||||
private static bool SGIS_generate_mipmap;
|
||||
private static bool SGIS_multisample;
|
||||
private static bool SGIS_pixel_texture;
|
||||
private static bool SGIS_point_line_texgen;
|
||||
private static bool SGIS_point_parameters;
|
||||
private static bool SGIS_sharpen_texture;
|
||||
private static bool SGIS_texture_border_clamp;
|
||||
private static bool SGIS_texture_color_mask;
|
||||
private static bool SGIS_texture_edge_clamp;
|
||||
private static bool SGIS_texture_filter4;
|
||||
private static bool SGIS_texture_lod;
|
||||
private static bool SGIS_texture_select;
|
||||
private static bool SGIS_texture4D;
|
||||
private static bool SGIX_async;
|
||||
private static bool SGIX_async_histogram;
|
||||
private static bool SGIX_async_pixel;
|
||||
private static bool SGIX_blend_alpha_minmax;
|
||||
private static bool SGIX_calligraphic_fragment;
|
||||
private static bool SGIX_clipmap;
|
||||
private static bool SGIX_convolution_accuracy;
|
||||
private static bool SGIX_depth_pass_instrument;
|
||||
private static bool SGIX_depth_texture;
|
||||
private static bool SGIX_flush_raster;
|
||||
private static bool SGIX_fog_offset;
|
||||
private static bool SGIX_fragment_lighting;
|
||||
private static bool SGIX_framezoom;
|
||||
private static bool SGIX_igloo_interface;
|
||||
private static bool SGIX_instruments;
|
||||
private static bool SGIX_interlace;
|
||||
private static bool SGIX_ir_instrument1;
|
||||
private static bool SGIX_list_priority;
|
||||
private static bool SGIX_pixel_texture;
|
||||
private static bool SGIX_pixel_tiles;
|
||||
private static bool SGIX_polynomial_ffd;
|
||||
private static bool SGIX_reference_plane;
|
||||
private static bool SGIX_resample;
|
||||
private static bool SGIX_scalebias_hint;
|
||||
private static bool SGIX_shadow;
|
||||
private static bool SGIX_shadow_ambient;
|
||||
private static bool SGIX_sprite;
|
||||
private static bool SGIX_subsample;
|
||||
private static bool SGIX_tag_sample_buffer;
|
||||
private static bool SGIX_texture_add_env;
|
||||
private static bool SGIX_texture_coordinate_clamp;
|
||||
private static bool SGIX_texture_lod_bias;
|
||||
private static bool SGIX_texture_multi_buffer;
|
||||
private static bool SGIX_texture_scale_bias;
|
||||
private static bool SGIX_vertex_preclip;
|
||||
private static bool SGIX_ycrcb;
|
||||
private static bool SGIX_ycrcb_subsample;
|
||||
private static bool SGIX_ycrcba;
|
||||
private static bool SUN_convolution_border_modes;
|
||||
private static bool SUN_global_alpha;
|
||||
private static bool SUN_mesh_array;
|
||||
private static bool SUN_slice_accum;
|
||||
private static bool SUN_triangle_list;
|
||||
private static bool SUN_vertex;
|
||||
private static bool SUNX_constant_data;
|
||||
private static bool WIN_phong_shading;
|
||||
private static bool WIN_specular_fog;
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,114 @@
|
||||
// -----------------------------------------------------------------------------
|
||||
// file="glRenderObjectGenrator"
|
||||
// Project: StgSharp
|
||||
// Copyright (c) Nitload.
|
||||
// SPDX-License-Identifier: MIT
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
using System;
|
||||
using System.Collections.Concurrent;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Nitload.Graphics.OpenGL
|
||||
{
|
||||
public partial class glRender
|
||||
{
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
protected AutoTextureGL CreateAutoTexture(
|
||||
int count
|
||||
)
|
||||
{
|
||||
return new AutoTextureGL(count, this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Create a set of <see cref="ElementBuffer" />.
|
||||
/// </summary>
|
||||
/// <param _label="count">
|
||||
/// Amount of EBO to be created.
|
||||
/// </param>
|
||||
/// <returns>
|
||||
///
|
||||
/// </returns>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
protected ElementBuffer CreateElementBuffer(
|
||||
int count
|
||||
)
|
||||
{
|
||||
return new ElementBuffer(count, this);
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
protected FrameBuffer CreateFrameBuffer(
|
||||
int count
|
||||
)
|
||||
{
|
||||
return new FrameBuffer(count, this);
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
protected RenderBuffer CreateRenderBuffer(
|
||||
int count
|
||||
)
|
||||
{
|
||||
return new RenderBuffer(count, this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Create a sets of <see cref="TextureGL" />
|
||||
/// </summary>
|
||||
/// <param _label="count">
|
||||
/// Amount of textures to be created.
|
||||
/// </param>
|
||||
/// <returns>
|
||||
///
|
||||
/// </returns>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
protected TextureGL CreateTexture(
|
||||
int count
|
||||
)
|
||||
{
|
||||
return new TextureGL(count, this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Create a set of <see cref="VertexArray" />.
|
||||
/// </summary>
|
||||
/// <param _label="count">
|
||||
/// Amount of VAO to be created.
|
||||
/// </param>
|
||||
/// <returns>
|
||||
///
|
||||
/// </returns>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
protected VertexArray CreateVertexArray(
|
||||
int count
|
||||
)
|
||||
{
|
||||
return new VertexArray(count, this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Create a set of <see cref="VertexBuffer" />.
|
||||
/// </summary>
|
||||
/// <param _label="count">
|
||||
/// Amount of Object to be created.
|
||||
/// </param>
|
||||
/// <returns>
|
||||
///
|
||||
/// </returns>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
protected VertexBuffer CreateVertexBuffer(
|
||||
int count
|
||||
)
|
||||
{
|
||||
return new VertexBuffer(count, this);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
// -----------------------------------------------------------------------------
|
||||
// file="glRenderStream.ThreadSecurity"
|
||||
// Project: StgSharp
|
||||
// Copyright (c) Nitload.
|
||||
// SPDX-License-Identifier: MIT
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
using System;
|
||||
using System.Collections.Concurrent;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Nitload.Graphics.OpenGL
|
||||
{
|
||||
public partial class glRender
|
||||
{
|
||||
|
||||
private static ConcurrentDictionary<Thread, glRender> threadLocalIndex
|
||||
= new();
|
||||
private readonly SynchronizationContext mainThreadContext = SynchronizationContext.Current;
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,91 @@
|
||||
// -----------------------------------------------------------------------------
|
||||
// file="glType"
|
||||
// Project: StgSharp
|
||||
// Copyright (c) Nitload.
|
||||
// SPDX-License-Identifier: MIT
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
|
||||
namespace Nitload.Graphics.OpenGL
|
||||
{
|
||||
internal delegate void GLVULKANPROCNV();
|
||||
|
||||
public unsafe struct glHandleARB(
|
||||
IntPtr value
|
||||
) { }
|
||||
|
||||
/// <summary>
|
||||
/// OpenGL numeric type. An IEEE-754 floating-point value, clamped to the range [0,1].
|
||||
/// </summary>
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public struct GlClampF
|
||||
{
|
||||
|
||||
public float value;
|
||||
|
||||
public GlClampF(
|
||||
float a
|
||||
)
|
||||
{
|
||||
value = a;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Explicit, Size = 16)]
|
||||
public struct glHalfNv(
|
||||
Half bin
|
||||
)
|
||||
{
|
||||
|
||||
[FieldOffset(0)] public Half binary = bin;
|
||||
|
||||
public float ToSingle()
|
||||
{
|
||||
return (float)binary;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public struct glSync
|
||||
{
|
||||
|
||||
public IntPtr Handle;
|
||||
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Explicit, Size = 8)]
|
||||
public struct GlFixed
|
||||
{
|
||||
|
||||
[FieldOffset(0)] public int All;
|
||||
[FieldOffset(0)] public short Decimals;
|
||||
[FieldOffset(4)] public short Integer;
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// OpenGL numeric type. An IEEE-754 double precision floating-point value, clamped to the
|
||||
/// range [0,1].
|
||||
/// </summary>
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public struct GlClampD
|
||||
{
|
||||
|
||||
public double value;
|
||||
|
||||
public GlClampD(
|
||||
double a
|
||||
)
|
||||
{
|
||||
value = a;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,92 @@
|
||||
// -----------------------------------------------------------------------------
|
||||
// file="Pixels"
|
||||
// Project: StgSharp
|
||||
// Copyright (c) Nitload.
|
||||
// SPDX-License-Identifier: MIT
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
|
||||
namespace Nitload.Graphics
|
||||
{
|
||||
public interface IPixel
|
||||
{
|
||||
|
||||
public float Red { get; set; }
|
||||
|
||||
public float Green { get; set; }
|
||||
|
||||
public float Blue { get; set; }
|
||||
|
||||
public float Alpha { get; set; }
|
||||
|
||||
internal int Size { get; }
|
||||
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Explicit, Size = 32)]
|
||||
public unsafe struct Pixel32RGBA : IPixel
|
||||
{
|
||||
|
||||
[FieldOffset(0)] private unsafe fixed byte data[4];
|
||||
[FieldOffset(0)] private readonly int mask;
|
||||
|
||||
public readonly int Size => 4;
|
||||
|
||||
public override bool Equals(
|
||||
object obj
|
||||
)
|
||||
{
|
||||
return obj is not null && obj is Pixel32RGBA pixel && this == pixel;
|
||||
}
|
||||
|
||||
public override readonly int GetHashCode()
|
||||
{
|
||||
return mask.GetHashCode();
|
||||
}
|
||||
|
||||
public static bool operator !=(
|
||||
Pixel32RGBA left,
|
||||
Pixel32RGBA right
|
||||
)
|
||||
{
|
||||
return !(left == right);
|
||||
}
|
||||
|
||||
public static bool operator ==(
|
||||
Pixel32RGBA left,
|
||||
Pixel32RGBA right
|
||||
)
|
||||
{
|
||||
return left.mask == right.mask;
|
||||
}
|
||||
|
||||
float IPixel.Alpha
|
||||
{
|
||||
get => data[3] / 256;
|
||||
set => data[3] = (byte)(value * 256);
|
||||
}
|
||||
|
||||
float IPixel.Blue
|
||||
{
|
||||
get => data[2] / 256;
|
||||
set => data[2] = (byte)(value * 256);
|
||||
}
|
||||
|
||||
float IPixel.Green
|
||||
{
|
||||
get => data[1] / 256;
|
||||
set => data[1] = (byte)(value * 256);
|
||||
}
|
||||
|
||||
float IPixel.Red
|
||||
{
|
||||
get => data[0] / 256;
|
||||
set => data[0] = (byte)(value * 256);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
# StgSharp.Graphics retired sources
|
||||
|
||||
This directory contains source snapshots retired during the Graphics/OpenGL
|
||||
reorganization on 2026-08-26. Files use the `.cs.old` suffix so that SDK-style
|
||||
project globbing does not compile them.
|
||||
|
||||
## Retired without an active replacement
|
||||
|
||||
- `framework.cs.old`: unused GL/debug delegate declarations.
|
||||
- `Vulkan.*.cs.old`: unreferenced Vulkan placeholders.
|
||||
- `OpenGL.glRenderStream.ThreadSecurity.cs.old`: unused thread/context fields.
|
||||
- `OpenGL.Generated.GlCommandHistory.g.cs.old`: generator report data that does
|
||||
not belong in the runtime assembly.
|
||||
|
||||
## Split before retirement
|
||||
|
||||
- `gl.cs.old`: image P/Invokes were temporarily split out and later retired;
|
||||
legacy OpenGL native helpers were replaced with direct calls through the
|
||||
OpenGL function table.
|
||||
- `glfw.dtruct.cs.old`: reduced to the four opaque GLFW types currently used by
|
||||
the wrapper in `glfw.struct.cs`.
|
||||
- `OpenGL.glType.cs.old`: only `glSync` remains active in `OpenGL/glSync.cs`.
|
||||
- `ShaderEdit.ShaderGenerator.cs.old`: only the temporary
|
||||
`InternalShaderType` compatibility enum remains active.
|
||||
- `GraphicInitializer.cs.old`: merged into the correctly named `GraphicModule`
|
||||
in `glfw.cs`.
|
||||
- `OpenGL.glApiManager.cs.old` and `OpenGL.glApiManager.Const.cs.old`: the active
|
||||
compatibility loader retains only core-version loading; the unused extension
|
||||
classification table and 619 write-only flags were retired.
|
||||
|
||||
## Retired during the image simplification
|
||||
|
||||
- `Image.cs.old`: the former image/decoder/OpenGL-format aggregate.
|
||||
- `ImageInfo.cs.old` and `Image.Native.cs.old`: the mismatched native decoder
|
||||
state and its P/Invoke bridge.
|
||||
- `Pixels.cs.old`: the unused and incorrectly sized legacy pixel abstraction.
|
||||
- `CPUanimation.ImageHelper.cs.old`: incomplete resizing and movement logic;
|
||||
image transformations now belong to a caller-selected codec or image library.
|
||||
- `CPUanimation.IImageProvider.cs.old`: the redundant image-returns-itself
|
||||
provider contract.
|
||||
- `TexturePipeline.cs.old`: an unused pipeline payload tied to the retired
|
||||
non-generic image type.
|
||||
- `OpenGL.Buffer.AutoTexture.cs.old`: the unused texture cache depended on image
|
||||
mutation counters and also contained incorrect slot/recycling bookkeeping.
|
||||
|
||||
## Retired during the data-only OpenGL resource migration
|
||||
|
||||
- `Define.BufferObjectBase.cs.old` and
|
||||
`OpenGL.Buffer.GLBufferObjectBase.cs.old`: the former resource base classes
|
||||
injected `glRender`/`OpenGLFunction` and attempted context-bound disposal from
|
||||
resource objects and finalizers.
|
||||
- `OpenGL.glRenderObjectGenrator.cs.old`: the former factories implicitly
|
||||
created resources through a render-stream instance.
|
||||
- `OpenGL.ShaderEdit.IglConvertable.cs.old`, `ShaderEdit.ShaderStruct.cs.old`,
|
||||
and `ShaderEdit.InternalShaderType.cs.old`: the obsolete shader conversion
|
||||
layer submitted uniforms through the global `CurrentGL` context.
|
||||
|
||||
Active OpenGL resource and shader types are passive handle records. Creation,
|
||||
binding, upload, compilation, use, and deletion are explicitly submitted to an
|
||||
`OpenGLFunction` instance.
|
||||
|
||||
The active `Image<TPixel>` is only a tightly packed managed bitmap buffer. It
|
||||
does not load files, convert formats, resize pixels, or retain native memory.
|
||||
|
||||
These files are historical references, not candidates for restoration as a
|
||||
group. Restore individual behavior only after checking it against the new
|
||||
Graphics and OpenGL architecture.
|
||||
@@ -0,0 +1,37 @@
|
||||
// -----------------------------------------------------------------------------
|
||||
// file="InternalShaderType"
|
||||
// Project: StgSharp
|
||||
// Copyright (c) Nitload.
|
||||
// SPDX-License-Identifier: MIT
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
namespace Nitload.Graphics.ShaderEdit
|
||||
{
|
||||
// Temporary compatibility type for ShaderStruct. The new shader model will replace it.
|
||||
public enum InternalShaderType
|
||||
{
|
||||
#pragma warning disable CS1591
|
||||
Struct,
|
||||
Void,
|
||||
Int,
|
||||
UInt,
|
||||
Float,
|
||||
Double,
|
||||
Vector2,
|
||||
Vector3,
|
||||
Vector4,
|
||||
VectorD2,
|
||||
VectorD3,
|
||||
VectorD4,
|
||||
Matrix2x2,
|
||||
Matrix2x3,
|
||||
Matrix2x4,
|
||||
Matrix3x2,
|
||||
Matrix3x3,
|
||||
Matrix3x4,
|
||||
Matrix4x2,
|
||||
Matrix4x3,
|
||||
Matrix4x4,
|
||||
#pragma warning restore CS1591
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,196 @@
|
||||
// -----------------------------------------------------------------------------
|
||||
// file="ShaderGenerator"
|
||||
// Project: StgSharp
|
||||
// Copyright (c) Nitload.
|
||||
// SPDX-License-Identifier: MIT
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
using Nitload.Graphics;
|
||||
using Nitload.Graphics.OpenGL;
|
||||
using Nitload.Mathematics;
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Nitload.Graphics.ShaderEdit
|
||||
{
|
||||
public class ShaderGenerator
|
||||
{
|
||||
|
||||
private Dictionary<int, ShaderParameter> uniformDefine;
|
||||
private List<string> codeList;
|
||||
private List<ShaderFunction> usedShaderFunctions;
|
||||
|
||||
public Uniform<T> DefineUniform<T>(
|
||||
string name,
|
||||
int index
|
||||
) where T : unmanaged
|
||||
{
|
||||
ShaderParameter p = new ShaderParameter(name, ShaderParameter.TypeMarshal<T>());
|
||||
uniformDefine.Add(index, p);
|
||||
|
||||
// return new Uniform<TView>();
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public class ShaderFunction
|
||||
{
|
||||
|
||||
private List<string> codeList;
|
||||
private List<ShaderParameter> inputList;
|
||||
private ShaderParameter outPut;
|
||||
private string name;
|
||||
|
||||
public int ParameterCount => inputList.Count;
|
||||
|
||||
public void EmitCall(
|
||||
ShaderFunction function,
|
||||
ShaderParameter outPut,
|
||||
params ShaderParameter[] inputParams
|
||||
)
|
||||
{
|
||||
if (inputParams.Length != function.ParameterCount)
|
||||
{
|
||||
// Param list length not equal
|
||||
throw new ArgumentException(
|
||||
"Provided parameters does not match function's parameter list.");
|
||||
}
|
||||
if (!ShaderParameter.IsSameType(outPut, function.outPut))
|
||||
{
|
||||
// Type of returning value not equal
|
||||
throw new ArgumentException(
|
||||
"Provided parameters does not match function's parameter list.");
|
||||
}
|
||||
for (int i = 0; i < inputParams.Length; i++)
|
||||
{
|
||||
if (!ShaderParameter.IsSameType(function.inputList[i], inputParams[i]))
|
||||
{
|
||||
// Input type not match
|
||||
throw new InvalidCastException(
|
||||
"Provided parameters does not match function's parameter list.");
|
||||
}
|
||||
}
|
||||
string codeLine = string.Empty; // adding a line like " outvalue = Func(input1, input2,...); "
|
||||
if (outPut != ShaderParameter.Void) {
|
||||
codeLine += $"{outPut.name} = ";
|
||||
}
|
||||
codeLine += $"{function.name}(";
|
||||
foreach (ShaderParameter inputParam in inputParams) {
|
||||
codeLine += inputParam.name;
|
||||
}
|
||||
codeLine += ");\n";
|
||||
codeList.Add(codeLine);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public class ShaderParameter
|
||||
{
|
||||
|
||||
public static readonly ShaderParameter Void = new ShaderParameter(
|
||||
string.Empty, InternalShaderType.Void);
|
||||
internal readonly bool isReadOnly;
|
||||
internal readonly InternalShaderType type;
|
||||
internal readonly string name;
|
||||
|
||||
public ShaderParameter(
|
||||
string name,
|
||||
InternalShaderType type
|
||||
)
|
||||
{
|
||||
this.name = name;
|
||||
this.type = type;
|
||||
isReadOnly = false;
|
||||
}
|
||||
|
||||
public static bool IsSameType(
|
||||
ShaderParameter param1,
|
||||
ShaderParameter param2
|
||||
)
|
||||
{
|
||||
if (param1.type != InternalShaderType.Struct)
|
||||
{
|
||||
return param1.type == param2.type;
|
||||
} else
|
||||
{
|
||||
throw new Exception("Struct is currently not supported.");
|
||||
}
|
||||
}
|
||||
|
||||
public static InternalShaderType TypeMarshal<T>() where T : unmanaged
|
||||
{
|
||||
switch (Type.GetTypeCode(typeof(T)))
|
||||
{
|
||||
case TypeCode.Single:
|
||||
return InternalShaderType.Float;
|
||||
case TypeCode.Double:
|
||||
return InternalShaderType.Double;
|
||||
case TypeCode.Int32:
|
||||
return InternalShaderType.Int;
|
||||
case TypeCode.UInt32:
|
||||
return InternalShaderType.UInt;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
switch (typeof(T).Name)
|
||||
{
|
||||
case "vec4d":
|
||||
return InternalShaderType.Vector4;
|
||||
case "Matrix2x2":
|
||||
return InternalShaderType.Matrix2x2;
|
||||
case "Matrix2x3":
|
||||
return InternalShaderType.Matrix2x3;
|
||||
case "Matrix2x4":
|
||||
return InternalShaderType.Matrix2x4;
|
||||
case "Matrix3x2":
|
||||
return InternalShaderType.Matrix3x2;
|
||||
case "Matrix3x3":
|
||||
return InternalShaderType.Matrix3x3;
|
||||
case "Matrix3x4":
|
||||
return InternalShaderType.Matrix3x4;
|
||||
case "Matrix4x2":
|
||||
return InternalShaderType.Matrix4x2;
|
||||
case "Matrix4x3":
|
||||
return InternalShaderType.Matrix4x3;
|
||||
case "Matrix4x4":
|
||||
return InternalShaderType.Matrix4x4;
|
||||
default:
|
||||
throw new ArgumentException("Not supported shader data type.");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public enum InternalShaderType
|
||||
{
|
||||
#pragma warning disable CS1591
|
||||
Struct,
|
||||
Void,
|
||||
Int,
|
||||
UInt,
|
||||
Float,
|
||||
Double,
|
||||
Vector2,
|
||||
Vector3,
|
||||
Vector4,
|
||||
VectorD2,
|
||||
VectorD3,
|
||||
VectorD4,
|
||||
Matrix2x2,
|
||||
Matrix2x3,
|
||||
Matrix2x4,
|
||||
Matrix3x2,
|
||||
Matrix3x3,
|
||||
Matrix3x4,
|
||||
Matrix4x2,
|
||||
Matrix4x3,
|
||||
Matrix4x4,
|
||||
#pragma warning restore CS1591
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,78 @@
|
||||
// -----------------------------------------------------------------------------
|
||||
// file="ShaderStruct"
|
||||
// Project: StgSharp
|
||||
// Copyright (c) Nitload.
|
||||
// SPDX-License-Identifier: MIT
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
using Nitload.Graphics;
|
||||
using Nitload.Graphics.OpenGL;
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Nitload.Graphics.ShaderEdit
|
||||
{
|
||||
public class ShaderStructMember
|
||||
{
|
||||
|
||||
internal InternalShaderType type;
|
||||
internal object value;
|
||||
|
||||
}
|
||||
|
||||
public class ShaderStruct
|
||||
{
|
||||
|
||||
internal Dictionary<GlHandle, ShaderStructMember> uniformPair;
|
||||
|
||||
internal ShaderStruct() { }
|
||||
|
||||
public ShaderStruct(
|
||||
params (GlHandle, ShaderStructMember)[] uniformPairs
|
||||
)
|
||||
{
|
||||
uniformPair = new Dictionary<GlHandle, ShaderStructMember>();
|
||||
if (uniformPairs.Length == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
foreach ((GlHandle, ShaderStructMember) item in uniformPairs) {
|
||||
uniformPair.Add(item.Item1, item.Item2);
|
||||
}
|
||||
}
|
||||
|
||||
public unsafe void SetAllUniforms()
|
||||
{
|
||||
OpenglContext* gl = (OpenglContext*)OpenGL.OpenGLFunction.CurrentGL.ContextHandle;
|
||||
foreach (KeyValuePair<GlHandle, ShaderStructMember> uniform in uniformPair)
|
||||
{
|
||||
int id = uniform.Key.SignedValue;
|
||||
ShaderStructMember s = uniform.Value;
|
||||
switch (s.type)
|
||||
{
|
||||
case InternalShaderType.Struct:
|
||||
throw new ArgumentException(
|
||||
"Incorrect type \"Struct\" defined in this self define type");
|
||||
case InternalShaderType.Void:
|
||||
throw new ArgumentException(
|
||||
"Incorrect type \"Void\" defined in this self define type");
|
||||
case InternalShaderType.Float:
|
||||
gl->glUniform1f(id, (float)s.value);
|
||||
break;
|
||||
case InternalShaderType.Int:
|
||||
gl->glUniform1f(id, (int)s.value);
|
||||
break;
|
||||
default:
|
||||
throw new NotImplementedException();
|
||||
throw new ArgumentException(
|
||||
"Incorrect type \"Unknown\" defined in this self define type");
|
||||
}
|
||||
}
|
||||
}//------------------------------------ End of Class ---------------------------------------
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
// -----------------------------------------------------------------------------
|
||||
// file="TexturePipeline"
|
||||
// Project: StgSharp
|
||||
// Copyright (c) Nitload.
|
||||
// SPDX-License-Identifier: MIT
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
using Nitload.Common.PipeLine;
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Nitload.Graphics
|
||||
{
|
||||
public class TexturePipeline : IPipeLineConnectionPayload
|
||||
{
|
||||
|
||||
private Image _value;
|
||||
|
||||
public TexturePipeline(
|
||||
Image i
|
||||
)
|
||||
{
|
||||
_value = i;
|
||||
}
|
||||
|
||||
public object? ValueDefault => null;
|
||||
|
||||
public object Value
|
||||
{
|
||||
get => _value;
|
||||
set
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(value);
|
||||
if (value is not Image image) {
|
||||
throw new ArgumentException("Value must be of type Image");
|
||||
}
|
||||
_value = image;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
// -----------------------------------------------------------------------------
|
||||
// file="vkEnum"
|
||||
// Project: StgSharp
|
||||
// Copyright (c) Nitload.
|
||||
// SPDX-License-Identifier: MIT
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace Nitload.Graphics.Vulkan
|
||||
{
|
||||
internal enum VkStructureType : uint
|
||||
{
|
||||
|
||||
VK_STRUCTURE_TYPE_XLIB_SURFACE_CREATE_INFO_KHR = 1000004000,
|
||||
VK_STRUCTURE_TYPE_XCB_SURFACE_CREATE_INFO_KHR = 1000005000,
|
||||
VK_STRUCTURE_TYPE_WAYLAND_SURFACE_CREATE_INFO_KHR = 1000006000,
|
||||
VK_STRUCTURE_TYPE_WIN32_SURFACE_CREATE_INFO_KHR = 1000009000,
|
||||
VK_STRUCTURE_TYPE_MACOS_SURFACE_CREATE_INFO_MVK = 1000123000,
|
||||
VK_STRUCTURE_TYPE_METAL_SURFACE_CREATE_INFO_EXT = 1000217000,
|
||||
VK_STRUCTURE_TYPE_MAX_ENUM = 0x7FFFFFFF
|
||||
|
||||
}
|
||||
|
||||
internal enum VkResult
|
||||
{
|
||||
|
||||
VK_SUCCESS = 0,
|
||||
VK_NOT_READY = 1,
|
||||
VK_TIMEOUT = 2,
|
||||
VK_EVENT_SET = 3,
|
||||
VK_EVENT_RESET = 4,
|
||||
VK_INCOMPLETE = 5,
|
||||
VK_ERROR_OUT_OF_HOST_MEMORY = -1,
|
||||
VK_ERROR_OUT_OF_DEVICE_MEMORY = -2,
|
||||
VK_ERROR_INITIALIZATION_FAILED = -3,
|
||||
VK_ERROR_DEVICE_LOST = -4,
|
||||
VK_ERROR_MEMORY_MAP_FAILED = -5,
|
||||
VK_ERROR_LAYER_NOT_PRESENT = -6,
|
||||
VK_ERROR_EXTENSION_NOT_PRESENT = -7,
|
||||
VK_ERROR_FEATURE_NOT_PRESENT = -8,
|
||||
VK_ERROR_INCOMPATIBLE_DRIVER = -9,
|
||||
VK_ERROR_TOO_MANY_OBJECTS = -10,
|
||||
VK_ERROR_FORMAT_NOT_SUPPORTED = -11,
|
||||
VK_ERROR_SURFACE_LOST_KHR = -1000000000,
|
||||
VK_SUBOPTIMAL_KHR = 1000001003,
|
||||
VK_ERROR_OUT_OF_DATE_KHR = -1000001004,
|
||||
VK_ERROR_INCOMPATIBLE_DISPLAY_KHR = -1000003001,
|
||||
VK_ERROR_NATIVE_WINDOW_IN_USE_KHR = -1000000001,
|
||||
VK_ERROR_VALIDATION_FAILED_EXT = -1000011001,
|
||||
VK_RESULT_MAX_ENUM = 0x7FFFFFFF
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
// -----------------------------------------------------------------------------
|
||||
// file="vkHandle"
|
||||
// Project: StgSharp
|
||||
// Copyright (c) Nitload.
|
||||
// SPDX-License-Identifier: MIT
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Security;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Nitload.Graphics.Vulkan
|
||||
{
|
||||
[StructLayout(LayoutKind.Explicit, Size = 8)]
|
||||
public struct vkHandle
|
||||
{
|
||||
|
||||
[FieldOffset(0)] public int SignedHalfValue;
|
||||
[FieldOffset(0)] public IntPtr Handle;
|
||||
[FieldOffset(0)] public IntPtr UnsignedHandle;
|
||||
[FieldOffset(0)] public uint HalfValue;
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,89 @@
|
||||
// -----------------------------------------------------------------------------
|
||||
// file="framework"
|
||||
// Project: StgSharp
|
||||
// Copyright (c) Nitload.
|
||||
// SPDX-License-Identifier: MIT
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
#if Windows
|
||||
// using Windows.Win32;
|
||||
#endif
|
||||
|
||||
namespace Nitload.Graphics
|
||||
{
|
||||
/// <summary>
|
||||
/// Function handler to load an opengl function by searching its _label.
|
||||
/// </summary>
|
||||
/// <param _label="name">
|
||||
/// the _label of the Opengl function
|
||||
/// </param>
|
||||
/// <returns>
|
||||
/// An Intptr value representing the pointer to the function
|
||||
/// </returns>
|
||||
public delegate IntPtr glLoader(
|
||||
string name
|
||||
);
|
||||
|
||||
#region StgSharpDele
|
||||
|
||||
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
|
||||
public unsafe delegate void FrameBufferSizeHandler(
|
||||
IntPtr window,
|
||||
int width,
|
||||
int height
|
||||
);
|
||||
|
||||
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
|
||||
public unsafe delegate void FramePositionHandler(
|
||||
IntPtr window,
|
||||
float width,
|
||||
float height
|
||||
);
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region glDEBUG
|
||||
|
||||
internal unsafe delegate void GLDEBUGPROC(
|
||||
int source,
|
||||
int type,
|
||||
uint id,
|
||||
int severity,
|
||||
int length,
|
||||
sbyte* message,
|
||||
void* userParam
|
||||
);
|
||||
internal unsafe delegate void GLDEBUGPROCARB(
|
||||
int source,
|
||||
int type,
|
||||
uint id,
|
||||
int severity,
|
||||
int length,
|
||||
sbyte* message,
|
||||
void* userParam
|
||||
);
|
||||
internal unsafe delegate void GLDEBUGPROCKHR(
|
||||
int source,
|
||||
int type,
|
||||
uint id,
|
||||
int severity,
|
||||
int length,
|
||||
sbyte* message,
|
||||
void* userParam
|
||||
);
|
||||
internal unsafe delegate void GLDEBUGPROCAMD(
|
||||
uint id,
|
||||
int category,
|
||||
int severity,
|
||||
int length,
|
||||
sbyte* message,
|
||||
void* userParam
|
||||
);
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
@@ -0,0 +1,94 @@
|
||||
// -----------------------------------------------------------------------------
|
||||
// file="gl"
|
||||
// Project: StgSharp
|
||||
// Copyright (c) Nitload.
|
||||
// SPDX-License-Identifier: MIT
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
using Nitload.Graphics;
|
||||
using Nitload.Graphics.OpenGL;
|
||||
using Nitload.Common.Internal;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Nitload.Graphics
|
||||
{
|
||||
internal static partial class GraphicFramework
|
||||
{
|
||||
|
||||
internal static uint[] GLtype = new uint[16];
|
||||
|
||||
static GraphicFramework()
|
||||
{
|
||||
GLtype[(int)TypeCode.Single] = glConst.FLOAT;
|
||||
GLtype[(int)TypeCode.Int32] = glConst.INT;
|
||||
GLtype[(int)TypeCode.UInt32] = glConst.UNSIGNED_INT;
|
||||
GLtype[(int)TypeCode.Int16] = glConst.SHORT;
|
||||
GLtype[(int)TypeCode.UInt16] = glConst.UNSIGNED_SHORT;
|
||||
GLtype[(int)TypeCode.SByte] = glConst.BYTE;
|
||||
GLtype[(int)TypeCode.Byte] = glConst.UNSIGNED_BYTE;
|
||||
}
|
||||
|
||||
[LibraryImport(Native.LibName, EntryPoint = "glCheckShaderStat")]
|
||||
[UnmanagedCallConv(CallConvs = [typeof(CallConvCdecl)])]
|
||||
#pragma warning disable CA5392
|
||||
internal static partial int glCheckShaderStatus(
|
||||
ref OpenglContext context,
|
||||
uint shaderHandle,
|
||||
int key,
|
||||
ref IntPtr logPtr
|
||||
);
|
||||
#pragma warning restore CA5392
|
||||
|
||||
|
||||
#region ssgc api define
|
||||
|
||||
[LibraryImport(Native.LibName, EntryPoint = "initGL")]
|
||||
[UnmanagedCallConv(CallConvs =[typeof(CallConvCdecl)])]
|
||||
internal static partial void InternalInitGL(
|
||||
int majorVersion,
|
||||
int minorVersion
|
||||
);
|
||||
|
||||
[LibraryImport(
|
||||
Native.LibName,
|
||||
EntryPoint = "loadGlfuncDefault",
|
||||
StringMarshalling = StringMarshalling.Utf8)]
|
||||
[UnmanagedCallConv(CallConvs =[typeof(CallConvCdecl)])]
|
||||
internal static partial IntPtr InternalLoadGlFuncDefault(
|
||||
string name
|
||||
);
|
||||
|
||||
[LibraryImport(Native.LibName, EntryPoint = "linkShaderProgram")]
|
||||
[UnmanagedCallConv(CallConvs =[typeof(CallConvCdecl)])]
|
||||
internal static unsafe partial uint InternalLinkShaderProgram(
|
||||
OpenglContext* context,
|
||||
uint shaderProgram
|
||||
);
|
||||
|
||||
[LibraryImport(Native.LibName, EntryPoint = "readLog")]
|
||||
[UnmanagedCallConv(CallConvs =[typeof(CallConvCdecl)])]
|
||||
internal static unsafe partial IntPtr InternalReadSSCLog();
|
||||
|
||||
[LibraryImport(
|
||||
Native.LibName,
|
||||
EntryPoint = "loadImageData",
|
||||
StringMarshalling = StringMarshalling.Utf8)]
|
||||
[UnmanagedCallConv(CallConvs =[typeof(CallConvCdecl)])]
|
||||
internal static unsafe partial void InternalLoadImage(
|
||||
string fileName,
|
||||
ImageInfo* output,
|
||||
ImageLoader loader
|
||||
);
|
||||
|
||||
[LibraryImport(Native.LibName, EntryPoint = "unloadImageData")]
|
||||
[UnmanagedCallConv(CallConvs =[typeof(CallConvCdecl)])]
|
||||
internal static unsafe partial void InternalUnloadImage(
|
||||
ImageInfo* output
|
||||
);
|
||||
|
||||
#endregion ssgc api define
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,88 @@
|
||||
// -----------------------------------------------------------------------------
|
||||
// file="glfw.dtruct"
|
||||
// Project: StgSharp
|
||||
// Copyright (c) Nitload.
|
||||
// SPDX-License-Identifier: MIT
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
using Nitload.Graphics;
|
||||
using Nitload.Graphics.OpenGL;
|
||||
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
/**/
|
||||
|
||||
namespace Nitload.Common.Internal
|
||||
{
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public unsafe struct glfwContext { }
|
||||
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public unsafe struct glfwVideomode { }
|
||||
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public unsafe struct glfwGammaramp { }
|
||||
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public unsafe struct GLFWimage { }
|
||||
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public unsafe struct GLFWgamepadstate { }
|
||||
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public unsafe struct GLFWallocator { }
|
||||
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public unsafe struct glfwMonitor { }
|
||||
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
internal unsafe struct glfwWindow { }
|
||||
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public struct GLFWwindowCallback { }
|
||||
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public struct GLFWcursor { }
|
||||
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public unsafe struct GLFWinitconfig { }
|
||||
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public unsafe struct GLFWwndconfig { }
|
||||
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public unsafe struct GLFWctxconfig { }
|
||||
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public unsafe struct GLFWfbconfig { }
|
||||
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
internal unsafe struct GLFWlibrary { }
|
||||
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public unsafe struct GLFWmapelement { }
|
||||
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public unsafe struct GLFWmapping { }
|
||||
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public unsafe struct GLFWjoystick { }
|
||||
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public unsafe struct GLFWls { }
|
||||
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public unsafe struct GLFWplatform { }
|
||||
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public unsafe struct GLFWmutex { }
|
||||
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
internal unsafe struct VkExtensionProperties { }
|
||||
|
||||
[StructLayout(LayoutKind.Explicit, Size = 16)]
|
||||
public struct uintptr_t { }
|
||||
}
|
||||
|
||||
/**/
|
||||
@@ -0,0 +1,268 @@
|
||||
// -----------------------------------------------------------------------------
|
||||
// file="Camera"
|
||||
// Project: StgSharp
|
||||
// Copyright (c) Nitload.
|
||||
// SPDX-License-Identifier: MIT
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
using Nitload.Mathematics.Numeric.Graphics;
|
||||
using System;
|
||||
using System.Numerics;
|
||||
|
||||
namespace Nitload.Mathematics.Numeric.Graphics
|
||||
{
|
||||
public sealed class Camera
|
||||
{
|
||||
|
||||
private bool _isLookAtAvailable;
|
||||
internal GraphicsMatrix _lookAt;
|
||||
internal GraphicsMatrix _projection;
|
||||
internal GraphicsMatrix cameraAtt;
|
||||
internal GraphicsMatrix rotation;
|
||||
internal GraphicsMatrix rotationAtt;
|
||||
internal Radius _pitch;
|
||||
internal Radius _row;
|
||||
internal Radius _yaw;
|
||||
internal Vec3<float> _target, up;
|
||||
|
||||
public Camera()
|
||||
{
|
||||
cameraAtt = GraphicsMatrix.Unit;
|
||||
_target = Vec3<float>.Zero;
|
||||
up = Vec3<float>.Zero;
|
||||
_isLookAtAvailable = false;
|
||||
_lookAt = GraphicsMatrix.Unit;
|
||||
rotationAtt = GraphicsMatrix.Unit;
|
||||
_projection = new GraphicsMatrix();
|
||||
}
|
||||
|
||||
public Camera(
|
||||
Vec3<float> position,
|
||||
Vec3<float> target,
|
||||
Vec3<float> up
|
||||
)
|
||||
: this()
|
||||
{
|
||||
rotationAtt = GraphicsMatrix.Unit;
|
||||
cameraAtt = new GraphicsMatrix();
|
||||
SetViewDirection(position, target, up);
|
||||
_pitch = Radius.Zero;
|
||||
_row = Radius.Zero;
|
||||
_yaw = Radius.Zero;
|
||||
}
|
||||
|
||||
public GraphicsMatrix Projection => _projection;
|
||||
|
||||
public GraphicsMatrix View
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_isLookAtAvailable) {
|
||||
return _lookAt;
|
||||
}
|
||||
GraphicsMatrix move = GraphicsMatrix.Unit;
|
||||
move.column[3] -= cameraAtt.column[3];
|
||||
_lookAt = rotationAtt.Transpose * move;
|
||||
_isLookAtAvailable = true;
|
||||
return _lookAt;
|
||||
}
|
||||
}
|
||||
|
||||
public GraphicsMatrix CameraMatrix()
|
||||
{
|
||||
return Projection * View;
|
||||
}
|
||||
|
||||
public void MoveNear(
|
||||
float distance
|
||||
)
|
||||
{
|
||||
cameraAtt.column[3].Z -= distance;
|
||||
_isLookAtAvailable = false;
|
||||
}
|
||||
|
||||
public void MoveRight(
|
||||
float distance
|
||||
)
|
||||
{
|
||||
cameraAtt.column[3].X -= distance;
|
||||
_isLookAtAvailable = false;
|
||||
}
|
||||
|
||||
public void MoveUp(
|
||||
float distance
|
||||
)
|
||||
{
|
||||
cameraAtt.column[3].Y -= distance;
|
||||
_isLookAtAvailable = false;
|
||||
}
|
||||
|
||||
public void SetViewDirection(
|
||||
Vec3<float> position,
|
||||
Vec3<float> target,
|
||||
Vec3<float> up
|
||||
)
|
||||
{
|
||||
Vec3<float> direction = position - target;
|
||||
if ((position == cameraAtt.column[3].XYZ) &&
|
||||
(this.up == up) &&
|
||||
(cameraAtt.column[3].XYZ == direction)) {
|
||||
return;
|
||||
}
|
||||
if (direction.GetLength() == 0)
|
||||
{
|
||||
// deadlock
|
||||
throw new ArgumentException("Direction bust is not zero.");
|
||||
}
|
||||
if (Vec3.IsParallel(direction, up)) {
|
||||
throw new ArgumentException("Direction and UP is on on same way");
|
||||
}
|
||||
_target = direction;
|
||||
this.up = up;
|
||||
|
||||
_isLookAtAvailable = false;
|
||||
|
||||
direction.Orthogonalize(ref up);
|
||||
|
||||
Vec3<float> right = Linear.Orthogonalize(Vec3.Cross(up, direction));
|
||||
|
||||
cameraAtt.column[0].XYZ = right;
|
||||
cameraAtt.column[1].XYZ = up;
|
||||
cameraAtt.column[2].XYZ = direction;
|
||||
cameraAtt.column[3].XYZ = position;
|
||||
|
||||
InternalPitch();
|
||||
InternalRow();
|
||||
InternalYaw();
|
||||
}
|
||||
|
||||
public void SetViewRange(
|
||||
Radius fovRadius,
|
||||
Vec2<float> size,
|
||||
Vec2<float> offset,
|
||||
(float front, float back) depthRange
|
||||
)
|
||||
{
|
||||
float
|
||||
distance = _target.GetLength(),
|
||||
near = distance - depthRange.front,
|
||||
far = distance + depthRange.back,
|
||||
offsetX = offset.X,
|
||||
offsetY = offset.Y,
|
||||
width = MathF.Abs(GeometryScaler.Tan(fovRadius / 2) * near * 2),
|
||||
height = (width * size.Y) / size.X;
|
||||
|
||||
_projection.column[0].X = (2 * near) / width;
|
||||
_projection.column[1].Y = (2 * near) / height;
|
||||
_projection.column[2].X = (2 * offsetX) / width;
|
||||
_projection.column[2].Y = (2 * offsetY) / height;
|
||||
_projection.column[2].Z = (far + near) / (near - far);
|
||||
_projection.column[2].W = -1;
|
||||
_projection.column[3].Z = (2 * near * far) / (near - far);
|
||||
}
|
||||
|
||||
public void Test(
|
||||
params Vec4<float>[] vec
|
||||
)
|
||||
{
|
||||
Console.WriteLine(View);
|
||||
Console.WriteLine(Projection);
|
||||
Console.WriteLine(Projection * View);
|
||||
Console.WriteLine(View);
|
||||
foreach (Vec4<float> item in vec)
|
||||
{
|
||||
// Console.Write($"{Projection * View * item};");
|
||||
}
|
||||
}
|
||||
|
||||
#region rotation
|
||||
|
||||
public void Yaw(
|
||||
Radius r
|
||||
)
|
||||
{
|
||||
_yaw -= r;
|
||||
|
||||
// Console.WriteLine(_yaw._radius);
|
||||
// Console.WriteLine(rotationAtt);
|
||||
InternalYaw();
|
||||
}
|
||||
|
||||
public void Pitch(
|
||||
Radius r
|
||||
)
|
||||
{
|
||||
_pitch -= r;
|
||||
|
||||
// Console.WriteLine(_pitch._radius);
|
||||
// Console.WriteLine(rotationAtt);
|
||||
InternalPitch();
|
||||
}
|
||||
|
||||
public void Row(
|
||||
Radius r
|
||||
)
|
||||
{
|
||||
_row -= r;
|
||||
|
||||
// Console.WriteLine(_row._radius);
|
||||
// Console.WriteLine(rotationAtt);
|
||||
InternalRow();
|
||||
}
|
||||
|
||||
internal void InternalPitch()
|
||||
{
|
||||
/*
|
||||
_isLookAtAvailable = false;
|
||||
|
||||
Matrix32 partialCoord = new Matrix32(cameraAtt.colum1.vec, cameraAtt.colum2.vec);
|
||||
float angle = _pitch._radius;
|
||||
|
||||
Matrix22 rotation = new Matrix22(
|
||||
Scaler.Cos(angle), -Scaler.Sin(angle), Scaler.Sin(angle), Scaler.Cos(angle));
|
||||
|
||||
partialCoord *= rotation;
|
||||
rotationAtt.colum1.reg = partialCoord.colum0.reg;
|
||||
rotationAtt.colum2.reg = partialCoord.colum1.reg;
|
||||
rotationAtt.isTransposed = false;
|
||||
/**/
|
||||
}
|
||||
|
||||
internal void InternalRow()
|
||||
{
|
||||
/*
|
||||
_isLookAtAvailable = false;
|
||||
|
||||
Matrix32 partialCoord = new Matrix32(cameraAtt.colum0.vec, cameraAtt.colum1.vec);
|
||||
float angle = _row._radius;
|
||||
|
||||
Matrix22 rotation = new Matrix22(
|
||||
Scaler.Cos(angle), -Scaler.Sin(angle), Scaler.Sin(angle), Scaler.Cos(angle));
|
||||
|
||||
partialCoord *= rotation;
|
||||
rotationAtt.colum0.reg = partialCoord.colum0.reg;
|
||||
rotationAtt.colum1.reg = partialCoord.colum1.reg;
|
||||
rotationAtt.isTransposed = false;
|
||||
*/
|
||||
}
|
||||
|
||||
internal void InternalYaw()
|
||||
{
|
||||
/*
|
||||
_isLookAtAvailable = false;
|
||||
|
||||
Matrix32 partialCoord = new Matrix32(cameraAtt.colum0.vec, cameraAtt.colum2.vec);
|
||||
float angle = _yaw._radius;
|
||||
Matrix22 rotation = new Matrix22(
|
||||
Scaler.Cos(angle), -Scaler.Sin(angle), Scaler.Sin(angle), Scaler.Cos(angle));
|
||||
|
||||
partialCoord *= rotation;
|
||||
rotationAtt.colum0.reg = partialCoord.colum0.reg;
|
||||
rotationAtt.colum2.reg = partialCoord.colum1.reg;
|
||||
rotationAtt.isTransposed = false;
|
||||
*/
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
// -----------------------------------------------------------------------------
|
||||
// file="Monitor"
|
||||
// Project: StgSharp
|
||||
// Copyright (c) Nitload.
|
||||
// SPDX-License-Identifier: MIT
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Nitload.Graphics
|
||||
{
|
||||
public static class GraphicsEnvironment
|
||||
{
|
||||
|
||||
private static IntPtr[] _monitorsHandleArray;
|
||||
|
||||
public static unsafe ReadOnlySpan<IntPtr> MonitorsHandleArray
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_monitorsHandleArray == null)
|
||||
{
|
||||
int count = 0;
|
||||
IntPtr* arrayHandle = GraphicFramework.glfwGetMonitors(&count);
|
||||
_monitorsHandleArray = new IntPtr[count];
|
||||
Marshal.Copy((IntPtr)arrayHandle, _monitorsHandleArray, 0, count);
|
||||
Marshal.FreeHGlobal((IntPtr)arrayHandle);
|
||||
}
|
||||
return _monitorsHandleArray;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,316 @@
|
||||
// -----------------------------------------------------------------------------
|
||||
// file="FrameworkConstant"
|
||||
// Project: StgSharp
|
||||
// Copyright (c) Nitload.
|
||||
// SPDX-License-Identifier: MIT
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Nitload.Graphics
|
||||
{
|
||||
public static class FrameworkConstant
|
||||
{
|
||||
|
||||
#region glfw
|
||||
|
||||
public const int VERSION_MAJOR = 3;
|
||||
public const int VERSION_MINOR = 3;
|
||||
public const int VERSION_REVISION = 8;
|
||||
public const int TRUE = 1;
|
||||
public const int FALSE = 0;
|
||||
public const int RELEASE = 0;
|
||||
public const int PRESS = 1;
|
||||
public const int REPEAT = 2;
|
||||
public const int HAT_CENTERED = 0;
|
||||
public const int HAT_UP = 1;
|
||||
public const int HAT_RIGHT = 2;
|
||||
public const int HAT_DOWN = 4;
|
||||
public const int HAT_LEFT = 8;
|
||||
public const int HAT_RIGHT_UP = HAT_RIGHT | HAT_UP;
|
||||
public const int HAT_RIGHT_DOWN = HAT_RIGHT | HAT_DOWN;
|
||||
public const int HAT_LEFT_UP = HAT_LEFT | HAT_UP;
|
||||
public const int HAT_LEFT_DOWN = HAT_LEFT | HAT_DOWN;
|
||||
public const int KEY_UNKNOWN = -1;
|
||||
public const int KEY_SPACE = 32;
|
||||
public const int KEY_APOSTROPHE = 39;
|
||||
public const int KEY_COMMA = 44;
|
||||
public const int KEY_MINUS = 45;
|
||||
public const int KEY_PERIOD = 46;
|
||||
public const int KEY_SLASH = 47;
|
||||
public const int KEY_0 = 48;
|
||||
public const int KEY_1 = 49;
|
||||
public const int KEY_2 = 50;
|
||||
public const int KEY_3 = 51;
|
||||
public const int KEY_4 = 52;
|
||||
public const int KEY_5 = 53;
|
||||
public const int KEY_6 = 54;
|
||||
public const int KEY_7 = 55;
|
||||
public const int KEY_8 = 56;
|
||||
public const int KEY_9 = 57;
|
||||
public const int KEY_SEMICOLON = 59;
|
||||
public const int KEY_EQUAL = 61;
|
||||
public const int KEY_A = 65;
|
||||
public const int KEY_B = 66;
|
||||
public const int KEY_C = 67;
|
||||
public const int KEY_D = 68;
|
||||
public const int KEY_E = 69;
|
||||
public const int KEY_F = 70;
|
||||
public const int KEY_G = 71;
|
||||
public const int KEY_H = 72;
|
||||
public const int KEY_I = 73;
|
||||
public const int KEY_J = 74;
|
||||
public const int KEY_K = 75;
|
||||
public const int KEY_L = 76;
|
||||
public const int KEY_M = 77;
|
||||
public const int KEY_N = 78;
|
||||
public const int KEY_O = 79;
|
||||
public const int KEY_P = 80;
|
||||
public const int KEY_Q = 81;
|
||||
public const int KEY_R = 82;
|
||||
public const int KEY_S = 83;
|
||||
public const int KEY_T = 84;
|
||||
public const int KEY_U = 85;
|
||||
public const int KEY_V = 86;
|
||||
public const int KEY_W = 87;
|
||||
public const int KEY_X = 88;
|
||||
public const int KEY_Y = 89;
|
||||
public const int KEY_Z = 90;
|
||||
public const int KEY_LEFT_BRACKET = 91;
|
||||
public const int KEY_BACKSLASH = 92;
|
||||
public const int KEY_RIGHT_BRACKET = 93;
|
||||
public const int KEY_GRAVE_ACCENT = 96;
|
||||
public const int KEY_WORLD_1 = 161;
|
||||
public const int KEY_WORLD_2 = 162;
|
||||
public const int KEY_ESCAPE = 256;
|
||||
public const int KEY_ENTER = 257;
|
||||
public const int KEY_TAB = 258;
|
||||
public const int KEY_BACKSPACE = 259;
|
||||
public const int KEY_INSERT = 260;
|
||||
public const int KEY_DELETE = 261;
|
||||
public const int KEY_RIGHT = 262;
|
||||
public const int KEY_LEFT = 263;
|
||||
public const int KEY_DOWN = 264;
|
||||
public const int KEY_UP = 265;
|
||||
public const int KEY_PAGE_UP = 266;
|
||||
public const int KEY_PAGE_DOWN = 267;
|
||||
public const int KEY_HOME = 268;
|
||||
public const int KEY_END = 269;
|
||||
public const int KEY_CAPS_LOCK = 280;
|
||||
public const int KEY_SCROLL_LOCK = 281;
|
||||
public const int KEY_NUM_LOCK = 282;
|
||||
public const int KEY_PRINT_SCREEN = 283;
|
||||
public const int KEY_PAUSE = 284;
|
||||
public const int KEY_F1 = 290;
|
||||
public const int KEY_F2 = 291;
|
||||
public const int KEY_F3 = 292;
|
||||
public const int KEY_F4 = 293;
|
||||
public const int KEY_F5 = 294;
|
||||
public const int KEY_F6 = 295;
|
||||
public const int KEY_F7 = 296;
|
||||
public const int KEY_F8 = 297;
|
||||
public const int KEY_F9 = 298;
|
||||
public const int KEY_F10 = 299;
|
||||
public const int KEY_F11 = 300;
|
||||
public const int KEY_F12 = 301;
|
||||
public const int KEY_F13 = 302;
|
||||
public const int KEY_F14 = 303;
|
||||
public const int KEY_F15 = 304;
|
||||
public const int KEY_F16 = 305;
|
||||
public const int KEY_F17 = 306;
|
||||
public const int KEY_F18 = 307;
|
||||
public const int KEY_F19 = 308;
|
||||
public const int KEY_F20 = 309;
|
||||
public const int KEY_F21 = 310;
|
||||
public const int KEY_F22 = 311;
|
||||
public const int KEY_F23 = 312;
|
||||
public const int KEY_F24 = 313;
|
||||
public const int KEY_F25 = 314;
|
||||
public const int KEY_KP_0 = 320;
|
||||
public const int KEY_KP_1 = 321;
|
||||
public const int KEY_KP_2 = 322;
|
||||
public const int KEY_KP_3 = 323;
|
||||
public const int KEY_KP_4 = 324;
|
||||
public const int KEY_KP_5 = 325;
|
||||
public const int KEY_KP_6 = 326;
|
||||
public const int KEY_KP_7 = 327;
|
||||
public const int KEY_KP_8 = 328;
|
||||
public const int KEY_KP_9 = 329;
|
||||
public const int KEY_KP_DECIMAL = 330;
|
||||
public const int KEY_KP_DIVIDE = 331;
|
||||
public const int KEY_KP_MULTIPLY = 332;
|
||||
public const int KEY_KP_SUBTRACT = 333;
|
||||
public const int KEY_KP_ADD = 334;
|
||||
public const int KEY_KP_ENTER = 335;
|
||||
public const int KEY_KP_EQUAL = 336;
|
||||
public const int KEY_LEFT_SHIFT = 340;
|
||||
public const int KEY_LEFT_CONTROL = 341;
|
||||
public const int KEY_LEFT_ALT = 342;
|
||||
public const int KEY_LEFT_SUPER = 343;
|
||||
public const int KEY_RIGHT_SHIFT = 344;
|
||||
public const int KEY_RIGHT_CONTROL = 345;
|
||||
public const int KEY_RIGHT_ALT = 346;
|
||||
public const int KEY_RIGHT_SUPER = 347;
|
||||
public const int KEY_MENU = 348;
|
||||
public const int KEY_LAST = KEY_MENU;
|
||||
public const int MOD_SHIFT = 0x0001;
|
||||
public const int MOD_CONTROL = 0x0002;
|
||||
public const int MOD_ALT = 0x0004;
|
||||
public const int MOD_SUPER = 0x0008;
|
||||
public const int MOD_CAPS_LOCK = 0x0010;
|
||||
public const int MOD_NUM_LOCK = 0x0020;
|
||||
public const int MOUSE_BUTTON_1 = 0;
|
||||
public const int MOUSE_BUTTON_2 = 1;
|
||||
public const int MOUSE_BUTTON_3 = 2;
|
||||
public const int MOUSE_BUTTON_4 = 3;
|
||||
public const int MOUSE_BUTTON_5 = 4;
|
||||
public const int MOUSE_BUTTON_6 = 5;
|
||||
public const int MOUSE_BUTTON_7 = 6;
|
||||
public const int MOUSE_BUTTON_8 = 7;
|
||||
public const int MOUSE_BUTTON_LAST = MOUSE_BUTTON_8;
|
||||
public const int MOUSE_BUTTON_LEFT = MOUSE_BUTTON_1;
|
||||
public const int MOUSE_BUTTON_RIGHT = MOUSE_BUTTON_2;
|
||||
public const int MOUSE_BUTTON_MIDDLE = MOUSE_BUTTON_3;
|
||||
public const int JOYSTICK_1 = 0;
|
||||
public const int JOYSTICK_2 = 1;
|
||||
public const int JOYSTICK_3 = 2;
|
||||
public const int JOYSTICK_4 = 3;
|
||||
public const int JOYSTICK_5 = 4;
|
||||
public const int JOYSTICK_6 = 5;
|
||||
public const int JOYSTICK_7 = 6;
|
||||
public const int JOYSTICK_8 = 7;
|
||||
public const int JOYSTICK_9 = 8;
|
||||
public const int JOYSTICK_10 = 9;
|
||||
public const int JOYSTICK_11 = 10;
|
||||
public const int JOYSTICK_12 = 11;
|
||||
public const int JOYSTICK_13 = 12;
|
||||
public const int JOYSTICK_14 = 13;
|
||||
public const int JOYSTICK_15 = 14;
|
||||
public const int JOYSTICK_16 = 15;
|
||||
public const int JOYSTICK_LAST = JOYSTICK_16;
|
||||
public const int GAMEPAD_BUTTON_A = 0;
|
||||
public const int GAMEPAD_BUTTON_B = 1;
|
||||
public const int GAMEPAD_BUTTON_X = 2;
|
||||
public const int GAMEPAD_BUTTON_Y = 3;
|
||||
public const int GAMEPAD_BUTTON_LEFT_BUMPER = 4;
|
||||
public const int GAMEPAD_BUTTON_RIGHT_BUMPER = 5;
|
||||
public const int GAMEPAD_BUTTON_BACK = 6;
|
||||
public const int GAMEPAD_BUTTON_START = 7;
|
||||
public const int GAMEPAD_BUTTON_GUIDE = 8;
|
||||
public const int GAMEPAD_BUTTON_LEFT_THUMB = 9;
|
||||
public const int GAMEPAD_BUTTON_RIGHT_THUMB = 10;
|
||||
public const int GAMEPAD_BUTTON_DPAD_UP = 11;
|
||||
public const int GAMEPAD_BUTTON_DPAD_RIGHT = 12;
|
||||
public const int GAMEPAD_BUTTON_DPAD_DOWN = 13;
|
||||
public const int GAMEPAD_BUTTON_DPAD_LEFT = 14;
|
||||
public const int GAMEPAD_BUTTON_LAST = GAMEPAD_BUTTON_DPAD_LEFT;
|
||||
public const int GAMEPAD_BUTTON_CROSS = GAMEPAD_BUTTON_A;
|
||||
public const int GAMEPAD_BUTTON_CIRCLE = GAMEPAD_BUTTON_B;
|
||||
public const int GAMEPAD_BUTTON_SQUARE = GAMEPAD_BUTTON_X;
|
||||
public const int GAMEPAD_BUTTON_TRIANGLE = GAMEPAD_BUTTON_Y;
|
||||
public const int GAMEPAD_AXIS_LEFT_X = 0;
|
||||
public const int GAMEPAD_AXIS_LEFT_Y = 1;
|
||||
public const int GAMEPAD_AXIS_RIGHT_X = 2;
|
||||
public const int GAMEPAD_AXIS_RIGHT_Y = 3;
|
||||
public const int GAMEPAD_AXIS_LEFT_TRIGGER = 4;
|
||||
public const int GAMEPAD_AXIS_RIGHT_TRIGGER = 5;
|
||||
public const int GAMEPAD_AXIS_LAST = GAMEPAD_AXIS_RIGHT_TRIGGER;
|
||||
public const int NO_ERROR = 0;
|
||||
public const int NOT_INITIALIZED = 0x00010001;
|
||||
public const int NO_CURRENT_CONTEXT = 0x00010002;
|
||||
public const int INVALID_ENUM = 0x00010003;
|
||||
public const int INVALID_VALUE = 0x00010004;
|
||||
public const int OUT_OF_MEMORY = 0x00010005;
|
||||
public const int API_UNAVAILABLE = 0x00010006;
|
||||
public const int VERSION_UNAVAILABLE = 0x00010007;
|
||||
public const int PLATFORM_ERROR = 0x00010008;
|
||||
public const int FORMAT_UNAVAILABLE = 0x00010009;
|
||||
public const int NO_WINDOW_CONTEXT = 0x0001000A;
|
||||
public const int FOCUSED = 0x00020001;
|
||||
public const int ICONIFIED = 0x00020002;
|
||||
public const int RESIZABLE = 0x00020003;
|
||||
public const int VISIBLE = 0x00020004;
|
||||
public const int DECORATED = 0x00020005;
|
||||
public const int AUTO_ICONIFY = 0x00020006;
|
||||
public const int FLOATING = 0x00020007;
|
||||
public const int MAXIMIZED = 0x00020008;
|
||||
public const int CENTER_CURSOR = 0x00020009;
|
||||
public const int TRANSPARENT_FRAMEBUFFER = 0x0002000A;
|
||||
public const int HOVERED = 0x0002000B;
|
||||
public const int FOCUS_ON_SHOW = 0x0002000C;
|
||||
public const int RED_BITS = 0x00021001;
|
||||
public const int GREEN_BITS = 0x00021002;
|
||||
public const int BLUE_BITS = 0x00021003;
|
||||
public const int ALPHA_BITS = 0x00021004;
|
||||
public const int DEPTH_BITS = 0x00021005;
|
||||
public const int STENCIL_BITS = 0x00021006;
|
||||
public const int ACCUM_RED_BITS = 0x00021007;
|
||||
public const int ACCUM_GREEN_BITS = 0x00021008;
|
||||
public const int ACCUM_BLUE_BITS = 0x00021009;
|
||||
public const int ACCUM_ALPHA_BITS = 0x0002100A;
|
||||
public const int AUX_BUFFERS = 0x0002100B;
|
||||
public const int STEREO = 0x0002100C;
|
||||
public const int SAMPLES = 0x0002100D;
|
||||
public const int SRGB_CAPABLE = 0x0002100E;
|
||||
public const int REFRESH_RATE = 0x0002100F;
|
||||
public const int DOUBLEBUFFER = 0x00021010;
|
||||
public const int CLIENT_API = 0x00022001;
|
||||
public const int CONTEXT_VERSION_MAJOR = 0x00022002;
|
||||
public const int CONTEXT_VERSION_MINOR = 0x00022003;
|
||||
public const int CONTEXT_REVISION = 0x00022004;
|
||||
public const int CONTEXT_ROBUSTNESS = 0x00022005;
|
||||
public const int OPENGL_FORWARD_COMPAT = 0x00022006;
|
||||
public const int OPENGL_DEBUG_CONTEXT = 0x00022007;
|
||||
public const int OPENGL_PROFILE = 0x00022008;
|
||||
public const int CONTEXT_RELEASE_BEHAVIOR = 0x00022009;
|
||||
public const int CONTEXT_NO_ERROR = 0x0002200A;
|
||||
public const int CONTEXT_CREATION_API = 0x0002200B;
|
||||
public const int SCALE_TO_MONITOR = 0x0002200C;
|
||||
public const int COCOA_RETINA_FRAMEBUFFER = 0x00023001;
|
||||
public const int COCOA_FRAME_NAME = 0x00023002;
|
||||
public const int COCOA_GRAPHICS_SWITCHING = 0x00023003;
|
||||
public const int X11_CLASS_NAME = 0x00024001;
|
||||
public const int X11_INSTANCE_NAME = 0x00024002;
|
||||
public const int NO_API = 0;
|
||||
public const int OPENGL_API = 0x00030001;
|
||||
public const int OPENGL_ES_API = 0x00030002;
|
||||
public const int NO_ROBUSTNESS = 0;
|
||||
public const int NO_RESET_NOTIFICATION = 0x00031001;
|
||||
public const int LOSE_CONTEXT_ON_RESET = 0x00031002;
|
||||
public const int OPENGL_ANY_PROFILE = 0;
|
||||
public const int OPENGL_CORE_PROFILE = 0x00032001;
|
||||
public const int OPENGL_COMPAT_PROFILE = 0x00032002;
|
||||
public const int CURSOR = 0x00033001;
|
||||
public const int STICKY_KEYS = 0x00033002;
|
||||
public const int STICKY_MOUSE_BUTTONS = 0x00033003;
|
||||
public const int LOCK_KEY_MODS = 0x00033004;
|
||||
public const int RAW_MOUSE_MOTION = 0x00033005;
|
||||
public const int CURSOR_NORMAL = 0x00034001;
|
||||
public const int CURSOR_HIDDEN = 0x00034002;
|
||||
public const int CURSOR_DISABLED = 0x00034003;
|
||||
public const int ANY_RELEASE_BEHAVIOR = 0;
|
||||
public const int RELEASE_BEHAVIOR_FLUSH = 0x00035001;
|
||||
public const int RELEASE_BEHAVIOR_NONE = 0x00035002;
|
||||
public const int NATIVE_CONTEXT_API = 0x00036001;
|
||||
public const int EGL_CONTEXT_API = 0x00036002;
|
||||
public const int OSMESA_CONTEXT_API = 0x00036003;
|
||||
public const int ARROW_CURSOR = 0x00036001;
|
||||
public const int IBEAM_CURSOR = 0x00036002;
|
||||
public const int CROSSHAIR_CURSOR = 0x00036003;
|
||||
public const int HAND_CURSOR = 0x00036004;
|
||||
public const int HRESIZE_CURSOR = 0x00036005;
|
||||
public const int VRESIZE_CURSOR = 0x00036006;
|
||||
public const int CONNECTED = 0x00040001;
|
||||
public const int DISCONNECTED = 0x00040002;
|
||||
public const int JOYSTICK_HAT_BUTTONS = 0x00050001;
|
||||
public const int COCOA_CHDIR_RESOURCES = 0x00051001;
|
||||
public const int COCOA_MENUBAR = 0x00051002;
|
||||
public const int DONT_CARE = -1;
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
// -----------------------------------------------------------------------------
|
||||
// file="Global"
|
||||
// Project: StgSharp
|
||||
// Copyright (c) Nitload.
|
||||
// SPDX-License-Identifier: MIT
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
global using Nitload.Common.Internal;
|
||||
global using System;
|
||||
@@ -0,0 +1,106 @@
|
||||
// -----------------------------------------------------------------------------
|
||||
// file="Image"
|
||||
// Project: StgSharp
|
||||
// Copyright (c) Nitload.
|
||||
// SPDX-License-Identifier: MIT
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Nitload.Graphics
|
||||
{
|
||||
/// <summary>
|
||||
/// Owns a tightly packed, two-dimensional managed pixel buffer.
|
||||
/// </summary>
|
||||
/// <typeparam name="TPixel">
|
||||
/// Unmanaged storage layout of one pixel.
|
||||
/// </typeparam>
|
||||
public sealed class Image<TPixel> where TPixel : unmanaged
|
||||
{
|
||||
|
||||
private readonly TPixel[] _pixels;
|
||||
|
||||
public Image(
|
||||
int width,
|
||||
int height
|
||||
) : this(width, height, new TPixel[GetRequiredPixelCount(width, height)]) { }
|
||||
|
||||
public Image(
|
||||
(int width, int height) size
|
||||
) : this(size.width, size.height) { }
|
||||
|
||||
/// <summary>
|
||||
/// Wraps <paramref name="pixels" /> without copying it.
|
||||
/// </summary>
|
||||
public Image(
|
||||
int width,
|
||||
int height,
|
||||
TPixel[] pixels
|
||||
)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(pixels);
|
||||
|
||||
int requiredLength = GetRequiredPixelCount(width, height);
|
||||
if (pixels.Length != requiredLength)
|
||||
{
|
||||
throw new ArgumentException(
|
||||
$"Pixel buffer length must be exactly {requiredLength}, but was {pixels.Length}.",
|
||||
nameof(pixels));
|
||||
}
|
||||
|
||||
Width = width;
|
||||
Height = height;
|
||||
_pixels = pixels;
|
||||
}
|
||||
|
||||
public Image(
|
||||
(int width, int height) size,
|
||||
TPixel[] pixels
|
||||
) : this(size.width, size.height, pixels) { }
|
||||
|
||||
/// <summary>
|
||||
/// Gets a writable byte view over the pixel buffer without copying it.
|
||||
/// </summary>
|
||||
public Span<byte> Bytes => MemoryMarshal.AsBytes(_pixels.AsSpan());
|
||||
|
||||
public int ByteLength => Bytes.Length;
|
||||
|
||||
public int Height { get; }
|
||||
|
||||
public int PixelCount => _pixels.Length;
|
||||
|
||||
/// <summary>
|
||||
/// Gets a writable typed view over the pixel buffer without copying it.
|
||||
/// </summary>
|
||||
public Span<TPixel> Pixels => _pixels;
|
||||
|
||||
public ReadOnlySpan<byte> ReadOnlyBytes => MemoryMarshal.AsBytes(_pixels.AsSpan());
|
||||
|
||||
public ReadOnlySpan<TPixel> ReadOnlyPixels => _pixels;
|
||||
|
||||
public (int width, int height) Size => (Width, Height);
|
||||
|
||||
public int Width { get; }
|
||||
|
||||
public static explicit operator Span<byte>(
|
||||
Image<TPixel> image
|
||||
)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(image);
|
||||
return image.Bytes;
|
||||
}
|
||||
|
||||
private static int GetRequiredPixelCount(
|
||||
int width,
|
||||
int height
|
||||
)
|
||||
{
|
||||
ArgumentOutOfRangeException.ThrowIfNegative(width);
|
||||
ArgumentOutOfRangeException.ThrowIfNegative(height);
|
||||
|
||||
return checked(width * height);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Nitload.Common\Nitload.Common.csproj" />
|
||||
<ProjectReference Include="..\Nitload.Mathematics\Nitload.Mathematics.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Folder Include="OpenGL\Generated\" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
@@ -0,0 +1,72 @@
|
||||
// -----------------------------------------------------------------------------
|
||||
// file="OpenGLFunction.Diagnostics"
|
||||
// Project: StgSharp
|
||||
// Copyright (c) Nitload.
|
||||
// SPDX-License-Identifier: MIT
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
namespace Nitload.Graphics.OpenGL
|
||||
{
|
||||
public unsafe partial class OpenGLFunction
|
||||
{
|
||||
|
||||
[Conditional("DEBUG")]
|
||||
public void Assert(
|
||||
bool shouldReportWhenNormal
|
||||
)
|
||||
{
|
||||
uint code = __context->glGetError();
|
||||
if (code != glConst.NO_ERROR) {
|
||||
throw new GlExecutionException(code);
|
||||
}
|
||||
if (shouldReportWhenNormal) {
|
||||
Console.WriteLine("OpenGL runs normally");
|
||||
}
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void ClearError()
|
||||
{
|
||||
uint code = 0;
|
||||
for (int i = 0; i < 1024; i++)
|
||||
{
|
||||
code = __context->glGetError();
|
||||
if (code == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Console.WriteLine(code);
|
||||
}
|
||||
foreach (ProcessThread thread in Process.GetCurrentProcess().Threads) {
|
||||
Debugger.Break();
|
||||
}
|
||||
throw new GlErrorOverflowException(1024, code);
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public unsafe void ClearGraphicError()
|
||||
{
|
||||
while (__context->glGetError() != 0) { }
|
||||
}
|
||||
|
||||
public unsafe int GetMaskInteger(
|
||||
uint statusCode
|
||||
)
|
||||
{
|
||||
int ret = 0;
|
||||
__context->glGetIntegerv(statusCode, &ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void WaitAccomplishment()
|
||||
{
|
||||
__context->glFinish();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,142 @@
|
||||
// -----------------------------------------------------------------------------
|
||||
// file="OpenGLFunction.Shader"
|
||||
// Project: StgSharp
|
||||
// Copyright (c) Nitload.
|
||||
// SPDX-License-Identifier: MIT
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
using System;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Text;
|
||||
|
||||
namespace Nitload.Graphics.OpenGL
|
||||
{
|
||||
public unsafe partial class OpenGLFunction
|
||||
{
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public GlHandle CreateGraphicProgram()
|
||||
{
|
||||
return CreateProgram();
|
||||
}
|
||||
|
||||
public GlHandle[] CreateProgram(
|
||||
int count
|
||||
)
|
||||
{
|
||||
ArgumentOutOfRangeException.ThrowIfNegative(count);
|
||||
|
||||
GlHandle[] handles = new GlHandle[count];
|
||||
for (int i = 0; i < handles.Length; i++) {
|
||||
handles[i] = CreateProgram();
|
||||
}
|
||||
return handles;
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public GlHandle CreateShader(
|
||||
ShaderType type
|
||||
)
|
||||
{
|
||||
GlHandle handle = GlHandle.Create(__context->glCreateShader((uint)type));
|
||||
if (handle.Value == 0)
|
||||
{
|
||||
uint error = __context->glGetError();
|
||||
throw new InvalidOperationException($"Failed in creating shader: {error}");
|
||||
}
|
||||
return handle;
|
||||
}
|
||||
|
||||
public GlHandle[] CreateShaderSet(
|
||||
int count,
|
||||
ShaderType type
|
||||
)
|
||||
{
|
||||
ArgumentOutOfRangeException.ThrowIfNegative(count);
|
||||
|
||||
GlHandle[] handles = new GlHandle[count];
|
||||
for (int i = 0; i < handles.Length; i++) {
|
||||
handles[i] = CreateShader(type);
|
||||
}
|
||||
return handles;
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public string GetShaderStatus(
|
||||
GlHandle shader,
|
||||
ShaderStatus status
|
||||
)
|
||||
{
|
||||
return GetShaderStatus(shader, (uint)status);
|
||||
}
|
||||
|
||||
public string GetShaderStatus(
|
||||
GlHandle shader,
|
||||
uint statusName
|
||||
)
|
||||
{
|
||||
int status;
|
||||
__context->glGetShaderiv(shader.Value, statusName, &status);
|
||||
if (status != 0) {
|
||||
return string.Empty;
|
||||
}
|
||||
|
||||
int logLength;
|
||||
__context->glGetShaderiv(shader.Value, glConst.INFO_LOG_LENGTH, &logLength);
|
||||
if (logLength <= 1) {
|
||||
return string.Empty;
|
||||
}
|
||||
|
||||
byte[] log = new byte[logLength];
|
||||
fixed (byte* logPtr = log)
|
||||
{
|
||||
int written;
|
||||
__context->glGetShaderInfoLog(shader.Value, log.Length, &written, logPtr);
|
||||
return Encoding.UTF8.GetString(log, 0, Math.Clamp(written, 0, log.Length));
|
||||
}
|
||||
}
|
||||
|
||||
public void ShaderSource(
|
||||
GlHandle shader,
|
||||
ReadOnlySpan<byte> source
|
||||
)
|
||||
{
|
||||
int length = source.Length;
|
||||
fixed (byte* sourcePtr = source)
|
||||
{
|
||||
byte emptySource = 0;
|
||||
byte* sourceAddress = sourcePtr == null ? &emptySource : sourcePtr;
|
||||
__context->glShaderSource(shader.Value, 1, &sourceAddress, &length);
|
||||
}
|
||||
}
|
||||
|
||||
public void ShaderSource(
|
||||
GlHandle shader,
|
||||
ReadOnlySpan<char> source
|
||||
)
|
||||
{
|
||||
int byteCount = Encoding.UTF8.GetByteCount(source);
|
||||
Span<byte> utf8Source = byteCount < 1024 ?
|
||||
stackalloc byte[byteCount] :
|
||||
new byte[byteCount];
|
||||
int written = Encoding.UTF8.GetBytes(source, utf8Source);
|
||||
ShaderSource(shader, utf8Source[..written]);
|
||||
}
|
||||
|
||||
public void ShaderSource(
|
||||
GlHandle shader,
|
||||
string source
|
||||
)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(source);
|
||||
|
||||
int byteCount = Encoding.UTF8.GetByteCount(source);
|
||||
Span<byte> utf8Source = byteCount < 1024 ?
|
||||
stackalloc byte[byteCount] :
|
||||
new byte[byteCount];
|
||||
int written = Encoding.UTF8.GetBytes(source.AsSpan(), utf8Source);
|
||||
ShaderSource(shader, utf8Source[..written]);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
// -----------------------------------------------------------------------------
|
||||
// file="EBO"
|
||||
// Project: StgSharp
|
||||
// Copyright (c) Nitload.
|
||||
// SPDX-License-Identifier: MIT
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
namespace Nitload.Graphics.OpenGL
|
||||
{
|
||||
/// <summary>A set of OpenGL element-buffer handles.</summary>
|
||||
public sealed record class ElementBuffer(
|
||||
GlHandle[] Handles
|
||||
)
|
||||
{
|
||||
|
||||
public int Count => Handles.Length;
|
||||
|
||||
public GlHandle this[int index] => Handles[index];
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
// -----------------------------------------------------------------------------
|
||||
// file="FBO"
|
||||
// Project: StgSharp
|
||||
// Copyright (c) Nitload.
|
||||
// SPDX-License-Identifier: MIT
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
namespace Nitload.Graphics.OpenGL
|
||||
{
|
||||
/// <summary>A set of OpenGL framebuffer handles.</summary>
|
||||
public sealed record class FrameBuffer(
|
||||
GlHandle[] Handles
|
||||
)
|
||||
{
|
||||
|
||||
public int Count => Handles.Length;
|
||||
|
||||
public GlHandle this[int index] => Handles[index];
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
// -----------------------------------------------------------------------------
|
||||
// file="RBO"
|
||||
// Project: StgSharp
|
||||
// Copyright (c) Nitload.
|
||||
// SPDX-License-Identifier: MIT
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
namespace Nitload.Graphics.OpenGL
|
||||
{
|
||||
/// <summary>A set of OpenGL renderbuffer handles.</summary>
|
||||
public sealed record class RenderBuffer(
|
||||
GlHandle[] Handles
|
||||
)
|
||||
{
|
||||
|
||||
public int Count => Handles.Length;
|
||||
|
||||
public GlHandle this[int index] => Handles[index];
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
// -----------------------------------------------------------------------------
|
||||
// file="TextureGL"
|
||||
// Project: StgSharp
|
||||
// Copyright (c) Nitload.
|
||||
// SPDX-License-Identifier: MIT
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
namespace Nitload.Graphics.OpenGL
|
||||
{
|
||||
/// <summary>A set of OpenGL texture handles.</summary>
|
||||
public sealed record class TextureGL(
|
||||
GlHandle[] Handles
|
||||
)
|
||||
{
|
||||
|
||||
public int Count => Handles.Length;
|
||||
|
||||
public GlHandle this[int index] => Handles[index];
|
||||
|
||||
}
|
||||
|
||||
public readonly record struct TextureProperty(
|
||||
TextureFilter FilterOnMagnify,
|
||||
TextureFilter FilterOnMinify,
|
||||
TextureWrap WrapOnHorizontal,
|
||||
TextureWrap WrapOnVertical
|
||||
);
|
||||
|
||||
#pragma warning disable CA1008
|
||||
public enum TextureFilter
|
||||
#pragma warning restore CA1008
|
||||
{
|
||||
|
||||
Nearest = glConst.NEAREST,
|
||||
Linear = glConst.LINEAR,
|
||||
NearestLinearMipmap = glConst.NEAREST_MIPMAP_LINEAR,
|
||||
LinearLinearMipmap = glConst.LINEAR_MIPMAP_LINEAR,
|
||||
NearestNearestMipmap = glConst.NEAREST_MIPMAP_NEAREST,
|
||||
LinearNearestMipmap = glConst.LINEAR_MIPMAP_NEAREST,
|
||||
|
||||
}
|
||||
|
||||
#pragma warning disable CA1008
|
||||
public enum TextureWrap
|
||||
#pragma warning restore CA1008
|
||||
{
|
||||
|
||||
Repeat = glConst.REPEAT,
|
||||
MirroredRepeat = glConst.MIRRORED_REPEAT,
|
||||
ClampToEdge = glConst.CLAMP_TO_EDGE,
|
||||
ClampToBorder = glConst.CLAMP_TO_BORDER,
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
// -----------------------------------------------------------------------------
|
||||
// file="VAO"
|
||||
// Project: StgSharp
|
||||
// Copyright (c) Nitload.
|
||||
// SPDX-License-Identifier: MIT
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
namespace Nitload.Graphics.OpenGL
|
||||
{
|
||||
/// <summary>A set of OpenGL vertex-array handles.</summary>
|
||||
public sealed record class VertexArray(
|
||||
GlHandle[] Handles
|
||||
)
|
||||
{
|
||||
|
||||
public int Count => Handles.Length;
|
||||
|
||||
public GlHandle this[int index] => Handles[index];
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
// -----------------------------------------------------------------------------
|
||||
// file="VBO"
|
||||
// Project: StgSharp
|
||||
// Copyright (c) Nitload.
|
||||
// SPDX-License-Identifier: MIT
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
namespace Nitload.Graphics.OpenGL
|
||||
{
|
||||
/// <summary>A set of OpenGL vertex-buffer handles.</summary>
|
||||
public sealed record class VertexBuffer(
|
||||
GlHandle[] Handles
|
||||
)
|
||||
{
|
||||
|
||||
public int Count => Handles.Length;
|
||||
|
||||
public GlHandle this[int index] => Handles[index];
|
||||
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,294 @@
|
||||
// -----------------------------------------------------------------------------
|
||||
// file="OpenGLFunction.v3_3"
|
||||
// Project: StgSharp
|
||||
// Copyright (c) Nitload.
|
||||
// SPDX-License-Identifier: MIT
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
// <auto-generated>
|
||||
// Generated by Nitload.GenerateGL.
|
||||
// Desktop OpenGL 3.3 core-profile forwarding methods.
|
||||
// </auto-generated>
|
||||
|
||||
using Nitload.Mathematics.Numeric.Graphics;
|
||||
|
||||
using System;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
namespace Nitload.Graphics.OpenGL
|
||||
{
|
||||
public unsafe partial class OpenGLFunction
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glBindFragDataLocationIndexed(GLuint program, GLuint colorNumber, GLuint index, const GLchar *name);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glBindFragDataLocationIndexed">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void BindFragmentDataLocationIndexed(GlHandle program, uint colorNumber, uint index, byte* name)
|
||||
{
|
||||
__context->glBindFragDataLocationIndexed(program.Value, colorNumber, index, name);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>GLint glGetFragDataIndex(GLuint program, const GLchar *name);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glGetFragDataIndex">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public int GetFragmentDataIndex(GlHandle program, byte* name)
|
||||
{
|
||||
return __context->glGetFragDataIndex(program.Value, name);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glGenSamplers(GLsizei count, GLuint *samplers);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glGenSamplers">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void GenSamplers(Span<GlHandle> samplers)
|
||||
{
|
||||
fixed (GlHandle* __samplers = samplers)
|
||||
{
|
||||
__context->glGenSamplers(samplers.Length, (uint*)__samplers);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glDeleteSamplers(GLsizei count, const GLuint *samplers);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glDeleteSamplers">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void DeleteSamplers(ReadOnlySpan<GlHandle> samplers)
|
||||
{
|
||||
fixed (GlHandle* __samplers = samplers)
|
||||
{
|
||||
__context->glDeleteSamplers(samplers.Length, (uint*)__samplers);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>GLboolean glIsSampler(GLuint sampler);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glIsSampler">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public byte IsSampler(GlHandle sampler)
|
||||
{
|
||||
return __context->glIsSampler(sampler.Value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glBindSampler(GLuint unit, GLuint sampler);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glBindSampler">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void BindSampler(uint unit, GlHandle sampler)
|
||||
{
|
||||
__context->glBindSampler(unit, sampler.Value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glSamplerParameteri(GLuint sampler, GLenum pname, GLint param);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glSamplerParameter">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void SamplerParameter(GlHandle sampler, SamplerParameterI pName, int param)
|
||||
{
|
||||
__context->glSamplerParameteri(sampler.Value, (uint)pName, param);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glSamplerParameteriv(GLuint sampler, GLenum pname, const GLint *param);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glSamplerParameter">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void SamplerParameter(GlHandle sampler, SamplerParameterI pName, int* param)
|
||||
{
|
||||
__context->glSamplerParameteriv(sampler.Value, (uint)pName, param);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glSamplerParameterf(GLuint sampler, GLenum pname, GLfloat param);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glSamplerParameter">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void SamplerParameter(GlHandle sampler, SamplerParameterF pName, float param)
|
||||
{
|
||||
__context->glSamplerParameterf(sampler.Value, (uint)pName, param);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glSamplerParameterfv(GLuint sampler, GLenum pname, const GLfloat *param);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glSamplerParameter">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void SamplerParameter(GlHandle sampler, SamplerParameterF pName, float* param)
|
||||
{
|
||||
__context->glSamplerParameterfv(sampler.Value, (uint)pName, param);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glSamplerParameterIiv(GLuint sampler, GLenum pname, const GLint *param);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glSamplerParameter">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void SamplerParameterInteger(GlHandle sampler, SamplerParameterI pName, int* param)
|
||||
{
|
||||
__context->glSamplerParameterIiv(sampler.Value, (uint)pName, param);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glSamplerParameterIuiv(GLuint sampler, GLenum pname, const GLuint *param);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glSamplerParameter">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void SamplerParameterInteger(GlHandle sampler, SamplerParameterI pName, uint* param)
|
||||
{
|
||||
__context->glSamplerParameterIuiv(sampler.Value, (uint)pName, param);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glGetSamplerParameteriv(GLuint sampler, GLenum pname, GLint *params);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glGetSamplerParameter">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void GetSamplerParameter(GlHandle sampler, SamplerParameterI pName, int* @params)
|
||||
{
|
||||
__context->glGetSamplerParameteriv(sampler.Value, (uint)pName, @params);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glGetSamplerParameterIiv(GLuint sampler, GLenum pname, GLint *params);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glGetSamplerParameter">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void GetSamplerParameterInteger(GlHandle sampler, SamplerParameterI pName, int* @params)
|
||||
{
|
||||
__context->glGetSamplerParameterIiv(sampler.Value, (uint)pName, @params);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glGetSamplerParameterfv(GLuint sampler, GLenum pname, GLfloat *params);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glGetSamplerParameter">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void GetSamplerParameter(GlHandle sampler, SamplerParameterF pName, float* @params)
|
||||
{
|
||||
__context->glGetSamplerParameterfv(sampler.Value, (uint)pName, @params);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glGetSamplerParameterIuiv(GLuint sampler, GLenum pname, GLuint *params);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glGetSamplerParameter">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void GetSamplerParameterInteger(GlHandle sampler, SamplerParameterI pName, uint* @params)
|
||||
{
|
||||
__context->glGetSamplerParameterIuiv(sampler.Value, (uint)pName, @params);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glQueryCounter(GLuint id, GLenum target);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glQueryCounter">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void QueryCounter(GlHandle id, QueryCounterTarget target)
|
||||
{
|
||||
__context->glQueryCounter(id.Value, (uint)target);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glGetQueryObjecti64v(GLuint id, GLenum pname, GLint64 *params);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glGetQueryObject">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void GetQueryObject(GlHandle id, QueryObjectParameterName pName, long* @params)
|
||||
{
|
||||
__context->glGetQueryObjecti64v(id.Value, (uint)pName, @params);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glGetQueryObjectui64v(GLuint id, GLenum pname, GLuint64 *params);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glGetQueryObject">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void GetQueryObject(GlHandle id, QueryObjectParameterName pName, ulong* @params)
|
||||
{
|
||||
__context->glGetQueryObjectui64v(id.Value, (uint)pName, @params);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glVertexAttribDivisor(GLuint index, GLuint divisor);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glVertexAttribDivisor">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void VertexAttributeDivisor(uint index, uint divisor)
|
||||
{
|
||||
__context->glVertexAttribDivisor(index, divisor);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glVertexAttribP1ui(GLuint index, GLenum type, GLboolean normalized, GLuint value);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glVertexAttrib">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void VertexAttributePacked1(uint index, VertexAttributePointerType type, byte normalized, uint value)
|
||||
{
|
||||
__context->glVertexAttribP1ui(index, (uint)type, normalized, value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glVertexAttribP2ui(GLuint index, GLenum type, GLboolean normalized, GLuint value);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glVertexAttrib">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void VertexAttributePacked2(uint index, VertexAttributePointerType type, byte normalized, uint value)
|
||||
{
|
||||
__context->glVertexAttribP2ui(index, (uint)type, normalized, value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glVertexAttribP3ui(GLuint index, GLenum type, GLboolean normalized, GLuint value);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glVertexAttrib">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void VertexAttributePacked3(uint index, VertexAttributePointerType type, byte normalized, uint value)
|
||||
{
|
||||
__context->glVertexAttribP3ui(index, (uint)type, normalized, value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glVertexAttribP4ui(GLuint index, GLenum type, GLboolean normalized, GLuint value);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glVertexAttrib">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void VertexAttributePacked4(uint index, VertexAttributePointerType type, byte normalized, uint value)
|
||||
{
|
||||
__context->glVertexAttribP4ui(index, (uint)type, normalized, value);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,454 @@
|
||||
// -----------------------------------------------------------------------------
|
||||
// file="OpenGLFunction.v4_0"
|
||||
// Project: StgSharp
|
||||
// Copyright (c) Nitload.
|
||||
// SPDX-License-Identifier: MIT
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
// <auto-generated>
|
||||
// Generated by Nitload.GenerateGL.
|
||||
// Desktop OpenGL 4.0 core-profile forwarding methods.
|
||||
// </auto-generated>
|
||||
|
||||
using Nitload.Mathematics.Numeric.Graphics;
|
||||
|
||||
using System;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
namespace Nitload.Graphics.OpenGL
|
||||
{
|
||||
public unsafe partial class OpenGLFunction
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glMinSampleShading(GLfloat value);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glMinSampleShading">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void MinSampleShading(float value)
|
||||
{
|
||||
__context->glMinSampleShading(value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glBlendEquationi(GLuint buf, GLenum mode);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glBlendEquationi">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void BlendEquationi(uint buf, BlendEquationMode mode)
|
||||
{
|
||||
__context->glBlendEquationi(buf, (uint)mode);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glBlendEquationSeparatei(GLuint buf, GLenum modeRGB, GLenum modeAlpha);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glBlendEquationSeparatei">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void BlendEquationSeparatei(uint buf, BlendEquationMode modeRGB, BlendEquationMode modeAlpha)
|
||||
{
|
||||
__context->glBlendEquationSeparatei(buf, (uint)modeRGB, (uint)modeAlpha);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glBlendFunci(GLuint buf, GLenum src, GLenum dst);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glBlendFunci">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void BlendFunci(uint buf, BlendingFactor src, BlendingFactor dst)
|
||||
{
|
||||
__context->glBlendFunci(buf, (uint)src, (uint)dst);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glBlendFuncSeparatei(GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glBlendFuncSeparatei">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void BlendFuncSeparatei(uint buf, BlendingFactor srcRGB, BlendingFactor dstRGB, BlendingFactor srcAlpha, BlendingFactor dstAlpha)
|
||||
{
|
||||
__context->glBlendFuncSeparatei(buf, (uint)srcRGB, (uint)dstRGB, (uint)srcAlpha, (uint)dstAlpha);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glDrawArraysIndirect(GLenum mode, const void *indirect);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glDrawArraysIndirect">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void DrawArraysIndirect(PrimitiveType mode, void* indirect)
|
||||
{
|
||||
__context->glDrawArraysIndirect((uint)mode, indirect);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glDrawElementsIndirect(GLenum mode, GLenum type, const void *indirect);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glDrawElementsIndirect">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void DrawElementsIndirect(PrimitiveType mode, DrawElementsType type, void* indirect)
|
||||
{
|
||||
__context->glDrawElementsIndirect((uint)mode, (uint)type, indirect);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glUniform1d(GLint location, GLdouble x);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glUniform">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void Uniform(int location, double x)
|
||||
{
|
||||
__context->glUniform1d(location, x);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glUniform2d(GLint location, GLdouble x, GLdouble y);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glUniform">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void Uniform(int location, double x, double y)
|
||||
{
|
||||
__context->glUniform2d(location, x, y);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glUniform2d(GLint location, GLdouble x, GLdouble y);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glUniform">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void Uniform(int location, Vec2<double> value)
|
||||
{
|
||||
__context->glUniform2d(location, value.X, value.Y);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glUniform3d(GLint location, GLdouble x, GLdouble y, GLdouble z);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glUniform">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void Uniform(int location, double x, double y, double z)
|
||||
{
|
||||
__context->glUniform3d(location, x, y, z);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glUniform3d(GLint location, GLdouble x, GLdouble y, GLdouble z);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glUniform">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void Uniform(int location, Vec3<double> value)
|
||||
{
|
||||
__context->glUniform3d(location, value.X, value.Y, value.Z);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glUniform4d(GLint location, GLdouble x, GLdouble y, GLdouble z, GLdouble w);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glUniform">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void Uniform(int location, double x, double y, double z, double w)
|
||||
{
|
||||
__context->glUniform4d(location, x, y, z, w);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glUniform4d(GLint location, GLdouble x, GLdouble y, GLdouble z, GLdouble w);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glUniform">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void Uniform(int location, Vec4<double> value)
|
||||
{
|
||||
__context->glUniform4d(location, value.X, value.Y, value.Z, value.W);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glUniform1dv(GLint location, GLsizei count, const GLdouble *value);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glUniform">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void Uniform(int location, ReadOnlySpan<double> values)
|
||||
{
|
||||
fixed (double* __value = values)
|
||||
{
|
||||
__context->glUniform1dv(location, values.Length, __value);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glUniform4dv(GLint location, GLsizei count, const GLdouble *value);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glUniform">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void Uniform(int location, ReadOnlySpan<Vec4<double>> values)
|
||||
{
|
||||
fixed (Vec4<double>* __vector = values)
|
||||
{
|
||||
__context->glUniform4dv(location, values.Length, (double*)__vector);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glGetUniformdv(GLuint program, GLint location, GLdouble *params);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glGetUniform">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void GetUniform(GlHandle program, int location, double* @params)
|
||||
{
|
||||
__context->glGetUniformdv(program.Value, location, @params);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>GLint glGetSubroutineUniformLocation(GLuint program, GLenum shadertype, const GLchar *name);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glGetSubroutineUniformLocation">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public int GetSubroutineUniformLocation(GlHandle program, ShaderType shadertype, byte* name)
|
||||
{
|
||||
return __context->glGetSubroutineUniformLocation(program.Value, (uint)shadertype, name);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>GLuint glGetSubroutineIndex(GLuint program, GLenum shadertype, const GLchar *name);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glGetSubroutineIndex">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public uint GetSubroutineIndex(GlHandle program, ShaderType shadertype, byte* name)
|
||||
{
|
||||
return __context->glGetSubroutineIndex(program.Value, (uint)shadertype, name);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glGetActiveSubroutineUniformiv(GLuint program, GLenum shadertype, GLuint index, GLenum pname, GLint *values);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glGetActiveSubroutineUniformiv">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void GetActiveSubroutineUniformiv(GlHandle program, ShaderType shadertype, uint index, SubroutineParameterName pName, int* values)
|
||||
{
|
||||
__context->glGetActiveSubroutineUniformiv(program.Value, (uint)shadertype, index, (uint)pName, values);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glGetActiveSubroutineUniformName(GLuint program, GLenum shadertype, GLuint index, GLsizei bufSize, GLsizei *length, GLchar *name);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glGetActiveSubroutineUniformName">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void GetActiveSubroutineUniformName(GlHandle program, ShaderType shadertype, uint index, int bufSize, int* length, byte* name)
|
||||
{
|
||||
__context->glGetActiveSubroutineUniformName(program.Value, (uint)shadertype, index, bufSize, length, name);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glGetActiveSubroutineName(GLuint program, GLenum shadertype, GLuint index, GLsizei bufSize, GLsizei *length, GLchar *name);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glGetActiveSubroutineName">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void GetActiveSubroutineName(GlHandle program, ShaderType shadertype, uint index, int bufSize, int* length, byte* name)
|
||||
{
|
||||
__context->glGetActiveSubroutineName(program.Value, (uint)shadertype, index, bufSize, length, name);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glUniformSubroutinesuiv(GLenum shadertype, GLsizei count, const GLuint *indices);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glUniformSubroutinesuiv">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void UniformSubroutinesuiv(ShaderType shadertype, int count, uint* indices)
|
||||
{
|
||||
__context->glUniformSubroutinesuiv((uint)shadertype, count, indices);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glGetUniformSubroutineuiv(GLenum shadertype, GLint location, GLuint *params);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glGetUniformSubroutineuiv">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void GetUniformSubroutineuiv(ShaderType shadertype, int location, uint* @params)
|
||||
{
|
||||
__context->glGetUniformSubroutineuiv((uint)shadertype, location, @params);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glGetProgramStageiv(GLuint program, GLenum shadertype, GLenum pname, GLint *values);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glGetProgramStageiv">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void GetProgramStageiv(GlHandle program, ShaderType shadertype, ProgramStagePName pName, int* values)
|
||||
{
|
||||
__context->glGetProgramStageiv(program.Value, (uint)shadertype, (uint)pName, values);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glPatchParameteri(GLenum pname, GLint value);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glPatchParameter">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void PatchParameter(PatchParameterName pName, int value)
|
||||
{
|
||||
__context->glPatchParameteri((uint)pName, value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glPatchParameterfv(GLenum pname, const GLfloat *values);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glPatchParameter">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void PatchParameter(PatchParameterName pName, float* values)
|
||||
{
|
||||
__context->glPatchParameterfv((uint)pName, values);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glBindTransformFeedback(GLenum target, GLuint id);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glBindTransformFeedback">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void BindTransformFeedback(BindTransformFeedbackTarget target, GlHandle id)
|
||||
{
|
||||
__context->glBindTransformFeedback((uint)target, id.Value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glDeleteTransformFeedbacks(GLsizei n, const GLuint *ids);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glDeleteTransformFeedbacks">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void DeleteTransformFeedbacks(ReadOnlySpan<GlHandle> ids)
|
||||
{
|
||||
fixed (GlHandle* __ids = ids)
|
||||
{
|
||||
__context->glDeleteTransformFeedbacks(ids.Length, (uint*)__ids);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glGenTransformFeedbacks(GLsizei n, GLuint *ids);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glGenTransformFeedbacks">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void GenTransformFeedbacks(Span<GlHandle> ids)
|
||||
{
|
||||
fixed (GlHandle* __ids = ids)
|
||||
{
|
||||
__context->glGenTransformFeedbacks(ids.Length, (uint*)__ids);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>GLboolean glIsTransformFeedback(GLuint id);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glIsTransformFeedback">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public byte IsTransformFeedback(GlHandle id)
|
||||
{
|
||||
return __context->glIsTransformFeedback(id.Value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glPauseTransformFeedback();</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glPauseTransformFeedback">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void PauseTransformFeedback()
|
||||
{
|
||||
__context->glPauseTransformFeedback();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glResumeTransformFeedback();</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glResumeTransformFeedback">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void ResumeTransformFeedback()
|
||||
{
|
||||
__context->glResumeTransformFeedback();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glDrawTransformFeedback(GLenum mode, GLuint id);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glDrawTransformFeedback">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void DrawTransformFeedback(PrimitiveType mode, GlHandle id)
|
||||
{
|
||||
__context->glDrawTransformFeedback((uint)mode, id.Value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glDrawTransformFeedbackStream(GLenum mode, GLuint id, GLuint stream);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glDrawTransformFeedbackStream">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void DrawTransformFeedbackStream(PrimitiveType mode, GlHandle id, uint stream)
|
||||
{
|
||||
__context->glDrawTransformFeedbackStream((uint)mode, id.Value, stream);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glBeginQueryIndexed(GLenum target, GLuint index, GLuint id);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glBeginQueryIndexed">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void BeginQueryIndexed(QueryTarget target, uint index, GlHandle id)
|
||||
{
|
||||
__context->glBeginQueryIndexed((uint)target, index, id.Value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glEndQueryIndexed(GLenum target, GLuint index);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glEndQueryIndexed">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void EndQueryIndexed(QueryTarget target, uint index)
|
||||
{
|
||||
__context->glEndQueryIndexed((uint)target, index);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glGetQueryIndexediv(GLenum target, GLuint index, GLenum pname, GLint *params);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glGetQueryIndexediv">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void GetQueryIndexediv(QueryTarget target, uint index, QueryParameterName pName, int* @params)
|
||||
{
|
||||
__context->glGetQueryIndexediv((uint)target, index, (uint)pName, @params);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,858 @@
|
||||
// -----------------------------------------------------------------------------
|
||||
// file="OpenGLFunction.v4_1"
|
||||
// Project: StgSharp
|
||||
// Copyright (c) Nitload.
|
||||
// SPDX-License-Identifier: MIT
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
// <auto-generated>
|
||||
// Generated by Nitload.GenerateGL.
|
||||
// Desktop OpenGL 4.1 core-profile forwarding methods.
|
||||
// </auto-generated>
|
||||
|
||||
using Nitload.Mathematics.Numeric.Graphics;
|
||||
|
||||
using System;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
namespace Nitload.Graphics.OpenGL
|
||||
{
|
||||
public unsafe partial class OpenGLFunction
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glReleaseShaderCompiler();</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glReleaseShaderCompiler">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void ReleaseShaderCompiler()
|
||||
{
|
||||
__context->glReleaseShaderCompiler();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glShaderBinary(GLsizei count, const GLuint *shaders, GLenum binaryFormat, const void *binary, GLsizei length);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glShaderBinary">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void ShaderBinary(ReadOnlySpan<GlHandle> shaders, ShaderBinaryFormat binaryFormat, void* binary, int length)
|
||||
{
|
||||
fixed (GlHandle* __shaders = shaders)
|
||||
{
|
||||
__context->glShaderBinary(shaders.Length, (uint*)__shaders, (uint)binaryFormat, binary, length);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glGetShaderPrecisionFormat(GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glGetShaderPrecisionFormat">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void GetShaderPrecisionFormat(ShaderType shadertype, PrecisionType precisiontype, int* range, int* precision)
|
||||
{
|
||||
__context->glGetShaderPrecisionFormat((uint)shadertype, (uint)precisiontype, range, precision);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glDepthRangef(GLfloat n, GLfloat f);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glDepthRangef">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void DepthRangef(float n, float f)
|
||||
{
|
||||
__context->glDepthRangef(n, f);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glClearDepthf(GLfloat d);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glClearDepthf">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void ClearDepthf(float d)
|
||||
{
|
||||
__context->glClearDepthf(d);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glGetProgramBinary(GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, void *binary);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glGetProgramBinary">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void GetProgramBinary(GlHandle program, int bufSize, int* length, uint* binaryFormat, void* binary)
|
||||
{
|
||||
__context->glGetProgramBinary(program.Value, bufSize, length, binaryFormat, binary);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glProgramBinary(GLuint program, GLenum binaryFormat, const void *binary, GLsizei length);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glProgramBinary">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void ProgramBinary(GlHandle program, uint binaryFormat, void* binary, int length)
|
||||
{
|
||||
__context->glProgramBinary(program.Value, binaryFormat, binary, length);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glProgramParameteri(GLuint program, GLenum pname, GLint value);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glProgramParameteri">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void ProgramParameteri(GlHandle program, ProgramParameterPName pName, int value)
|
||||
{
|
||||
__context->glProgramParameteri(program.Value, (uint)pName, value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glUseProgramStages(GLuint pipeline, GLbitfield stages, GLuint program);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glUseProgramStages">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void UseProgramStages(GlHandle pipeline, UseProgramStageMask stages, GlHandle program)
|
||||
{
|
||||
__context->glUseProgramStages(pipeline.Value, (uint)stages, program.Value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glActiveShaderProgram(GLuint pipeline, GLuint program);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glActiveShaderProgram">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void ActiveShaderProgram(GlHandle pipeline, GlHandle program)
|
||||
{
|
||||
__context->glActiveShaderProgram(pipeline.Value, program.Value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>GLuint glCreateShaderProgramv(GLenum type, GLsizei count, const GLchar *const*strings);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glCreateShaderProgramv">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public GlHandle CreateShaderProgramv(ShaderType type, int count, byte** strings)
|
||||
{
|
||||
return GlHandle.Create(__context->glCreateShaderProgramv((uint)type, count, strings));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glBindProgramPipeline(GLuint pipeline);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glBindProgramPipeline">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void BindProgramPipeline(GlHandle pipeline)
|
||||
{
|
||||
__context->glBindProgramPipeline(pipeline.Value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glDeleteProgramPipelines(GLsizei n, const GLuint *pipelines);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glDeleteProgramPipelines">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void DeleteProgramPipelines(ReadOnlySpan<GlHandle> pipelines)
|
||||
{
|
||||
fixed (GlHandle* __pipelines = pipelines)
|
||||
{
|
||||
__context->glDeleteProgramPipelines(pipelines.Length, (uint*)__pipelines);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glGenProgramPipelines(GLsizei n, GLuint *pipelines);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glGenProgramPipelines">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void GenProgramPipelines(Span<GlHandle> pipelines)
|
||||
{
|
||||
fixed (GlHandle* __pipelines = pipelines)
|
||||
{
|
||||
__context->glGenProgramPipelines(pipelines.Length, (uint*)__pipelines);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>GLboolean glIsProgramPipeline(GLuint pipeline);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glIsProgramPipeline">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public byte IsProgramPipeline(GlHandle pipeline)
|
||||
{
|
||||
return __context->glIsProgramPipeline(pipeline.Value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glGetProgramPipelineiv(GLuint pipeline, GLenum pname, GLint *params);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glGetProgramPipelineiv">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void GetProgramPipelineiv(GlHandle pipeline, PipelineParameterName pName, int* @params)
|
||||
{
|
||||
__context->glGetProgramPipelineiv(pipeline.Value, (uint)pName, @params);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glProgramUniform1i(GLuint program, GLint location, GLint v0);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glProgramUniform">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void ProgramUniform(GlHandle program, int location, int v0)
|
||||
{
|
||||
__context->glProgramUniform1i(program.Value, location, v0);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glProgramUniform1iv(GLuint program, GLint location, GLsizei count, const GLint *value);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glProgramUniform">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void ProgramUniform(GlHandle program, int location, ReadOnlySpan<int> values)
|
||||
{
|
||||
fixed (int* __value = values)
|
||||
{
|
||||
__context->glProgramUniform1iv(program.Value, location, values.Length, __value);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glProgramUniform1f(GLuint program, GLint location, GLfloat v0);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glProgramUniform">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void ProgramUniform(GlHandle program, int location, float v0)
|
||||
{
|
||||
__context->glProgramUniform1f(program.Value, location, v0);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glProgramUniform1fv(GLuint program, GLint location, GLsizei count, const GLfloat *value);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glProgramUniform">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void ProgramUniform(GlHandle program, int location, ReadOnlySpan<float> values)
|
||||
{
|
||||
fixed (float* __value = values)
|
||||
{
|
||||
__context->glProgramUniform1fv(program.Value, location, values.Length, __value);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glProgramUniform1d(GLuint program, GLint location, GLdouble v0);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glProgramUniform">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void ProgramUniform(GlHandle program, int location, double v0)
|
||||
{
|
||||
__context->glProgramUniform1d(program.Value, location, v0);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glProgramUniform1dv(GLuint program, GLint location, GLsizei count, const GLdouble *value);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glProgramUniform">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void ProgramUniform(GlHandle program, int location, ReadOnlySpan<double> values)
|
||||
{
|
||||
fixed (double* __value = values)
|
||||
{
|
||||
__context->glProgramUniform1dv(program.Value, location, values.Length, __value);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glProgramUniform1ui(GLuint program, GLint location, GLuint v0);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glProgramUniform">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void ProgramUniform(GlHandle program, int location, uint v0)
|
||||
{
|
||||
__context->glProgramUniform1ui(program.Value, location, v0);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glProgramUniform1uiv(GLuint program, GLint location, GLsizei count, const GLuint *value);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glProgramUniform">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void ProgramUniform(GlHandle program, int location, ReadOnlySpan<uint> values)
|
||||
{
|
||||
fixed (uint* __value = values)
|
||||
{
|
||||
__context->glProgramUniform1uiv(program.Value, location, values.Length, __value);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glProgramUniform2i(GLuint program, GLint location, GLint v0, GLint v1);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glProgramUniform">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void ProgramUniform(GlHandle program, int location, int v0, int v1)
|
||||
{
|
||||
__context->glProgramUniform2i(program.Value, location, v0, v1);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glProgramUniform2i(GLuint program, GLint location, GLint v0, GLint v1);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glProgramUniform">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void ProgramUniform(GlHandle program, int location, Vec2<int> value)
|
||||
{
|
||||
__context->glProgramUniform2i(program.Value, location, value.X, value.Y);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glProgramUniform2f(GLuint program, GLint location, GLfloat v0, GLfloat v1);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glProgramUniform">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void ProgramUniform(GlHandle program, int location, float v0, float v1)
|
||||
{
|
||||
__context->glProgramUniform2f(program.Value, location, v0, v1);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glProgramUniform2f(GLuint program, GLint location, GLfloat v0, GLfloat v1);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glProgramUniform">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void ProgramUniform(GlHandle program, int location, Vec2<float> value)
|
||||
{
|
||||
__context->glProgramUniform2f(program.Value, location, value.X, value.Y);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glProgramUniform2d(GLuint program, GLint location, GLdouble v0, GLdouble v1);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glProgramUniform">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void ProgramUniform(GlHandle program, int location, double v0, double v1)
|
||||
{
|
||||
__context->glProgramUniform2d(program.Value, location, v0, v1);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glProgramUniform2d(GLuint program, GLint location, GLdouble v0, GLdouble v1);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glProgramUniform">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void ProgramUniform(GlHandle program, int location, Vec2<double> value)
|
||||
{
|
||||
__context->glProgramUniform2d(program.Value, location, value.X, value.Y);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glProgramUniform2ui(GLuint program, GLint location, GLuint v0, GLuint v1);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glProgramUniform">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void ProgramUniform(GlHandle program, int location, uint v0, uint v1)
|
||||
{
|
||||
__context->glProgramUniform2ui(program.Value, location, v0, v1);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glProgramUniform2ui(GLuint program, GLint location, GLuint v0, GLuint v1);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glProgramUniform">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void ProgramUniform(GlHandle program, int location, Vec2<uint> value)
|
||||
{
|
||||
__context->glProgramUniform2ui(program.Value, location, value.X, value.Y);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glProgramUniform3i(GLuint program, GLint location, GLint v0, GLint v1, GLint v2);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glProgramUniform">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void ProgramUniform(GlHandle program, int location, int v0, int v1, int v2)
|
||||
{
|
||||
__context->glProgramUniform3i(program.Value, location, v0, v1, v2);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glProgramUniform3i(GLuint program, GLint location, GLint v0, GLint v1, GLint v2);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glProgramUniform">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void ProgramUniform(GlHandle program, int location, Vec3<int> value)
|
||||
{
|
||||
__context->glProgramUniform3i(program.Value, location, value.X, value.Y, value.Z);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glProgramUniform3f(GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glProgramUniform">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void ProgramUniform(GlHandle program, int location, float v0, float v1, float v2)
|
||||
{
|
||||
__context->glProgramUniform3f(program.Value, location, v0, v1, v2);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glProgramUniform3f(GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glProgramUniform">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void ProgramUniform(GlHandle program, int location, Vec3<float> value)
|
||||
{
|
||||
__context->glProgramUniform3f(program.Value, location, value.X, value.Y, value.Z);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glProgramUniform3d(GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glProgramUniform">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void ProgramUniform(GlHandle program, int location, double v0, double v1, double v2)
|
||||
{
|
||||
__context->glProgramUniform3d(program.Value, location, v0, v1, v2);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glProgramUniform3d(GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glProgramUniform">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void ProgramUniform(GlHandle program, int location, Vec3<double> value)
|
||||
{
|
||||
__context->glProgramUniform3d(program.Value, location, value.X, value.Y, value.Z);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glProgramUniform3ui(GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glProgramUniform">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void ProgramUniform(GlHandle program, int location, uint v0, uint v1, uint v2)
|
||||
{
|
||||
__context->glProgramUniform3ui(program.Value, location, v0, v1, v2);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glProgramUniform3ui(GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glProgramUniform">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void ProgramUniform(GlHandle program, int location, Vec3<uint> value)
|
||||
{
|
||||
__context->glProgramUniform3ui(program.Value, location, value.X, value.Y, value.Z);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glProgramUniform4i(GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glProgramUniform">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void ProgramUniform(GlHandle program, int location, int v0, int v1, int v2, int v3)
|
||||
{
|
||||
__context->glProgramUniform4i(program.Value, location, v0, v1, v2, v3);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glProgramUniform4i(GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glProgramUniform">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void ProgramUniform(GlHandle program, int location, Vec4<int> value)
|
||||
{
|
||||
__context->glProgramUniform4i(program.Value, location, value.X, value.Y, value.Z, value.W);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glProgramUniform4iv(GLuint program, GLint location, GLsizei count, const GLint *value);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glProgramUniform">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void ProgramUniform(GlHandle program, int location, ReadOnlySpan<Vec4<int>> values)
|
||||
{
|
||||
fixed (Vec4<int>* __vector = values)
|
||||
{
|
||||
__context->glProgramUniform4iv(program.Value, location, values.Length, (int*)__vector);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glProgramUniform4f(GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glProgramUniform">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void ProgramUniform(GlHandle program, int location, float v0, float v1, float v2, float v3)
|
||||
{
|
||||
__context->glProgramUniform4f(program.Value, location, v0, v1, v2, v3);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glProgramUniform4f(GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glProgramUniform">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void ProgramUniform(GlHandle program, int location, Vec4<float> value)
|
||||
{
|
||||
__context->glProgramUniform4f(program.Value, location, value.X, value.Y, value.Z, value.W);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glProgramUniform4fv(GLuint program, GLint location, GLsizei count, const GLfloat *value);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glProgramUniform">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void ProgramUniform(GlHandle program, int location, ReadOnlySpan<Vec4<float>> values)
|
||||
{
|
||||
fixed (Vec4<float>* __vector = values)
|
||||
{
|
||||
__context->glProgramUniform4fv(program.Value, location, values.Length, (float*)__vector);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glProgramUniform4d(GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2, GLdouble v3);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glProgramUniform">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void ProgramUniform(GlHandle program, int location, double v0, double v1, double v2, double v3)
|
||||
{
|
||||
__context->glProgramUniform4d(program.Value, location, v0, v1, v2, v3);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glProgramUniform4d(GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2, GLdouble v3);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glProgramUniform">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void ProgramUniform(GlHandle program, int location, Vec4<double> value)
|
||||
{
|
||||
__context->glProgramUniform4d(program.Value, location, value.X, value.Y, value.Z, value.W);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glProgramUniform4dv(GLuint program, GLint location, GLsizei count, const GLdouble *value);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glProgramUniform">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void ProgramUniform(GlHandle program, int location, ReadOnlySpan<Vec4<double>> values)
|
||||
{
|
||||
fixed (Vec4<double>* __vector = values)
|
||||
{
|
||||
__context->glProgramUniform4dv(program.Value, location, values.Length, (double*)__vector);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glProgramUniform4ui(GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glProgramUniform">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void ProgramUniform(GlHandle program, int location, uint v0, uint v1, uint v2, uint v3)
|
||||
{
|
||||
__context->glProgramUniform4ui(program.Value, location, v0, v1, v2, v3);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glProgramUniform4ui(GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glProgramUniform">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void ProgramUniform(GlHandle program, int location, Vec4<uint> value)
|
||||
{
|
||||
__context->glProgramUniform4ui(program.Value, location, value.X, value.Y, value.Z, value.W);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glProgramUniform4uiv(GLuint program, GLint location, GLsizei count, const GLuint *value);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glProgramUniform">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void ProgramUniform(GlHandle program, int location, ReadOnlySpan<Vec4<uint>> values)
|
||||
{
|
||||
fixed (Vec4<uint>* __vector = values)
|
||||
{
|
||||
__context->glProgramUniform4uiv(program.Value, location, values.Length, (uint*)__vector);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glProgramUniformMatrix4fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glProgramUniform">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void ProgramUniform(GlHandle program, int location, bool transpose, GraphicsMatrix value)
|
||||
{
|
||||
__context->glProgramUniformMatrix4fv(program.Value, location, 1, transpose ? (byte)1 : (byte)0, (float*)&value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glProgramUniformMatrix4fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glProgramUniform">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void ProgramUniform(GlHandle program, int location, bool transpose, ReadOnlySpan<GraphicsMatrix> values)
|
||||
{
|
||||
fixed (GraphicsMatrix* __value = values)
|
||||
{
|
||||
__context->glProgramUniformMatrix4fv(program.Value, location, values.Length, transpose ? (byte)1 : (byte)0, (float*)__value);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glValidateProgramPipeline(GLuint pipeline);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glValidateProgramPipeline">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void ValidateProgramPipeline(GlHandle pipeline)
|
||||
{
|
||||
__context->glValidateProgramPipeline(pipeline.Value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glGetProgramPipelineInfoLog(GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glGetProgramPipelineInfoLog">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void GetProgramPipelineInfoLog(GlHandle pipeline, int bufSize, int* length, byte* infoLog)
|
||||
{
|
||||
__context->glGetProgramPipelineInfoLog(pipeline.Value, bufSize, length, infoLog);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glVertexAttribL1d(GLuint index, GLdouble x);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glVertexAttrib">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void VertexAttributeDouble(uint index, double x)
|
||||
{
|
||||
__context->glVertexAttribL1d(index, x);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glVertexAttribL2d(GLuint index, GLdouble x, GLdouble y);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glVertexAttrib">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void VertexAttributeDouble(uint index, double x, double y)
|
||||
{
|
||||
__context->glVertexAttribL2d(index, x, y);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glVertexAttribL3d(GLuint index, GLdouble x, GLdouble y, GLdouble z);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glVertexAttrib">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void VertexAttributeDouble(uint index, double x, double y, double z)
|
||||
{
|
||||
__context->glVertexAttribL3d(index, x, y, z);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glVertexAttribL4d(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glVertexAttrib">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void VertexAttributeDouble(uint index, double x, double y, double z, double w)
|
||||
{
|
||||
__context->glVertexAttribL4d(index, x, y, z, w);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glVertexAttribLPointer(GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glVertexAttribPointer">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void VertexAttributeDoublePointer(uint index, int size, VertexAttributeLType type, int stride, void* pointer)
|
||||
{
|
||||
__context->glVertexAttribLPointer(index, size, (uint)type, stride, pointer);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glGetVertexAttribLdv(GLuint index, GLenum pname, GLdouble *params);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glGetVertexAttrib">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void GetVertexAttributeDouble(uint index, VertexAttributeEnum pName, double* @params)
|
||||
{
|
||||
__context->glGetVertexAttribLdv(index, (uint)pName, @params);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glViewportArrayv(GLuint first, GLsizei count, const GLfloat *v);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glViewportArrayv">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void ViewportArrayv(uint first, int count, float* v)
|
||||
{
|
||||
__context->glViewportArrayv(first, count, v);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glViewportIndexedf(GLuint index, GLfloat x, GLfloat y, GLfloat w, GLfloat h);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glViewportIndexed">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void ViewportIndexed(uint index, float x, float y, float w, float h)
|
||||
{
|
||||
__context->glViewportIndexedf(index, x, y, w, h);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glViewportIndexedfv(GLuint index, const GLfloat *v);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glViewportIndexed">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void ViewportIndexed(uint index, float* v)
|
||||
{
|
||||
__context->glViewportIndexedfv(index, v);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glScissorArrayv(GLuint first, GLsizei count, const GLint *v);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glScissorArrayv">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void ScissorArrayv(uint first, int count, int* v)
|
||||
{
|
||||
__context->glScissorArrayv(first, count, v);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glScissorIndexed(GLuint index, GLint left, GLint bottom, GLsizei width, GLsizei height);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glScissorIndexed">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void ScissorIndexed(uint index, int left, int bottom, int width, int height)
|
||||
{
|
||||
__context->glScissorIndexed(index, left, bottom, width, height);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glScissorIndexedv(GLuint index, const GLint *v);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glScissorIndexed">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void ScissorIndexed(uint index, int* v)
|
||||
{
|
||||
__context->glScissorIndexedv(index, v);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glDepthRangeArrayv(GLuint first, GLsizei count, const GLdouble *v);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glDepthRangeArrayv">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void DepthRangeArrayv(uint first, int count, double* v)
|
||||
{
|
||||
__context->glDepthRangeArrayv(first, count, v);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glDepthRangeIndexed(GLuint index, GLdouble n, GLdouble f);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glDepthRangeIndexed">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void DepthRangeIndexed(uint index, double n, double f)
|
||||
{
|
||||
__context->glDepthRangeIndexed(index, n, f);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glGetFloati_v(GLenum target, GLuint index, GLfloat *data);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glGet">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void GetValue(GetPName target, uint index, Span<float> values)
|
||||
{
|
||||
fixed (float* __value = values)
|
||||
{
|
||||
__context->glGetFloati_v((uint)target, index, __value);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glGetDoublei_v(GLenum target, GLuint index, GLdouble *data);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glGet">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void GetValue(GetPName target, uint index, Span<double> values)
|
||||
{
|
||||
fixed (double* __value = values)
|
||||
{
|
||||
__context->glGetDoublei_v((uint)target, index, __value);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,156 @@
|
||||
// -----------------------------------------------------------------------------
|
||||
// file="OpenGLFunction.v4_2"
|
||||
// Project: StgSharp
|
||||
// Copyright (c) Nitload.
|
||||
// SPDX-License-Identifier: MIT
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
// <auto-generated>
|
||||
// Generated by Nitload.GenerateGL.
|
||||
// Desktop OpenGL 4.2 core-profile forwarding methods.
|
||||
// </auto-generated>
|
||||
|
||||
using Nitload.Mathematics.Numeric.Graphics;
|
||||
|
||||
using System;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
namespace Nitload.Graphics.OpenGL
|
||||
{
|
||||
public unsafe partial class OpenGLFunction
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glDrawArraysInstancedBaseInstance(GLenum mode, GLint first, GLsizei count, GLsizei instancecount, GLuint baseinstance);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glDrawArraysInstancedBaseInstance">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void DrawArraysInstancedBaseInstance(PrimitiveType mode, int first, int count, int instancecount, uint baseinstance)
|
||||
{
|
||||
__context->glDrawArraysInstancedBaseInstance((uint)mode, first, count, instancecount, baseinstance);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glDrawElementsInstancedBaseInstance(GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLuint baseinstance);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glDrawElementsInstancedBaseInstance">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void DrawElementsInstancedBaseInstance(PrimitiveType mode, int count, DrawElementsType type, void* indices, int instancecount, uint baseinstance)
|
||||
{
|
||||
__context->glDrawElementsInstancedBaseInstance((uint)mode, count, (uint)type, indices, instancecount, baseinstance);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glDrawElementsInstancedBaseVertexBaseInstance(GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLint basevertex, GLuint baseinstance);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glDrawElementsInstancedBaseVertexBaseInstance">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void DrawElementsInstancedBaseVertexBaseInstance(PrimitiveType mode, int count, DrawElementsType type, void* indices, int instancecount, int basevertex, uint baseinstance)
|
||||
{
|
||||
__context->glDrawElementsInstancedBaseVertexBaseInstance((uint)mode, count, (uint)type, indices, instancecount, basevertex, baseinstance);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glGetInternalformativ(GLenum target, GLenum internalformat, GLenum pname, GLsizei count, GLint *params);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glGetInternalformat">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void GetInternalFormat(TextureTarget target, InternalFormat internalFormat, InternalFormatPName pName, int count, int* @params)
|
||||
{
|
||||
__context->glGetInternalformativ((uint)target, (uint)internalFormat, (uint)pName, count, @params);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glGetActiveAtomicCounterBufferiv(GLuint program, GLuint bufferIndex, GLenum pname, GLint *params);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glGetActiveAtomicCounterBufferiv">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void GetActiveAtomicCounterBufferiv(GlHandle program, uint bufferIndex, AtomicCounterBufferPName pName, int* @params)
|
||||
{
|
||||
__context->glGetActiveAtomicCounterBufferiv(program.Value, bufferIndex, (uint)pName, @params);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glBindImageTexture(GLuint unit, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLenum format);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glBindImageTexture">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void BindImageTexture(uint unit, GlHandle texture, int level, byte layered, int layer, BufferAccess access, InternalFormat format)
|
||||
{
|
||||
__context->glBindImageTexture(unit, texture.Value, level, layered, layer, (uint)access, (uint)format);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glMemoryBarrier(GLbitfield barriers);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glMemoryBarrier">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void MemoryBarrier(MemoryBarrierMask barriers)
|
||||
{
|
||||
__context->glMemoryBarrier((uint)barriers);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glTexStorage1D(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glTexStorage1D">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void TexStorage1D(TextureTarget target, int levels, SizedInternalFormat internalFormat, int width)
|
||||
{
|
||||
__context->glTexStorage1D((uint)target, levels, (uint)internalFormat, width);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glTexStorage2D(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glTexStorage2D">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void TexStorage2D(TextureTarget target, int levels, SizedInternalFormat internalFormat, int width, int height)
|
||||
{
|
||||
__context->glTexStorage2D((uint)target, levels, (uint)internalFormat, width, height);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glTexStorage3D(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glTexStorage3D">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void TexStorage3D(TextureTarget target, int levels, SizedInternalFormat internalFormat, int width, int height, int depth)
|
||||
{
|
||||
__context->glTexStorage3D((uint)target, levels, (uint)internalFormat, width, height, depth);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glDrawTransformFeedbackInstanced(GLenum mode, GLuint id, GLsizei instancecount);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glDrawTransformFeedbackInstanced">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void DrawTransformFeedbackInstanced(PrimitiveType mode, GlHandle id, int instancecount)
|
||||
{
|
||||
__context->glDrawTransformFeedbackInstanced((uint)mode, id.Value, instancecount);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glDrawTransformFeedbackStreamInstanced(GLenum mode, GLuint id, GLuint stream, GLsizei instancecount);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glDrawTransformFeedbackStreamInstanced">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void DrawTransformFeedbackStreamInstanced(PrimitiveType mode, GlHandle id, uint stream, int instancecount)
|
||||
{
|
||||
__context->glDrawTransformFeedbackStreamInstanced((uint)mode, id.Value, stream, instancecount);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,497 @@
|
||||
// -----------------------------------------------------------------------------
|
||||
// file="OpenGLFunction.v4_3"
|
||||
// Project: StgSharp
|
||||
// Copyright (c) Nitload.
|
||||
// SPDX-License-Identifier: MIT
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
// <auto-generated>
|
||||
// Generated by Nitload.GenerateGL.
|
||||
// Desktop OpenGL 4.3 core-profile forwarding methods.
|
||||
// </auto-generated>
|
||||
|
||||
using Nitload.Mathematics.Numeric.Graphics;
|
||||
|
||||
using System;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
namespace Nitload.Graphics.OpenGL
|
||||
{
|
||||
public unsafe partial class OpenGLFunction
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glClearBufferData(GLenum target, GLenum internalformat, GLenum format, GLenum type, const void *data);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glClearBufferData">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void ClearBufferData(BufferStorageTarget target, SizedInternalFormat internalFormat, PixelFormat format, PixelType type, void* data)
|
||||
{
|
||||
__context->glClearBufferData((uint)target, (uint)internalFormat, (uint)format, (uint)type, data);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glClearBufferSubData(GLenum target, GLenum internalformat, GLintptr offset, GLsizeiptr size, GLenum format, GLenum type, const void *data);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glClearBufferSubData">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void ClearBufferSubData(BufferTarget target, SizedInternalFormat internalFormat, nint offset, nint size, PixelFormat format, PixelType type, void* data)
|
||||
{
|
||||
__context->glClearBufferSubData((uint)target, (uint)internalFormat, offset, size, (uint)format, (uint)type, data);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glDispatchCompute(GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glDispatchCompute">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[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);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glDispatchComputeIndirect(GLintptr indirect);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glDispatchComputeIndirect">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void DispatchComputeIndirect(nint indirect)
|
||||
{
|
||||
__context->glDispatchComputeIndirect(indirect);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glCopyImageSubData(GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei srcWidth, GLsizei srcHeight, GLsizei srcDepth);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glCopyImageSubData">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void CopyImageSubData(uint srcName, CopyImageSubDataTarget srcTarget, int srcLevel, int srcX, int srcY, int srcZ, uint dstName, CopyImageSubDataTarget dstTarget, int dstLevel, int dstX, int dstY, int dstZ, int srcWidth, int srcHeight, int srcDepth)
|
||||
{
|
||||
__context->glCopyImageSubData(srcName, (uint)srcTarget, srcLevel, srcX, srcY, srcZ, dstName, (uint)dstTarget, dstLevel, dstX, dstY, dstZ, srcWidth, srcHeight, srcDepth);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glFramebufferParameteri(GLenum target, GLenum pname, GLint param);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glFramebufferParameteri">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void FrameBufferParameteri(FrameBufferTarget target, FrameBufferParameterName pName, int param)
|
||||
{
|
||||
__context->glFramebufferParameteri((uint)target, (uint)pName, param);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glGetFramebufferParameteriv(GLenum target, GLenum pname, GLint *params);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glGetFramebufferParameteriv">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void GetFrameBufferParameteriv(FrameBufferTarget target, FrameBufferAttachmentParameterName pName, int* @params)
|
||||
{
|
||||
__context->glGetFramebufferParameteriv((uint)target, (uint)pName, @params);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glGetInternalformati64v(GLenum target, GLenum internalformat, GLenum pname, GLsizei count, GLint64 *params);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glGetInternalformat">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void GetInternalFormat(TextureTarget target, InternalFormat internalFormat, InternalFormatPName pName, int count, long* @params)
|
||||
{
|
||||
__context->glGetInternalformati64v((uint)target, (uint)internalFormat, (uint)pName, count, @params);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glInvalidateTexSubImage(GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glInvalidateTexSubImage">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[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);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glInvalidateTexImage(GLuint texture, GLint level);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glInvalidateTexImage">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void InvalidateTexImage(GlHandle texture, int level)
|
||||
{
|
||||
__context->glInvalidateTexImage(texture.Value, level);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glInvalidateBufferSubData(GLuint buffer, GLintptr offset, GLsizeiptr length);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glInvalidateBufferSubData">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void InvalidateBufferSubData(GlHandle buffer, nint offset, nint length)
|
||||
{
|
||||
__context->glInvalidateBufferSubData(buffer.Value, offset, length);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glInvalidateBufferData(GLuint buffer);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glInvalidateBufferData">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void InvalidateBufferData(GlHandle buffer)
|
||||
{
|
||||
__context->glInvalidateBufferData(buffer.Value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glInvalidateFramebuffer(GLenum target, GLsizei numAttachments, const GLenum *attachments);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glInvalidateFramebuffer">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void InvalidateFrameBuffer(FrameBufferTarget target, int numAttachments, InvalidateFrameBufferAttachment* attachments)
|
||||
{
|
||||
__context->glInvalidateFramebuffer((uint)target, numAttachments, (uint*)attachments);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glInvalidateSubFramebuffer(GLenum target, GLsizei numAttachments, const GLenum *attachments, GLint x, GLint y, GLsizei width, GLsizei height);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glInvalidateSubFramebuffer">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void InvalidateSubFrameBuffer(FrameBufferTarget target, int numAttachments, InvalidateFrameBufferAttachment* attachments, int x, int y, int width, int height)
|
||||
{
|
||||
__context->glInvalidateSubFramebuffer((uint)target, numAttachments, (uint*)attachments, x, y, width, height);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glMultiDrawArraysIndirect(GLenum mode, const void *indirect, GLsizei drawcount, GLsizei stride);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glMultiDrawArraysIndirect">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void MultiDrawArraysIndirect(PrimitiveType mode, void* indirect, int drawcount, int stride)
|
||||
{
|
||||
__context->glMultiDrawArraysIndirect((uint)mode, indirect, drawcount, stride);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glMultiDrawElementsIndirect(GLenum mode, GLenum type, const void *indirect, GLsizei drawcount, GLsizei stride);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glMultiDrawElementsIndirect">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void MultiDrawElementsIndirect(PrimitiveType mode, DrawElementsType type, void* indirect, int drawcount, int stride)
|
||||
{
|
||||
__context->glMultiDrawElementsIndirect((uint)mode, (uint)type, indirect, drawcount, stride);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glGetProgramInterfaceiv(GLuint program, GLenum programInterface, GLenum pname, GLint *params);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glGetProgramInterfaceiv">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void GetProgramInterfaceiv(GlHandle program, ProgramInterface programInterface, ProgramInterfacePName pName, int* @params)
|
||||
{
|
||||
__context->glGetProgramInterfaceiv(program.Value, (uint)programInterface, (uint)pName, @params);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>GLuint glGetProgramResourceIndex(GLuint program, GLenum programInterface, const GLchar *name);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glGetProgramResourceIndex">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public uint GetProgramResourceIndex(GlHandle program, ProgramInterface programInterface, byte* name)
|
||||
{
|
||||
return __context->glGetProgramResourceIndex(program.Value, (uint)programInterface, name);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glGetProgramResourceName(GLuint program, GLenum programInterface, GLuint index, GLsizei bufSize, GLsizei *length, GLchar *name);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glGetProgramResourceName">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void GetProgramResourceName(GlHandle program, ProgramInterface programInterface, uint index, int bufSize, int* length, byte* name)
|
||||
{
|
||||
__context->glGetProgramResourceName(program.Value, (uint)programInterface, index, bufSize, length, name);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glGetProgramResourceiv(GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum *props, GLsizei count, GLsizei *length, GLint *params);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glGetProgramResourceiv">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void GetProgramResourceiv(GlHandle program, ProgramInterface programInterface, uint index, int propCount, ProgramResourceProperty* props, int count, int* length, int* @params)
|
||||
{
|
||||
__context->glGetProgramResourceiv(program.Value, (uint)programInterface, index, propCount, (uint*)props, count, length, @params);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>GLint glGetProgramResourceLocation(GLuint program, GLenum programInterface, const GLchar *name);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glGetProgramResourceLocation">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public int GetProgramResourceLocation(GlHandle program, ProgramInterface programInterface, byte* name)
|
||||
{
|
||||
return __context->glGetProgramResourceLocation(program.Value, (uint)programInterface, name);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>GLint glGetProgramResourceLocationIndex(GLuint program, GLenum programInterface, const GLchar *name);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glGetProgramResourceLocationIndex">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public int GetProgramResourceLocationIndex(GlHandle program, ProgramInterface programInterface, byte* name)
|
||||
{
|
||||
return __context->glGetProgramResourceLocationIndex(program.Value, (uint)programInterface, name);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glShaderStorageBlockBinding(GLuint program, GLuint storageBlockIndex, GLuint storageBlockBinding);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glShaderStorageBlockBinding">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void ShaderStorageBlockBinding(GlHandle program, uint storageBlockIndex, uint storageBlockBinding)
|
||||
{
|
||||
__context->glShaderStorageBlockBinding(program.Value, storageBlockIndex, storageBlockBinding);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glTexBufferRange(GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glTexBufferRange">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void TexBufferRange(TextureTarget target, SizedInternalFormat internalFormat, GlHandle buffer, nint offset, nint size)
|
||||
{
|
||||
__context->glTexBufferRange((uint)target, (uint)internalFormat, buffer.Value, offset, size);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glTexStorage2DMultisample(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glTexStorage2DMultisample">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void TexStorage2DMultisample(TextureTarget target, int samples, SizedInternalFormat internalFormat, int width, int height, byte fixedsamplelocations)
|
||||
{
|
||||
__context->glTexStorage2DMultisample((uint)target, samples, (uint)internalFormat, width, height, fixedsamplelocations);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glTexStorage3DMultisample(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glTexStorage3DMultisample">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void TexStorage3DMultisample(TextureTarget target, int samples, SizedInternalFormat internalFormat, int width, int height, int depth, byte fixedsamplelocations)
|
||||
{
|
||||
__context->glTexStorage3DMultisample((uint)target, samples, (uint)internalFormat, width, height, depth, fixedsamplelocations);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glTextureView(GLuint texture, GLenum target, GLuint origtexture, GLenum internalformat, GLuint minlevel, GLuint numlevels, GLuint minlayer, GLuint numlayers);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glTextureView">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void TextureView(GlHandle texture, TextureTarget target, GlHandle origtexture, SizedInternalFormat internalFormat, uint minlevel, uint numlevels, uint minlayer, uint numlayers)
|
||||
{
|
||||
__context->glTextureView(texture.Value, (uint)target, origtexture.Value, (uint)internalFormat, minlevel, numlevels, minlayer, numlayers);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glBindVertexBuffer(GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glBindVertexBuffer">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void BindVertexBuffer(uint bindingIndex, GlHandle buffer, nint offset, int stride)
|
||||
{
|
||||
__context->glBindVertexBuffer(bindingIndex, buffer.Value, offset, stride);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glVertexAttribFormat(GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glVertexAttribFormat">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void VertexAttributeFormat(uint attributeIndex, int size, VertexAttributeType type, byte normalized, uint relativeOffset)
|
||||
{
|
||||
__context->glVertexAttribFormat(attributeIndex, size, (uint)type, normalized, relativeOffset);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glVertexAttribIFormat(GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glVertexAttribFormat">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void VertexAttributeIntegerFormat(uint attributeIndex, int size, VertexAttributeIType type, uint relativeOffset)
|
||||
{
|
||||
__context->glVertexAttribIFormat(attributeIndex, size, (uint)type, relativeOffset);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glVertexAttribLFormat(GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glVertexAttribFormat">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void VertexAttributeDoubleFormat(uint attributeIndex, int size, VertexAttributeLType type, uint relativeOffset)
|
||||
{
|
||||
__context->glVertexAttribLFormat(attributeIndex, size, (uint)type, relativeOffset);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glVertexAttribBinding(GLuint attribindex, GLuint bindingindex);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glVertexAttribBinding">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void VertexAttributeBinding(uint attributeIndex, uint bindingIndex)
|
||||
{
|
||||
__context->glVertexAttribBinding(attributeIndex, bindingIndex);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glVertexBindingDivisor(GLuint bindingindex, GLuint divisor);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glVertexBindingDivisor">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void VertexBindingDivisor(uint bindingIndex, uint divisor)
|
||||
{
|
||||
__context->glVertexBindingDivisor(bindingIndex, divisor);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glDebugMessageControl(GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glDebugMessageControl">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void DebugMessageControl(DebugSource source, DebugType type, DebugSeverity severity, int count, uint* ids, byte enabled)
|
||||
{
|
||||
__context->glDebugMessageControl((uint)source, (uint)type, (uint)severity, count, ids, enabled);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glDebugMessageInsert(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glDebugMessageInsert">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void DebugMessageInsert(DebugSource source, DebugType type, uint id, DebugSeverity severity, int length, byte* buf)
|
||||
{
|
||||
__context->glDebugMessageInsert((uint)source, (uint)type, id, (uint)severity, length, buf);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glDebugMessageCallback(GLDEBUGPROC callback, const void *userParam);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glDebugMessageCallback">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void DebugMessageCallback(delegate* unmanaged<uint, uint, uint, uint, int, byte*, void*, void> callback, void* userParam)
|
||||
{
|
||||
__context->glDebugMessageCallback(callback, userParam);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>GLuint glGetDebugMessageLog(GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glGetDebugMessageLog">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public uint GetDebugMessageLog(uint count, int bufSize, DebugSource* sources, DebugType* types, uint* ids, DebugSeverity* severities, int* lengths, byte* messageLog)
|
||||
{
|
||||
return __context->glGetDebugMessageLog(count, bufSize, (uint*)sources, (uint*)types, ids, (uint*)severities, lengths, messageLog);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glPushDebugGroup(GLenum source, GLuint id, GLsizei length, const GLchar *message);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glPushDebugGroup">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void PushDebugGroup(DebugSource source, uint id, int length, byte* message)
|
||||
{
|
||||
__context->glPushDebugGroup((uint)source, id, length, message);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glPopDebugGroup();</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glPopDebugGroup">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void PopDebugGroup()
|
||||
{
|
||||
__context->glPopDebugGroup();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glObjectLabel(GLenum identifier, GLuint name, GLsizei length, const GLchar *label);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glObjectLabel">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void ObjectLabel(ObjectIdentifier identifier, uint name, int length, byte* label)
|
||||
{
|
||||
__context->glObjectLabel((uint)identifier, name, length, label);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glGetObjectLabel(GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glGetObjectLabel">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void GetObjectLabel(ObjectIdentifier identifier, uint name, int bufSize, int* length, byte* label)
|
||||
{
|
||||
__context->glGetObjectLabel((uint)identifier, name, bufSize, length, label);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glObjectPtrLabel(const void *ptr, GLsizei length, const GLchar *label);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glObjectPtrLabel">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void ObjectPtrLabel(void* ptr, int length, byte* label)
|
||||
{
|
||||
__context->glObjectPtrLabel(ptr, length, label);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glGetObjectPtrLabel(const void *ptr, GLsizei bufSize, GLsizei *length, GLchar *label);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glGetObjectPtrLabel">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void GetObjectPtrLabel(void* ptr, int bufSize, int* length, byte* label)
|
||||
{
|
||||
__context->glGetObjectPtrLabel(ptr, bufSize, length, label);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,141 @@
|
||||
// -----------------------------------------------------------------------------
|
||||
// file="OpenGLFunction.v4_4"
|
||||
// Project: StgSharp
|
||||
// Copyright (c) Nitload.
|
||||
// SPDX-License-Identifier: MIT
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
// <auto-generated>
|
||||
// Generated by Nitload.GenerateGL.
|
||||
// Desktop OpenGL 4.4 core-profile forwarding methods.
|
||||
// </auto-generated>
|
||||
|
||||
using Nitload.Mathematics.Numeric.Graphics;
|
||||
|
||||
using System;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
namespace Nitload.Graphics.OpenGL
|
||||
{
|
||||
public unsafe partial class OpenGLFunction
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glBufferStorage(GLenum target, GLsizeiptr size, const void *data, GLbitfield flags);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glBufferStorage">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void BufferStorage(BufferStorageTarget target, nint size, void* data, BufferStorageMask flags)
|
||||
{
|
||||
__context->glBufferStorage((uint)target, size, data, (uint)flags);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glClearTexImage(GLuint texture, GLint level, GLenum format, GLenum type, const void *data);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glClearTexImage">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void ClearTexImage(GlHandle texture, int level, PixelFormat format, PixelType type, void* data)
|
||||
{
|
||||
__context->glClearTexImage(texture.Value, level, (uint)format, (uint)type, data);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glClearTexSubImage(GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *data);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glClearTexSubImage">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void ClearTexSubImage(GlHandle texture, int level, int xOffset, int yOffset, int zOffset, int width, int height, int depth, PixelFormat format, PixelType type, void* data)
|
||||
{
|
||||
__context->glClearTexSubImage(texture.Value, level, xOffset, yOffset, zOffset, width, height, depth, (uint)format, (uint)type, data);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glBindBuffersBase(GLenum target, GLuint first, GLsizei count, const GLuint *buffers);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glBindBuffersBase">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void BindBuffersBase(BufferTarget target, uint first, ReadOnlySpan<GlHandle> buffers)
|
||||
{
|
||||
fixed (GlHandle* __buffers = buffers)
|
||||
{
|
||||
__context->glBindBuffersBase((uint)target, first, buffers.Length, (uint*)__buffers);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glBindBuffersRange(GLenum target, GLuint first, GLsizei count, const GLuint *buffers, const GLintptr *offsets, const GLsizeiptr *sizes);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glBindBuffersRange">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void BindBuffersRange(BufferTarget target, uint first, ReadOnlySpan<GlHandle> buffers, nint* offsets, nint* sizes)
|
||||
{
|
||||
fixed (GlHandle* __buffers = buffers)
|
||||
{
|
||||
__context->glBindBuffersRange((uint)target, first, buffers.Length, (uint*)__buffers, offsets, sizes);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glBindTextures(GLuint first, GLsizei count, const GLuint *textures);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glBindTextures">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void BindTextures(uint first, ReadOnlySpan<GlHandle> textures)
|
||||
{
|
||||
fixed (GlHandle* __textures = textures)
|
||||
{
|
||||
__context->glBindTextures(first, textures.Length, (uint*)__textures);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glBindSamplers(GLuint first, GLsizei count, const GLuint *samplers);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glBindSamplers">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void BindSamplers(uint first, ReadOnlySpan<GlHandle> samplers)
|
||||
{
|
||||
fixed (GlHandle* __samplers = samplers)
|
||||
{
|
||||
__context->glBindSamplers(first, samplers.Length, (uint*)__samplers);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glBindImageTextures(GLuint first, GLsizei count, const GLuint *textures);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glBindImageTextures">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void BindImageTextures(uint first, ReadOnlySpan<GlHandle> textures)
|
||||
{
|
||||
fixed (GlHandle* __textures = textures)
|
||||
{
|
||||
__context->glBindImageTextures(first, textures.Length, (uint*)__textures);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glBindVertexBuffers(GLuint first, GLsizei count, const GLuint *buffers, const GLintptr *offsets, const GLsizei *strides);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glBindVertexBuffers">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void BindVertexBuffers(uint first, ReadOnlySpan<GlHandle> buffers, nint* offsets, int* strides)
|
||||
{
|
||||
fixed (GlHandle* __buffers = buffers)
|
||||
{
|
||||
__context->glBindVertexBuffers(first, buffers.Length, (uint*)__buffers, offsets, strides);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,68 @@
|
||||
// -----------------------------------------------------------------------------
|
||||
// file="OpenGLFunction.v4_6"
|
||||
// Project: StgSharp
|
||||
// Copyright (c) Nitload.
|
||||
// SPDX-License-Identifier: MIT
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
// <auto-generated>
|
||||
// Generated by Nitload.GenerateGL.
|
||||
// Desktop OpenGL 4.6 core-profile forwarding methods.
|
||||
// </auto-generated>
|
||||
|
||||
using Nitload.Mathematics.Numeric.Graphics;
|
||||
|
||||
using System;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
namespace Nitload.Graphics.OpenGL
|
||||
{
|
||||
public unsafe partial class OpenGLFunction
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glSpecializeShader(GLuint shader, const GLchar *pEntryPoint, GLuint numSpecializationConstants, const GLuint *pConstantIndex, const GLuint *pConstantValue);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glSpecializeShader">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void SpecializeShader(GlHandle shader, byte* pEntryPoint, uint numSpecializationConstants, uint* pConstantIndex, uint* pConstantValue)
|
||||
{
|
||||
__context->glSpecializeShader(shader.Value, pEntryPoint, numSpecializationConstants, pConstantIndex, pConstantValue);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glMultiDrawArraysIndirectCount(GLenum mode, const void *indirect, GLintptr drawcount, GLsizei maxdrawcount, GLsizei stride);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glMultiDrawArraysIndirectCount">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void MultiDrawArraysIndirectCount(PrimitiveType mode, void* indirect, nint drawcount, int maxdrawcount, int stride)
|
||||
{
|
||||
__context->glMultiDrawArraysIndirectCount((uint)mode, indirect, drawcount, maxdrawcount, stride);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glMultiDrawElementsIndirectCount(GLenum mode, GLenum type, const void *indirect, GLintptr drawcount, GLsizei maxdrawcount, GLsizei stride);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glMultiDrawElementsIndirectCount">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void MultiDrawElementsIndirectCount(PrimitiveType mode, DrawElementsType type, void* indirect, nint drawcount, int maxdrawcount, int stride)
|
||||
{
|
||||
__context->glMultiDrawElementsIndirectCount((uint)mode, (uint)type, indirect, drawcount, maxdrawcount, stride);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Forwards to the native OpenGL entry point.</para>
|
||||
/// <para><c>void glPolygonOffsetClamp(GLfloat factor, GLfloat units, GLfloat clamp);</c></para>
|
||||
/// <para>See <see href="https://docs.gl/gl4/glPolygonOffsetClamp">docs.gl</see>.</para>
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public void PolygonOffsetClamp(float factor, float units, float clamp)
|
||||
{
|
||||
__context->glPolygonOffsetClamp(factor, units, clamp);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,676 @@
|
||||
// -----------------------------------------------------------------------------
|
||||
// file="OpenglContext"
|
||||
// Project: StgSharp
|
||||
// Copyright (c) Nitload.
|
||||
// SPDX-License-Identifier: MIT
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
// <auto-generated>
|
||||
// Generated by Nitload.GenerateGL.
|
||||
// Desktop OpenGL core function pointer table.
|
||||
// </auto-generated>
|
||||
|
||||
namespace Nitload.Graphics.OpenGL
|
||||
{
|
||||
[System.Runtime.InteropServices.StructLayout(System.Runtime.InteropServices.LayoutKind.Sequential)]
|
||||
public unsafe partial struct OpenglContext
|
||||
{
|
||||
internal delegate* unmanaged<uint, uint, void> glActiveShaderProgram;
|
||||
internal delegate* unmanaged<uint, void> glActiveTexture;
|
||||
internal delegate* unmanaged<uint, uint, void> glAttachShader;
|
||||
internal delegate* unmanaged<uint, uint, void> glBeginConditionalRender;
|
||||
internal delegate* unmanaged<uint, uint, void> glBeginQuery;
|
||||
internal delegate* unmanaged<uint, uint, uint, void> glBeginQueryIndexed;
|
||||
internal delegate* unmanaged<uint, void> glBeginTransformFeedback;
|
||||
internal delegate* unmanaged<uint, uint, byte*, void> glBindAttribLocation;
|
||||
internal delegate* unmanaged<uint, uint, void> glBindBuffer;
|
||||
internal delegate* unmanaged<uint, uint, uint, void> glBindBufferBase;
|
||||
internal delegate* unmanaged<uint, uint, uint, nint, nint, void> glBindBufferRange;
|
||||
internal delegate* unmanaged<uint, uint, int, uint*, void> glBindBuffersBase;
|
||||
internal delegate* unmanaged<uint, uint, int, uint*, nint*, nint*, void> glBindBuffersRange;
|
||||
internal delegate* unmanaged<uint, uint, byte*, void> glBindFragDataLocation;
|
||||
internal delegate* unmanaged<uint, uint, uint, byte*, void> glBindFragDataLocationIndexed;
|
||||
internal delegate* unmanaged<uint, uint, void> glBindFramebuffer;
|
||||
internal delegate* unmanaged<uint, uint, int, byte, int, uint, uint, void> glBindImageTexture;
|
||||
internal delegate* unmanaged<uint, int, uint*, void> glBindImageTextures;
|
||||
internal delegate* unmanaged<uint, void> glBindProgramPipeline;
|
||||
internal delegate* unmanaged<uint, uint, void> glBindRenderbuffer;
|
||||
internal delegate* unmanaged<uint, uint, void> glBindSampler;
|
||||
internal delegate* unmanaged<uint, int, uint*, void> glBindSamplers;
|
||||
internal delegate* unmanaged<uint, uint, void> glBindTexture;
|
||||
internal delegate* unmanaged<uint, uint, void> glBindTextureUnit;
|
||||
internal delegate* unmanaged<uint, int, uint*, void> glBindTextures;
|
||||
internal delegate* unmanaged<uint, uint, void> glBindTransformFeedback;
|
||||
internal delegate* unmanaged<uint, void> glBindVertexArray;
|
||||
internal delegate* unmanaged<uint, uint, nint, int, void> glBindVertexBuffer;
|
||||
internal delegate* unmanaged<uint, int, uint*, nint*, int*, void> glBindVertexBuffers;
|
||||
internal delegate* unmanaged<float, float, float, float, void> glBlendColor;
|
||||
internal delegate* unmanaged<uint, void> glBlendEquation;
|
||||
internal delegate* unmanaged<uint, uint, void> glBlendEquationSeparate;
|
||||
internal delegate* unmanaged<uint, uint, uint, void> glBlendEquationSeparatei;
|
||||
internal delegate* unmanaged<uint, uint, void> glBlendEquationi;
|
||||
internal delegate* unmanaged<uint, uint, void> glBlendFunc;
|
||||
internal delegate* unmanaged<uint, uint, uint, uint, void> glBlendFuncSeparate;
|
||||
internal delegate* unmanaged<uint, uint, uint, uint, uint, void> glBlendFuncSeparatei;
|
||||
internal delegate* unmanaged<uint, uint, uint, void> glBlendFunci;
|
||||
internal delegate* unmanaged<int, int, int, int, int, int, int, int, uint, uint, void> glBlitFramebuffer;
|
||||
internal delegate* unmanaged<uint, uint, int, int, int, int, int, int, int, int, uint, uint, void> glBlitNamedFramebuffer;
|
||||
internal delegate* unmanaged<uint, nint, void*, uint, void> glBufferData;
|
||||
internal delegate* unmanaged<uint, nint, void*, uint, void> glBufferStorage;
|
||||
internal delegate* unmanaged<uint, nint, nint, void*, void> glBufferSubData;
|
||||
internal delegate* unmanaged<uint, uint> glCheckFramebufferStatus;
|
||||
internal delegate* unmanaged<uint, uint, uint> glCheckNamedFramebufferStatus;
|
||||
internal delegate* unmanaged<uint, uint, void> glClampColor;
|
||||
internal delegate* unmanaged<uint, void> glClear;
|
||||
internal delegate* unmanaged<uint, uint, uint, uint, void*, void> glClearBufferData;
|
||||
internal delegate* unmanaged<uint, uint, nint, nint, uint, uint, void*, void> glClearBufferSubData;
|
||||
internal delegate* unmanaged<uint, int, float, int, void> glClearBufferfi;
|
||||
internal delegate* unmanaged<uint, int, float*, void> glClearBufferfv;
|
||||
internal delegate* unmanaged<uint, int, int*, void> glClearBufferiv;
|
||||
internal delegate* unmanaged<uint, int, uint*, void> glClearBufferuiv;
|
||||
internal delegate* unmanaged<float, float, float, float, void> glClearColor;
|
||||
internal delegate* unmanaged<double, void> glClearDepth;
|
||||
internal delegate* unmanaged<float, void> glClearDepthf;
|
||||
internal delegate* unmanaged<uint, uint, uint, uint, void*, void> glClearNamedBufferData;
|
||||
internal delegate* unmanaged<uint, uint, nint, nint, uint, uint, void*, void> glClearNamedBufferSubData;
|
||||
internal delegate* unmanaged<uint, uint, int, float, int, void> glClearNamedFramebufferfi;
|
||||
internal delegate* unmanaged<uint, uint, int, float*, void> glClearNamedFramebufferfv;
|
||||
internal delegate* unmanaged<uint, uint, int, int*, void> glClearNamedFramebufferiv;
|
||||
internal delegate* unmanaged<uint, uint, int, uint*, void> glClearNamedFramebufferuiv;
|
||||
internal delegate* unmanaged<int, void> glClearStencil;
|
||||
internal delegate* unmanaged<uint, int, uint, uint, void*, void> glClearTexImage;
|
||||
internal delegate* unmanaged<uint, int, int, int, int, int, int, int, uint, uint, void*, void> glClearTexSubImage;
|
||||
internal delegate* unmanaged<void*, uint, ulong, uint> glClientWaitSync;
|
||||
internal delegate* unmanaged<uint, uint, void> glClipControl;
|
||||
internal delegate* unmanaged<byte, byte, byte, byte, void> glColorMask;
|
||||
internal delegate* unmanaged<uint, byte, byte, byte, byte, void> glColorMaski;
|
||||
internal delegate* unmanaged<uint, void> glCompileShader;
|
||||
internal delegate* unmanaged<uint, int, uint, int, int, int, void*, void> glCompressedTexImage1D;
|
||||
internal delegate* unmanaged<uint, int, uint, int, int, int, int, void*, void> glCompressedTexImage2D;
|
||||
internal delegate* unmanaged<uint, int, uint, int, int, int, int, int, void*, void> glCompressedTexImage3D;
|
||||
internal delegate* unmanaged<uint, int, int, int, uint, int, void*, void> glCompressedTexSubImage1D;
|
||||
internal delegate* unmanaged<uint, int, int, int, int, int, uint, int, void*, void> glCompressedTexSubImage2D;
|
||||
internal delegate* unmanaged<uint, int, int, int, int, int, int, int, uint, int, void*, void> glCompressedTexSubImage3D;
|
||||
internal delegate* unmanaged<uint, int, int, int, uint, int, void*, void> glCompressedTextureSubImage1D;
|
||||
internal delegate* unmanaged<uint, int, int, int, int, int, uint, int, void*, void> glCompressedTextureSubImage2D;
|
||||
internal delegate* unmanaged<uint, int, int, int, int, int, int, int, uint, int, void*, void> glCompressedTextureSubImage3D;
|
||||
internal delegate* unmanaged<uint, uint, nint, nint, nint, void> glCopyBufferSubData;
|
||||
internal delegate* unmanaged<uint, uint, int, int, int, int, uint, uint, int, int, int, int, int, int, int, void> glCopyImageSubData;
|
||||
internal delegate* unmanaged<uint, uint, nint, nint, nint, void> glCopyNamedBufferSubData;
|
||||
internal delegate* unmanaged<uint, int, uint, int, int, int, int, void> glCopyTexImage1D;
|
||||
internal delegate* unmanaged<uint, int, uint, int, int, int, int, int, void> glCopyTexImage2D;
|
||||
internal delegate* unmanaged<uint, int, int, int, int, int, void> glCopyTexSubImage1D;
|
||||
internal delegate* unmanaged<uint, int, int, int, int, int, int, int, void> glCopyTexSubImage2D;
|
||||
internal delegate* unmanaged<uint, int, int, int, int, int, int, int, int, void> glCopyTexSubImage3D;
|
||||
internal delegate* unmanaged<uint, int, int, int, int, int, void> glCopyTextureSubImage1D;
|
||||
internal delegate* unmanaged<uint, int, int, int, int, int, int, int, void> glCopyTextureSubImage2D;
|
||||
internal delegate* unmanaged<uint, int, int, int, int, int, int, int, int, void> glCopyTextureSubImage3D;
|
||||
internal delegate* unmanaged<int, uint*, void> glCreateBuffers;
|
||||
internal delegate* unmanaged<int, uint*, void> glCreateFramebuffers;
|
||||
internal delegate* unmanaged<uint> glCreateProgram;
|
||||
internal delegate* unmanaged<int, uint*, void> glCreateProgramPipelines;
|
||||
internal delegate* unmanaged<uint, int, uint*, void> glCreateQueries;
|
||||
internal delegate* unmanaged<int, uint*, void> glCreateRenderbuffers;
|
||||
internal delegate* unmanaged<int, uint*, void> glCreateSamplers;
|
||||
internal delegate* unmanaged<uint, uint> glCreateShader;
|
||||
internal delegate* unmanaged<uint, int, byte**, uint> glCreateShaderProgramv;
|
||||
internal delegate* unmanaged<uint, int, uint*, void> glCreateTextures;
|
||||
internal delegate* unmanaged<int, uint*, void> glCreateTransformFeedbacks;
|
||||
internal delegate* unmanaged<int, uint*, void> glCreateVertexArrays;
|
||||
internal delegate* unmanaged<uint, void> glCullFace;
|
||||
internal delegate* unmanaged<delegate* unmanaged<uint, uint, uint, uint, int, byte*, void*, void>, void*, void> glDebugMessageCallback;
|
||||
internal delegate* unmanaged<uint, uint, uint, int, uint*, byte, void> glDebugMessageControl;
|
||||
internal delegate* unmanaged<uint, uint, uint, uint, int, byte*, void> glDebugMessageInsert;
|
||||
internal delegate* unmanaged<int, uint*, void> glDeleteBuffers;
|
||||
internal delegate* unmanaged<int, uint*, void> glDeleteFramebuffers;
|
||||
internal delegate* unmanaged<uint, void> glDeleteProgram;
|
||||
internal delegate* unmanaged<int, uint*, void> glDeleteProgramPipelines;
|
||||
internal delegate* unmanaged<int, uint*, void> glDeleteQueries;
|
||||
internal delegate* unmanaged<int, uint*, void> glDeleteRenderbuffers;
|
||||
internal delegate* unmanaged<int, uint*, void> glDeleteSamplers;
|
||||
internal delegate* unmanaged<uint, void> glDeleteShader;
|
||||
internal delegate* unmanaged<void*, void> glDeleteSync;
|
||||
internal delegate* unmanaged<int, uint*, void> glDeleteTextures;
|
||||
internal delegate* unmanaged<int, uint*, void> glDeleteTransformFeedbacks;
|
||||
internal delegate* unmanaged<int, uint*, void> glDeleteVertexArrays;
|
||||
internal delegate* unmanaged<uint, void> glDepthFunc;
|
||||
internal delegate* unmanaged<byte, void> glDepthMask;
|
||||
internal delegate* unmanaged<double, double, void> glDepthRange;
|
||||
internal delegate* unmanaged<uint, int, double*, void> glDepthRangeArrayv;
|
||||
internal delegate* unmanaged<uint, double, double, void> glDepthRangeIndexed;
|
||||
internal delegate* unmanaged<float, float, void> glDepthRangef;
|
||||
internal delegate* unmanaged<uint, uint, void> glDetachShader;
|
||||
internal delegate* unmanaged<uint, void> glDisable;
|
||||
internal delegate* unmanaged<uint, uint, void> glDisableVertexArrayAttrib;
|
||||
internal delegate* unmanaged<uint, void> glDisableVertexAttribArray;
|
||||
internal delegate* unmanaged<uint, uint, void> glDisablei;
|
||||
internal delegate* unmanaged<uint, uint, uint, void> glDispatchCompute;
|
||||
internal delegate* unmanaged<nint, void> glDispatchComputeIndirect;
|
||||
internal delegate* unmanaged<uint, int, int, void> glDrawArrays;
|
||||
internal delegate* unmanaged<uint, void*, void> glDrawArraysIndirect;
|
||||
internal delegate* unmanaged<uint, int, int, int, void> glDrawArraysInstanced;
|
||||
internal delegate* unmanaged<uint, int, int, int, uint, void> glDrawArraysInstancedBaseInstance;
|
||||
internal delegate* unmanaged<uint, void> glDrawBuffer;
|
||||
internal delegate* unmanaged<int, uint*, void> glDrawBuffers;
|
||||
internal delegate* unmanaged<uint, int, uint, void*, void> glDrawElements;
|
||||
internal delegate* unmanaged<uint, int, uint, void*, int, void> glDrawElementsBaseVertex;
|
||||
internal delegate* unmanaged<uint, uint, void*, void> glDrawElementsIndirect;
|
||||
internal delegate* unmanaged<uint, int, uint, void*, int, void> glDrawElementsInstanced;
|
||||
internal delegate* unmanaged<uint, int, uint, void*, int, uint, void> glDrawElementsInstancedBaseInstance;
|
||||
internal delegate* unmanaged<uint, int, uint, void*, int, int, void> glDrawElementsInstancedBaseVertex;
|
||||
internal delegate* unmanaged<uint, int, uint, void*, int, int, uint, void> glDrawElementsInstancedBaseVertexBaseInstance;
|
||||
internal delegate* unmanaged<uint, uint, uint, int, uint, void*, void> glDrawRangeElements;
|
||||
internal delegate* unmanaged<uint, uint, uint, int, uint, void*, int, void> glDrawRangeElementsBaseVertex;
|
||||
internal delegate* unmanaged<uint, uint, void> glDrawTransformFeedback;
|
||||
internal delegate* unmanaged<uint, uint, int, void> glDrawTransformFeedbackInstanced;
|
||||
internal delegate* unmanaged<uint, uint, uint, void> glDrawTransformFeedbackStream;
|
||||
internal delegate* unmanaged<uint, uint, uint, int, void> glDrawTransformFeedbackStreamInstanced;
|
||||
internal delegate* unmanaged<uint, void> glEnable;
|
||||
internal delegate* unmanaged<uint, uint, void> glEnableVertexArrayAttrib;
|
||||
internal delegate* unmanaged<uint, void> glEnableVertexAttribArray;
|
||||
internal delegate* unmanaged<uint, uint, void> glEnablei;
|
||||
internal delegate* unmanaged<void> glEndConditionalRender;
|
||||
internal delegate* unmanaged<uint, void> glEndQuery;
|
||||
internal delegate* unmanaged<uint, uint, void> glEndQueryIndexed;
|
||||
internal delegate* unmanaged<void> glEndTransformFeedback;
|
||||
internal delegate* unmanaged<uint, uint, void*> glFenceSync;
|
||||
internal delegate* unmanaged<void> glFinish;
|
||||
internal delegate* unmanaged<void> glFlush;
|
||||
internal delegate* unmanaged<uint, nint, nint, void> glFlushMappedBufferRange;
|
||||
internal delegate* unmanaged<uint, nint, nint, void> glFlushMappedNamedBufferRange;
|
||||
internal delegate* unmanaged<uint, uint, int, void> glFramebufferParameteri;
|
||||
internal delegate* unmanaged<uint, uint, uint, uint, void> glFramebufferRenderbuffer;
|
||||
internal delegate* unmanaged<uint, uint, uint, int, void> glFramebufferTexture;
|
||||
internal delegate* unmanaged<uint, uint, uint, uint, int, void> glFramebufferTexture1D;
|
||||
internal delegate* unmanaged<uint, uint, uint, uint, int, void> glFramebufferTexture2D;
|
||||
internal delegate* unmanaged<uint, uint, uint, uint, int, int, void> glFramebufferTexture3D;
|
||||
internal delegate* unmanaged<uint, uint, uint, int, int, void> glFramebufferTextureLayer;
|
||||
internal delegate* unmanaged<uint, void> glFrontFace;
|
||||
internal delegate* unmanaged<int, uint*, void> glGenBuffers;
|
||||
internal delegate* unmanaged<int, uint*, void> glGenFramebuffers;
|
||||
internal delegate* unmanaged<int, uint*, void> glGenProgramPipelines;
|
||||
internal delegate* unmanaged<int, uint*, void> glGenQueries;
|
||||
internal delegate* unmanaged<int, uint*, void> glGenRenderbuffers;
|
||||
internal delegate* unmanaged<int, uint*, void> glGenSamplers;
|
||||
internal delegate* unmanaged<int, uint*, void> glGenTextures;
|
||||
internal delegate* unmanaged<int, uint*, void> glGenTransformFeedbacks;
|
||||
internal delegate* unmanaged<int, uint*, void> glGenVertexArrays;
|
||||
internal delegate* unmanaged<uint, void> glGenerateMipmap;
|
||||
internal delegate* unmanaged<uint, void> glGenerateTextureMipmap;
|
||||
internal delegate* unmanaged<uint, uint, uint, int*, void> glGetActiveAtomicCounterBufferiv;
|
||||
internal delegate* unmanaged<uint, uint, int, int*, int*, uint*, byte*, void> glGetActiveAttrib;
|
||||
internal delegate* unmanaged<uint, uint, uint, int, int*, byte*, void> glGetActiveSubroutineName;
|
||||
internal delegate* unmanaged<uint, uint, uint, int, int*, byte*, void> glGetActiveSubroutineUniformName;
|
||||
internal delegate* unmanaged<uint, uint, uint, uint, int*, void> glGetActiveSubroutineUniformiv;
|
||||
internal delegate* unmanaged<uint, uint, int, int*, int*, uint*, byte*, void> glGetActiveUniform;
|
||||
internal delegate* unmanaged<uint, uint, int, int*, byte*, void> glGetActiveUniformBlockName;
|
||||
internal delegate* unmanaged<uint, uint, uint, int*, void> glGetActiveUniformBlockiv;
|
||||
internal delegate* unmanaged<uint, uint, int, int*, byte*, void> glGetActiveUniformName;
|
||||
internal delegate* unmanaged<uint, int, uint*, uint, int*, void> glGetActiveUniformsiv;
|
||||
internal delegate* unmanaged<uint, int, int*, uint*, void> glGetAttachedShaders;
|
||||
internal delegate* unmanaged<uint, byte*, int> glGetAttribLocation;
|
||||
internal delegate* unmanaged<uint, uint, byte*, void> glGetBooleani_v;
|
||||
internal delegate* unmanaged<uint, byte*, void> glGetBooleanv;
|
||||
internal delegate* unmanaged<uint, uint, long*, void> glGetBufferParameteri64v;
|
||||
internal delegate* unmanaged<uint, uint, int*, void> glGetBufferParameteriv;
|
||||
internal delegate* unmanaged<uint, uint, void**, void> glGetBufferPointerv;
|
||||
internal delegate* unmanaged<uint, nint, nint, void*, void> glGetBufferSubData;
|
||||
internal delegate* unmanaged<uint, int, void*, void> glGetCompressedTexImage;
|
||||
internal delegate* unmanaged<uint, int, int, void*, void> glGetCompressedTextureImage;
|
||||
internal delegate* unmanaged<uint, int, int, int, int, int, int, int, int, void*, void> glGetCompressedTextureSubImage;
|
||||
internal delegate* unmanaged<uint, int, uint*, uint*, uint*, uint*, int*, byte*, uint> glGetDebugMessageLog;
|
||||
internal delegate* unmanaged<uint, uint, double*, void> glGetDoublei_v;
|
||||
internal delegate* unmanaged<uint, double*, void> glGetDoublev;
|
||||
internal delegate* unmanaged<uint> glGetError;
|
||||
internal delegate* unmanaged<uint, uint, float*, void> glGetFloati_v;
|
||||
internal delegate* unmanaged<uint, float*, void> glGetFloatv;
|
||||
internal delegate* unmanaged<uint, byte*, int> glGetFragDataIndex;
|
||||
internal delegate* unmanaged<uint, byte*, int> glGetFragDataLocation;
|
||||
internal delegate* unmanaged<uint, uint, uint, int*, void> glGetFramebufferAttachmentParameteriv;
|
||||
internal delegate* unmanaged<uint, uint, int*, void> glGetFramebufferParameteriv;
|
||||
internal delegate* unmanaged<uint> glGetGraphicsResetStatus;
|
||||
internal delegate* unmanaged<uint, uint, long*, void> glGetInteger64i_v;
|
||||
internal delegate* unmanaged<uint, long*, void> glGetInteger64v;
|
||||
internal delegate* unmanaged<uint, uint, int*, void> glGetIntegeri_v;
|
||||
internal delegate* unmanaged<uint, int*, void> glGetIntegerv;
|
||||
internal delegate* unmanaged<uint, uint, uint, int, long*, void> glGetInternalformati64v;
|
||||
internal delegate* unmanaged<uint, uint, uint, int, int*, void> glGetInternalformativ;
|
||||
internal delegate* unmanaged<uint, uint, float*, void> glGetMultisamplefv;
|
||||
internal delegate* unmanaged<uint, uint, long*, void> glGetNamedBufferParameteri64v;
|
||||
internal delegate* unmanaged<uint, uint, int*, void> glGetNamedBufferParameteriv;
|
||||
internal delegate* unmanaged<uint, uint, void**, void> glGetNamedBufferPointerv;
|
||||
internal delegate* unmanaged<uint, nint, nint, void*, void> glGetNamedBufferSubData;
|
||||
internal delegate* unmanaged<uint, uint, uint, int*, void> glGetNamedFramebufferAttachmentParameteriv;
|
||||
internal delegate* unmanaged<uint, uint, int*, void> glGetNamedFramebufferParameteriv;
|
||||
internal delegate* unmanaged<uint, uint, int*, void> glGetNamedRenderbufferParameteriv;
|
||||
internal delegate* unmanaged<uint, uint, int, int*, byte*, void> glGetObjectLabel;
|
||||
internal delegate* unmanaged<void*, int, int*, byte*, void> glGetObjectPtrLabel;
|
||||
internal delegate* unmanaged<uint, void**, void> glGetPointerv;
|
||||
internal delegate* unmanaged<uint, int, int*, uint*, void*, void> glGetProgramBinary;
|
||||
internal delegate* unmanaged<uint, int, int*, byte*, void> glGetProgramInfoLog;
|
||||
internal delegate* unmanaged<uint, uint, uint, int*, void> glGetProgramInterfaceiv;
|
||||
internal delegate* unmanaged<uint, int, int*, byte*, void> glGetProgramPipelineInfoLog;
|
||||
internal delegate* unmanaged<uint, uint, int*, void> glGetProgramPipelineiv;
|
||||
internal delegate* unmanaged<uint, uint, byte*, uint> glGetProgramResourceIndex;
|
||||
internal delegate* unmanaged<uint, uint, byte*, int> glGetProgramResourceLocation;
|
||||
internal delegate* unmanaged<uint, uint, byte*, int> glGetProgramResourceLocationIndex;
|
||||
internal delegate* unmanaged<uint, uint, uint, int, int*, byte*, void> glGetProgramResourceName;
|
||||
internal delegate* unmanaged<uint, uint, uint, int, uint*, int, int*, int*, void> glGetProgramResourceiv;
|
||||
internal delegate* unmanaged<uint, uint, uint, int*, void> glGetProgramStageiv;
|
||||
internal delegate* unmanaged<uint, uint, int*, void> glGetProgramiv;
|
||||
internal delegate* unmanaged<uint, uint, uint, nint, void> glGetQueryBufferObjecti64v;
|
||||
internal delegate* unmanaged<uint, uint, uint, nint, void> glGetQueryBufferObjectiv;
|
||||
internal delegate* unmanaged<uint, uint, uint, nint, void> glGetQueryBufferObjectui64v;
|
||||
internal delegate* unmanaged<uint, uint, uint, nint, void> glGetQueryBufferObjectuiv;
|
||||
internal delegate* unmanaged<uint, uint, uint, int*, void> glGetQueryIndexediv;
|
||||
internal delegate* unmanaged<uint, uint, long*, void> glGetQueryObjecti64v;
|
||||
internal delegate* unmanaged<uint, uint, int*, void> glGetQueryObjectiv;
|
||||
internal delegate* unmanaged<uint, uint, ulong*, void> glGetQueryObjectui64v;
|
||||
internal delegate* unmanaged<uint, uint, uint*, void> glGetQueryObjectuiv;
|
||||
internal delegate* unmanaged<uint, uint, int*, void> glGetQueryiv;
|
||||
internal delegate* unmanaged<uint, uint, int*, void> glGetRenderbufferParameteriv;
|
||||
internal delegate* unmanaged<uint, uint, int*, void> glGetSamplerParameterIiv;
|
||||
internal delegate* unmanaged<uint, uint, uint*, void> glGetSamplerParameterIuiv;
|
||||
internal delegate* unmanaged<uint, uint, float*, void> glGetSamplerParameterfv;
|
||||
internal delegate* unmanaged<uint, uint, int*, void> glGetSamplerParameteriv;
|
||||
internal delegate* unmanaged<uint, int, int*, byte*, void> glGetShaderInfoLog;
|
||||
internal delegate* unmanaged<uint, uint, int*, int*, void> glGetShaderPrecisionFormat;
|
||||
internal delegate* unmanaged<uint, int, int*, byte*, void> glGetShaderSource;
|
||||
internal delegate* unmanaged<uint, uint, int*, void> glGetShaderiv;
|
||||
internal delegate* unmanaged<uint, byte*> glGetString;
|
||||
internal delegate* unmanaged<uint, uint, byte*> glGetStringi;
|
||||
internal delegate* unmanaged<uint, uint, byte*, uint> glGetSubroutineIndex;
|
||||
internal delegate* unmanaged<uint, uint, byte*, int> glGetSubroutineUniformLocation;
|
||||
internal delegate* unmanaged<void*, uint, int, int*, int*, void> glGetSynciv;
|
||||
internal delegate* unmanaged<uint, int, uint, uint, void*, void> glGetTexImage;
|
||||
internal delegate* unmanaged<uint, int, uint, float*, void> glGetTexLevelParameterfv;
|
||||
internal delegate* unmanaged<uint, int, uint, int*, void> glGetTexLevelParameteriv;
|
||||
internal delegate* unmanaged<uint, uint, int*, void> glGetTexParameterIiv;
|
||||
internal delegate* unmanaged<uint, uint, uint*, void> glGetTexParameterIuiv;
|
||||
internal delegate* unmanaged<uint, uint, float*, void> glGetTexParameterfv;
|
||||
internal delegate* unmanaged<uint, uint, int*, void> glGetTexParameteriv;
|
||||
internal delegate* unmanaged<uint, int, uint, uint, int, void*, void> glGetTextureImage;
|
||||
internal delegate* unmanaged<uint, int, uint, float*, void> glGetTextureLevelParameterfv;
|
||||
internal delegate* unmanaged<uint, int, uint, int*, void> glGetTextureLevelParameteriv;
|
||||
internal delegate* unmanaged<uint, uint, int*, void> glGetTextureParameterIiv;
|
||||
internal delegate* unmanaged<uint, uint, uint*, void> glGetTextureParameterIuiv;
|
||||
internal delegate* unmanaged<uint, uint, float*, void> glGetTextureParameterfv;
|
||||
internal delegate* unmanaged<uint, uint, int*, void> glGetTextureParameteriv;
|
||||
internal delegate* unmanaged<uint, int, int, int, int, int, int, int, uint, uint, int, void*, void> glGetTextureSubImage;
|
||||
internal delegate* unmanaged<uint, uint, int, int*, int*, uint*, byte*, void> glGetTransformFeedbackVarying;
|
||||
internal delegate* unmanaged<uint, uint, uint, long*, void> glGetTransformFeedbacki64_v;
|
||||
internal delegate* unmanaged<uint, uint, uint, int*, void> glGetTransformFeedbacki_v;
|
||||
internal delegate* unmanaged<uint, uint, int*, void> glGetTransformFeedbackiv;
|
||||
internal delegate* unmanaged<uint, byte*, uint> glGetUniformBlockIndex;
|
||||
internal delegate* unmanaged<uint, int, byte**, uint*, void> glGetUniformIndices;
|
||||
internal delegate* unmanaged<uint, byte*, int> glGetUniformLocation;
|
||||
internal delegate* unmanaged<uint, int, uint*, void> glGetUniformSubroutineuiv;
|
||||
internal delegate* unmanaged<uint, int, double*, void> glGetUniformdv;
|
||||
internal delegate* unmanaged<uint, int, float*, void> glGetUniformfv;
|
||||
internal delegate* unmanaged<uint, int, int*, void> glGetUniformiv;
|
||||
internal delegate* unmanaged<uint, int, uint*, void> glGetUniformuiv;
|
||||
internal delegate* unmanaged<uint, uint, uint, long*, void> glGetVertexArrayIndexed64iv;
|
||||
internal delegate* unmanaged<uint, uint, uint, int*, void> glGetVertexArrayIndexediv;
|
||||
internal delegate* unmanaged<uint, uint, int*, void> glGetVertexArrayiv;
|
||||
internal delegate* unmanaged<uint, uint, int*, void> glGetVertexAttribIiv;
|
||||
internal delegate* unmanaged<uint, uint, uint*, void> glGetVertexAttribIuiv;
|
||||
internal delegate* unmanaged<uint, uint, double*, void> glGetVertexAttribLdv;
|
||||
internal delegate* unmanaged<uint, uint, void**, void> glGetVertexAttribPointerv;
|
||||
internal delegate* unmanaged<uint, uint, double*, void> glGetVertexAttribdv;
|
||||
internal delegate* unmanaged<uint, uint, float*, void> glGetVertexAttribfv;
|
||||
internal delegate* unmanaged<uint, uint, int*, void> glGetVertexAttribiv;
|
||||
internal delegate* unmanaged<uint, int, int, void*, void> glGetnCompressedTexImage;
|
||||
internal delegate* unmanaged<uint, int, uint, uint, int, void*, void> glGetnTexImage;
|
||||
internal delegate* unmanaged<uint, int, int, double*, void> glGetnUniformdv;
|
||||
internal delegate* unmanaged<uint, int, int, float*, void> glGetnUniformfv;
|
||||
internal delegate* unmanaged<uint, int, int, int*, void> glGetnUniformiv;
|
||||
internal delegate* unmanaged<uint, int, int, uint*, void> glGetnUniformuiv;
|
||||
internal delegate* unmanaged<uint, uint, void> glHint;
|
||||
internal delegate* unmanaged<uint, void> glInvalidateBufferData;
|
||||
internal delegate* unmanaged<uint, nint, nint, void> glInvalidateBufferSubData;
|
||||
internal delegate* unmanaged<uint, int, uint*, void> glInvalidateFramebuffer;
|
||||
internal delegate* unmanaged<uint, int, uint*, void> glInvalidateNamedFramebufferData;
|
||||
internal delegate* unmanaged<uint, int, uint*, int, int, int, int, void> glInvalidateNamedFramebufferSubData;
|
||||
internal delegate* unmanaged<uint, int, uint*, int, int, int, int, void> glInvalidateSubFramebuffer;
|
||||
internal delegate* unmanaged<uint, int, void> glInvalidateTexImage;
|
||||
internal delegate* unmanaged<uint, int, int, int, int, int, int, int, void> glInvalidateTexSubImage;
|
||||
internal delegate* unmanaged<uint, byte> glIsBuffer;
|
||||
internal delegate* unmanaged<uint, byte> glIsEnabled;
|
||||
internal delegate* unmanaged<uint, uint, byte> glIsEnabledi;
|
||||
internal delegate* unmanaged<uint, byte> glIsFramebuffer;
|
||||
internal delegate* unmanaged<uint, byte> glIsProgram;
|
||||
internal delegate* unmanaged<uint, byte> glIsProgramPipeline;
|
||||
internal delegate* unmanaged<uint, byte> glIsQuery;
|
||||
internal delegate* unmanaged<uint, byte> glIsRenderbuffer;
|
||||
internal delegate* unmanaged<uint, byte> glIsSampler;
|
||||
internal delegate* unmanaged<uint, byte> glIsShader;
|
||||
internal delegate* unmanaged<void*, byte> glIsSync;
|
||||
internal delegate* unmanaged<uint, byte> glIsTexture;
|
||||
internal delegate* unmanaged<uint, byte> glIsTransformFeedback;
|
||||
internal delegate* unmanaged<uint, byte> glIsVertexArray;
|
||||
internal delegate* unmanaged<float, void> glLineWidth;
|
||||
internal delegate* unmanaged<uint, void> glLinkProgram;
|
||||
internal delegate* unmanaged<uint, void> glLogicOp;
|
||||
internal delegate* unmanaged<uint, uint, void*> glMapBuffer;
|
||||
internal delegate* unmanaged<uint, nint, nint, uint, void*> glMapBufferRange;
|
||||
internal delegate* unmanaged<uint, uint, void*> glMapNamedBuffer;
|
||||
internal delegate* unmanaged<uint, nint, nint, uint, void*> glMapNamedBufferRange;
|
||||
internal delegate* unmanaged<uint, void> glMemoryBarrier;
|
||||
internal delegate* unmanaged<uint, void> glMemoryBarrierByRegion;
|
||||
internal delegate* unmanaged<float, void> glMinSampleShading;
|
||||
internal delegate* unmanaged<uint, int*, int*, int, void> glMultiDrawArrays;
|
||||
internal delegate* unmanaged<uint, void*, int, int, void> glMultiDrawArraysIndirect;
|
||||
internal delegate* unmanaged<uint, void*, nint, int, int, void> glMultiDrawArraysIndirectCount;
|
||||
internal delegate* unmanaged<uint, int*, uint, void**, int, void> glMultiDrawElements;
|
||||
internal delegate* unmanaged<uint, int*, uint, void**, int, int*, void> glMultiDrawElementsBaseVertex;
|
||||
internal delegate* unmanaged<uint, uint, void*, int, int, void> glMultiDrawElementsIndirect;
|
||||
internal delegate* unmanaged<uint, uint, void*, nint, int, int, void> glMultiDrawElementsIndirectCount;
|
||||
internal delegate* unmanaged<uint, nint, void*, uint, void> glNamedBufferData;
|
||||
internal delegate* unmanaged<uint, nint, void*, uint, void> glNamedBufferStorage;
|
||||
internal delegate* unmanaged<uint, nint, nint, void*, void> glNamedBufferSubData;
|
||||
internal delegate* unmanaged<uint, uint, void> glNamedFramebufferDrawBuffer;
|
||||
internal delegate* unmanaged<uint, int, uint*, void> glNamedFramebufferDrawBuffers;
|
||||
internal delegate* unmanaged<uint, uint, int, void> glNamedFramebufferParameteri;
|
||||
internal delegate* unmanaged<uint, uint, void> glNamedFramebufferReadBuffer;
|
||||
internal delegate* unmanaged<uint, uint, uint, uint, void> glNamedFramebufferRenderbuffer;
|
||||
internal delegate* unmanaged<uint, uint, uint, int, void> glNamedFramebufferTexture;
|
||||
internal delegate* unmanaged<uint, uint, uint, int, int, void> glNamedFramebufferTextureLayer;
|
||||
internal delegate* unmanaged<uint, uint, int, int, void> glNamedRenderbufferStorage;
|
||||
internal delegate* unmanaged<uint, int, uint, int, int, void> glNamedRenderbufferStorageMultisample;
|
||||
internal delegate* unmanaged<uint, uint, int, byte*, void> glObjectLabel;
|
||||
internal delegate* unmanaged<void*, int, byte*, void> glObjectPtrLabel;
|
||||
internal delegate* unmanaged<uint, float*, void> glPatchParameterfv;
|
||||
internal delegate* unmanaged<uint, int, void> glPatchParameteri;
|
||||
internal delegate* unmanaged<void> glPauseTransformFeedback;
|
||||
internal delegate* unmanaged<uint, float, void> glPixelStoref;
|
||||
internal delegate* unmanaged<uint, int, void> glPixelStorei;
|
||||
internal delegate* unmanaged<uint, float, void> glPointParameterf;
|
||||
internal delegate* unmanaged<uint, float*, void> glPointParameterfv;
|
||||
internal delegate* unmanaged<uint, int, void> glPointParameteri;
|
||||
internal delegate* unmanaged<uint, int*, void> glPointParameteriv;
|
||||
internal delegate* unmanaged<float, void> glPointSize;
|
||||
internal delegate* unmanaged<uint, uint, void> glPolygonMode;
|
||||
internal delegate* unmanaged<float, float, void> glPolygonOffset;
|
||||
internal delegate* unmanaged<float, float, float, void> glPolygonOffsetClamp;
|
||||
internal delegate* unmanaged<void> glPopDebugGroup;
|
||||
internal delegate* unmanaged<uint, void> glPrimitiveRestartIndex;
|
||||
internal delegate* unmanaged<uint, uint, void*, int, void> glProgramBinary;
|
||||
internal delegate* unmanaged<uint, uint, int, void> glProgramParameteri;
|
||||
internal delegate* unmanaged<uint, int, double, void> glProgramUniform1d;
|
||||
internal delegate* unmanaged<uint, int, int, double*, void> glProgramUniform1dv;
|
||||
internal delegate* unmanaged<uint, int, float, void> glProgramUniform1f;
|
||||
internal delegate* unmanaged<uint, int, int, float*, void> glProgramUniform1fv;
|
||||
internal delegate* unmanaged<uint, int, int, void> glProgramUniform1i;
|
||||
internal delegate* unmanaged<uint, int, int, int*, void> glProgramUniform1iv;
|
||||
internal delegate* unmanaged<uint, int, uint, void> glProgramUniform1ui;
|
||||
internal delegate* unmanaged<uint, int, int, uint*, void> glProgramUniform1uiv;
|
||||
internal delegate* unmanaged<uint, int, double, double, void> glProgramUniform2d;
|
||||
internal delegate* unmanaged<uint, int, int, double*, void> glProgramUniform2dv;
|
||||
internal delegate* unmanaged<uint, int, float, float, void> glProgramUniform2f;
|
||||
internal delegate* unmanaged<uint, int, int, float*, void> glProgramUniform2fv;
|
||||
internal delegate* unmanaged<uint, int, int, int, void> glProgramUniform2i;
|
||||
internal delegate* unmanaged<uint, int, int, int*, void> glProgramUniform2iv;
|
||||
internal delegate* unmanaged<uint, int, uint, uint, void> glProgramUniform2ui;
|
||||
internal delegate* unmanaged<uint, int, int, uint*, void> glProgramUniform2uiv;
|
||||
internal delegate* unmanaged<uint, int, double, double, double, void> glProgramUniform3d;
|
||||
internal delegate* unmanaged<uint, int, int, double*, void> glProgramUniform3dv;
|
||||
internal delegate* unmanaged<uint, int, float, float, float, void> glProgramUniform3f;
|
||||
internal delegate* unmanaged<uint, int, int, float*, void> glProgramUniform3fv;
|
||||
internal delegate* unmanaged<uint, int, int, int, int, void> glProgramUniform3i;
|
||||
internal delegate* unmanaged<uint, int, int, int*, void> glProgramUniform3iv;
|
||||
internal delegate* unmanaged<uint, int, uint, uint, uint, void> glProgramUniform3ui;
|
||||
internal delegate* unmanaged<uint, int, int, uint*, void> glProgramUniform3uiv;
|
||||
internal delegate* unmanaged<uint, int, double, double, double, double, void> glProgramUniform4d;
|
||||
internal delegate* unmanaged<uint, int, int, double*, void> glProgramUniform4dv;
|
||||
internal delegate* unmanaged<uint, int, float, float, float, float, void> glProgramUniform4f;
|
||||
internal delegate* unmanaged<uint, int, int, float*, void> glProgramUniform4fv;
|
||||
internal delegate* unmanaged<uint, int, int, int, int, int, void> glProgramUniform4i;
|
||||
internal delegate* unmanaged<uint, int, int, int*, void> glProgramUniform4iv;
|
||||
internal delegate* unmanaged<uint, int, uint, uint, uint, uint, void> glProgramUniform4ui;
|
||||
internal delegate* unmanaged<uint, int, int, uint*, void> glProgramUniform4uiv;
|
||||
internal delegate* unmanaged<uint, int, int, byte, double*, void> glProgramUniformMatrix2dv;
|
||||
internal delegate* unmanaged<uint, int, int, byte, float*, void> glProgramUniformMatrix2fv;
|
||||
internal delegate* unmanaged<uint, int, int, byte, double*, void> glProgramUniformMatrix2x3dv;
|
||||
internal delegate* unmanaged<uint, int, int, byte, float*, void> glProgramUniformMatrix2x3fv;
|
||||
internal delegate* unmanaged<uint, int, int, byte, double*, void> glProgramUniformMatrix2x4dv;
|
||||
internal delegate* unmanaged<uint, int, int, byte, float*, void> glProgramUniformMatrix2x4fv;
|
||||
internal delegate* unmanaged<uint, int, int, byte, double*, void> glProgramUniformMatrix3dv;
|
||||
internal delegate* unmanaged<uint, int, int, byte, float*, void> glProgramUniformMatrix3fv;
|
||||
internal delegate* unmanaged<uint, int, int, byte, double*, void> glProgramUniformMatrix3x2dv;
|
||||
internal delegate* unmanaged<uint, int, int, byte, float*, void> glProgramUniformMatrix3x2fv;
|
||||
internal delegate* unmanaged<uint, int, int, byte, double*, void> glProgramUniformMatrix3x4dv;
|
||||
internal delegate* unmanaged<uint, int, int, byte, float*, void> glProgramUniformMatrix3x4fv;
|
||||
internal delegate* unmanaged<uint, int, int, byte, double*, void> glProgramUniformMatrix4dv;
|
||||
internal delegate* unmanaged<uint, int, int, byte, float*, void> glProgramUniformMatrix4fv;
|
||||
internal delegate* unmanaged<uint, int, int, byte, double*, void> glProgramUniformMatrix4x2dv;
|
||||
internal delegate* unmanaged<uint, int, int, byte, float*, void> glProgramUniformMatrix4x2fv;
|
||||
internal delegate* unmanaged<uint, int, int, byte, double*, void> glProgramUniformMatrix4x3dv;
|
||||
internal delegate* unmanaged<uint, int, int, byte, float*, void> glProgramUniformMatrix4x3fv;
|
||||
internal delegate* unmanaged<uint, void> glProvokingVertex;
|
||||
internal delegate* unmanaged<uint, uint, int, byte*, void> glPushDebugGroup;
|
||||
internal delegate* unmanaged<uint, uint, void> glQueryCounter;
|
||||
internal delegate* unmanaged<uint, void> glReadBuffer;
|
||||
internal delegate* unmanaged<int, int, int, int, uint, uint, void*, void> glReadPixels;
|
||||
internal delegate* unmanaged<int, int, int, int, uint, uint, int, void*, void> glReadnPixels;
|
||||
internal delegate* unmanaged<void> glReleaseShaderCompiler;
|
||||
internal delegate* unmanaged<uint, uint, int, int, void> glRenderbufferStorage;
|
||||
internal delegate* unmanaged<uint, int, uint, int, int, void> glRenderbufferStorageMultisample;
|
||||
internal delegate* unmanaged<void> glResumeTransformFeedback;
|
||||
internal delegate* unmanaged<float, byte, void> glSampleCoverage;
|
||||
internal delegate* unmanaged<uint, uint, void> glSampleMaski;
|
||||
internal delegate* unmanaged<uint, uint, int*, void> glSamplerParameterIiv;
|
||||
internal delegate* unmanaged<uint, uint, uint*, void> glSamplerParameterIuiv;
|
||||
internal delegate* unmanaged<uint, uint, float, void> glSamplerParameterf;
|
||||
internal delegate* unmanaged<uint, uint, float*, void> glSamplerParameterfv;
|
||||
internal delegate* unmanaged<uint, uint, int, void> glSamplerParameteri;
|
||||
internal delegate* unmanaged<uint, uint, int*, void> glSamplerParameteriv;
|
||||
internal delegate* unmanaged<int, int, int, int, void> glScissor;
|
||||
internal delegate* unmanaged<uint, int, int*, void> glScissorArrayv;
|
||||
internal delegate* unmanaged<uint, int, int, int, int, void> glScissorIndexed;
|
||||
internal delegate* unmanaged<uint, int*, void> glScissorIndexedv;
|
||||
internal delegate* unmanaged<int, uint*, uint, void*, int, void> glShaderBinary;
|
||||
internal delegate* unmanaged<uint, int, byte**, int*, void> glShaderSource;
|
||||
internal delegate* unmanaged<uint, uint, uint, void> glShaderStorageBlockBinding;
|
||||
internal delegate* unmanaged<uint, byte*, uint, uint*, uint*, void> glSpecializeShader;
|
||||
internal delegate* unmanaged<uint, int, uint, void> glStencilFunc;
|
||||
internal delegate* unmanaged<uint, uint, int, uint, void> glStencilFuncSeparate;
|
||||
internal delegate* unmanaged<uint, void> glStencilMask;
|
||||
internal delegate* unmanaged<uint, uint, void> glStencilMaskSeparate;
|
||||
internal delegate* unmanaged<uint, uint, uint, void> glStencilOp;
|
||||
internal delegate* unmanaged<uint, uint, uint, uint, void> glStencilOpSeparate;
|
||||
internal delegate* unmanaged<uint, uint, uint, void> glTexBuffer;
|
||||
internal delegate* unmanaged<uint, uint, uint, nint, nint, void> glTexBufferRange;
|
||||
internal delegate* unmanaged<uint, int, int, int, int, uint, uint, void*, void> glTexImage1D;
|
||||
internal delegate* unmanaged<uint, int, int, int, int, int, uint, uint, void*, void> glTexImage2D;
|
||||
internal delegate* unmanaged<uint, int, uint, int, int, byte, void> glTexImage2DMultisample;
|
||||
internal delegate* unmanaged<uint, int, int, int, int, int, int, uint, uint, void*, void> glTexImage3D;
|
||||
internal delegate* unmanaged<uint, int, uint, int, int, int, byte, void> glTexImage3DMultisample;
|
||||
internal delegate* unmanaged<uint, uint, int*, void> glTexParameterIiv;
|
||||
internal delegate* unmanaged<uint, uint, uint*, void> glTexParameterIuiv;
|
||||
internal delegate* unmanaged<uint, uint, float, void> glTexParameterf;
|
||||
internal delegate* unmanaged<uint, uint, float*, void> glTexParameterfv;
|
||||
internal delegate* unmanaged<uint, uint, int, void> glTexParameteri;
|
||||
internal delegate* unmanaged<uint, uint, int*, void> glTexParameteriv;
|
||||
internal delegate* unmanaged<uint, int, uint, int, void> glTexStorage1D;
|
||||
internal delegate* unmanaged<uint, int, uint, int, int, void> glTexStorage2D;
|
||||
internal delegate* unmanaged<uint, int, uint, int, int, byte, void> glTexStorage2DMultisample;
|
||||
internal delegate* unmanaged<uint, int, uint, int, int, int, void> glTexStorage3D;
|
||||
internal delegate* unmanaged<uint, int, uint, int, int, int, byte, void> glTexStorage3DMultisample;
|
||||
internal delegate* unmanaged<uint, int, int, int, uint, uint, void*, void> glTexSubImage1D;
|
||||
internal delegate* unmanaged<uint, int, int, int, int, int, uint, uint, void*, void> glTexSubImage2D;
|
||||
internal delegate* unmanaged<uint, int, int, int, int, int, int, int, uint, uint, void*, void> glTexSubImage3D;
|
||||
internal delegate* unmanaged<void> glTextureBarrier;
|
||||
internal delegate* unmanaged<uint, uint, uint, void> glTextureBuffer;
|
||||
internal delegate* unmanaged<uint, uint, uint, nint, nint, void> glTextureBufferRange;
|
||||
internal delegate* unmanaged<uint, uint, int*, void> glTextureParameterIiv;
|
||||
internal delegate* unmanaged<uint, uint, uint*, void> glTextureParameterIuiv;
|
||||
internal delegate* unmanaged<uint, uint, float, void> glTextureParameterf;
|
||||
internal delegate* unmanaged<uint, uint, float*, void> glTextureParameterfv;
|
||||
internal delegate* unmanaged<uint, uint, int, void> glTextureParameteri;
|
||||
internal delegate* unmanaged<uint, uint, int*, void> glTextureParameteriv;
|
||||
internal delegate* unmanaged<uint, int, uint, int, void> glTextureStorage1D;
|
||||
internal delegate* unmanaged<uint, int, uint, int, int, void> glTextureStorage2D;
|
||||
internal delegate* unmanaged<uint, int, uint, int, int, byte, void> glTextureStorage2DMultisample;
|
||||
internal delegate* unmanaged<uint, int, uint, int, int, int, void> glTextureStorage3D;
|
||||
internal delegate* unmanaged<uint, int, uint, int, int, int, byte, void> glTextureStorage3DMultisample;
|
||||
internal delegate* unmanaged<uint, int, int, int, uint, uint, void*, void> glTextureSubImage1D;
|
||||
internal delegate* unmanaged<uint, int, int, int, int, int, uint, uint, void*, void> glTextureSubImage2D;
|
||||
internal delegate* unmanaged<uint, int, int, int, int, int, int, int, uint, uint, void*, void> glTextureSubImage3D;
|
||||
internal delegate* unmanaged<uint, uint, uint, uint, uint, uint, uint, uint, void> glTextureView;
|
||||
internal delegate* unmanaged<uint, uint, uint, void> glTransformFeedbackBufferBase;
|
||||
internal delegate* unmanaged<uint, uint, uint, nint, nint, void> glTransformFeedbackBufferRange;
|
||||
internal delegate* unmanaged<uint, int, byte**, uint, void> glTransformFeedbackVaryings;
|
||||
internal delegate* unmanaged<int, double, void> glUniform1d;
|
||||
internal delegate* unmanaged<int, int, double*, void> glUniform1dv;
|
||||
internal delegate* unmanaged<int, float, void> glUniform1f;
|
||||
internal delegate* unmanaged<int, int, float*, void> glUniform1fv;
|
||||
internal delegate* unmanaged<int, int, void> glUniform1i;
|
||||
internal delegate* unmanaged<int, int, int*, void> glUniform1iv;
|
||||
internal delegate* unmanaged<int, uint, void> glUniform1ui;
|
||||
internal delegate* unmanaged<int, int, uint*, void> glUniform1uiv;
|
||||
internal delegate* unmanaged<int, double, double, void> glUniform2d;
|
||||
internal delegate* unmanaged<int, int, double*, void> glUniform2dv;
|
||||
internal delegate* unmanaged<int, float, float, void> glUniform2f;
|
||||
internal delegate* unmanaged<int, int, float*, void> glUniform2fv;
|
||||
internal delegate* unmanaged<int, int, int, void> glUniform2i;
|
||||
internal delegate* unmanaged<int, int, int*, void> glUniform2iv;
|
||||
internal delegate* unmanaged<int, uint, uint, void> glUniform2ui;
|
||||
internal delegate* unmanaged<int, int, uint*, void> glUniform2uiv;
|
||||
internal delegate* unmanaged<int, double, double, double, void> glUniform3d;
|
||||
internal delegate* unmanaged<int, int, double*, void> glUniform3dv;
|
||||
internal delegate* unmanaged<int, float, float, float, void> glUniform3f;
|
||||
internal delegate* unmanaged<int, int, float*, void> glUniform3fv;
|
||||
internal delegate* unmanaged<int, int, int, int, void> glUniform3i;
|
||||
internal delegate* unmanaged<int, int, int*, void> glUniform3iv;
|
||||
internal delegate* unmanaged<int, uint, uint, uint, void> glUniform3ui;
|
||||
internal delegate* unmanaged<int, int, uint*, void> glUniform3uiv;
|
||||
internal delegate* unmanaged<int, double, double, double, double, void> glUniform4d;
|
||||
internal delegate* unmanaged<int, int, double*, void> glUniform4dv;
|
||||
internal delegate* unmanaged<int, float, float, float, float, void> glUniform4f;
|
||||
internal delegate* unmanaged<int, int, float*, void> glUniform4fv;
|
||||
internal delegate* unmanaged<int, int, int, int, int, void> glUniform4i;
|
||||
internal delegate* unmanaged<int, int, int*, void> glUniform4iv;
|
||||
internal delegate* unmanaged<int, uint, uint, uint, uint, void> glUniform4ui;
|
||||
internal delegate* unmanaged<int, int, uint*, void> glUniform4uiv;
|
||||
internal delegate* unmanaged<uint, uint, uint, void> glUniformBlockBinding;
|
||||
internal delegate* unmanaged<int, int, byte, double*, void> glUniformMatrix2dv;
|
||||
internal delegate* unmanaged<int, int, byte, float*, void> glUniformMatrix2fv;
|
||||
internal delegate* unmanaged<int, int, byte, double*, void> glUniformMatrix2x3dv;
|
||||
internal delegate* unmanaged<int, int, byte, float*, void> glUniformMatrix2x3fv;
|
||||
internal delegate* unmanaged<int, int, byte, double*, void> glUniformMatrix2x4dv;
|
||||
internal delegate* unmanaged<int, int, byte, float*, void> glUniformMatrix2x4fv;
|
||||
internal delegate* unmanaged<int, int, byte, double*, void> glUniformMatrix3dv;
|
||||
internal delegate* unmanaged<int, int, byte, float*, void> glUniformMatrix3fv;
|
||||
internal delegate* unmanaged<int, int, byte, double*, void> glUniformMatrix3x2dv;
|
||||
internal delegate* unmanaged<int, int, byte, float*, void> glUniformMatrix3x2fv;
|
||||
internal delegate* unmanaged<int, int, byte, double*, void> glUniformMatrix3x4dv;
|
||||
internal delegate* unmanaged<int, int, byte, float*, void> glUniformMatrix3x4fv;
|
||||
internal delegate* unmanaged<int, int, byte, double*, void> glUniformMatrix4dv;
|
||||
internal delegate* unmanaged<int, int, byte, float*, void> glUniformMatrix4fv;
|
||||
internal delegate* unmanaged<int, int, byte, double*, void> glUniformMatrix4x2dv;
|
||||
internal delegate* unmanaged<int, int, byte, float*, void> glUniformMatrix4x2fv;
|
||||
internal delegate* unmanaged<int, int, byte, double*, void> glUniformMatrix4x3dv;
|
||||
internal delegate* unmanaged<int, int, byte, float*, void> glUniformMatrix4x3fv;
|
||||
internal delegate* unmanaged<uint, int, uint*, void> glUniformSubroutinesuiv;
|
||||
internal delegate* unmanaged<uint, byte> glUnmapBuffer;
|
||||
internal delegate* unmanaged<uint, byte> glUnmapNamedBuffer;
|
||||
internal delegate* unmanaged<uint, void> glUseProgram;
|
||||
internal delegate* unmanaged<uint, uint, uint, void> glUseProgramStages;
|
||||
internal delegate* unmanaged<uint, void> glValidateProgram;
|
||||
internal delegate* unmanaged<uint, void> glValidateProgramPipeline;
|
||||
internal delegate* unmanaged<uint, uint, uint, void> glVertexArrayAttribBinding;
|
||||
internal delegate* unmanaged<uint, uint, int, uint, byte, uint, void> glVertexArrayAttribFormat;
|
||||
internal delegate* unmanaged<uint, uint, int, uint, uint, void> glVertexArrayAttribIFormat;
|
||||
internal delegate* unmanaged<uint, uint, int, uint, uint, void> glVertexArrayAttribLFormat;
|
||||
internal delegate* unmanaged<uint, uint, uint, void> glVertexArrayBindingDivisor;
|
||||
internal delegate* unmanaged<uint, uint, void> glVertexArrayElementBuffer;
|
||||
internal delegate* unmanaged<uint, uint, uint, nint, int, void> glVertexArrayVertexBuffer;
|
||||
internal delegate* unmanaged<uint, uint, int, uint*, nint*, int*, void> glVertexArrayVertexBuffers;
|
||||
internal delegate* unmanaged<uint, double, void> glVertexAttrib1d;
|
||||
internal delegate* unmanaged<uint, double*, void> glVertexAttrib1dv;
|
||||
internal delegate* unmanaged<uint, float, void> glVertexAttrib1f;
|
||||
internal delegate* unmanaged<uint, float*, void> glVertexAttrib1fv;
|
||||
internal delegate* unmanaged<uint, short, void> glVertexAttrib1s;
|
||||
internal delegate* unmanaged<uint, short*, void> glVertexAttrib1sv;
|
||||
internal delegate* unmanaged<uint, double, double, void> glVertexAttrib2d;
|
||||
internal delegate* unmanaged<uint, double*, void> glVertexAttrib2dv;
|
||||
internal delegate* unmanaged<uint, float, float, void> glVertexAttrib2f;
|
||||
internal delegate* unmanaged<uint, float*, void> glVertexAttrib2fv;
|
||||
internal delegate* unmanaged<uint, short, short, void> glVertexAttrib2s;
|
||||
internal delegate* unmanaged<uint, short*, void> glVertexAttrib2sv;
|
||||
internal delegate* unmanaged<uint, double, double, double, void> glVertexAttrib3d;
|
||||
internal delegate* unmanaged<uint, double*, void> glVertexAttrib3dv;
|
||||
internal delegate* unmanaged<uint, float, float, float, void> glVertexAttrib3f;
|
||||
internal delegate* unmanaged<uint, float*, void> glVertexAttrib3fv;
|
||||
internal delegate* unmanaged<uint, short, short, short, void> glVertexAttrib3s;
|
||||
internal delegate* unmanaged<uint, short*, void> glVertexAttrib3sv;
|
||||
internal delegate* unmanaged<uint, sbyte*, void> glVertexAttrib4Nbv;
|
||||
internal delegate* unmanaged<uint, int*, void> glVertexAttrib4Niv;
|
||||
internal delegate* unmanaged<uint, short*, void> glVertexAttrib4Nsv;
|
||||
internal delegate* unmanaged<uint, byte, byte, byte, byte, void> glVertexAttrib4Nub;
|
||||
internal delegate* unmanaged<uint, byte*, void> glVertexAttrib4Nubv;
|
||||
internal delegate* unmanaged<uint, uint*, void> glVertexAttrib4Nuiv;
|
||||
internal delegate* unmanaged<uint, ushort*, void> glVertexAttrib4Nusv;
|
||||
internal delegate* unmanaged<uint, sbyte*, void> glVertexAttrib4bv;
|
||||
internal delegate* unmanaged<uint, double, double, double, double, void> glVertexAttrib4d;
|
||||
internal delegate* unmanaged<uint, double*, void> glVertexAttrib4dv;
|
||||
internal delegate* unmanaged<uint, float, float, float, float, void> glVertexAttrib4f;
|
||||
internal delegate* unmanaged<uint, float*, void> glVertexAttrib4fv;
|
||||
internal delegate* unmanaged<uint, int*, void> glVertexAttrib4iv;
|
||||
internal delegate* unmanaged<uint, short, short, short, short, void> glVertexAttrib4s;
|
||||
internal delegate* unmanaged<uint, short*, void> glVertexAttrib4sv;
|
||||
internal delegate* unmanaged<uint, byte*, void> glVertexAttrib4ubv;
|
||||
internal delegate* unmanaged<uint, uint*, void> glVertexAttrib4uiv;
|
||||
internal delegate* unmanaged<uint, ushort*, void> glVertexAttrib4usv;
|
||||
internal delegate* unmanaged<uint, uint, void> glVertexAttribBinding;
|
||||
internal delegate* unmanaged<uint, uint, void> glVertexAttribDivisor;
|
||||
internal delegate* unmanaged<uint, int, uint, byte, uint, void> glVertexAttribFormat;
|
||||
internal delegate* unmanaged<uint, int, void> glVertexAttribI1i;
|
||||
internal delegate* unmanaged<uint, int*, void> glVertexAttribI1iv;
|
||||
internal delegate* unmanaged<uint, uint, void> glVertexAttribI1ui;
|
||||
internal delegate* unmanaged<uint, uint*, void> glVertexAttribI1uiv;
|
||||
internal delegate* unmanaged<uint, int, int, void> glVertexAttribI2i;
|
||||
internal delegate* unmanaged<uint, int*, void> glVertexAttribI2iv;
|
||||
internal delegate* unmanaged<uint, uint, uint, void> glVertexAttribI2ui;
|
||||
internal delegate* unmanaged<uint, uint*, void> glVertexAttribI2uiv;
|
||||
internal delegate* unmanaged<uint, int, int, int, void> glVertexAttribI3i;
|
||||
internal delegate* unmanaged<uint, int*, void> glVertexAttribI3iv;
|
||||
internal delegate* unmanaged<uint, uint, uint, uint, void> glVertexAttribI3ui;
|
||||
internal delegate* unmanaged<uint, uint*, void> glVertexAttribI3uiv;
|
||||
internal delegate* unmanaged<uint, sbyte*, void> glVertexAttribI4bv;
|
||||
internal delegate* unmanaged<uint, int, int, int, int, void> glVertexAttribI4i;
|
||||
internal delegate* unmanaged<uint, int*, void> glVertexAttribI4iv;
|
||||
internal delegate* unmanaged<uint, short*, void> glVertexAttribI4sv;
|
||||
internal delegate* unmanaged<uint, byte*, void> glVertexAttribI4ubv;
|
||||
internal delegate* unmanaged<uint, uint, uint, uint, uint, void> glVertexAttribI4ui;
|
||||
internal delegate* unmanaged<uint, uint*, void> glVertexAttribI4uiv;
|
||||
internal delegate* unmanaged<uint, ushort*, void> glVertexAttribI4usv;
|
||||
internal delegate* unmanaged<uint, int, uint, uint, void> glVertexAttribIFormat;
|
||||
internal delegate* unmanaged<uint, int, uint, int, void*, void> glVertexAttribIPointer;
|
||||
internal delegate* unmanaged<uint, double, void> glVertexAttribL1d;
|
||||
internal delegate* unmanaged<uint, double*, void> glVertexAttribL1dv;
|
||||
internal delegate* unmanaged<uint, double, double, void> glVertexAttribL2d;
|
||||
internal delegate* unmanaged<uint, double*, void> glVertexAttribL2dv;
|
||||
internal delegate* unmanaged<uint, double, double, double, void> glVertexAttribL3d;
|
||||
internal delegate* unmanaged<uint, double*, void> glVertexAttribL3dv;
|
||||
internal delegate* unmanaged<uint, double, double, double, double, void> glVertexAttribL4d;
|
||||
internal delegate* unmanaged<uint, double*, void> glVertexAttribL4dv;
|
||||
internal delegate* unmanaged<uint, int, uint, uint, void> glVertexAttribLFormat;
|
||||
internal delegate* unmanaged<uint, int, uint, int, void*, void> glVertexAttribLPointer;
|
||||
internal delegate* unmanaged<uint, uint, byte, uint, void> glVertexAttribP1ui;
|
||||
internal delegate* unmanaged<uint, uint, byte, uint*, void> glVertexAttribP1uiv;
|
||||
internal delegate* unmanaged<uint, uint, byte, uint, void> glVertexAttribP2ui;
|
||||
internal delegate* unmanaged<uint, uint, byte, uint*, void> glVertexAttribP2uiv;
|
||||
internal delegate* unmanaged<uint, uint, byte, uint, void> glVertexAttribP3ui;
|
||||
internal delegate* unmanaged<uint, uint, byte, uint*, void> glVertexAttribP3uiv;
|
||||
internal delegate* unmanaged<uint, uint, byte, uint, void> glVertexAttribP4ui;
|
||||
internal delegate* unmanaged<uint, uint, byte, uint*, void> glVertexAttribP4uiv;
|
||||
internal delegate* unmanaged<uint, int, uint, byte, int, void*, void> glVertexAttribPointer;
|
||||
internal delegate* unmanaged<uint, uint, void> glVertexBindingDivisor;
|
||||
internal delegate* unmanaged<int, int, int, int, void> glViewport;
|
||||
internal delegate* unmanaged<uint, int, float*, void> glViewportArrayv;
|
||||
internal delegate* unmanaged<uint, float, float, float, float, void> glViewportIndexedf;
|
||||
internal delegate* unmanaged<uint, float*, void> glViewportIndexedfv;
|
||||
internal delegate* unmanaged<void*, uint, ulong, void> glWaitSync;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,676 @@
|
||||
// -----------------------------------------------------------------------------
|
||||
// file="glContextShadow"
|
||||
// Project: StgSharp
|
||||
// Copyright (c) Nitload.
|
||||
// SPDX-License-Identifier: MIT
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
// <auto-generated>
|
||||
// Generated by Nitload.GenerateGL.
|
||||
// Native-address shadow of the OpenGL function pointer table.
|
||||
// </auto-generated>
|
||||
|
||||
namespace Nitload.Graphics.OpenGL
|
||||
{
|
||||
[System.Runtime.InteropServices.StructLayout(System.Runtime.InteropServices.LayoutKind.Sequential)]
|
||||
internal struct glContextShadow
|
||||
{
|
||||
internal nint glActiveShaderProgram;
|
||||
internal nint glActiveTexture;
|
||||
internal nint glAttachShader;
|
||||
internal nint glBeginConditionalRender;
|
||||
internal nint glBeginQuery;
|
||||
internal nint glBeginQueryIndexed;
|
||||
internal nint glBeginTransformFeedback;
|
||||
internal nint glBindAttribLocation;
|
||||
internal nint glBindBuffer;
|
||||
internal nint glBindBufferBase;
|
||||
internal nint glBindBufferRange;
|
||||
internal nint glBindBuffersBase;
|
||||
internal nint glBindBuffersRange;
|
||||
internal nint glBindFragDataLocation;
|
||||
internal nint glBindFragDataLocationIndexed;
|
||||
internal nint glBindFramebuffer;
|
||||
internal nint glBindImageTexture;
|
||||
internal nint glBindImageTextures;
|
||||
internal nint glBindProgramPipeline;
|
||||
internal nint glBindRenderbuffer;
|
||||
internal nint glBindSampler;
|
||||
internal nint glBindSamplers;
|
||||
internal nint glBindTexture;
|
||||
internal nint glBindTextureUnit;
|
||||
internal nint glBindTextures;
|
||||
internal nint glBindTransformFeedback;
|
||||
internal nint glBindVertexArray;
|
||||
internal nint glBindVertexBuffer;
|
||||
internal nint glBindVertexBuffers;
|
||||
internal nint glBlendColor;
|
||||
internal nint glBlendEquation;
|
||||
internal nint glBlendEquationSeparate;
|
||||
internal nint glBlendEquationSeparatei;
|
||||
internal nint glBlendEquationi;
|
||||
internal nint glBlendFunc;
|
||||
internal nint glBlendFuncSeparate;
|
||||
internal nint glBlendFuncSeparatei;
|
||||
internal nint glBlendFunci;
|
||||
internal nint glBlitFramebuffer;
|
||||
internal nint glBlitNamedFramebuffer;
|
||||
internal nint glBufferData;
|
||||
internal nint glBufferStorage;
|
||||
internal nint glBufferSubData;
|
||||
internal nint glCheckFramebufferStatus;
|
||||
internal nint glCheckNamedFramebufferStatus;
|
||||
internal nint glClampColor;
|
||||
internal nint glClear;
|
||||
internal nint glClearBufferData;
|
||||
internal nint glClearBufferSubData;
|
||||
internal nint glClearBufferfi;
|
||||
internal nint glClearBufferfv;
|
||||
internal nint glClearBufferiv;
|
||||
internal nint glClearBufferuiv;
|
||||
internal nint glClearColor;
|
||||
internal nint glClearDepth;
|
||||
internal nint glClearDepthf;
|
||||
internal nint glClearNamedBufferData;
|
||||
internal nint glClearNamedBufferSubData;
|
||||
internal nint glClearNamedFramebufferfi;
|
||||
internal nint glClearNamedFramebufferfv;
|
||||
internal nint glClearNamedFramebufferiv;
|
||||
internal nint glClearNamedFramebufferuiv;
|
||||
internal nint glClearStencil;
|
||||
internal nint glClearTexImage;
|
||||
internal nint glClearTexSubImage;
|
||||
internal nint glClientWaitSync;
|
||||
internal nint glClipControl;
|
||||
internal nint glColorMask;
|
||||
internal nint glColorMaski;
|
||||
internal nint glCompileShader;
|
||||
internal nint glCompressedTexImage1D;
|
||||
internal nint glCompressedTexImage2D;
|
||||
internal nint glCompressedTexImage3D;
|
||||
internal nint glCompressedTexSubImage1D;
|
||||
internal nint glCompressedTexSubImage2D;
|
||||
internal nint glCompressedTexSubImage3D;
|
||||
internal nint glCompressedTextureSubImage1D;
|
||||
internal nint glCompressedTextureSubImage2D;
|
||||
internal nint glCompressedTextureSubImage3D;
|
||||
internal nint glCopyBufferSubData;
|
||||
internal nint glCopyImageSubData;
|
||||
internal nint glCopyNamedBufferSubData;
|
||||
internal nint glCopyTexImage1D;
|
||||
internal nint glCopyTexImage2D;
|
||||
internal nint glCopyTexSubImage1D;
|
||||
internal nint glCopyTexSubImage2D;
|
||||
internal nint glCopyTexSubImage3D;
|
||||
internal nint glCopyTextureSubImage1D;
|
||||
internal nint glCopyTextureSubImage2D;
|
||||
internal nint glCopyTextureSubImage3D;
|
||||
internal nint glCreateBuffers;
|
||||
internal nint glCreateFramebuffers;
|
||||
internal nint glCreateProgram;
|
||||
internal nint glCreateProgramPipelines;
|
||||
internal nint glCreateQueries;
|
||||
internal nint glCreateRenderbuffers;
|
||||
internal nint glCreateSamplers;
|
||||
internal nint glCreateShader;
|
||||
internal nint glCreateShaderProgramv;
|
||||
internal nint glCreateTextures;
|
||||
internal nint glCreateTransformFeedbacks;
|
||||
internal nint glCreateVertexArrays;
|
||||
internal nint glCullFace;
|
||||
internal nint glDebugMessageCallback;
|
||||
internal nint glDebugMessageControl;
|
||||
internal nint glDebugMessageInsert;
|
||||
internal nint glDeleteBuffers;
|
||||
internal nint glDeleteFramebuffers;
|
||||
internal nint glDeleteProgram;
|
||||
internal nint glDeleteProgramPipelines;
|
||||
internal nint glDeleteQueries;
|
||||
internal nint glDeleteRenderbuffers;
|
||||
internal nint glDeleteSamplers;
|
||||
internal nint glDeleteShader;
|
||||
internal nint glDeleteSync;
|
||||
internal nint glDeleteTextures;
|
||||
internal nint glDeleteTransformFeedbacks;
|
||||
internal nint glDeleteVertexArrays;
|
||||
internal nint glDepthFunc;
|
||||
internal nint glDepthMask;
|
||||
internal nint glDepthRange;
|
||||
internal nint glDepthRangeArrayv;
|
||||
internal nint glDepthRangeIndexed;
|
||||
internal nint glDepthRangef;
|
||||
internal nint glDetachShader;
|
||||
internal nint glDisable;
|
||||
internal nint glDisableVertexArrayAttrib;
|
||||
internal nint glDisableVertexAttribArray;
|
||||
internal nint glDisablei;
|
||||
internal nint glDispatchCompute;
|
||||
internal nint glDispatchComputeIndirect;
|
||||
internal nint glDrawArrays;
|
||||
internal nint glDrawArraysIndirect;
|
||||
internal nint glDrawArraysInstanced;
|
||||
internal nint glDrawArraysInstancedBaseInstance;
|
||||
internal nint glDrawBuffer;
|
||||
internal nint glDrawBuffers;
|
||||
internal nint glDrawElements;
|
||||
internal nint glDrawElementsBaseVertex;
|
||||
internal nint glDrawElementsIndirect;
|
||||
internal nint glDrawElementsInstanced;
|
||||
internal nint glDrawElementsInstancedBaseInstance;
|
||||
internal nint glDrawElementsInstancedBaseVertex;
|
||||
internal nint glDrawElementsInstancedBaseVertexBaseInstance;
|
||||
internal nint glDrawRangeElements;
|
||||
internal nint glDrawRangeElementsBaseVertex;
|
||||
internal nint glDrawTransformFeedback;
|
||||
internal nint glDrawTransformFeedbackInstanced;
|
||||
internal nint glDrawTransformFeedbackStream;
|
||||
internal nint glDrawTransformFeedbackStreamInstanced;
|
||||
internal nint glEnable;
|
||||
internal nint glEnableVertexArrayAttrib;
|
||||
internal nint glEnableVertexAttribArray;
|
||||
internal nint glEnablei;
|
||||
internal nint glEndConditionalRender;
|
||||
internal nint glEndQuery;
|
||||
internal nint glEndQueryIndexed;
|
||||
internal nint glEndTransformFeedback;
|
||||
internal nint glFenceSync;
|
||||
internal nint glFinish;
|
||||
internal nint glFlush;
|
||||
internal nint glFlushMappedBufferRange;
|
||||
internal nint glFlushMappedNamedBufferRange;
|
||||
internal nint glFramebufferParameteri;
|
||||
internal nint glFramebufferRenderbuffer;
|
||||
internal nint glFramebufferTexture;
|
||||
internal nint glFramebufferTexture1D;
|
||||
internal nint glFramebufferTexture2D;
|
||||
internal nint glFramebufferTexture3D;
|
||||
internal nint glFramebufferTextureLayer;
|
||||
internal nint glFrontFace;
|
||||
internal nint glGenBuffers;
|
||||
internal nint glGenFramebuffers;
|
||||
internal nint glGenProgramPipelines;
|
||||
internal nint glGenQueries;
|
||||
internal nint glGenRenderbuffers;
|
||||
internal nint glGenSamplers;
|
||||
internal nint glGenTextures;
|
||||
internal nint glGenTransformFeedbacks;
|
||||
internal nint glGenVertexArrays;
|
||||
internal nint glGenerateMipmap;
|
||||
internal nint glGenerateTextureMipmap;
|
||||
internal nint glGetActiveAtomicCounterBufferiv;
|
||||
internal nint glGetActiveAttrib;
|
||||
internal nint glGetActiveSubroutineName;
|
||||
internal nint glGetActiveSubroutineUniformName;
|
||||
internal nint glGetActiveSubroutineUniformiv;
|
||||
internal nint glGetActiveUniform;
|
||||
internal nint glGetActiveUniformBlockName;
|
||||
internal nint glGetActiveUniformBlockiv;
|
||||
internal nint glGetActiveUniformName;
|
||||
internal nint glGetActiveUniformsiv;
|
||||
internal nint glGetAttachedShaders;
|
||||
internal nint glGetAttribLocation;
|
||||
internal nint glGetBooleani_v;
|
||||
internal nint glGetBooleanv;
|
||||
internal nint glGetBufferParameteri64v;
|
||||
internal nint glGetBufferParameteriv;
|
||||
internal nint glGetBufferPointerv;
|
||||
internal nint glGetBufferSubData;
|
||||
internal nint glGetCompressedTexImage;
|
||||
internal nint glGetCompressedTextureImage;
|
||||
internal nint glGetCompressedTextureSubImage;
|
||||
internal nint glGetDebugMessageLog;
|
||||
internal nint glGetDoublei_v;
|
||||
internal nint glGetDoublev;
|
||||
internal nint glGetError;
|
||||
internal nint glGetFloati_v;
|
||||
internal nint glGetFloatv;
|
||||
internal nint glGetFragDataIndex;
|
||||
internal nint glGetFragDataLocation;
|
||||
internal nint glGetFramebufferAttachmentParameteriv;
|
||||
internal nint glGetFramebufferParameteriv;
|
||||
internal nint glGetGraphicsResetStatus;
|
||||
internal nint glGetInteger64i_v;
|
||||
internal nint glGetInteger64v;
|
||||
internal nint glGetIntegeri_v;
|
||||
internal nint glGetIntegerv;
|
||||
internal nint glGetInternalformati64v;
|
||||
internal nint glGetInternalformativ;
|
||||
internal nint glGetMultisamplefv;
|
||||
internal nint glGetNamedBufferParameteri64v;
|
||||
internal nint glGetNamedBufferParameteriv;
|
||||
internal nint glGetNamedBufferPointerv;
|
||||
internal nint glGetNamedBufferSubData;
|
||||
internal nint glGetNamedFramebufferAttachmentParameteriv;
|
||||
internal nint glGetNamedFramebufferParameteriv;
|
||||
internal nint glGetNamedRenderbufferParameteriv;
|
||||
internal nint glGetObjectLabel;
|
||||
internal nint glGetObjectPtrLabel;
|
||||
internal nint glGetPointerv;
|
||||
internal nint glGetProgramBinary;
|
||||
internal nint glGetProgramInfoLog;
|
||||
internal nint glGetProgramInterfaceiv;
|
||||
internal nint glGetProgramPipelineInfoLog;
|
||||
internal nint glGetProgramPipelineiv;
|
||||
internal nint glGetProgramResourceIndex;
|
||||
internal nint glGetProgramResourceLocation;
|
||||
internal nint glGetProgramResourceLocationIndex;
|
||||
internal nint glGetProgramResourceName;
|
||||
internal nint glGetProgramResourceiv;
|
||||
internal nint glGetProgramStageiv;
|
||||
internal nint glGetProgramiv;
|
||||
internal nint glGetQueryBufferObjecti64v;
|
||||
internal nint glGetQueryBufferObjectiv;
|
||||
internal nint glGetQueryBufferObjectui64v;
|
||||
internal nint glGetQueryBufferObjectuiv;
|
||||
internal nint glGetQueryIndexediv;
|
||||
internal nint glGetQueryObjecti64v;
|
||||
internal nint glGetQueryObjectiv;
|
||||
internal nint glGetQueryObjectui64v;
|
||||
internal nint glGetQueryObjectuiv;
|
||||
internal nint glGetQueryiv;
|
||||
internal nint glGetRenderbufferParameteriv;
|
||||
internal nint glGetSamplerParameterIiv;
|
||||
internal nint glGetSamplerParameterIuiv;
|
||||
internal nint glGetSamplerParameterfv;
|
||||
internal nint glGetSamplerParameteriv;
|
||||
internal nint glGetShaderInfoLog;
|
||||
internal nint glGetShaderPrecisionFormat;
|
||||
internal nint glGetShaderSource;
|
||||
internal nint glGetShaderiv;
|
||||
internal nint glGetString;
|
||||
internal nint glGetStringi;
|
||||
internal nint glGetSubroutineIndex;
|
||||
internal nint glGetSubroutineUniformLocation;
|
||||
internal nint glGetSynciv;
|
||||
internal nint glGetTexImage;
|
||||
internal nint glGetTexLevelParameterfv;
|
||||
internal nint glGetTexLevelParameteriv;
|
||||
internal nint glGetTexParameterIiv;
|
||||
internal nint glGetTexParameterIuiv;
|
||||
internal nint glGetTexParameterfv;
|
||||
internal nint glGetTexParameteriv;
|
||||
internal nint glGetTextureImage;
|
||||
internal nint glGetTextureLevelParameterfv;
|
||||
internal nint glGetTextureLevelParameteriv;
|
||||
internal nint glGetTextureParameterIiv;
|
||||
internal nint glGetTextureParameterIuiv;
|
||||
internal nint glGetTextureParameterfv;
|
||||
internal nint glGetTextureParameteriv;
|
||||
internal nint glGetTextureSubImage;
|
||||
internal nint glGetTransformFeedbackVarying;
|
||||
internal nint glGetTransformFeedbacki64_v;
|
||||
internal nint glGetTransformFeedbacki_v;
|
||||
internal nint glGetTransformFeedbackiv;
|
||||
internal nint glGetUniformBlockIndex;
|
||||
internal nint glGetUniformIndices;
|
||||
internal nint glGetUniformLocation;
|
||||
internal nint glGetUniformSubroutineuiv;
|
||||
internal nint glGetUniformdv;
|
||||
internal nint glGetUniformfv;
|
||||
internal nint glGetUniformiv;
|
||||
internal nint glGetUniformuiv;
|
||||
internal nint glGetVertexArrayIndexed64iv;
|
||||
internal nint glGetVertexArrayIndexediv;
|
||||
internal nint glGetVertexArrayiv;
|
||||
internal nint glGetVertexAttribIiv;
|
||||
internal nint glGetVertexAttribIuiv;
|
||||
internal nint glGetVertexAttribLdv;
|
||||
internal nint glGetVertexAttribPointerv;
|
||||
internal nint glGetVertexAttribdv;
|
||||
internal nint glGetVertexAttribfv;
|
||||
internal nint glGetVertexAttribiv;
|
||||
internal nint glGetnCompressedTexImage;
|
||||
internal nint glGetnTexImage;
|
||||
internal nint glGetnUniformdv;
|
||||
internal nint glGetnUniformfv;
|
||||
internal nint glGetnUniformiv;
|
||||
internal nint glGetnUniformuiv;
|
||||
internal nint glHint;
|
||||
internal nint glInvalidateBufferData;
|
||||
internal nint glInvalidateBufferSubData;
|
||||
internal nint glInvalidateFramebuffer;
|
||||
internal nint glInvalidateNamedFramebufferData;
|
||||
internal nint glInvalidateNamedFramebufferSubData;
|
||||
internal nint glInvalidateSubFramebuffer;
|
||||
internal nint glInvalidateTexImage;
|
||||
internal nint glInvalidateTexSubImage;
|
||||
internal nint glIsBuffer;
|
||||
internal nint glIsEnabled;
|
||||
internal nint glIsEnabledi;
|
||||
internal nint glIsFramebuffer;
|
||||
internal nint glIsProgram;
|
||||
internal nint glIsProgramPipeline;
|
||||
internal nint glIsQuery;
|
||||
internal nint glIsRenderbuffer;
|
||||
internal nint glIsSampler;
|
||||
internal nint glIsShader;
|
||||
internal nint glIsSync;
|
||||
internal nint glIsTexture;
|
||||
internal nint glIsTransformFeedback;
|
||||
internal nint glIsVertexArray;
|
||||
internal nint glLineWidth;
|
||||
internal nint glLinkProgram;
|
||||
internal nint glLogicOp;
|
||||
internal nint glMapBuffer;
|
||||
internal nint glMapBufferRange;
|
||||
internal nint glMapNamedBuffer;
|
||||
internal nint glMapNamedBufferRange;
|
||||
internal nint glMemoryBarrier;
|
||||
internal nint glMemoryBarrierByRegion;
|
||||
internal nint glMinSampleShading;
|
||||
internal nint glMultiDrawArrays;
|
||||
internal nint glMultiDrawArraysIndirect;
|
||||
internal nint glMultiDrawArraysIndirectCount;
|
||||
internal nint glMultiDrawElements;
|
||||
internal nint glMultiDrawElementsBaseVertex;
|
||||
internal nint glMultiDrawElementsIndirect;
|
||||
internal nint glMultiDrawElementsIndirectCount;
|
||||
internal nint glNamedBufferData;
|
||||
internal nint glNamedBufferStorage;
|
||||
internal nint glNamedBufferSubData;
|
||||
internal nint glNamedFramebufferDrawBuffer;
|
||||
internal nint glNamedFramebufferDrawBuffers;
|
||||
internal nint glNamedFramebufferParameteri;
|
||||
internal nint glNamedFramebufferReadBuffer;
|
||||
internal nint glNamedFramebufferRenderbuffer;
|
||||
internal nint glNamedFramebufferTexture;
|
||||
internal nint glNamedFramebufferTextureLayer;
|
||||
internal nint glNamedRenderbufferStorage;
|
||||
internal nint glNamedRenderbufferStorageMultisample;
|
||||
internal nint glObjectLabel;
|
||||
internal nint glObjectPtrLabel;
|
||||
internal nint glPatchParameterfv;
|
||||
internal nint glPatchParameteri;
|
||||
internal nint glPauseTransformFeedback;
|
||||
internal nint glPixelStoref;
|
||||
internal nint glPixelStorei;
|
||||
internal nint glPointParameterf;
|
||||
internal nint glPointParameterfv;
|
||||
internal nint glPointParameteri;
|
||||
internal nint glPointParameteriv;
|
||||
internal nint glPointSize;
|
||||
internal nint glPolygonMode;
|
||||
internal nint glPolygonOffset;
|
||||
internal nint glPolygonOffsetClamp;
|
||||
internal nint glPopDebugGroup;
|
||||
internal nint glPrimitiveRestartIndex;
|
||||
internal nint glProgramBinary;
|
||||
internal nint glProgramParameteri;
|
||||
internal nint glProgramUniform1d;
|
||||
internal nint glProgramUniform1dv;
|
||||
internal nint glProgramUniform1f;
|
||||
internal nint glProgramUniform1fv;
|
||||
internal nint glProgramUniform1i;
|
||||
internal nint glProgramUniform1iv;
|
||||
internal nint glProgramUniform1ui;
|
||||
internal nint glProgramUniform1uiv;
|
||||
internal nint glProgramUniform2d;
|
||||
internal nint glProgramUniform2dv;
|
||||
internal nint glProgramUniform2f;
|
||||
internal nint glProgramUniform2fv;
|
||||
internal nint glProgramUniform2i;
|
||||
internal nint glProgramUniform2iv;
|
||||
internal nint glProgramUniform2ui;
|
||||
internal nint glProgramUniform2uiv;
|
||||
internal nint glProgramUniform3d;
|
||||
internal nint glProgramUniform3dv;
|
||||
internal nint glProgramUniform3f;
|
||||
internal nint glProgramUniform3fv;
|
||||
internal nint glProgramUniform3i;
|
||||
internal nint glProgramUniform3iv;
|
||||
internal nint glProgramUniform3ui;
|
||||
internal nint glProgramUniform3uiv;
|
||||
internal nint glProgramUniform4d;
|
||||
internal nint glProgramUniform4dv;
|
||||
internal nint glProgramUniform4f;
|
||||
internal nint glProgramUniform4fv;
|
||||
internal nint glProgramUniform4i;
|
||||
internal nint glProgramUniform4iv;
|
||||
internal nint glProgramUniform4ui;
|
||||
internal nint glProgramUniform4uiv;
|
||||
internal nint glProgramUniformMatrix2dv;
|
||||
internal nint glProgramUniformMatrix2fv;
|
||||
internal nint glProgramUniformMatrix2x3dv;
|
||||
internal nint glProgramUniformMatrix2x3fv;
|
||||
internal nint glProgramUniformMatrix2x4dv;
|
||||
internal nint glProgramUniformMatrix2x4fv;
|
||||
internal nint glProgramUniformMatrix3dv;
|
||||
internal nint glProgramUniformMatrix3fv;
|
||||
internal nint glProgramUniformMatrix3x2dv;
|
||||
internal nint glProgramUniformMatrix3x2fv;
|
||||
internal nint glProgramUniformMatrix3x4dv;
|
||||
internal nint glProgramUniformMatrix3x4fv;
|
||||
internal nint glProgramUniformMatrix4dv;
|
||||
internal nint glProgramUniformMatrix4fv;
|
||||
internal nint glProgramUniformMatrix4x2dv;
|
||||
internal nint glProgramUniformMatrix4x2fv;
|
||||
internal nint glProgramUniformMatrix4x3dv;
|
||||
internal nint glProgramUniformMatrix4x3fv;
|
||||
internal nint glProvokingVertex;
|
||||
internal nint glPushDebugGroup;
|
||||
internal nint glQueryCounter;
|
||||
internal nint glReadBuffer;
|
||||
internal nint glReadPixels;
|
||||
internal nint glReadnPixels;
|
||||
internal nint glReleaseShaderCompiler;
|
||||
internal nint glRenderbufferStorage;
|
||||
internal nint glRenderbufferStorageMultisample;
|
||||
internal nint glResumeTransformFeedback;
|
||||
internal nint glSampleCoverage;
|
||||
internal nint glSampleMaski;
|
||||
internal nint glSamplerParameterIiv;
|
||||
internal nint glSamplerParameterIuiv;
|
||||
internal nint glSamplerParameterf;
|
||||
internal nint glSamplerParameterfv;
|
||||
internal nint glSamplerParameteri;
|
||||
internal nint glSamplerParameteriv;
|
||||
internal nint glScissor;
|
||||
internal nint glScissorArrayv;
|
||||
internal nint glScissorIndexed;
|
||||
internal nint glScissorIndexedv;
|
||||
internal nint glShaderBinary;
|
||||
internal nint glShaderSource;
|
||||
internal nint glShaderStorageBlockBinding;
|
||||
internal nint glSpecializeShader;
|
||||
internal nint glStencilFunc;
|
||||
internal nint glStencilFuncSeparate;
|
||||
internal nint glStencilMask;
|
||||
internal nint glStencilMaskSeparate;
|
||||
internal nint glStencilOp;
|
||||
internal nint glStencilOpSeparate;
|
||||
internal nint glTexBuffer;
|
||||
internal nint glTexBufferRange;
|
||||
internal nint glTexImage1D;
|
||||
internal nint glTexImage2D;
|
||||
internal nint glTexImage2DMultisample;
|
||||
internal nint glTexImage3D;
|
||||
internal nint glTexImage3DMultisample;
|
||||
internal nint glTexParameterIiv;
|
||||
internal nint glTexParameterIuiv;
|
||||
internal nint glTexParameterf;
|
||||
internal nint glTexParameterfv;
|
||||
internal nint glTexParameteri;
|
||||
internal nint glTexParameteriv;
|
||||
internal nint glTexStorage1D;
|
||||
internal nint glTexStorage2D;
|
||||
internal nint glTexStorage2DMultisample;
|
||||
internal nint glTexStorage3D;
|
||||
internal nint glTexStorage3DMultisample;
|
||||
internal nint glTexSubImage1D;
|
||||
internal nint glTexSubImage2D;
|
||||
internal nint glTexSubImage3D;
|
||||
internal nint glTextureBarrier;
|
||||
internal nint glTextureBuffer;
|
||||
internal nint glTextureBufferRange;
|
||||
internal nint glTextureParameterIiv;
|
||||
internal nint glTextureParameterIuiv;
|
||||
internal nint glTextureParameterf;
|
||||
internal nint glTextureParameterfv;
|
||||
internal nint glTextureParameteri;
|
||||
internal nint glTextureParameteriv;
|
||||
internal nint glTextureStorage1D;
|
||||
internal nint glTextureStorage2D;
|
||||
internal nint glTextureStorage2DMultisample;
|
||||
internal nint glTextureStorage3D;
|
||||
internal nint glTextureStorage3DMultisample;
|
||||
internal nint glTextureSubImage1D;
|
||||
internal nint glTextureSubImage2D;
|
||||
internal nint glTextureSubImage3D;
|
||||
internal nint glTextureView;
|
||||
internal nint glTransformFeedbackBufferBase;
|
||||
internal nint glTransformFeedbackBufferRange;
|
||||
internal nint glTransformFeedbackVaryings;
|
||||
internal nint glUniform1d;
|
||||
internal nint glUniform1dv;
|
||||
internal nint glUniform1f;
|
||||
internal nint glUniform1fv;
|
||||
internal nint glUniform1i;
|
||||
internal nint glUniform1iv;
|
||||
internal nint glUniform1ui;
|
||||
internal nint glUniform1uiv;
|
||||
internal nint glUniform2d;
|
||||
internal nint glUniform2dv;
|
||||
internal nint glUniform2f;
|
||||
internal nint glUniform2fv;
|
||||
internal nint glUniform2i;
|
||||
internal nint glUniform2iv;
|
||||
internal nint glUniform2ui;
|
||||
internal nint glUniform2uiv;
|
||||
internal nint glUniform3d;
|
||||
internal nint glUniform3dv;
|
||||
internal nint glUniform3f;
|
||||
internal nint glUniform3fv;
|
||||
internal nint glUniform3i;
|
||||
internal nint glUniform3iv;
|
||||
internal nint glUniform3ui;
|
||||
internal nint glUniform3uiv;
|
||||
internal nint glUniform4d;
|
||||
internal nint glUniform4dv;
|
||||
internal nint glUniform4f;
|
||||
internal nint glUniform4fv;
|
||||
internal nint glUniform4i;
|
||||
internal nint glUniform4iv;
|
||||
internal nint glUniform4ui;
|
||||
internal nint glUniform4uiv;
|
||||
internal nint glUniformBlockBinding;
|
||||
internal nint glUniformMatrix2dv;
|
||||
internal nint glUniformMatrix2fv;
|
||||
internal nint glUniformMatrix2x3dv;
|
||||
internal nint glUniformMatrix2x3fv;
|
||||
internal nint glUniformMatrix2x4dv;
|
||||
internal nint glUniformMatrix2x4fv;
|
||||
internal nint glUniformMatrix3dv;
|
||||
internal nint glUniformMatrix3fv;
|
||||
internal nint glUniformMatrix3x2dv;
|
||||
internal nint glUniformMatrix3x2fv;
|
||||
internal nint glUniformMatrix3x4dv;
|
||||
internal nint glUniformMatrix3x4fv;
|
||||
internal nint glUniformMatrix4dv;
|
||||
internal nint glUniformMatrix4fv;
|
||||
internal nint glUniformMatrix4x2dv;
|
||||
internal nint glUniformMatrix4x2fv;
|
||||
internal nint glUniformMatrix4x3dv;
|
||||
internal nint glUniformMatrix4x3fv;
|
||||
internal nint glUniformSubroutinesuiv;
|
||||
internal nint glUnmapBuffer;
|
||||
internal nint glUnmapNamedBuffer;
|
||||
internal nint glUseProgram;
|
||||
internal nint glUseProgramStages;
|
||||
internal nint glValidateProgram;
|
||||
internal nint glValidateProgramPipeline;
|
||||
internal nint glVertexArrayAttribBinding;
|
||||
internal nint glVertexArrayAttribFormat;
|
||||
internal nint glVertexArrayAttribIFormat;
|
||||
internal nint glVertexArrayAttribLFormat;
|
||||
internal nint glVertexArrayBindingDivisor;
|
||||
internal nint glVertexArrayElementBuffer;
|
||||
internal nint glVertexArrayVertexBuffer;
|
||||
internal nint glVertexArrayVertexBuffers;
|
||||
internal nint glVertexAttrib1d;
|
||||
internal nint glVertexAttrib1dv;
|
||||
internal nint glVertexAttrib1f;
|
||||
internal nint glVertexAttrib1fv;
|
||||
internal nint glVertexAttrib1s;
|
||||
internal nint glVertexAttrib1sv;
|
||||
internal nint glVertexAttrib2d;
|
||||
internal nint glVertexAttrib2dv;
|
||||
internal nint glVertexAttrib2f;
|
||||
internal nint glVertexAttrib2fv;
|
||||
internal nint glVertexAttrib2s;
|
||||
internal nint glVertexAttrib2sv;
|
||||
internal nint glVertexAttrib3d;
|
||||
internal nint glVertexAttrib3dv;
|
||||
internal nint glVertexAttrib3f;
|
||||
internal nint glVertexAttrib3fv;
|
||||
internal nint glVertexAttrib3s;
|
||||
internal nint glVertexAttrib3sv;
|
||||
internal nint glVertexAttrib4Nbv;
|
||||
internal nint glVertexAttrib4Niv;
|
||||
internal nint glVertexAttrib4Nsv;
|
||||
internal nint glVertexAttrib4Nub;
|
||||
internal nint glVertexAttrib4Nubv;
|
||||
internal nint glVertexAttrib4Nuiv;
|
||||
internal nint glVertexAttrib4Nusv;
|
||||
internal nint glVertexAttrib4bv;
|
||||
internal nint glVertexAttrib4d;
|
||||
internal nint glVertexAttrib4dv;
|
||||
internal nint glVertexAttrib4f;
|
||||
internal nint glVertexAttrib4fv;
|
||||
internal nint glVertexAttrib4iv;
|
||||
internal nint glVertexAttrib4s;
|
||||
internal nint glVertexAttrib4sv;
|
||||
internal nint glVertexAttrib4ubv;
|
||||
internal nint glVertexAttrib4uiv;
|
||||
internal nint glVertexAttrib4usv;
|
||||
internal nint glVertexAttribBinding;
|
||||
internal nint glVertexAttribDivisor;
|
||||
internal nint glVertexAttribFormat;
|
||||
internal nint glVertexAttribI1i;
|
||||
internal nint glVertexAttribI1iv;
|
||||
internal nint glVertexAttribI1ui;
|
||||
internal nint glVertexAttribI1uiv;
|
||||
internal nint glVertexAttribI2i;
|
||||
internal nint glVertexAttribI2iv;
|
||||
internal nint glVertexAttribI2ui;
|
||||
internal nint glVertexAttribI2uiv;
|
||||
internal nint glVertexAttribI3i;
|
||||
internal nint glVertexAttribI3iv;
|
||||
internal nint glVertexAttribI3ui;
|
||||
internal nint glVertexAttribI3uiv;
|
||||
internal nint glVertexAttribI4bv;
|
||||
internal nint glVertexAttribI4i;
|
||||
internal nint glVertexAttribI4iv;
|
||||
internal nint glVertexAttribI4sv;
|
||||
internal nint glVertexAttribI4ubv;
|
||||
internal nint glVertexAttribI4ui;
|
||||
internal nint glVertexAttribI4uiv;
|
||||
internal nint glVertexAttribI4usv;
|
||||
internal nint glVertexAttribIFormat;
|
||||
internal nint glVertexAttribIPointer;
|
||||
internal nint glVertexAttribL1d;
|
||||
internal nint glVertexAttribL1dv;
|
||||
internal nint glVertexAttribL2d;
|
||||
internal nint glVertexAttribL2dv;
|
||||
internal nint glVertexAttribL3d;
|
||||
internal nint glVertexAttribL3dv;
|
||||
internal nint glVertexAttribL4d;
|
||||
internal nint glVertexAttribL4dv;
|
||||
internal nint glVertexAttribLFormat;
|
||||
internal nint glVertexAttribLPointer;
|
||||
internal nint glVertexAttribP1ui;
|
||||
internal nint glVertexAttribP1uiv;
|
||||
internal nint glVertexAttribP2ui;
|
||||
internal nint glVertexAttribP2uiv;
|
||||
internal nint glVertexAttribP3ui;
|
||||
internal nint glVertexAttribP3uiv;
|
||||
internal nint glVertexAttribP4ui;
|
||||
internal nint glVertexAttribP4uiv;
|
||||
internal nint glVertexAttribPointer;
|
||||
internal nint glVertexBindingDivisor;
|
||||
internal nint glViewport;
|
||||
internal nint glViewportArrayv;
|
||||
internal nint glViewportIndexedf;
|
||||
internal nint glViewportIndexedfv;
|
||||
internal nint glWaitSync;
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,54 @@
|
||||
// -----------------------------------------------------------------------------
|
||||
// file="Shader"
|
||||
// Project: StgSharp
|
||||
// Copyright (c) Nitload.
|
||||
// SPDX-License-Identifier: MIT
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
using System;
|
||||
|
||||
namespace Nitload.Graphics.OpenGL
|
||||
{
|
||||
/// <summary>
|
||||
/// A set of OpenGL shader handles with their common stage type.
|
||||
/// </summary>
|
||||
public sealed class Shader
|
||||
{
|
||||
|
||||
private readonly GlHandle[] _handles;
|
||||
|
||||
public Shader(
|
||||
ReadOnlySpan<GlHandle> handles,
|
||||
ShaderType type
|
||||
)
|
||||
{
|
||||
_handles = handles.ToArray();
|
||||
Type = type;
|
||||
}
|
||||
|
||||
public GlHandle this[
|
||||
int index
|
||||
] => _handles[index];
|
||||
|
||||
public int Count => _handles.Length;
|
||||
|
||||
public ReadOnlySpan<GlHandle> Handles => _handles;
|
||||
|
||||
public ShaderType Type { get; }
|
||||
|
||||
}
|
||||
|
||||
public enum ShaderStatus : int
|
||||
{
|
||||
|
||||
CompileStatus = glConst.COMPILE_STATUS,
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// An OpenGL shader-program handle.
|
||||
/// </summary>
|
||||
public readonly record struct ShaderProgram(
|
||||
GlHandle Handle
|
||||
);
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,179 @@
|
||||
// -----------------------------------------------------------------------------
|
||||
// file="glApiManager"
|
||||
// Project: StgSharp
|
||||
// Copyright (c) Nitload.
|
||||
// SPDX-License-Identifier: MIT
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
using Nitload.Common.Internal;
|
||||
|
||||
using System;
|
||||
using System.Globalization;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Nitload.Graphics.OpenGL
|
||||
{
|
||||
/// <summary>
|
||||
/// Compatibility loader retained until the context subsystem is replaced.
|
||||
/// </summary>
|
||||
public static partial class glManager
|
||||
{
|
||||
|
||||
private const uint GlVersion = 0x1F02;
|
||||
|
||||
private static bool core10;
|
||||
private static bool core11;
|
||||
private static bool core12;
|
||||
private static bool core13;
|
||||
private static bool core14;
|
||||
private static bool core15;
|
||||
private static bool core20;
|
||||
private static bool core21;
|
||||
private static bool core30;
|
||||
private static bool core31;
|
||||
private static bool core32;
|
||||
private static bool core33;
|
||||
private static bool core40;
|
||||
private static bool core41;
|
||||
private static bool core42;
|
||||
private static bool core43;
|
||||
private static bool core44;
|
||||
private static bool core45;
|
||||
private static bool core46;
|
||||
|
||||
/// <summary>
|
||||
/// Loads the core OpenGL entry points for the current GLFW context.
|
||||
/// </summary>
|
||||
public static unsafe void LoadOpenGLApiTo(
|
||||
IntPtr contextHandle
|
||||
)
|
||||
{
|
||||
if (contextHandle == IntPtr.Zero) {
|
||||
throw new ArgumentException("A context table is required.", nameof(contextHandle));
|
||||
}
|
||||
|
||||
OpenglContext* context = (OpenglContext*)contextHandle;
|
||||
if (context->glGetString != null) {
|
||||
return;
|
||||
}
|
||||
|
||||
delegate* <ReadOnlySpan<byte>, IntPtr> loader = &GraphicFramework.glfwGetProcAddress;
|
||||
IntPtr getString = GraphicFramework.glfwGetProcAddress("glGetString"u8);
|
||||
if (getString == IntPtr.Zero) {
|
||||
throw new NotSupportedException("Cannot load glGetString from the current context.");
|
||||
}
|
||||
|
||||
context->glGetString = (delegate* unmanaged[Cdecl]<uint, byte*>)getString;
|
||||
byte* versionPointer = context->glGetString(GlVersion);
|
||||
if (versionPointer == null) {
|
||||
throw new NotSupportedException("The current context did not report an OpenGL version.");
|
||||
}
|
||||
|
||||
string versionText = Marshal.PtrToStringAnsi((nint)versionPointer) ?? string.Empty;
|
||||
if (!TryReadVersion(versionText, out int majorVersion, out int minorVersion)) {
|
||||
throw new NotSupportedException($"Cannot parse OpenGL version '{versionText}'.");
|
||||
}
|
||||
|
||||
CheckCoreVersion(majorVersion, minorVersion);
|
||||
|
||||
_ = LoadGLcore10((glContextShadow*)context, loader) &&
|
||||
LoadGLcore11((glContextShadow*)context, loader) &&
|
||||
LoadGLcore12((glContextShadow*)context, loader) &&
|
||||
LoadGLcore13((glContextShadow*)context, loader) &&
|
||||
LoadGLcore14((glContextShadow*)context, loader) &&
|
||||
LoadGLcore15((glContextShadow*)context, loader) &&
|
||||
LoadGLcore20((glContextShadow*)context, loader) &&
|
||||
LoadGLcore21((glContextShadow*)context, loader) &&
|
||||
LoadGLcore30((glContextShadow*)context, loader) &&
|
||||
LoadGLcore31((glContextShadow*)context, loader) &&
|
||||
LoadGLcore32((glContextShadow*)context, loader) &&
|
||||
LoadGLcore33((glContextShadow*)context, loader) &&
|
||||
LoadGLcore40((glContextShadow*)context, loader) &&
|
||||
LoadGLcore41((glContextShadow*)context, loader) &&
|
||||
LoadGLcore42((glContextShadow*)context, loader) &&
|
||||
LoadGLcore43((glContextShadow*)context, loader) &&
|
||||
LoadGLcore44((glContextShadow*)context, loader) &&
|
||||
LoadGLcore45((glContextShadow*)context, loader) &&
|
||||
LoadGLcore46((glContextShadow*)context, loader);
|
||||
}
|
||||
|
||||
internal static void CheckCoreVersion(
|
||||
int majorVersion,
|
||||
int minorVersion
|
||||
)
|
||||
{
|
||||
if (majorVersion < 3) {
|
||||
throw new InvalidOperationException(
|
||||
"StgSharp does not support OpenGL immediate mode.");
|
||||
}
|
||||
|
||||
core10 = IsAtLeast(majorVersion, minorVersion, 1, 0);
|
||||
core11 = IsAtLeast(majorVersion, minorVersion, 1, 1);
|
||||
core12 = IsAtLeast(majorVersion, minorVersion, 1, 2);
|
||||
core13 = IsAtLeast(majorVersion, minorVersion, 1, 3);
|
||||
core14 = IsAtLeast(majorVersion, minorVersion, 1, 4);
|
||||
core15 = IsAtLeast(majorVersion, minorVersion, 1, 5);
|
||||
core20 = IsAtLeast(majorVersion, minorVersion, 2, 0);
|
||||
core21 = IsAtLeast(majorVersion, minorVersion, 2, 1);
|
||||
core30 = IsAtLeast(majorVersion, minorVersion, 3, 0);
|
||||
core31 = IsAtLeast(majorVersion, minorVersion, 3, 1);
|
||||
core32 = IsAtLeast(majorVersion, minorVersion, 3, 2);
|
||||
core33 = IsAtLeast(majorVersion, minorVersion, 3, 3);
|
||||
core40 = IsAtLeast(majorVersion, minorVersion, 4, 0);
|
||||
core41 = IsAtLeast(majorVersion, minorVersion, 4, 1);
|
||||
core42 = IsAtLeast(majorVersion, minorVersion, 4, 2);
|
||||
core43 = IsAtLeast(majorVersion, minorVersion, 4, 3);
|
||||
core44 = IsAtLeast(majorVersion, minorVersion, 4, 4);
|
||||
core45 = IsAtLeast(majorVersion, minorVersion, 4, 5);
|
||||
core46 = IsAtLeast(majorVersion, minorVersion, 4, 6);
|
||||
}
|
||||
|
||||
private static bool IsAtLeast(
|
||||
int actualMajor,
|
||||
int actualMinor,
|
||||
int requiredMajor,
|
||||
int requiredMinor
|
||||
)
|
||||
{
|
||||
return actualMajor > requiredMajor ||
|
||||
(actualMajor == requiredMajor && actualMinor >= requiredMinor);
|
||||
}
|
||||
|
||||
private static bool TryReadVersion(
|
||||
ReadOnlySpan<char> text,
|
||||
out int major,
|
||||
out int minor
|
||||
)
|
||||
{
|
||||
major = 0;
|
||||
minor = 0;
|
||||
|
||||
int majorStart = 0;
|
||||
while (majorStart < text.Length && !char.IsAsciiDigit(text[majorStart])) {
|
||||
majorStart++;
|
||||
}
|
||||
if (majorStart == text.Length) {
|
||||
return false;
|
||||
}
|
||||
|
||||
int dot = text[majorStart..].IndexOf('.');
|
||||
if (dot < 1) {
|
||||
return false;
|
||||
}
|
||||
dot += majorStart;
|
||||
|
||||
int minorEnd = dot + 1;
|
||||
while (minorEnd < text.Length && char.IsAsciiDigit(text[minorEnd])) {
|
||||
minorEnd++;
|
||||
}
|
||||
|
||||
return minorEnd > dot + 1 &&
|
||||
int.TryParse(text[majorStart..dot], NumberStyles.None,
|
||||
CultureInfo.InvariantCulture,
|
||||
out major) &&
|
||||
int.TryParse(text[(dot + 1)..minorEnd], NumberStyles.None,
|
||||
CultureInfo.InvariantCulture, out minor);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
// -----------------------------------------------------------------------------
|
||||
// file="glConst"
|
||||
// Project: StgSharp
|
||||
// Copyright (c) Nitload.
|
||||
// SPDX-License-Identifier: MIT
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
using System;
|
||||
using System.Drawing;
|
||||
|
||||
namespace Nitload.Graphics.OpenGL
|
||||
{
|
||||
// rename types in style of glConst
|
||||
|
||||
public static class glAttachment
|
||||
{
|
||||
|
||||
public const uint Depth = glConst.DEPTH_ATTACHMENT;
|
||||
public const uint DepthAndStencil = glConst.DEPTH_STENCIL_ATTACHMENT;
|
||||
public const uint Stencil = glConst.STENCIL_ATTACHMENT;
|
||||
|
||||
public static uint Color(
|
||||
int i
|
||||
)
|
||||
{
|
||||
ArgumentOutOfRangeException.ThrowIfNegative(i);
|
||||
return (uint)(glConst.COLOR_ATTACHMENT0 + i);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
// -----------------------------------------------------------------------------
|
||||
// file="glException"
|
||||
// Project: StgSharp
|
||||
// Copyright (c) Nitload.
|
||||
// SPDX-License-Identifier: MIT
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
using System;
|
||||
|
||||
namespace Nitload.Graphics.OpenGL
|
||||
{
|
||||
public sealed class GlErrorOverflowException : Exception
|
||||
{
|
||||
|
||||
public GlErrorOverflowException(
|
||||
int errorCount,
|
||||
uint errorCode
|
||||
)
|
||||
: base(
|
||||
"Too many opengl error detected at certain position. " + $"The amount of errors exceeds {errorCount}. " + $"Code of the last error is {errorCode}") { }
|
||||
|
||||
}
|
||||
|
||||
public sealed class GlExecutionException : Exception
|
||||
{
|
||||
|
||||
public GlExecutionException(
|
||||
uint errorCode
|
||||
)
|
||||
: base($"Critical OpenGL error: {errorCode}") { }
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
// -----------------------------------------------------------------------------
|
||||
// file="glHandle"
|
||||
// Project: StgSharp
|
||||
// Copyright (c) Nitload.
|
||||
// SPDX-License-Identifier: MIT
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data.Common;
|
||||
using System.Linq;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Runtime.Versioning;
|
||||
using System.Security.AccessControl;
|
||||
using System.Security.Cryptography;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Nitload.Graphics.OpenGL
|
||||
{
|
||||
[StructLayout(LayoutKind.Explicit, Size = 4)]
|
||||
public struct GlHandle
|
||||
{
|
||||
|
||||
[FieldOffset(0)] internal uint Value;
|
||||
|
||||
public GlHandle()
|
||||
{
|
||||
Unsafe.SkipInit(out Value);
|
||||
Unsafe.SkipInit(out this);
|
||||
}
|
||||
|
||||
public static GlHandle Zero => new GlHandle
|
||||
{
|
||||
Value = 0
|
||||
};
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static GlHandle Create(
|
||||
uint value
|
||||
)
|
||||
{
|
||||
return new GlHandle
|
||||
{
|
||||
Value = value
|
||||
};
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,142 @@
|
||||
// -----------------------------------------------------------------------------
|
||||
// file="glRenderStream"
|
||||
// Project: StgSharp
|
||||
// Copyright (c) Nitload.
|
||||
// SPDX-License-Identifier: MIT
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
using Nitload.Mathematics;
|
||||
using Nitload.Mathematics.Numeric.Graphics;
|
||||
using Nitload.Mathematics.Numeric.Graphics;
|
||||
using Nitload.Threading;
|
||||
|
||||
using System;
|
||||
using System.Collections.Concurrent;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Nitload.Graphics.OpenGL
|
||||
{
|
||||
public abstract partial class glRender : RenderStream
|
||||
{
|
||||
|
||||
private protected static readonly ConcurrentDictionary<glRender, Thread> renderToThread
|
||||
= new ConcurrentDictionary<glRender, Thread>();
|
||||
|
||||
private OpenGLFunction _context;
|
||||
|
||||
protected internal OpenGLFunction GL => _context;
|
||||
|
||||
/// <summary>
|
||||
/// Initialize an opengl context and load all opengl functions.
|
||||
/// </summary>
|
||||
public unsafe void InitializeContext()
|
||||
{
|
||||
if (ContextHandle == default)
|
||||
{
|
||||
ContextHandle = Marshal.AllocHGlobal(Marshal.SizeOf<OpenglContext>());
|
||||
OpenglContext* contextID = (OpenglContext*)ContextHandle;
|
||||
contextID->glGetString = (delegate*<uint,byte*>)IntPtr.Zero;
|
||||
}
|
||||
if (GL == null) {
|
||||
_context = OpenGLFunction.BuildGlFunctionPackage(ContextHandle);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initialize an OpenGl viewPortDisplay if current form has not been binded to any
|
||||
/// viewPortDisplay. and set the viewPortDisplay binded to current form as current OpenGL
|
||||
/// viewPortDisplay.
|
||||
/// </summary>
|
||||
/// <exception cref="Exception">
|
||||
/// Something goes wrong and World fails in creating a new OpenGL viewPortDisplay.
|
||||
/// </exception>
|
||||
public unsafe void MakeAsCurrentContext()
|
||||
{
|
||||
GraphicFramework.glfwMakeContextCurrent(CanvasHandle);
|
||||
OpenGLFunction.CurrentGL = this.GL;
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override void RenderEnd()
|
||||
{
|
||||
if (!renderToThread.TryGetValue(this, out Thread t) || t != Thread.CurrentThread) {
|
||||
throw new InvalidOperationException(
|
||||
$"Current render has had been binded to thread {t!.ManagedThreadId}");
|
||||
}
|
||||
SwapBuffers();
|
||||
renderToThread[this] = ThreadHelper.EmptyThread;
|
||||
GraphicFramework.glfwMakeContextCurrent(IntPtr.Zero);
|
||||
OpenGLFunction.CurrentGL = null;
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override void RenderStart()
|
||||
{
|
||||
Thread current = Thread.CurrentThread;
|
||||
if (!renderToThread.TryGetValue(this, out Thread t) || t == ThreadHelper.EmptyThread)
|
||||
{
|
||||
renderToThread[this] = current;
|
||||
MakeAsCurrentContext();
|
||||
return;
|
||||
}
|
||||
if (t != current) {
|
||||
throw new InvalidOperationException(
|
||||
$"Current render has had been binded to thread {t!.ManagedThreadId}");
|
||||
}
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public override void SetSizeLimit(
|
||||
int minWidth,
|
||||
int minHeight,
|
||||
int maxWidth,
|
||||
int maxHeight
|
||||
)
|
||||
{
|
||||
GraphicFramework.glfwSetWindowSizeLimits(this.CanvasHandle, minWidth, minHeight,
|
||||
maxWidth, maxHeight);
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
internal sealed override void PlatformSpecifiedInitialize()
|
||||
{
|
||||
InitializeContext();
|
||||
MakeAsCurrentContext();
|
||||
glManager.LoadOpenGLApiTo(BindedViewPortContext.GraphicHandle);
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
internal sealed override void Terminate()
|
||||
{
|
||||
CustomizeDeinit();
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
protected sealed override void NativeCameraViewRange(
|
||||
Radius fieldOfRange,
|
||||
Vec2 offset,
|
||||
(float frontDepth, float backDepth) viewDepth
|
||||
)
|
||||
{
|
||||
NativeCamera.SetViewRange(fieldOfRange, this.Size, offset, viewDepth);
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
protected sealed override void NativeCameraViewTarget(
|
||||
Vec3 position,
|
||||
Vec3 direction,
|
||||
Vec3 up
|
||||
)
|
||||
{
|
||||
NativeCamera.SetViewDirection(position, direction, up);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
// -----------------------------------------------------------------------------
|
||||
// file="glSync"
|
||||
// Project: StgSharp
|
||||
// Copyright (c) Nitload.
|
||||
// SPDX-License-Identifier: MIT
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Nitload.Graphics.OpenGL
|
||||
{
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public struct glSync
|
||||
{
|
||||
|
||||
public IntPtr Handle;
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
// -----------------------------------------------------------------------------
|
||||
// file="PlainGeometryMesh"
|
||||
// Project: StgSharp
|
||||
// Copyright (c) Nitload.
|
||||
// SPDX-License-Identifier: MIT
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
using Nitload.Geometries;
|
||||
using Nitload.Mathematics;
|
||||
using Nitload.Mathematics.Numeric.Graphics;
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Nitload.Graphics
|
||||
{
|
||||
public class PlainGeometryMesh
|
||||
{
|
||||
|
||||
private readonly PlainGeometry _shape;
|
||||
private readonly Vec2[] _textureCoordinates;
|
||||
private readonly Image<Rgba8> _textureImage;
|
||||
|
||||
public PlainGeometryMesh(
|
||||
PlainGeometry shape,
|
||||
Image<Rgba8> texture,
|
||||
Vec2[] texCoord
|
||||
)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(shape);
|
||||
ArgumentNullException.ThrowIfNull(texture);
|
||||
ArgumentNullException.ThrowIfNull(texCoord);
|
||||
|
||||
if (shape.VertexCount > texCoord.Length) {
|
||||
throw new ArgumentException(
|
||||
paramName:nameof(texCoord),
|
||||
message:"Amount of texture coordination is too less");
|
||||
}
|
||||
_shape = shape;
|
||||
_textureImage = texture;
|
||||
_textureCoordinates = texCoord;
|
||||
}
|
||||
|
||||
public Vec4[] VertexArray => _shape.VertexStream;
|
||||
|
||||
public Image<Rgba8> TextureImage => _textureImage;
|
||||
|
||||
public ReadOnlySpan<int> MeshIndices => _shape.VertexIndices;
|
||||
|
||||
public ReadOnlySpan<Vec4> TextureCoord => MemoryMarshal.Cast<Vec2, Vec4>(
|
||||
_textureCoordinates);
|
||||
|
||||
public PlainGeometryMesh Resize(
|
||||
PlainGeometry newShape
|
||||
)
|
||||
{
|
||||
return new PlainGeometryMesh(newShape, _textureImage, _textureCoordinates);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,182 @@
|
||||
// -----------------------------------------------------------------------------
|
||||
// file="RenderStream"
|
||||
// Project: StgSharp
|
||||
// Copyright (c) Nitload.
|
||||
// SPDX-License-Identifier: MIT
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
using Nitload.Mathematics;
|
||||
using Nitload.Mathematics.Numeric.Graphics;
|
||||
using Nitload.Mathematics.Numeric.Graphics;
|
||||
using Nitload.Common.Timing;
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Linq;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Nitload.Graphics
|
||||
{
|
||||
public abstract class RenderStream
|
||||
{
|
||||
|
||||
private Camera nativeCamera;
|
||||
|
||||
private protected ViewSurface primeArgs;
|
||||
internal TimeSpanProvider _timeProvider;
|
||||
|
||||
public (int width, int height) Size => (Width, Height);
|
||||
|
||||
public abstract bool IsContextSharable { get; }
|
||||
|
||||
public int Height => primeArgs.Height;
|
||||
|
||||
public int Width => primeArgs.Width;
|
||||
|
||||
public IntPtr Monitor
|
||||
{
|
||||
get => primeArgs.Monitor;
|
||||
internal set => primeArgs.Monitor = value;
|
||||
}
|
||||
|
||||
public string Name => primeArgs.Name;
|
||||
|
||||
public ViewSurface BindedViewPortContext
|
||||
{
|
||||
get => primeArgs;
|
||||
internal set => primeArgs = value;
|
||||
}
|
||||
|
||||
internal IntPtr CanvasHandle => primeArgs.ViewPortHandle;
|
||||
|
||||
internal IntPtr ContextHandle
|
||||
{
|
||||
get => primeArgs.GraphicHandle;
|
||||
private protected set => primeArgs.GraphicHandle = value;
|
||||
}
|
||||
|
||||
protected internal Camera NativeCamera
|
||||
{
|
||||
get => nativeCamera;
|
||||
internal set => nativeCamera = value;
|
||||
}
|
||||
|
||||
protected float FramePassed => _timeProvider.CurrentSpan;
|
||||
|
||||
protected int PassedFrames => _timeProvider.CurrentSpan;
|
||||
|
||||
protected float TimePassed => (float)_timeProvider.CurrentSecond;
|
||||
|
||||
protected TimeSpanProvider TimeProvider => _timeProvider;
|
||||
|
||||
/// <summary>
|
||||
/// Set the Size limit of current form
|
||||
/// </summary>
|
||||
/// <param _label="minWidth">
|
||||
/// Minimum width of current form
|
||||
/// </param>
|
||||
/// <param _label="minHeight">
|
||||
/// Minimum height of current form
|
||||
/// </param>
|
||||
/// <param _label="maxWidth">
|
||||
/// Maximum width of current form
|
||||
/// </param>
|
||||
/// <param _label="maxHeight">
|
||||
/// Maximum height of current form
|
||||
/// </param>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public abstract void SetSizeLimit(
|
||||
int minWidth,
|
||||
int minHeight,
|
||||
int maxWidth,
|
||||
int maxHeight
|
||||
);
|
||||
|
||||
public static TTarget ShareContextFrom<TSource, TTarget>(
|
||||
[NotNull]TSource source
|
||||
) where TSource : RenderStream where TTarget : RenderStream, new()
|
||||
{
|
||||
TTarget target = new TTarget();
|
||||
target.Initialize(source.BindedViewPortContext, source._timeProvider);
|
||||
return target;
|
||||
}
|
||||
|
||||
/**/
|
||||
protected internal static void PollEvents()
|
||||
{
|
||||
GraphicFramework.glfwPollEvents();
|
||||
}
|
||||
|
||||
private protected void SwapBuffers()
|
||||
{
|
||||
GraphicFramework.glfwSwapBuffers(CanvasHandle);
|
||||
}
|
||||
|
||||
/**/
|
||||
|
||||
#region native camera operation
|
||||
|
||||
protected abstract void NativeCameraViewRange(
|
||||
Radius fieldOfRange,
|
||||
Vec2 offset,
|
||||
(float frontDepth, float backDepth) viewDepth
|
||||
);
|
||||
|
||||
protected abstract void NativeCameraViewTarget(
|
||||
Vec3 position,
|
||||
Vec3 direction,
|
||||
Vec3 up
|
||||
);
|
||||
|
||||
#endregion
|
||||
|
||||
#region internal operation
|
||||
|
||||
public void Initialize(
|
||||
ViewSurface v,
|
||||
TimeSpanProvider timeProvider
|
||||
)
|
||||
{
|
||||
if (v == null) {
|
||||
throw new ArgumentNullException(nameof(v));
|
||||
}
|
||||
primeArgs = v;
|
||||
this._timeProvider = timeProvider;
|
||||
nativeCamera = new Camera();
|
||||
PlatformSpecifiedInitialize();
|
||||
CustomizeInit();
|
||||
GraphicFramework.glfwMakeContextCurrent(IntPtr.Zero);
|
||||
}
|
||||
|
||||
internal abstract void PlatformSpecifiedInitialize();
|
||||
|
||||
internal abstract void Terminate();
|
||||
|
||||
#endregion
|
||||
|
||||
#region public operation
|
||||
|
||||
protected abstract void CustomizeDeinit();
|
||||
|
||||
protected abstract void CustomizeInit();
|
||||
|
||||
/// <summary>
|
||||
/// Marking the start of current render operations, and set this renser context as
|
||||
/// current.
|
||||
/// </summary>
|
||||
public abstract void RenderStart();
|
||||
|
||||
/// <summary>
|
||||
/// Marking the end of current render operations, and release the binding of this renser
|
||||
/// context to current, making it available for another thread as current.
|
||||
/// </summary>
|
||||
public abstract void RenderEnd();
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
// -----------------------------------------------------------------------------
|
||||
// file="Rgba8"
|
||||
// Project: StgSharp
|
||||
// Copyright (c) Nitload.
|
||||
// SPDX-License-Identifier: MIT
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Nitload.Graphics
|
||||
{
|
||||
/// <summary>
|
||||
/// Four-channel, eight-bit-per-channel RGBA pixel storage.
|
||||
/// </summary>
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1, Size = 4)]
|
||||
public struct Rgba8
|
||||
{
|
||||
|
||||
public byte R;
|
||||
public byte G;
|
||||
public byte B;
|
||||
public byte A;
|
||||
|
||||
public Rgba8(
|
||||
byte red,
|
||||
byte green,
|
||||
byte blue,
|
||||
byte alpha
|
||||
)
|
||||
{
|
||||
R = red;
|
||||
G = green;
|
||||
B = blue;
|
||||
A = alpha;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,112 @@
|
||||
// -----------------------------------------------------------------------------
|
||||
// file="ViewSurface"
|
||||
// Project: StgSharp
|
||||
// Copyright (c) Nitload.
|
||||
// SPDX-License-Identifier: MIT
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
using System;
|
||||
using System.Collections.Concurrent;
|
||||
using System.Diagnostics;
|
||||
using System.Diagnostics.Contracts;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
|
||||
namespace Nitload.Graphics
|
||||
{
|
||||
public class ViewSurface
|
||||
{
|
||||
|
||||
private static readonly ConcurrentDictionary<IntPtr, ViewSurface> _handleToViewPortIndex = [];
|
||||
private int _width, _height, _newWidth, _newHeight;
|
||||
|
||||
internal unsafe ViewSurface()
|
||||
{
|
||||
_newHeight = 600;
|
||||
_newWidth = 800;
|
||||
FlushSize();
|
||||
Name = new StackFrame(1, false).
|
||||
GetMethod()!.DeclaringType!.Name;
|
||||
Monitor = IntPtr.Zero;
|
||||
ViewPortHandle = GraphicFramework.glfwCreateWindow(_newWidth, _newHeight,
|
||||
Encoding.UTF8.GetBytes(Name),
|
||||
Monitor, IntPtr.Zero);
|
||||
if (ViewPortHandle == IntPtr.Zero) {
|
||||
throw new InvalidOperationException("Unable to create viewport handle.");
|
||||
}
|
||||
_ = _handleToViewPortIndex.TryAdd(ViewPortHandle, this);
|
||||
}
|
||||
|
||||
public unsafe ViewSurface(
|
||||
int width,
|
||||
int height,
|
||||
string name,
|
||||
IntPtr monitor
|
||||
)
|
||||
{
|
||||
_newWidth = width;
|
||||
_newHeight = height;
|
||||
FlushSize();
|
||||
Name = name;
|
||||
Monitor = monitor;
|
||||
ViewPortHandle = GraphicFramework.glfwCreateWindow(_newWidth, _newHeight,
|
||||
Encoding.UTF8.GetBytes(Name),
|
||||
Monitor, IntPtr.Zero);
|
||||
if (ViewPortHandle == IntPtr.Zero) {
|
||||
throw new InvalidOperationException("Unable to create viewport handle.");
|
||||
}
|
||||
_ = _handleToViewPortIndex.TryAdd(ViewPortHandle, this);
|
||||
}
|
||||
|
||||
public unsafe int Height
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
get => _height;
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
internal set => Interlocked.Exchange(ref _height, value);
|
||||
}
|
||||
|
||||
public unsafe int Width
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
get => _width;
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
internal set => Interlocked.Exchange(ref _width, value);
|
||||
}
|
||||
|
||||
public IntPtr GraphicHandle { get; internal set; }
|
||||
|
||||
public IntPtr Monitor { get; internal set; }
|
||||
|
||||
public IntPtr ViewPortHandle { get; private set; }
|
||||
|
||||
public string Name { get; set; }
|
||||
|
||||
// [BlueprintNodeExecution]
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static bool GetExistedViewPort(
|
||||
IntPtr handle,
|
||||
out ViewSurface port
|
||||
)
|
||||
{
|
||||
return _handleToViewPortIndex.TryGetValue(handle, out port);
|
||||
}
|
||||
|
||||
internal unsafe void FlushSize()
|
||||
{
|
||||
_ = Interlocked.Exchange(ref _height, _newHeight);
|
||||
_ = Interlocked.Exchange(ref _width, _newWidth);
|
||||
}
|
||||
|
||||
internal void RequestFlushSizeInNextFrame(
|
||||
int width,
|
||||
int height
|
||||
)
|
||||
{
|
||||
_ = Interlocked.Exchange(ref _newHeight, height);
|
||||
_ = Interlocked .Exchange(ref _newWidth, width);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,141 @@
|
||||
// -----------------------------------------------------------------------------
|
||||
// file="glfw.function"
|
||||
// Project: StgSharp
|
||||
// Copyright (c) Nitload.
|
||||
// SPDX-License-Identifier: MIT
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
using System;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Nitload.Common.Internal
|
||||
{
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
internal unsafe struct GLFWFunction
|
||||
{
|
||||
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, int, int, IntPtr> glfwCreateCursor;
|
||||
public delegate* unmanaged[Cdecl]<int, IntPtr> glfwCreateStandardCursor;
|
||||
public delegate* unmanaged[Cdecl]<int, int, byte*, IntPtr, IntPtr, IntPtr> glfwCreateWindow;
|
||||
public delegate* unmanaged[Cdecl]<void> glfwDefaultWindowHints;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, void> glfwDestroyCursor;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, void> glfwDestroyWindow;
|
||||
public delegate* unmanaged[Cdecl]<byte*, int> glfwExtensionSupported;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, void> glfwFocusWindow;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, byte*> glfwGetClipboardString;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr> glfwGetCurrentContext;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, double*, double*, void> glfwGetCursorPos;
|
||||
public delegate* unmanaged[Cdecl]<byte**, int> glfwGetError;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, int*, int*, void> glfwGetFrameBufferSize;
|
||||
public delegate* unmanaged[Cdecl]<int, byte*> glfwGetGamepadName;
|
||||
public delegate* unmanaged[Cdecl]<int, IntPtr, int> glfwGetGamepadState;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, IntPtr> glfwGetGammaRamp;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, int, int> glfwGetInputMode;
|
||||
public delegate* unmanaged[Cdecl]<int, int*, float*> glfwGetJoystickAxes;
|
||||
public delegate* unmanaged[Cdecl]<int, int*, byte*> glfwGetJoystickButtons;
|
||||
public delegate* unmanaged[Cdecl]<int, byte*> glfwGetJoystickGUID;
|
||||
public delegate* unmanaged[Cdecl]<int, int*, byte*> glfwGetJoystickHats;
|
||||
public delegate* unmanaged[Cdecl]<int, byte*> glfwGetJoystickName;
|
||||
public delegate* unmanaged[Cdecl]<int, void*> glfwGetJoystickUserPointer;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, int, int> glfwGetKey;
|
||||
public delegate* unmanaged[Cdecl]<int, int, byte*> glfwGetKeyName;
|
||||
public delegate* unmanaged[Cdecl]<int, int> glfwGetKeyScancode;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, float*, float*, void> glfwGetMonitorContentScale;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, byte*> glfwGetMonitorName;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, int*, int*, void> glfwGetMonitorPhysicalSize;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, int*, int*, void> glfwGetMonitorPos;
|
||||
public delegate* unmanaged[Cdecl]<int*, IntPtr*> glfwGetMonitors;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, void*> glfwGetMonitorUserPointer;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, int*, int*, int*, int*, void> glfwGetMonitorWorkarea;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, int, int> glfwGetMouseButton;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr> glfwGetPrimaryMonitor;
|
||||
public delegate* unmanaged[Cdecl]<byte*, IntPtr> glfwGetProcAddress;
|
||||
public delegate* unmanaged[Cdecl]<uint*, byte**> glfwGetRequiredInstanceExtensions;
|
||||
public delegate* unmanaged[Cdecl]<double> glfwGetTime;
|
||||
public delegate* unmanaged[Cdecl]<ulong> glfwGetTimerFrequency;
|
||||
public delegate* unmanaged[Cdecl]<ulong> glfwGetTimerValue;
|
||||
public delegate* unmanaged[Cdecl]<int*, int*, int*, void> glfwGetVersion;
|
||||
public delegate* unmanaged[Cdecl]<byte*> glfwGetVersionString;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, IntPtr> glfwGetVideoMode;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, int*, IntPtr*> glfwGetVideoModes;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, int, int> glfwGetWindowAttrib;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, float*, float*, void> glfwGetWindowContentScale;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, int*, int*, int*, int*, void> glfwGetWindowFrameSize;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, IntPtr> glfwGetWindowMonitor;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, float> glfwGetWindowOpacity;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, int*, int*, void> glfwGetWindowPos;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, int*, int*, void> glfwGetWindowSize;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, void*> glfwGetWindowUserPointer;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, void> glfwHideWindow;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, void> glfwIconifyWindow;
|
||||
public delegate* unmanaged[Cdecl]<int> glfwInit;
|
||||
public delegate* unmanaged[Cdecl]<int, int, void> glfwInitHint;
|
||||
public delegate* unmanaged[Cdecl]<int, int> glfwJoystickIsGamePad;
|
||||
public delegate* unmanaged[Cdecl]<int, int> glfwJoystickPresent;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, void> glfwMakeContextCurrent;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, void> glfwMaximizeWindow;
|
||||
public delegate* unmanaged[Cdecl]<void> glfwPollEvents;
|
||||
public delegate* unmanaged[Cdecl]<void> glfwPostEmptyEvent;
|
||||
public delegate* unmanaged[Cdecl]<int> glfwRawMouseMotionSupported;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, void> glfwRequestWindowAttention;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, void> glfwRestoreWindow;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, delegate* unmanaged[Cdecl]<IntPtr, uint, void>, delegate* unmanaged[Cdecl]<IntPtr, uint, void>> glfwSetCharCallback;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, delegate* unmanaged[Cdecl]<IntPtr, uint, int, void>, delegate* unmanaged[Cdecl]<IntPtr, uint, int, void>> glfwSetCharModsCallback;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, byte*, void> glfwSetClipboardString;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, IntPtr, void> glfwSetCursor;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, delegate* unmanaged[Cdecl]<IntPtr, int, void>, delegate* unmanaged[Cdecl]<IntPtr, int, void>> glfwSetCursorEnterCallback;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, double, double, void> glfwSetCursorPos;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, delegate* unmanaged[Cdecl]<IntPtr, double, double, void>, delegate* unmanaged[Cdecl]<IntPtr, double, double, void>> glfwSetCursorPosCallback;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, delegate* unmanaged[Cdecl]<IntPtr, int, byte**, void>, delegate* unmanaged[Cdecl]<IntPtr, int, byte**, void>> glfwSetDropCallback;
|
||||
public delegate* unmanaged[Cdecl]<delegate* unmanaged[Cdecl]<int, byte*, void>, delegate* unmanaged[Cdecl]<int, byte*, void>> glfwSetErrorCallback;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, delegate* unmanaged[Cdecl]<IntPtr, int, int, void>, delegate* unmanaged[Cdecl]<IntPtr, int, int, void>> glfwSetFramebufferSizeCallback;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, float, void> glfwSetGamma;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, IntPtr, void> glfwSetGammaRamp;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, int, int, void> glfwSetInputMode;
|
||||
public delegate* unmanaged[Cdecl]<delegate* unmanaged[Cdecl]<int, int, void>, delegate* unmanaged[Cdecl]<int, int, void>> glfwSetJoystickCallback;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, void*, void> glfwSetJoystickUserPointer;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, delegate* unmanaged[Cdecl]<IntPtr, int, int, int, int, void>, delegate* unmanaged[Cdecl]<IntPtr, int, int, int, int, void>> glfwSetKeyCallback;
|
||||
public delegate* unmanaged[Cdecl]<delegate* unmanaged[Cdecl]<IntPtr, int, void>, delegate* unmanaged[Cdecl]<IntPtr, int, void>> glfwSetMonitorCallback;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, void*, void> glfwSetMonitorUserPointer;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, delegate* unmanaged[Cdecl]<IntPtr, int, int, int, void>, delegate* unmanaged[Cdecl]<IntPtr, int, int, int, void>> glfwSetMouseButtonCallback;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, delegate* unmanaged[Cdecl]<IntPtr, double, double, void>, delegate* unmanaged[Cdecl]<IntPtr, double, double, void>> glfwSetScrollCallback;
|
||||
public delegate* unmanaged[Cdecl]<double, void> glfwSetTime;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, int, int, void> glfwSetWindowAspectRatio;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, int, int, void> glfwSetWindowAttrib;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, delegate* unmanaged[Cdecl]<IntPtr, void>, delegate* unmanaged[Cdecl]<IntPtr, void>> glfwSetWindowCloseCallback;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, delegate* unmanaged[Cdecl]<IntPtr, float, float, void>, delegate* unmanaged[Cdecl]<IntPtr, float, float, void>> glfwSetWindowContentScaleCallback;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, delegate* unmanaged[Cdecl]<IntPtr, int, void>, delegate* unmanaged[Cdecl]<IntPtr, int, void>> glfwSetWindowFocusCallback;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, int, IntPtr, void> glfwSetWindowIcon;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, delegate* unmanaged[Cdecl]<IntPtr, int, void>, delegate* unmanaged[Cdecl]<IntPtr, int, void>> glfwSetWindowIconifyCallback;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, delegate* unmanaged[Cdecl]<IntPtr, int, void>, delegate* unmanaged[Cdecl]<IntPtr, int, void>> glfwSetWindowMaximizeCallback;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, IntPtr, int, int, int, int, int, void> glfwSetWindowMonitor;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, float, void> glfwSetWindowOpacity;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, int, int, void> glfwSetWindowPos;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, delegate* unmanaged[Cdecl]<IntPtr, int, int, void>, delegate* unmanaged[Cdecl]<IntPtr, int, int, void>> glfwSetWindowPosCallback;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, delegate* unmanaged[Cdecl]<IntPtr, void>, delegate* unmanaged[Cdecl]<IntPtr, void>> glfwSetWindowRefreshCallback;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, int, void> glfwSetWindowShouldClose;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, int, int, void> glfwSetWindowSize;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, delegate* unmanaged[Cdecl]<IntPtr, int, int, void>, delegate* unmanaged[Cdecl]<IntPtr, int, int, void>> glfwSetWindowSizeCallback;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, int, int, int, int, void> glfwSetWindowSizeLimits;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, byte*, void> glfwSetWindowTitle;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, void*, void> glfwSetWindowUserPointer;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, void> glfwShowWindow;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, void> glfwSwapBuffers;
|
||||
public delegate* unmanaged[Cdecl]<int, void> glfwSwapInterval;
|
||||
public delegate* unmanaged[Cdecl]<void> glfwTerminate;
|
||||
public delegate* unmanaged[Cdecl]<byte*, int> glfwUpdateGamePadMappings;
|
||||
public delegate* unmanaged[Cdecl]<int> glfwVulkanSupported;
|
||||
public delegate* unmanaged[Cdecl]<void> glfwWaitEvents;
|
||||
public delegate* unmanaged[Cdecl]<double, void> glfwWaitEventsTimeout;
|
||||
public delegate* unmanaged[Cdecl]<int, int, void> glfwWindowHint;
|
||||
public delegate* unmanaged[Cdecl]<int, byte*, void> glfwWindowHintString;
|
||||
public delegate* unmanaged[Cdecl]<IntPtr, int> glfwWindowShouldClose;
|
||||
|
||||
public GLFWFunction()
|
||||
{
|
||||
Unsafe.SkipInit(out this);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
// -----------------------------------------------------------------------------
|
||||
// file="glfw.struct"
|
||||
// Project: StgSharp
|
||||
// Copyright (c) Nitload.
|
||||
// SPDX-License-Identifier: MIT
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Nitload.Common.Internal
|
||||
{
|
||||
// GLFW owns these objects. The managed layer only passes opaque pointers to them.
|
||||
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public struct glfwVideomode { }
|
||||
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public struct glfwGammaramp { }
|
||||
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
internal unsafe struct GlfwImageNative
|
||||
{
|
||||
|
||||
internal int Width;
|
||||
internal int Height;
|
||||
internal byte* Pixels;
|
||||
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public struct GLFWgamepadstate { }
|
||||
}
|
||||
Reference in New Issue
Block a user