diff --git a/GenerateGL.sln b/GenerateGL.sln
index a98bbf24..dc07a6b6 100644
--- a/GenerateGL.sln
+++ b/GenerateGL.sln
@@ -10,15 +10,23 @@ EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
+ Debug|x64 = Debug|x64
Release|Any CPU = Release|Any CPU
+ Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{9FD27EE6-E94D-4E64-A13B-5A349DEA215A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9FD27EE6-E94D-4E64-A13B-5A349DEA215A}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {9FD27EE6-E94D-4E64-A13B-5A349DEA215A}.Debug|x64.ActiveCfg = Debug|x64
+ {9FD27EE6-E94D-4E64-A13B-5A349DEA215A}.Debug|x64.Build.0 = Debug|x64
{9FD27EE6-E94D-4E64-A13B-5A349DEA215A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9FD27EE6-E94D-4E64-A13B-5A349DEA215A}.Release|Any CPU.Build.0 = Release|Any CPU
+ {9FD27EE6-E94D-4E64-A13B-5A349DEA215A}.Release|x64.ActiveCfg = Release|x64
+ {9FD27EE6-E94D-4E64-A13B-5A349DEA215A}.Release|x64.Build.0 = Release|x64
{5D646C0E-CCF8-B5B4-7DE8-1C37542E7B4D}.Debug|Any CPU.ActiveCfg = Debug|x64
+ {5D646C0E-CCF8-B5B4-7DE8-1C37542E7B4D}.Debug|x64.ActiveCfg = Debug|x64
{5D646C0E-CCF8-B5B4-7DE8-1C37542E7B4D}.Release|Any CPU.ActiveCfg = Release|x64
+ {5D646C0E-CCF8-B5B4-7DE8-1C37542E7B4D}.Release|x64.ActiveCfg = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/StgSharp.Common/Graphics/OpenGL/Buffer/TextureGL.cs b/StgSharp.Common/Graphics/OpenGL/Buffer/TextureGL.cs
index 23058ecb..d3ed5347 100644
--- a/StgSharp.Common/Graphics/OpenGL/Buffer/TextureGL.cs
+++ b/StgSharp.Common/Graphics/OpenGL/Buffer/TextureGL.cs
@@ -1,4 +1,4 @@
-//-----------------------------------------------------------------------
+//-----------------------------------------------------------------------
// -----------------------------------------------------------------------
// file="TextureGL"
// Project: StgSharp
@@ -44,14 +44,19 @@ namespace StgSharp.Graphics.OpenGL
private OpenGLFunction _gl;
internal GlHandle[] _textureHandle;
- internal TextureGL(int count, glRender binding)
+ internal TextureGL(
+ int count,
+ glRender binding
+ )
{
// sourceList = new Image[count];
this._gl = binding.GL;
_textureHandle = _gl.GenTextures(count);
}
- public GlHandle this[int index]
+ public GlHandle this[
+ int index
+ ]
{
get => _textureHandle[index];
}
@@ -70,12 +75,16 @@ namespace StgSharp.Graphics.OpenGL
internal OpenGLFunction GL => _gl;
- public void ActivateAs(TextureUnit unit)
+ public void ActivateAs(
+ TextureUnit unit
+ )
{
_gl.ActiveTextureUnit((uint)unit);
}
- public void Bind2D(int index)
+ public void Bind2D(
+ int index
+ )
{
currentEditingTextureIndex = index;
_gl.BindTexture(glConst.TEXTURE_2D, _textureHandle[index]);
@@ -90,19 +99,25 @@ namespace StgSharp.Graphics.OpenGL
///
///
///
- public unsafe void LoadTexture(int index, Image i)
+ public unsafe void LoadTexture(
+ int index,
+ Image i
+ )
{
byte[] handle = i.PixelBuffer;
- _gl.TextureImage2d(
- Texture2DTarget.Texture2D, 0, i.Channel, (uint)i.Width, (uint)i.Height, i.Channel, i.PixelLayout,
- pixels:handle);
+ _gl.TextureImage2d(Texture2DTarget.Texture2D, 0, i.Channel, i.Width, i.Height,
+ i.Channel, i.PixelLayout, pixels:handle);
_gl.GenerateMipmap(Texture2DTarget.Texture2D);
}
#region texture setting
[MethodImpl(MethodImplOptions.AggressiveInlining)]
- public void Set2dFilterProperty(int index, TextureFilter onMinify, TextureFilter onMagnify)
+ public void Set2dFilterProperty(
+ int index,
+ TextureFilter onMinify,
+ TextureFilter onMagnify
+ )
{
#if DEBUG
if (index != currentEditingTextureIndex)
@@ -117,7 +132,11 @@ namespace StgSharp.Graphics.OpenGL
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
- public void Set2dWrapProperty(int index, TextureWrap onHorizontial, TextureWrap onVertical)
+ public void Set2dWrapProperty(
+ int index,
+ TextureWrap onHorizontial,
+ TextureWrap onVertical
+ )
{
#if DEBUG
if (index != currentEditingTextureIndex)
@@ -132,7 +151,10 @@ namespace StgSharp.Graphics.OpenGL
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
- public void Set2dProperty(int index, TextureProperty property)
+ public void Set2dProperty(
+ int index,
+ TextureProperty property
+ )
{
Set2dFilterProperty(index, property.FilterOnMinify, property.FilterOnMagnify);
Set2dWrapProperty(index, property.WrapOnHorizontial, property.WrapOnVertical);
@@ -156,7 +178,8 @@ namespace StgSharp.Graphics.OpenGL
TextureFilter onMagnify,
TextureFilter onMinify,
TextureWrap onHorizontial,
- TextureWrap onVertical)
+ TextureWrap onVertical
+ )
{
FilterOnMagnify = onMagnify;
FilterOnMinify = onMinify;
@@ -188,15 +211,17 @@ namespace StgSharp.Graphics.OpenGL
set => vert = value;
}
- public override bool Equals([NotNullWhen(true)] object obj)
+ public override bool Equals(
+ [NotNullWhen(true)] object obj
+ )
{
return base.Equals(obj);
}
public override int GetHashCode()
{
- return HashCode.Combine(
- FilterOnMagnify, FilterOnMagnify, WrapOnHorizontial, WrapOnVertical);
+ return HashCode.Combine(FilterOnMagnify, FilterOnMagnify, WrapOnHorizontial,
+ WrapOnVertical);
}
public override string ToString()
@@ -204,12 +229,18 @@ namespace StgSharp.Graphics.OpenGL
return $"FilterOnMagnify:{FilterOnMagnify}, " + $"FilterOnMagnify:{FilterOnMagnify}, " + $"WrapOnHorizontial:{WrapOnHorizontial}, " + $"WrapOnVertical:{WrapOnVertical}";
}
- public static bool operator !=(TextureProperty left, TextureProperty right)
+ public static bool operator !=(
+ TextureProperty left,
+ TextureProperty right
+ )
{
return left.mask != right.mask;
}
- public static bool operator ==(TextureProperty left, TextureProperty right)
+ public static bool operator ==(
+ TextureProperty left,
+ TextureProperty right
+ )
{
return left.mask == right.mask;
}
@@ -218,11 +249,12 @@ namespace StgSharp.Graphics.OpenGL
(
TextureFilter onMagnify, TextureFilter onMinify,
TextureWrap onHorizontial, TextureWrap onVertical
- ) propertyValueTuple)
+ ) propertyValueTuple
+ )
{
- return new TextureProperty(
- propertyValueTuple.onMagnify, propertyValueTuple.onMinify,
- propertyValueTuple.onHorizontial, propertyValueTuple.onVertical);
+ return new TextureProperty(propertyValueTuple.onMagnify, propertyValueTuple.onMinify,
+ propertyValueTuple.onHorizontial,
+ propertyValueTuple.onVertical);
}
}
diff --git a/StgSharp.Common/Graphics/OpenGL/Buffer/VAO.cs b/StgSharp.Common/Graphics/OpenGL/Buffer/VAO.cs
index b9cab902..c81649d3 100644
--- a/StgSharp.Common/Graphics/OpenGL/Buffer/VAO.cs
+++ b/StgSharp.Common/Graphics/OpenGL/Buffer/VAO.cs
@@ -1,4 +1,4 @@
-//-----------------------------------------------------------------------
+//-----------------------------------------------------------------------
// -----------------------------------------------------------------------
// file="VAO"
// Project: StgSharp
@@ -36,14 +36,19 @@ namespace StgSharp.Graphics.OpenGL
public sealed unsafe class VertexArray : GlBufferObjectBase
{
- internal VertexArray(int n, glRender binding)
+ internal VertexArray(
+ int n,
+ glRender binding
+ )
: base(binding)
{
_bufferHandle = GL.GenVertexArrays(n);
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
- public sealed override void Bind(int index)
+ public sealed override void Bind(
+ int index
+ )
{
GL.BindVertexArray(_bufferHandle[index]);
}
@@ -60,13 +65,17 @@ namespace StgSharp.Graphics.OpenGL
int vertexLength,
TypeCode dataType,
bool isNomalized,
- uint stride,
- int pointer)
+ int stride,
+ int pointer
+ )
{
- GL.SetVertexAttribute(attributeIndex, vertexLength, dataType, isNomalized, stride, pointer);
+ GL.SetVertexAttribute(attributeIndex, vertexLength, dataType, isNomalized, stride,
+ pointer);
}
- protected sealed override void Dispose(bool disposing)
+ protected sealed override void Dispose(
+ bool disposing
+ )
{
if (disposing) {
GL.DeleteVertexArrays(_bufferHandle);
diff --git a/StgSharp.Common/Graphics/OpenGL/ShaderEdit/Shader.cs b/StgSharp.Common/Graphics/OpenGL/ShaderEdit/Shader.cs
index fa2b7fd7..cbe4b5b5 100644
--- a/StgSharp.Common/Graphics/OpenGL/ShaderEdit/Shader.cs
+++ b/StgSharp.Common/Graphics/OpenGL/ShaderEdit/Shader.cs
@@ -1,4 +1,4 @@
-//-----------------------------------------------------------------------
+//-----------------------------------------------------------------------
// -----------------------------------------------------------------------
// file="Shader"
// Project: StgSharp
@@ -56,7 +56,10 @@ namespace StgSharp.Graphics.OpenGL
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
- protected sealed override Shader CreateShaderSegment(ShaderType type, int count)
+ protected sealed override Shader CreateShaderSegment(
+ ShaderType type,
+ int count
+ )
{
return new Shader(GL.CreateShaderSet(count, type), type, this);
}
@@ -70,7 +73,11 @@ namespace StgSharp.Graphics.OpenGL
internal readonly GlHandle[] handle;
public readonly ShaderType type;
- internal unsafe Shader(GlHandle[] handle, ShaderType usage, glRender stream)
+ internal unsafe Shader(
+ GlHandle[] handle,
+ ShaderType usage,
+ glRender stream
+ )
{
this.handle = handle;
GL = stream.GL;
@@ -89,12 +96,18 @@ namespace StgSharp.Graphics.OpenGL
/// Index of shader code in current shader code set.
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
- public void AttachTo(int index, [NotNull]ShaderProgram target)
+ public void AttachTo(
+ int index,
+ [NotNull]ShaderProgram target
+ )
{
GL.AttachShader(target.handle, handle[index]);
}
- public void CheckStatus(int index, ShaderStatus status)
+ public void CheckStatus(
+ int index,
+ ShaderStatus status
+ )
{
string log = GL.GetShaderStatus(this, index, (int)status);
if (!string.IsNullOrEmpty(log)) {
@@ -103,7 +116,10 @@ namespace StgSharp.Graphics.OpenGL
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
- public unsafe void Compile(int index, ReadOnlySpan codeU8Stream)
+ public unsafe void Compile(
+ int index,
+ ReadOnlySpan codeU8Stream
+ )
{
GL.LoadShaderSource(handle[index], codeU8Stream);
GL.CompileShader(handle[index]);
@@ -111,7 +127,10 @@ namespace StgSharp.Graphics.OpenGL
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
- public unsafe void Compile(int index, byte[] codeStream)
+ public unsafe void Compile(
+ int index,
+ byte[] codeStream
+ )
{
ArgumentNullException.ThrowIfNull(codeStream);
GL.LoadShaderSource(handle[index], codeStream);
@@ -120,7 +139,10 @@ namespace StgSharp.Graphics.OpenGL
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
- public unsafe void Compile(int index, string codeStream)
+ public unsafe void Compile(
+ int index,
+ string codeStream
+ )
{
ArgumentNullException.ThrowIfNull(codeStream);
GL.LoadShaderSource(handle[index], codeStream.AsSpan());
@@ -128,12 +150,16 @@ namespace StgSharp.Graphics.OpenGL
CheckStatus(index, ShaderStatus.CompileStatus);
}
- public void FromBytes(byte[] stream)
+ public void FromBytes(
+ byte[] stream
+ )
{
throw new NotImplementedException();
}
- public static byte[] FromCodeFile(string fileRoute)
+ public static byte[] FromCodeFile(
+ string fileRoute
+ )
{
string str = File.ReadAllText(fileRoute);
if (string.IsNullOrEmpty(str)) {
@@ -147,7 +173,9 @@ namespace StgSharp.Graphics.OpenGL
return Array.Empty();
}
- public byte[] GetBytes(out int length)
+ public byte[] GetBytes(
+ out int length
+ )
{
throw new NotImplementedException();
}
@@ -175,7 +203,9 @@ namespace StgSharp.Graphics.OpenGL
///
/// CustomizeInit a program with no shader attached.
///
- internal unsafe ShaderProgram(glRender binding)
+ internal unsafe ShaderProgram(
+ glRender binding
+ )
{
GL = binding.GL;
handle = GL.CreateProgram();
@@ -191,7 +221,9 @@ namespace StgSharp.Graphics.OpenGL
///
///
[MethodImpl(MethodImplOptions.AggressiveInlining)]
- public unsafe Uniform GetUniform(string name) where T: unmanaged
+ public unsafe Uniform GetUniform(
+ string name
+ ) where T : unmanaged
{
return new Uniform(GL.GetUniformLocation(this.handle, name));
}
@@ -205,7 +237,9 @@ namespace StgSharp.Graphics.OpenGL
///
///
///
- public unsafe Uniform GetUniform(string name) where T: unmanaged where U: struct
+ public unsafe Uniform GetUniform(
+ string name
+ ) where T : unmanaged where U : struct
{
return new Uniform(GL.GetUniformLocation(this.handle, name));
}
@@ -219,8 +253,9 @@ namespace StgSharp.Graphics.OpenGL
///
///
///
- public unsafe Uniform GetUniform(string name) where T: unmanaged where U: struct
- where V: struct
+ public unsafe Uniform GetUniform(
+ string name
+ ) where T : unmanaged where U : struct where V : struct
{
return new Uniform(GL.GetUniformLocation(this.handle, name));
}
@@ -234,9 +269,9 @@ namespace StgSharp.Graphics.OpenGL
///
///
///
- public unsafe Uniform GetUniform(string name) where T: unmanaged where U: struct
- where V: struct
- where W: struct
+ public unsafe Uniform GetUniform(
+ string name
+ ) where T : unmanaged where U : struct where V : struct where W : struct
{
return new Uniform(GL.GetUniformLocation(this.handle, name));
}
diff --git a/StgSharp.Common/Graphics/OpenGL/ShaderEdit/Uniform.cs b/StgSharp.Common/Graphics/OpenGL/ShaderEdit/Uniform.cs
index 209a21de..ae70a522 100644
--- a/StgSharp.Common/Graphics/OpenGL/ShaderEdit/Uniform.cs
+++ b/StgSharp.Common/Graphics/OpenGL/ShaderEdit/Uniform.cs
@@ -1,4 +1,4 @@
-//-----------------------------------------------------------------------
+//-----------------------------------------------------------------------
// -----------------------------------------------------------------------
// file="Uniform"
// Project: StgSharp
@@ -41,17 +41,21 @@ namespace StgSharp.Graphics.OpenGL
}
- public sealed class Uniform : Uniform where T: unmanaged
+ public sealed class Uniform : Uniform where T : unmanaged
{
internal Uniform() { }
- internal unsafe Uniform(GlHandle id)
+ internal unsafe Uniform(
+ GlHandle id
+ )
{
this.id = id;
}
- internal static Uniform FromHandle(GlHandle handle)
+ internal static Uniform FromHandle(
+ GlHandle handle
+ )
{
return new Uniform
{
@@ -61,17 +65,21 @@ namespace StgSharp.Graphics.OpenGL
}
- public sealed class Uniform : Uniform where T: unmanaged where U: struct
+ public sealed class Uniform : Uniform where T : unmanaged where U : struct
{
internal Uniform() { }
- internal unsafe Uniform(GlHandle id)
+ internal unsafe Uniform(
+ GlHandle id
+ )
{
this.id = id;
}
- internal static Uniform FromHandle(GlHandle handle)
+ internal static Uniform FromHandle(
+ GlHandle handle
+ )
{
return new Uniform
{
@@ -81,17 +89,22 @@ namespace StgSharp.Graphics.OpenGL
}
- public sealed class Uniform : Uniform where T: unmanaged where U: struct where V: struct
+ public sealed class Uniform : Uniform where T : unmanaged where U : struct
+ where V : struct
{
internal Uniform() { }
- internal unsafe Uniform(GlHandle id)
+ internal unsafe Uniform(
+ GlHandle id
+ )
{
this.id = id;
}
- internal static Uniform FromHandle(GlHandle handle)
+ internal static Uniform FromHandle(
+ GlHandle handle
+ )
{
return new Uniform
{
@@ -101,17 +114,23 @@ namespace StgSharp.Graphics.OpenGL
}
- public sealed class Uniform : Uniform where T: unmanaged where U: struct where V: struct where W: struct
+ public sealed class Uniform : Uniform where T : unmanaged where U : struct
+ where V : struct
+ where W : struct
{
internal Uniform() { }
- internal unsafe Uniform(GlHandle id)
+ internal unsafe Uniform(
+ GlHandle id
+ )
{
this.id = id;
}
- internal static Uniform FromHandle(GlHandle handle)
+ internal static Uniform FromHandle(
+ GlHandle handle
+ )
{
return new Uniform
{
@@ -125,46 +144,67 @@ namespace StgSharp.Graphics.OpenGL
{
[MethodImpl(MethodImplOptions.AggressiveInlining)]
- public void SetUniformValue([NotNull] Uniform uniform, Matrix44 mat)
+ public void SetUniformValue(
+ [NotNull] Uniform uniform,
+ Matrix44 mat
+ )
{
- Matrix44 temp = mat;
- Context.glUniformMatrix4fv(uniform.id.SignedValue, 1, false, (float*)&temp);
+ Context.glUniformMatrix4fv(uniform.id.SignedValue, 1, (byte)0, (float*)&mat);
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
- public void SetUniformValue([NotNull]Uniform uniform, Vec4 vec)
+ public void SetUniformValue(
+ [NotNull]Uniform uniform,
+ Vec4 vec
+ )
{
- Vec4 temp = vec;
- Context.glUniform1fv(uniform.id.SignedValue, 4, &temp.reg);
+ Context.glUniform1fv(uniform.id.SignedValue, 4, (float*)&vec);
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
- public void SetUniformValue([NotNull]Uniform uniform, Vec4 vec)
+ public void SetUniformValue(
+ [NotNull]Uniform uniform,
+ Vec4 vec
+ )
{
- Vec4 temp = vec;
- Context.glUniform1fv(uniform.id.SignedValue, 4, &temp.reg);
+ Context.glUniform1fv(uniform.id.SignedValue, 4, (float*)&vec);
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
- public void SetUniformValue([NotNull]Uniform uniform, float v0)
+ public void SetUniformValue(
+ [NotNull]Uniform uniform,
+ float v0
+ )
{
Context.glUniform1f(uniform.id.SignedValue, v0);
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
- public void SetUniformValue([NotNull]Uniform uniform, int i0)
+ public void SetUniformValue(
+ [NotNull]Uniform uniform,
+ int i0
+ )
{
Context.glUniform1i(uniform.id.SignedValue, i0);
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
- public void SetUniformValue([NotNull] Uniform uniform, float v0, float v1)
+ public void SetUniformValue(
+ [NotNull] Uniform uniform,
+ float v0,
+ float v1
+ )
{
Context.glUniform2f(uniform.id.SignedValue, v0, v1);
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
- public void SetUniformValue([NotNull] Uniform uniform, float v0, float v1, float v2)
+ public void SetUniformValue(
+ [NotNull] Uniform uniform,
+ float v0,
+ float v1,
+ float v2
+ )
{
Context.glUniform3f(uniform.id.SignedValue, v0, v1, v2);
}
@@ -175,7 +215,8 @@ namespace StgSharp.Graphics.OpenGL
float v0,
float v1,
float v2,
- float v3)
+ float v3
+ )
{
Context.glUniform4f(uniform.id.SignedValue, v0, v1, v2, v3);
}
diff --git a/StgSharp.Common/Graphics/OpenGL/glApiManager.Load.cs b/StgSharp.Common/Graphics/OpenGL/glApiManager.Load.cs
index 7e331f5c..e8528709 100644
--- a/StgSharp.Common/Graphics/OpenGL/glApiManager.Load.cs
+++ b/StgSharp.Common/Graphics/OpenGL/glApiManager.Load.cs
@@ -1,4 +1,4 @@
-//-----------------------------------------------------------------------
+//-----------------------------------------------------------------------
// -----------------------------------------------------------------------
// file="glApiManager.Load"
// Project: StgSharp
@@ -27,13 +27,17 @@
// -----------------------------------------------------------------------
using StgSharp.HighPerformance;
using System;
+using System.Runtime.CompilerServices;
namespace StgSharp.Graphics.OpenGL
{
public static partial class glManager
{
- internal static unsafe bool LoadGLcore10(OpenglContext* contextPtr, delegate*, IntPtr> load)
+ internal static unsafe bool LoadGLcore10(
+ glContextShadow* contextPtr,
+ delegate*, IntPtr> load
+ )
{
if (!core10)
{
@@ -43,62 +47,65 @@ namespace StgSharp.Graphics.OpenGL
#region load
- contextPtr->glBlendFunc = (delegate*)load("glBlendFunc"u8);
- contextPtr->glClear = (delegate*)load("glClear"u8);
- contextPtr->glClearColor = (delegate*)load("glClearColor"u8);
- contextPtr->glClearDepth = (delegate*)load("glClearDepth"u8);
- contextPtr->glClearStencil = (delegate*)load("glClearStencil"u8);
- contextPtr->glColorMask = (delegate*)load("glColorMask"u8);
- contextPtr->glCullFace = (delegate*)load("glCullFace"u8);
- contextPtr->glDepthFunc = (delegate*)load("glDepthFunc"u8);
- contextPtr->glDepthMask = (delegate*)load("glDepthMask"u8);
- contextPtr->glDepthRange = (delegate*)load("glDepthRange"u8);
- contextPtr->glDisable = (delegate*)load("glDisable"u8);
- contextPtr->glDrawBuffer = (delegate*)load("glDrawBuffer"u8);
- contextPtr->glEnable = (delegate*)load("glEnable"u8);
- contextPtr->glFinish = (delegate*)load("glFinish"u8);
- contextPtr->glFlush = (delegate*)load("glFlush"u8);
- contextPtr->glFrontFace = (delegate*)load("glFrontFace"u8);
- contextPtr->glGetBooleanv = (delegate*)load("glGetBooleanv"u8);
- contextPtr->glGetDoublev = (delegate*)load("glGetDoublev"u8);
- contextPtr->glGetError = (delegate*)load("glGetError"u8);
- contextPtr->glGetFloatv = (delegate*)load("glGetFloatv"u8);
- contextPtr->glGetIntegerv = (delegate*)load("glGetIntegerv"u8);
- contextPtr->glGetString = (delegate*)load("glGetString"u8);
- contextPtr->glGetTexImage = (delegate*)load("glGetTexImage"u8);
- contextPtr->glGetTexLevelParameterfv = (delegate*)load("glGetTexLevelParameterfv"u8);
- contextPtr->glGetTexLevelParameteriv = (delegate*)load("glGetTexLevelParameteriv"u8);
- contextPtr->glGetTexParameterfv = (delegate*)load("glGetTexParameterfv"u8);
- contextPtr->glGetTexParameteriv = (delegate*)load("glGetTexParameteriv"u8);
- contextPtr->glHint = (delegate*)load("glHint"u8);
- contextPtr->glIsEnabled = (delegate*)load("glIsEnabled"u8);
- contextPtr->glLineWidth = (delegate*)load("glLineWidth"u8);
- contextPtr->glLogicOp = (delegate*)load("glLogicOp"u8);
- contextPtr->glPixelStoref = (delegate*)load("glPixelStoref"u8);
- contextPtr->glPixelStorei = (delegate*)load("glPixelStorei"u8);
- contextPtr->glPointSize = (delegate*)load("glPointSize"u8);
- contextPtr->glPolygonMode = (delegate*)load("glPolygonMode"u8);
- contextPtr->glReadBuffer = (delegate*)load("glReadBuffer"u8);
- contextPtr->glReadPixels = (delegate*)load("glReadPixels"u8);
- contextPtr->glScissor = (delegate*)load("glScissor"u8);
- contextPtr->glStencilFunc = (delegate*)load("glStencilFunc"u8);
- contextPtr->glStencilMask = (delegate*)load("glStencilMask"u8);
- contextPtr->glStencilOp = (delegate*)load("glStencilOp"u8);
- contextPtr->glTexImage1D = (delegate*)load("glTexImage1D"u8);
- contextPtr->glTexImage2D = (delegate*)load("glTexImage2D"u8);
- contextPtr->glTexParameterf = (delegate*)load("glTexParameterf"u8);
- contextPtr->glTexParameterfv = (delegate*)load("glTexParameterfv"u8);
- contextPtr->glTexParameteri = (delegate*)load("glTexParameteri"u8);
- contextPtr->glTexParameteriv = (delegate*)load("glTexParameteriv"u8);
- contextPtr->glViewport = (delegate*)load("glViewport"u8);
+ contextPtr->glBlendFunc = LoadGLFunction(load, "glBlendFunc"u8);
+ contextPtr->glClear = LoadGLFunction(load, "glClear"u8);
+ contextPtr->glClearColor = LoadGLFunction(load, "glClearColor"u8);
+ contextPtr->glClearDepth = LoadGLFunction(load, "glClearDepth"u8);
+ contextPtr->glClearStencil = LoadGLFunction(load, "glClearStencil"u8);
+ contextPtr->glColorMask = LoadGLFunction(load, "glColorMask"u8);
+ contextPtr->glCullFace = LoadGLFunction(load, "glCullFace"u8);
+ contextPtr->glDepthFunc = LoadGLFunction(load, "glDepthFunc"u8);
+ contextPtr->glDepthMask = LoadGLFunction(load, "glDepthMask"u8);
+ contextPtr->glDepthRange = LoadGLFunction(load, "glDepthRange"u8);
+ contextPtr->glDisable = LoadGLFunction(load, "glDisable"u8);
+ contextPtr->glDrawBuffer = LoadGLFunction(load, "glDrawBuffer"u8);
+ contextPtr->glEnable = LoadGLFunction(load, "glEnable"u8);
+ contextPtr->glFinish = LoadGLFunction(load, "glFinish"u8);
+ contextPtr->glFlush = LoadGLFunction(load, "glFlush"u8);
+ contextPtr->glFrontFace = LoadGLFunction(load, "glFrontFace"u8);
+ contextPtr->glGetBooleanv = LoadGLFunction(load, "glGetBooleanv"u8);
+ contextPtr->glGetDoublev = LoadGLFunction(load, "glGetDoublev"u8);
+ contextPtr->glGetError = LoadGLFunction(load, "glGetError"u8);
+ contextPtr->glGetFloatv = LoadGLFunction(load, "glGetFloatv"u8);
+ contextPtr->glGetIntegerv = LoadGLFunction(load, "glGetIntegerv"u8);
+ contextPtr->glGetString = LoadGLFunction(load, "glGetString"u8);
+ contextPtr->glGetTexImage = LoadGLFunction(load, "glGetTexImage"u8);
+ contextPtr->glGetTexLevelParameterfv = LoadGLFunction(load, "glGetTexLevelParameterfv"u8);
+ contextPtr->glGetTexLevelParameteriv = LoadGLFunction(load, "glGetTexLevelParameteriv"u8);
+ contextPtr->glGetTexParameterfv = LoadGLFunction(load, "glGetTexParameterfv"u8);
+ contextPtr->glGetTexParameteriv = LoadGLFunction(load, "glGetTexParameteriv"u8);
+ contextPtr->glHint = LoadGLFunction(load, "glHint"u8);
+ contextPtr->glIsEnabled = LoadGLFunction(load, "glIsEnabled"u8);
+ contextPtr->glLineWidth = LoadGLFunction(load, "glLineWidth"u8);
+ contextPtr->glLogicOp = LoadGLFunction(load, "glLogicOp"u8);
+ contextPtr->glPixelStoref = LoadGLFunction(load, "glPixelStoref"u8);
+ contextPtr->glPixelStorei = LoadGLFunction(load, "glPixelStorei"u8);
+ contextPtr->glPointSize = LoadGLFunction(load, "glPointSize"u8);
+ contextPtr->glPolygonMode = LoadGLFunction(load, "glPolygonMode"u8);
+ contextPtr->glReadBuffer = LoadGLFunction(load, "glReadBuffer"u8);
+ contextPtr->glReadPixels = LoadGLFunction(load, "glReadPixels"u8);
+ contextPtr->glScissor = LoadGLFunction(load, "glScissor"u8);
+ contextPtr->glStencilFunc = LoadGLFunction(load, "glStencilFunc"u8);
+ contextPtr->glStencilMask = LoadGLFunction(load, "glStencilMask"u8);
+ contextPtr->glStencilOp = LoadGLFunction(load, "glStencilOp"u8);
+ contextPtr->glTexImage1D = LoadGLFunction(load, "glTexImage1D"u8);
+ contextPtr->glTexImage2D = LoadGLFunction(load, "glTexImage2D"u8);
+ contextPtr->glTexParameterf = LoadGLFunction(load, "glTexParameterf"u8);
+ contextPtr->glTexParameterfv = LoadGLFunction(load, "glTexParameterfv"u8);
+ contextPtr->glTexParameteri = LoadGLFunction(load, "glTexParameteri"u8);
+ contextPtr->glTexParameteriv = LoadGLFunction(load, "glTexParameteriv"u8);
+ contextPtr->glViewport = LoadGLFunction(load, "glViewport"u8);
#endregion load
- DefaultLog.InternalAppendLog("Successfully load all OpenGL 1.0 APIs");
+ DefaultLog.InternalAppendLog("Successfully load OpenGL 1.0 APIs");
return true;
}
- internal static unsafe bool LoadGLcore11(OpenglContext* contextPtr, delegate*, IntPtr> load)
+ internal static unsafe bool LoadGLcore11(
+ glContextShadow* contextPtr,
+ delegate*, IntPtr> load
+ )
{
if (!core11)
{
@@ -108,36 +115,40 @@ namespace StgSharp.Graphics.OpenGL
#region load
- contextPtr->glBindTexture = (delegate*)load("glBindTexture"u8);
- contextPtr->glCopyTexImage1D = (delegate*)load(
+ contextPtr->glBindTexture = LoadGLFunction(load, "glBindTexture"u8);
+ contextPtr->glCopyTexImage1D = LoadGLFunction(load,
"glCopyTexImage1D"u8);
- contextPtr->glCopyTexImage2D = (delegate*)load(
+ contextPtr->glCopyTexImage2D = LoadGLFunction(load,
"glCopyTexImage2D"u8);
- contextPtr->glCopyTexSubImage1D = (delegate*)load(
+ contextPtr->glCopyTexSubImage1D = LoadGLFunction(load,
"glCopyTexSubImage1D"u8);
- contextPtr->glCopyTexSubImage2D = (delegate*)load(
+ contextPtr->glCopyTexSubImage2D = LoadGLFunction(load,
"glCopyTexSubImage2D"u8);
- contextPtr->glDeleteTextures = (delegate*)load(
+ contextPtr->glDeleteTextures = LoadGLFunction(load,
"glDeleteTextures"u8);
- contextPtr->glDrawArrays = (delegate*)load("glDrawArrays"u8);
- contextPtr->glDrawElements = (delegate*)load(
+ contextPtr->glDrawArrays = LoadGLFunction(load, "glDrawArrays"u8);
+ contextPtr->glDrawElements = LoadGLFunction(load,
"glDrawElements"u8);
- contextPtr->glGenTextures = (delegate*)load("glGenTextures"u8);
- contextPtr->glGetPointerv = (delegate*)load("glGetPointerv"u8);
- contextPtr->glIsTexture = (delegate*)load("glIsTexture"u8);
- contextPtr->glPolygonOffset = (delegate*)load("glPolygonOffset"u8);
- contextPtr->glTexSubImage1D = (delegate*)load(
+ contextPtr->glGenTextures = LoadGLFunction(load, "glGenTextures"u8);
+
+ // contextPtr->glGetPointerv =LoadGLFunction(load,"glGetPointerv"u8);
+ contextPtr->glIsTexture = LoadGLFunction(load, "glIsTexture"u8);
+ contextPtr->glPolygonOffset = LoadGLFunction(load, "glPolygonOffset"u8);
+ contextPtr->glTexSubImage1D = LoadGLFunction(load,
"glTexSubImage1D"u8);
- contextPtr->glTexSubImage2D = (delegate*)load(
+ contextPtr->glTexSubImage2D = LoadGLFunction(load,
"glTexSubImage2D"u8);
#endregion load
- DefaultLog.InternalAppendLog("Successfully load all OpenGL 1.1 APIs");
+ DefaultLog.InternalAppendLog("Successfully load OpenGL 1.1 APIs");
return true;
}
- internal static unsafe bool LoadGLcore12(OpenglContext* contextPtr, delegate*, IntPtr> load)
+ internal static unsafe bool LoadGLcore12(
+ glContextShadow* contextPtr,
+ delegate*, IntPtr> load
+ )
{
if (!core12)
{
@@ -147,22 +158,25 @@ namespace StgSharp.Graphics.OpenGL
#region load
- contextPtr->glCopyTexSubImage3D = (delegate*)load(
+ contextPtr->glCopyTexSubImage3D = LoadGLFunction(load,
"glCopyTexSubImage3D"u8);
- contextPtr->glDrawRangeElements = (delegate*)load(
+ contextPtr->glDrawRangeElements = LoadGLFunction(load,
"glDrawRangeElements"u8);
- contextPtr->glTexImage3D = (delegate*)load(
+ contextPtr->glTexImage3D = LoadGLFunction(load,
"glTexImage3D"u8);
- contextPtr->glTexSubImage3D = (delegate*)load(
+ contextPtr->glTexSubImage3D = LoadGLFunction(load,
"glTexSubImage3D"u8);
#endregion load
- DefaultLog.InternalAppendLog("Successfully load all OpenGL 1.2 APIs");
+ DefaultLog.InternalAppendLog("Successfully load OpenGL 1.2 APIs");
return true;
}
- internal static unsafe bool LoadGLcore13(OpenglContext* contextPtr, delegate*, IntPtr> load)
+ internal static unsafe bool LoadGLcore13(
+ glContextShadow* contextPtr,
+ delegate*, IntPtr> load
+ )
{
if (!core13)
{
@@ -172,31 +186,34 @@ namespace StgSharp.Graphics.OpenGL
#region load
- contextPtr->glActiveTexture = (delegate*)load("glActiveTexture"u8);
- contextPtr->glCompressedTexImage1D = (delegate*)load(
+ contextPtr->glActiveTexture = LoadGLFunction(load, "glActiveTexture"u8);
+ contextPtr->glCompressedTexImage1D = LoadGLFunction(load,
"glCompressedTexImage1D"u8);
- contextPtr->glCompressedTexImage2D = (delegate*)load(
+ contextPtr->glCompressedTexImage2D = LoadGLFunction(load,
"glCompressedTexImage2D"u8);
- contextPtr->glCompressedTexImage3D = (delegate*)load(
+ contextPtr->glCompressedTexImage3D = LoadGLFunction(load,
"glCompressedTexImage3D"u8);
- contextPtr->glCompressedTexSubImage1D = (delegate*)load(
+ contextPtr->glCompressedTexSubImage1D = LoadGLFunction(load,
"glCompressedTexSubImage1D"u8);
- contextPtr->glCompressedTexSubImage2D = (delegate*)load(
+ contextPtr->glCompressedTexSubImage2D = LoadGLFunction(load,
"glCompressedTexSubImage2D"u8);
- contextPtr->glCompressedTexSubImage3D = (delegate*)load(
+ contextPtr->glCompressedTexSubImage3D = LoadGLFunction(load,
"glCompressedTexSubImage3D"u8);
- contextPtr->glGetCompressedTexImage = (delegate*)load(
+ contextPtr->glGetCompressedTexImage = LoadGLFunction(load,
"glGetCompressedTexImage"u8);
- contextPtr->glSampleCoverage = (delegate*)load(
+ contextPtr->glSampleCoverage = LoadGLFunction(load,
"glSampleCoverage"u8);
#endregion load
- DefaultLog.InternalAppendLog("Successfully load all OpenGL 1.3 APIs");
+ DefaultLog.InternalAppendLog("Successfully load OpenGL 1.3 APIs");
return true;
}
- internal static unsafe bool LoadGLcore14(OpenglContext* contextPtr, delegate*, IntPtr> load)
+ internal static unsafe bool LoadGLcore14(
+ glContextShadow* contextPtr,
+ delegate*, IntPtr> load
+ )
{
if (!core14)
{
@@ -206,31 +223,34 @@ namespace StgSharp.Graphics.OpenGL
#region load
- contextPtr->glBlendColor = (delegate*)load(
+ contextPtr->glBlendColor = LoadGLFunction(load,
"glBlendColor"u8);
- contextPtr->glBlendEquation = (delegate*)load("glBlendEquation"u8);
- contextPtr->glBlendFuncSeparate = (delegate*)load(
+ contextPtr->glBlendEquation = LoadGLFunction(load, "glBlendEquation"u8);
+ contextPtr->glBlendFuncSeparate = LoadGLFunction(load,
"glBlendFuncSeparate"u8);
- contextPtr->glMultiDrawArrays = (delegate*)load(
+ contextPtr->glMultiDrawArrays = LoadGLFunction(load,
"glMultiDrawArrays"u8);
- contextPtr->glMultiDrawElements = (delegate*)load(
+ contextPtr->glMultiDrawElements = LoadGLFunction(load,
"glMultiDrawElements"u8);
- contextPtr->glPointParameterf = (delegate*)load(
+ contextPtr->glPointParameterf = LoadGLFunction(load,
"glPointParameterf"u8);
- contextPtr->glPointParameterfv = (delegate*)load(
+ contextPtr->glPointParameterfv = LoadGLFunction(load,
"glPointParameterfv"u8);
- contextPtr->glPointParameteri = (delegate*)load(
+ contextPtr->glPointParameteri = LoadGLFunction(load,
"glPointParameteri"u8);
- contextPtr->glPointParameteriv = (delegate*)load(
+ contextPtr->glPointParameteriv = LoadGLFunction(load,
"glPointParameteriv"u8);
#endregion load
- DefaultLog.InternalAppendLog("Successfully load all OpenGL 1.4 APIs");
+ DefaultLog.InternalAppendLog("Successfully load OpenGL 1.4 APIs");
return true;
}
- internal static unsafe bool LoadGLcore15(OpenglContext* contextPtr, delegate*, IntPtr> load)
+ internal static unsafe bool LoadGLcore15(
+ glContextShadow* contextPtr,
+ delegate*, IntPtr> load
+ )
{
if (!core15)
{
@@ -240,40 +260,43 @@ namespace StgSharp.Graphics.OpenGL
#region load
- contextPtr->glBeginQuery = (delegate*)load("glBeginQuery"u8);
- contextPtr->glBindBuffer = (delegate*)load("glBindBuffer"u8);
- contextPtr->glBufferData = (delegate*)load(
+ contextPtr->glBeginQuery = LoadGLFunction(load, "glBeginQuery"u8);
+ contextPtr->glBindBuffer = LoadGLFunction(load, "glBindBuffer"u8);
+ contextPtr->glBufferData = LoadGLFunction(load,
"glBufferData"u8);
- contextPtr->glBufferSubData = (delegate*)load(
+ contextPtr->glBufferSubData = LoadGLFunction(load,
"glBufferSubData"u8);
- contextPtr->glDeleteBuffers = (delegate*)load("glDeleteBuffers"u8);
- contextPtr->glDeleteQueries = (delegate*)load("glDeleteQueries"u8);
- contextPtr->glEndQuery = (delegate*)load("glEndQuery"u8);
- contextPtr->glGenBuffers = (delegate*)load("glGenBuffers"u8);
- contextPtr->glGenQueries = (delegate*)load("glGenQueries"u8);
- contextPtr->glGetBufferParameteriv = (delegate*)load(
+ contextPtr->glDeleteBuffers = LoadGLFunction(load, "glDeleteBuffers"u8);
+ contextPtr->glDeleteQueries = LoadGLFunction(load, "glDeleteQueries"u8);
+ contextPtr->glEndQuery = LoadGLFunction(load, "glEndQuery"u8);
+ contextPtr->glGenBuffers = LoadGLFunction(load, "glGenBuffers"u8);
+ contextPtr->glGenQueries = LoadGLFunction(load, "glGenQueries"u8);
+ contextPtr->glGetBufferParameteriv = LoadGLFunction(load,
"glGetBufferParameteriv"u8);
- contextPtr->glGetBufferPointerv = (delegate*)load(
+ contextPtr->glGetBufferPointerv = LoadGLFunction(load,
"glGetBufferPointerv"u8);
- contextPtr->glGetBufferSubData = (delegate*)load(
+ contextPtr->glGetBufferSubData = LoadGLFunction(load,
"glGetBufferSubData"u8);
- contextPtr->glGetQueryObjectiv = (delegate*)load(
+ contextPtr->glGetQueryObjectiv = LoadGLFunction(load,
"glGetQueryObjectiv"u8);
- contextPtr->glGetQueryObjectuiv = (delegate*)load(
+ contextPtr->glGetQueryObjectuiv = LoadGLFunction(load,
"glGetQueryObjectuiv"u8);
- contextPtr->glGetQueryiv = (delegate*)load("glGetQueryiv"u8);
- contextPtr->glIsBuffer = (delegate*)load("glIsBuffer"u8);
- contextPtr->glIsQuery = (delegate*)load("glIsQuery"u8);
- contextPtr->glMapBuffer = (delegate*)load("glMapBuffer"u8);
- contextPtr->glUnmapBuffer = (delegate*)load("glUnmapBuffer"u8);
+ contextPtr->glGetQueryiv = LoadGLFunction(load, "glGetQueryiv"u8);
+ contextPtr->glIsBuffer = LoadGLFunction(load, "glIsBuffer"u8);
+ contextPtr->glIsQuery = LoadGLFunction(load, "glIsQuery"u8);
+ contextPtr->glMapBuffer = LoadGLFunction(load, "glMapBuffer"u8);
+ contextPtr->glUnmapBuffer = LoadGLFunction(load, "glUnmapBuffer"u8);
#endregion load
- DefaultLog.InternalAppendLog("Successfully load all OpenGL 1.5 APIs");
+ DefaultLog.InternalAppendLog("Successfully load OpenGL 1.5 APIs");
return true;
}
- internal static unsafe bool LoadGLcore20(OpenglContext* contextPtr, delegate*, IntPtr> load)
+ internal static unsafe bool LoadGLcore20(
+ glContextShadow* contextPtr,
+ delegate*, IntPtr> load
+ )
{
if (!core20)
{
@@ -283,173 +306,176 @@ namespace StgSharp.Graphics.OpenGL
#region load
- contextPtr->glAttachShader = (delegate*)load("glAttachShader"u8);
- contextPtr->glBindAttribLocation = (delegate*)load(
+ contextPtr->glAttachShader = LoadGLFunction(load, "glAttachShader"u8);
+ contextPtr->glBindAttribLocation = LoadGLFunction(load,
"glBindAttribLocation"u8);
- contextPtr->glBlendEquationSeparate = (delegate*)load(
+ contextPtr->glBlendEquationSeparate = LoadGLFunction(load,
"glBlendEquationSeparate"u8);
- contextPtr->glCompileShader = (delegate*)load("glCompileShader"u8);
- contextPtr->glCreateProgram = (delegate*)load("glCreateProgram"u8);
- contextPtr->glCreateShader = (delegate*)load("glCreateShader"u8);
- contextPtr->glDeleteProgram = (delegate*)load("glDeleteProgram"u8);
- contextPtr->glDeleteShader = (delegate*)load("glDeleteShader"u8);
- contextPtr->glDetachShader = (delegate*)load("glDetachShader"u8);
- contextPtr->glDisableVertexAttribArray = (delegate*)load(
+ contextPtr->glCompileShader = LoadGLFunction(load, "glCompileShader"u8);
+ contextPtr->glCreateProgram = LoadGLFunction(load, "glCreateProgram"u8);
+ contextPtr->glCreateShader = LoadGLFunction(load, "glCreateShader"u8);
+ contextPtr->glDeleteProgram = LoadGLFunction(load, "glDeleteProgram"u8);
+ contextPtr->glDeleteShader = LoadGLFunction(load, "glDeleteShader"u8);
+ contextPtr->glDetachShader = LoadGLFunction(load, "glDetachShader"u8);
+ contextPtr->glDisableVertexAttribArray = LoadGLFunction(load,
"glDisableVertexAttribArray"u8);
- contextPtr->glDrawBuffers = (delegate*)load("glDrawBuffers"u8);
- contextPtr->glEnableVertexAttribArray = (delegate*)load(
+ contextPtr->glDrawBuffers = LoadGLFunction(load, "glDrawBuffers"u8);
+ contextPtr->glEnableVertexAttribArray = LoadGLFunction(load,
"glEnableVertexAttribArray"u8);
- contextPtr->glGetActiveAttrib = (delegate*)load(
+ contextPtr->glGetActiveAttrib = LoadGLFunction(load,
"glGetActiveAttrib"u8);
- contextPtr->glGetActiveUniform = (delegate*)load(
+ contextPtr->glGetActiveUniform = LoadGLFunction(load,
"glGetActiveUniform"u8);
- contextPtr->glGetAttachedShaders = (delegate*)load(
+ contextPtr->glGetAttachedShaders = LoadGLFunction(load,
"glGetAttachedShaders"u8);
- contextPtr->glGetAttribLocation = (delegate*)load(
+ contextPtr->glGetAttribLocation = LoadGLFunction(load,
"glGetAttribLocation"u8);
- contextPtr->glGetProgramInfoLog = (delegate*)load(
+ contextPtr->glGetProgramInfoLog = LoadGLFunction(load,
"glGetProgramInfoLog"u8);
- contextPtr->glGetProgramiv = (delegate*)load(
+ contextPtr->glGetProgramiv = LoadGLFunction(load,
"glGetProgramiv"u8);
- contextPtr->glGetShaderInfoLog = (delegate*)load(
+ contextPtr->glGetShaderInfoLog = LoadGLFunction(load,
"glGetShaderInfoLog"u8);
- contextPtr->glGetShaderSource = (delegate*)load(
+ contextPtr->glGetShaderSource = LoadGLFunction(load,
"glGetShaderSource"u8);
- contextPtr->glGetShaderiv = (delegate*)load("glGetShaderiv"u8);
- contextPtr->glGetUniformLocation = (delegate*)load(
+ contextPtr->glGetShaderiv = LoadGLFunction(load, "glGetShaderiv"u8);
+ contextPtr->glGetUniformLocation = LoadGLFunction(load,
"glGetUniformLocation"u8);
- contextPtr->glGetUniformfv = (delegate*)load(
+ contextPtr->glGetUniformfv = LoadGLFunction(load,
"glGetUniformfv"u8);
- contextPtr->glGetUniformiv = (delegate*)load(
+ contextPtr->glGetUniformiv = LoadGLFunction(load,
"glGetUniformiv"u8);
- contextPtr->glGetVertexAttribPointerv = (delegate*)load(
+ contextPtr->glGetVertexAttribPointerv = LoadGLFunction(load,
"glGetVertexAttribPointerv"u8);
- contextPtr->glGetVertexAttribdv = (delegate*)load(
+ contextPtr->glGetVertexAttribdv = LoadGLFunction(load,
"glGetVertexAttribdv"u8);
- contextPtr->glGetVertexAttribfv = (delegate*)load(
+ contextPtr->glGetVertexAttribfv = LoadGLFunction(load,
"glGetVertexAttribfv"u8);
- contextPtr->glGetVertexAttribiv = (delegate*)load(
+ contextPtr->glGetVertexAttribiv = LoadGLFunction(load,
"glGetVertexAttribiv"u8);
- contextPtr->glIsProgram = (delegate*)load("glIsProgram"u8);
- contextPtr->glIsShader = (delegate*)load("glIsShader"u8);
- contextPtr->glLinkProgram = (delegate*)load("glLinkProgram"u8);
- contextPtr->glShaderSource = (delegate* unmanaged[Stdcall])load(
+ contextPtr->glIsProgram = LoadGLFunction(load, "glIsProgram"u8);
+ contextPtr->glIsShader = LoadGLFunction(load, "glIsShader"u8);
+ contextPtr->glLinkProgram = LoadGLFunction(load, "glLinkProgram"u8);
+ contextPtr->glShaderSource = LoadGLFunction(load,
"glShaderSource"u8);
- contextPtr->glStencilFuncSeparate = (delegate*)load(
+ contextPtr->glStencilFuncSeparate = LoadGLFunction(load,
"glStencilFuncSeparate"u8);
- contextPtr->glStencilMaskSeparate = (delegate*)load(
+ contextPtr->glStencilMaskSeparate = LoadGLFunction(load,
"glStencilMaskSeparate"u8);
- contextPtr->glStencilOpSeparate = (delegate*)load(
+ contextPtr->glStencilOpSeparate = LoadGLFunction(load,
"glStencilOpSeparate"u8);
- contextPtr->glUniform1f = (delegate*)load("glUniform1f"u8);
- contextPtr->glUniform1fv = (delegate*)load("glUniform1fv"u8);
- contextPtr->glUniform1i = (delegate*)load("glUniform1i"u8);
- contextPtr->glUniform1iv = (delegate*)load("glUniform1iv"u8);
- contextPtr->glUniform2f = (delegate*)load("glUniform2f"u8);
- contextPtr->glUniform2fv = (delegate*)load("glUniform2fv"u8);
- contextPtr->glUniform2i = (delegate*)load("glUniform2i"u8);
- contextPtr->glUniform2iv = (delegate*)load("glUniform2iv"u8);
- contextPtr->glUniform3f = (delegate*)load(
+ contextPtr->glUniform1f = LoadGLFunction(load, "glUniform1f"u8);
+ contextPtr->glUniform1fv = LoadGLFunction(load, "glUniform1fv"u8);
+ contextPtr->glUniform1i = LoadGLFunction(load, "glUniform1i"u8);
+ contextPtr->glUniform1iv = LoadGLFunction(load, "glUniform1iv"u8);
+ contextPtr->glUniform2f = LoadGLFunction(load, "glUniform2f"u8);
+ contextPtr->glUniform2fv = LoadGLFunction(load, "glUniform2fv"u8);
+ contextPtr->glUniform2i = LoadGLFunction(load, "glUniform2i"u8);
+ contextPtr->glUniform2iv = LoadGLFunction(load, "glUniform2iv"u8);
+ contextPtr->glUniform3f = LoadGLFunction(load,
"glUniform3f"u8);
- contextPtr->glUniform3fv = (delegate*)load("glUniform3fv"u8);
- contextPtr->glUniform3i = (delegate*)load("glUniform3i"u8);
- contextPtr->glUniform3iv = (delegate*)load("glUniform3iv"u8);
- contextPtr->glUniform4f = (delegate*)load(
+ contextPtr->glUniform3fv = LoadGLFunction(load, "glUniform3fv"u8);
+ contextPtr->glUniform3i = LoadGLFunction(load, "glUniform3i"u8);
+ contextPtr->glUniform3iv = LoadGLFunction(load, "glUniform3iv"u8);
+ contextPtr->glUniform4f = LoadGLFunction(load,
"glUniform4f"u8);
- contextPtr->glUniform4fv = (delegate*)load("glUniform4fv"u8);
- contextPtr->glUniform4i = (delegate*)load(
+ contextPtr->glUniform4fv = LoadGLFunction(load, "glUniform4fv"u8);
+ contextPtr->glUniform4i = LoadGLFunction(load,
"glUniform4i"u8);
- contextPtr->glUniform4iv = (delegate*)load("glUniform4iv"u8);
- contextPtr->glUniformMatrix2fv = (delegate*)load(
+ contextPtr->glUniform4iv = LoadGLFunction(load, "glUniform4iv"u8);
+ contextPtr->glUniformMatrix2fv = LoadGLFunction(load,
"glUniformMatrix2fv"u8);
- contextPtr->glUniformMatrix3fv = (delegate*)load(
+ contextPtr->glUniformMatrix3fv = LoadGLFunction(load,
"glUniformMatrix3fv"u8);
- contextPtr->glUniformMatrix4fv = (delegate*)load(
+ contextPtr->glUniformMatrix4fv = LoadGLFunction(load,
"glUniformMatrix4fv"u8);
- contextPtr->glUseProgram = (delegate*)load("glUseProgram"u8);
- contextPtr->glValidateProgram = (delegate*)load("glValidateProgram"u8);
- contextPtr->glVertexAttrib1d = (delegate*)load(
+ contextPtr->glUseProgram = LoadGLFunction(load, "glUseProgram"u8);
+ contextPtr->glValidateProgram = LoadGLFunction(load, "glValidateProgram"u8);
+ contextPtr->glVertexAttrib1d = LoadGLFunction(load,
"glVertexAttrib1d"u8);
- contextPtr->glVertexAttrib1dv = (delegate*)load(
+ contextPtr->glVertexAttrib1dv = LoadGLFunction(load,
"glVertexAttrib1dv"u8);
- contextPtr->glVertexAttrib1f = (delegate*)load(
+ contextPtr->glVertexAttrib1f = LoadGLFunction(load,
"glVertexAttrib1f"u8);
- contextPtr->glVertexAttrib1fv = (delegate*)load(
+ contextPtr->glVertexAttrib1fv = LoadGLFunction(load,
"glVertexAttrib1fv"u8);
- contextPtr->glVertexAttrib1s = (delegate*)load(
+ contextPtr->glVertexAttrib1s = LoadGLFunction(load,
"glVertexAttrib1s"u8);
- contextPtr->glVertexAttrib1sv = (delegate*)load(
+ contextPtr->glVertexAttrib1sv = LoadGLFunction(load,
"glVertexAttrib1sv"u8);
- contextPtr->glVertexAttrib2d = (delegate*)load(
+ contextPtr->glVertexAttrib2d = LoadGLFunction(load,
"glVertexAttrib2d"u8);
- contextPtr->glVertexAttrib2dv = (delegate*)load(
+ contextPtr->glVertexAttrib2dv = LoadGLFunction(load,
"glVertexAttrib2dv"u8);
- contextPtr->glVertexAttrib2f = (delegate*)load(
+ contextPtr->glVertexAttrib2f = LoadGLFunction(load,
"glVertexAttrib2f"u8);
- contextPtr->glVertexAttrib2fv = (delegate*)load(
+ contextPtr->glVertexAttrib2fv = LoadGLFunction(load,
"glVertexAttrib2fv"u8);
- contextPtr->glVertexAttrib2s = (delegate*)load(
+ contextPtr->glVertexAttrib2s = LoadGLFunction(load,
"glVertexAttrib2s"u8);
- contextPtr->glVertexAttrib2sv = (delegate*)load(
+ contextPtr->glVertexAttrib2sv = LoadGLFunction(load,
"glVertexAttrib2sv"u8);
- contextPtr->glVertexAttrib3d = (delegate*)load(
+ contextPtr->glVertexAttrib3d = LoadGLFunction(load,
"glVertexAttrib3d"u8);
- contextPtr->glVertexAttrib3dv = (delegate*)load(
+ contextPtr->glVertexAttrib3dv = LoadGLFunction(load,
"glVertexAttrib3dv"u8);
- contextPtr->glVertexAttrib3f = (delegate*)load(
+ contextPtr->glVertexAttrib3f = LoadGLFunction(load,
"glVertexAttrib3f"u8);
- contextPtr->glVertexAttrib3fv = (delegate*)load(
+ contextPtr->glVertexAttrib3fv = LoadGLFunction(load,
"glVertexAttrib3fv"u8);
- contextPtr->glVertexAttrib3s = (delegate*)load(
+ contextPtr->glVertexAttrib3s = LoadGLFunction(load,
"glVertexAttrib3s"u8);
- contextPtr->glVertexAttrib3sv = (delegate*)load(
+ contextPtr->glVertexAttrib3sv = LoadGLFunction(load,
"glVertexAttrib3sv"u8);
- contextPtr->glVertexAttrib4Nbv = (delegate*)load(
+ contextPtr->glVertexAttrib4Nbv = LoadGLFunction(load,
"glVertexAttrib4Nbv"u8);
- contextPtr->glVertexAttrib4Niv = (delegate*)load(
+ contextPtr->glVertexAttrib4Niv = LoadGLFunction(load,
"glVertexAttrib4Niv"u8);
- contextPtr->glVertexAttrib4Nsv = (delegate*)load(
+ contextPtr->glVertexAttrib4Nsv = LoadGLFunction(load,
"glVertexAttrib4Nsv"u8);
- contextPtr->glVertexAttrib4Nub = (delegate*)load(
+ contextPtr->glVertexAttrib4Nub = LoadGLFunction(load,
"glVertexAttrib4Nub"u8);
- contextPtr->glVertexAttrib4Nubv = (delegate*)load(
+ contextPtr->glVertexAttrib4Nubv = LoadGLFunction(load,
"glVertexAttrib4Nubv"u8);
- contextPtr->glVertexAttrib4Nuiv = (delegate*)load(
+ contextPtr->glVertexAttrib4Nuiv = LoadGLFunction(load,
"glVertexAttrib4Nuiv"u8);
- contextPtr->glVertexAttrib4Nusv = (delegate*