using System;
using System.Diagnostics;
#if !MINIMAL
using System.Drawing;
using System.Numerics;
#endif
using System.Runtime.InteropServices;
using StgSharp.Math;
using StgSharp.Graphic.GL;
namespace StgSharp.Graphic.OpenGL
{
///
/// OpenGL bindings for .NET, implementing the full OpenGL API, including extensions.
///
///
///
/// This class contains all OpenGL enums and functions defined in the latest OpenGL specification.
/// The official .spec files can be found at: http://opengl.org/registry/.
///
/// A valid OpenGL context must be created before calling any OpenGL function.
///
/// Use the GLLib.Load and GLLib.LoadAll methods to prepare function entry points prior to use. To maintain
/// cross-platform compatibility, this must be done for both core and extension functions. The GameWindow
/// and the GLControl class will take care of this automatically.
///
///
/// You can use the GLLib.SupportsExtension method to check whether any given category of extension functions
/// exists in the current OpenGL context. Keep in mind that different OpenGL contexts may support different
/// extensions, and under different entry points. Always check if all required extensions are still supported
/// when changing visuals or pixel formats.
///
///
/// You may retrieve the entry point for an OpenGL function using the GLLib.GetDelegate method.
///
///
///
public sealed partial class GLLib : BindingsBase
{
internal const string Library = "opengl32.dll";
private static IntPtr[] EntryPoints;
private static string[] EntryPointNames;
///
/// Loads all the available bindings for the current context.
///
/// The context used to query the available bindings.
///
/// Loads all available entry points for the current OpenGL context.
///
public static void LoadBindings(IBindingsContext context)
{
Debug.Print("Loading entry points for {0}", typeof(GLLib).FullName);
if (context == null)
{
throw new ArgumentNullException(nameof(context));
}
for (int i = 0; i < EntryPoints.Length; i++)
{
EntryPoints[i] = context.GetProcAddress(EntryPointNames[i]);
}
}
///
/// [requires: v1.0][deprecated: v3.2]
/// Set the RGB values of the current color.
///
/// The color to set.
public static void Color3(Color color)
{
GLLib.Color3(color.R, color.G, color.B);
}
///
/// [requires: v1.0][deprecated: v3.2]
/// Set the current color.
///
/// The color to set.
public static void Color4(Color color)
{
GLLib.Color4(color.R, color.G, color.B, color.A);
}
///
/// [requires: v1.0][deprecated: v3.2]
/// Set the RGB values of the current color.
///
/// The color to set.
public static void Color3(vec3d color)
{
GLLib.Color3(color.X, color.Y, color.Z);
}
///
/// [requires: v1.0][deprecated: v3.2]
/// Set the current color.
///
/// The color to set.
public static void Color4(vec4d color)
{
GLLib.Color4(color.X, color.Y, color.Z, color.W);
}
///
/// [requires: v1.0][deprecated: v3.2]
/// Set the current color.
///
/// The color to set.
public static void Color4(Color4 color)
{
GLLib.Color4(color.R, color.G, color.B, color.A);
}
///
/// [requires: v1.0]
/// Specify clear values for the color buffers.
///
/// The color to set as the clear value.
public static void ClearColor(Color color)
{
GLLib.ClearColor(color.R / 255.0f, color.G / 255.0f, color.B / 255.0f, color.A / 255.0f);
}
///
/// [requires: v1.0]
/// Specify clear values for the color buffers.
///
/// The color to set as the clear value.
public static void ClearColor(Color4 color)
{
GLLib.ClearColor(color.R, color.G, color.B, color.A);
}
///
/// [requires: v1.4 or ARB_imaging|VERSION_1_4]
/// Set the blend color.
///
/// The blend color to set.
public static void BlendColor(Color color)
{
GLLib.BlendColor(color.R / 255.0f, color.G / 255.0f, color.B / 255.0f, color.A / 255.0f);
}
///
/// [requires: v1.4 or ARB_imaging|VERSION_1_4]
/// Set the blend color.
///
/// The blend color to set.
public static void BlendColor(Color4 color)
{
GLLib.BlendColor(color.R, color.G, color.B, color.A);
}
///
/// [requires: v1.0][deprecated: v3.2]
/// Specify material parameters for the lighting model.
///
///
/// Specifies which face or faces are being updated. Must be one of Front, Back, or FrontAndBack.
///
///
/// Specifies the single-valued material parameter of the face or faces that is being updated. Must be Shininess.
///
/// [length: pname]
/// Specifies the value that parameter Shininess will be set to.
///
public static void Material(MaterialFace face, MaterialParameter pname, vec4d @params)
{
unsafe { Material(face, pname, (float*)&@params.X); }
}
///
/// [requires: v1.0][deprecated: v3.2]
/// Specify material parameters for the lighting model.
///
///
/// Specifies which face or faces are being updated. Must be one of Front, Back, or FrontAndBack.
///
///
/// Specifies the single-valued material parameter of the face or faces that is being updated. Must be Shininess.
///
/// [length: pname]
/// Specifies the value that parameter Shininess will be set to.
///
public static void Material(MaterialFace face, MaterialParameter pname, Color4 @params)
{
unsafe { GLLib.Material(face, pname, (float*)&@params); }
}
/// [requires: v1.0][deprecated: v3.2]
/// Set light source parameters
///
///
/// Specifies a light. The number of lights depends on the implementation, but at least eight lights are supported. They are identified by symbolic names of the form Light , where i ranges from 0 to the value of MaxLights - 1.
///
///
/// Specifies a single-valued light source parameter for light. SpotExponent, SpotCutoff, ConstantAttenuation, LinearAttenuation, and QuadraticAttenuation are accepted.
///
/// [length: pname]
/// Specifies the value that parameter pname of light source light will be set to.
///
public static void Light(LightName name, LightParameter pname, vec4d @params)
{
unsafe { GLLib.Light(name, pname, (float*)&@params.X); }
}
/// [requires: v1.0][deprecated: v3.2]
/// Set light source parameters
///
///
/// Specifies a light. The number of lights depends on the implementation, but at least eight lights are supported. They are identified by symbolic names of the form Light , where i ranges from 0 to the value of MaxLights - 1.
///
///
/// Specifies a single-valued light source parameter for light. SpotExponent, SpotCutoff, ConstantAttenuation, LinearAttenuation, and QuadraticAttenuation are accepted.
///
/// [length: pname]
/// Specifies the value that parameter pname of light source light will be set to.
///
public static void Light(LightName name, LightParameter pname, Color4 @params)
{
unsafe { GLLib.Light(name, pname, (float*)&@params); }
}
///
/// [requires: v1.0][deprecated: v3.2]
/// Set the current normal vector.
///
///
/// Specify the x, y, and z coordinates of the new current normal. The initial value of the current normal is the unit vector, (0, 0, 1).
///
public static void Normal3(vec3d normal)
{
GLLib.Normal3(normal.X, normal.Y, normal.Z);
}
///
/// [requires: v1.0][deprecated: v3.2]
/// Specify the raster position for pixel operations.
///
///
/// Specify the x and y object coordinates (if present) for the raster position.
///
public static void RasterPos2(vec2d pos)
{
GLLib.RasterPos2(pos.X, pos.Y);
}
///
/// [requires: v1.0][deprecated: v3.2]
/// Specify the raster position for pixel operations.
///
///
/// Specify the x, y, and z object coordinates (if present) for the raster position.
///
public static void RasterPos3(vec3d pos)
{
GLLib.RasterPos3(pos.X, pos.Y, pos.Z);
}
///
/// [requires: v1.0][deprecated: v3.2]
/// Specify the raster position for pixel operations.
///
///
/// Specify the x, y, z, and w object coordinates (if present) for the raster position.
///
public static void RasterPos4(vec4d pos)
{
GLLib.RasterPos4(pos.X, pos.Y, pos.Z, pos.W);
}
///
/// [requires: v1.0][deprecated: v3.2]
/// Specify a vertex.
///
///
/// Specifies the x and y coordinates of a vertex.
///
public static void Vertex2(vec2d v)
{
GLLib.Vertex2(v.X, v.Y);
}
///
/// [requires: v1.0][deprecated: v3.2]
/// Specify a vertex.
///
///
/// Specifies the x, y and z coordinates of a vertex.
///
public static void Vertex3(vec3d v)
{
GLLib.Vertex3(v.X, v.Y, v.Z);
}
///
/// [requires: v1.0][deprecated: v3.2]
/// Specify a vertex.
///
///
/// Specifies the x, y, z and w coordinates of a vertex.
///
public static void Vertex4(vec4d v)
{
GLLib.Vertex4(v.X, v.Y, v.Z, v.W);
}
///
/// [requires: v1.0][deprecated: v3.2]
/// Set the current texture coordinates.
///
///
/// Specifies the s and t texture coordinates.
///
public static void TexCoord2(vec2d v)
{
GLLib.TexCoord2(v.X, v.Y);
}
///
/// [requires: v1.0][deprecated: v3.2]
/// Set the current texture coordinates.
///
///
/// Specifies the s, t and r texture coordinates.
///
public static void TexCoord3(vec3d v)
{
GLLib.TexCoord3(v.X, v.Y, v.Z);
}
///
/// [requires: v1.0][deprecated: v3.2]
/// Set the current texture coordinates.
///
///
/// Specifies the s, t, r and q texture coordinates.
///
public static void TexCoord4(vec4d v)
{
GLLib.TexCoord4(v.X, v.Y, v.Z, v.W);
}
///
/// [requires: v1.0][deprecated: v3.2]
/// Multiply the current matrix by a rotation matrix.
///
///
/// Specifies the angle of rotation, in degrees.
///
///
/// Specifies the axis of rotation.
///
public static void Rotate(Single angle, vec3d axis)
{
GLLib.Rotate((Single)angle, axis.X, axis.Y, axis.Z);
}
///
/// [requires: v1.0][deprecated: v3.2]
/// Multiply the current matrix by a general scaling matrix.
///
///
/// Specifies scale factors along the x, y, and z axes.
///
public static void Scale(vec3d scale)
{
GLLib.Scale(scale.X, scale.Y, scale.Z);
}
///
/// [requires: v1.0][deprecated: v3.2]
/// Multiply the current matrix by a translation matrix.
///
///
/// Specifies the x, y, and z coordinates with which to translate.
///
public static void Translate(vec3d trans)
{
GLLib.Translate(trans.X, trans.Y, trans.Z);
}
///
/// [requires: v1.0][deprecated: v3.2]
/// Multiply the current matrix with the specified matrix.
///
///
/// The matrix to multiply the current one with.
///
public static void MultMatrix(ref matrix4x4 mat)
{
unsafe
{
fixed (Single* m_ptr = &mat.row0.X)
{
GLLib.MultMatrix((Single*)m_ptr);
}
}
}
/// [requires: v1.0][deprecated: v3.2]
/// Replace the current matrix with the specified matrix
///
///
/// The matrix to replace the current one with.
///
public static void LoadMatrix(ref matrix4x4 mat)
{
unsafe
{
fixed (Single* m_ptr = &mat.Row0.X)
{
GLLib.LoadMatrix((Single*)m_ptr);
}
}
}
///
/// [requires: v1.3][deprecated: v3.2]
/// Replace the current matrix with the specified row-major ordered matrix.
///
///
/// The matrix to replace the current one with.
///
public static void LoadTransposeMatrix(ref matrix4x4 mat)
{
unsafe
{
fixed (Single* m_ptr = &mat.Row0.X)
{
GLLib.LoadTransposeMatrix((Single*)m_ptr);
}
}
}
///
/// [requires: v1.3][deprecated: v3.2]
/// Multiply the current matrix with the specified row-major ordered matrix
///
///
/// The matrix to multiply the current one with.
///
public static void MultTransposeMatrix(ref Matrix4 mat)
{
unsafe
{
fixed (Single* m_ptr = &mat.Row0.X)
{
GLLib.MultTransposeMatrix((Single*)m_ptr);
}
}
}
/*
///
/// [requires: v1.0][deprecated: v3.2]
/// Set the current normal vector.
///
///
/// Specify the x, y, and z coordinates of the new current normal. The initial value of the current normal is the unit vector, (0, 0, 1).
///
public static void Normal3(Vector3d normal)
{
GLLib.Normal3(normal.X, normal.Y, normal.Z);
}
///
/// [requires: v1.0][deprecated: v3.2]
/// Specify the raster position for pixel operations.
///
///
/// Specify the x and y object coordinates (if present) for the raster position.
///
public static void RasterPos2(vec2d pos)
{
GLLib.RasterPos2(pos.X, pos.Y);
}
*/
/*
///
/// [requires: v1.0][deprecated: v3.2]
/// Specify the raster position for pixel operations.
///
///
/// Specify the x, y and z object coordinates (if present) for the raster position.
///
public static void RasterPos3(Vector3d pos)
{
GLLib.RasterPos3(pos.X, pos.Y, pos.Z);
}
*/
/*
///
/// [requires: v1.0][deprecated: v3.2]
/// Specify the raster position for pixel operations.
///
///
/// Specify the x, y, z and w object coordinates (if present) for the raster position.
///
public static void RasterPos4(Vector4d pos)
{
GLLib.RasterPos4(pos.X, pos.Y, pos.Z, pos.W);
}
*/
/*
///
/// [requires: v1.0][deprecated: v3.2]
/// Specify a vertex.
///
///
/// Specifies the x and y coordinates of a vertex.
///
public static void Vertex2(vec2d v)
{
GLLib.Vertex2(v.X, v.Y);
}
*/
/*
///
/// [requires: v1.0][deprecated: v3.2]
/// Specify a vertex.
///
///
/// Specifies the x, y and z coordinates of a vertex.
///
public static void Vertex3(Vector3d v)
{
GLLib.Vertex3(v.X, v.Y, v.Z);
}
*/
/*
///
/// [requires: v1.0][deprecated: v3.2]
/// Specify a vertex.
///
///
/// Specifies the x, y, z and w coordinates of a vertex.
///
public static void Vertex4(Vector4d v)
{
GLLib.Vertex4(v.X, v.Y, v.Z, v.W);
}
*/
/*
///
/// [requires: v1.0][deprecated: v3.2]
/// Set the current texture coordinates.
///
///
/// Specifies the s and t texture coordinates.
///
public static void TexCoord2(vec2d v)
{
GLLib.TexCoord2(v.X, v.Y);
}
*/
/*
///
/// [requires: v1.0][deprecated: v3.2]
/// Set the current texture coordinates.
///
///
/// Specifies the s, t and r texture coordinates.
///
public static void TexCoord3(Vector3d v)
{
GLLib.TexCoord3(v.X, v.Y, v.Z);
}
*/
/*
///
/// [requires: v1.0][deprecated: v3.2]
/// Set the current texture coordinates.
///
///
/// Specifies the s, t, r and q texture coordinates.
///
public static void TexCoord4(Vector4d v)
{
GLLib.TexCoord4(v.X, v.Y, v.Z, v.W);
}
*/
/*
///
/// [requires: v1.0][deprecated: v3.2]
/// Multiply the current matrix by a rotation matrix.
///
///
/// Specifies the angle of rotation, in degrees.
///
///
/// Specifies the axis of rotation.
///
public static void Rotate(double angle, Vector3d axis)
{
GLLib.Rotate((double)angle, axis.X, axis.Y, axis.Z);
}
*/
/*
///
/// [requires: v1.0][deprecated: v3.2]
/// Multiply the current matrix by a general scaling matrix.
///
///
/// Specifies scale factors along the x, y, and z axes.
///
public static void Scale(Vector3d scale)
{
GLLib.Scale(scale.X, scale.Y, scale.Z);
}
*/
/*
///
/// [requires: v1.0][deprecated: v3.2]
/// Multiply the current matrix by a translation matrix.
///
///
/// Specifies the x, y, and z coordinates with which to translate.
///
public static void Translate(Vector3d trans)
{
GLLib.Translate(trans.X, trans.Y, trans.Z);
}
*/
/*
///
/// [requires: v1.0][deprecated: v3.2]
/// Multiply the current matrix with the specified matrix.
///
///
/// The matrix to multiply the current one with.
///
public static void MultMatrix(ref Matrix4d mat)
{
unsafe
{
fixed (Double* m_ptr = &mat.Row0.X)
{
GLLib.MultMatrix((Double*)m_ptr);
}
}
}
*/
/*
/// [requires: v1.0][deprecated: v3.2]
/// Replace the current matrix with the specified matrix
///
///
/// The matrix to replace the current one with.
///
public static void LoadMatrix(ref Matrix4d mat)
{
unsafe
{
fixed (Double* m_ptr = &mat.Row0.X)
{
GLLib.LoadMatrix((Double*)m_ptr);
}
}
}
*/
/*
///
/// [requires: v1.3][deprecated: v3.2]
/// Replace the current matrix with the specified row-major ordered matrix.
///
///
/// The matrix to replace the current one with.
///
public static void LoadTransposeMatrix(ref Matrix4d mat)
{
unsafe
{
fixed (Double* m_ptr = &mat.Row0.X)
{
GLLib.LoadTransposeMatrix((Double*)m_ptr);
}
}
}
*/
/*
///
/// [requires: v1.3][deprecated: v3.2]
/// Multiply the current matrix with the specified row-major ordered matrix
///
///
/// The matrix to multiply the current one with.
///
public static void MultTransposeMatrix(ref Matrix4d mat)
{
unsafe
{
fixed (Double* m_ptr = &mat.Row0.X)
{
GLLib.MultTransposeMatrix((Double*)m_ptr);
}
}
}
*/
///
/// [requires: v2.0]
/// Specify the value of a uniform variable for the current program object.
///
///
/// Specifies the location of the uniform variable to be modified.
///
///
/// Specifies the new vector to be used for the specified uniform variable.
///
public static void Uniform2(int location, ref vec2d vector)
{
GLLib.Uniform2(location, vector.X, vector.Y);
}
///
/// [requires: v2.0]
/// Specify the value of a uniform variable for the current program object.
///
///
/// Specifies the location of the uniform variable to be modified.
///
///
/// Specifies the new vector to be used for the specified uniform variable.
///
public static void Uniform3(int location, ref vec3d vector)
{
GLLib.Uniform3(location, vector.X, vector.Y, vector.Z);
}
///
/// [requires: v2.0]
/// Specify the value of a uniform variable for the current program object.
///
///
/// Specifies the location of the uniform variable to be modified.
///
///
/// Specifies the new vector to be used for the specified uniform variable.
///
public static void Uniform4(int location, ref vec4d vector)
{
GLLib.Uniform4(location, vector.X, vector.Y, vector.Z, vector.W);
}
///
/// [requires: v2.0]
/// Specify the value of a uniform variable for the current program object.
///
///
/// Specifies the location of the uniform variable to be modified.
///
///
/// Specifies the new vector to be used for the specified uniform variable.
///
public static void Uniform2(int location, vec2d vector)
{
GLLib.Uniform2(location, vector.X, vector.Y);
}
///
/// [requires: v2.0]
/// Specify the value of a uniform variable for the current program object.
///
///
/// Specifies the location of the uniform variable to be modified.
///
///
/// Specifies the new vector to be used for the specified uniform variable.
///
public static void Uniform3(int location, vec3d vector)
{
GLLib.Uniform3(location, vector.X, vector.Y, vector.Z);
}
///
/// [requires: v2.0]
/// Specify the value of a uniform variable for the current program object.
///
///
/// Specifies the location of the uniform variable to be modified.
///
///
/// Specifies the new vector to be used for the specified uniform variable.
///
public static void Uniform4(int location, vec4d vector)
{
GLLib.Uniform4(location, vector.X, vector.Y, vector.Z, vector.W);
}
///
/// [requires: v2.0]
/// Specify the value of a uniform variable for the current program object.
///
///
/// Specifies the location of the uniform variable to be modified.
///
///
/// Specifies the new vector to be used for the specified uniform variable.
///
public static void Uniform2(int location, ref vec2dInt vector)
{
GLLib.Uniform2(location, vector.X, vector.Y);
}
///
/// [requires: v2.0]
/// Specify the value of a uniform variable for the current program object.
///
///
/// Specifies the location of the uniform variable to be modified.
///
///
/// Specifies the new vector to be used for the specified uniform variable.
///
public static void Uniform3(int location, ref vec3dInt vector)
{
GLLib.Uniform3(location, vector.X, vector.Y, vector.Z);
}
///
/// [requires: v2.0]
/// Specify the value of a uniform variable for the current program object.
///
///
/// Specifies the location of the uniform variable to be modified.
///
///
/// Specifies the new vector to be used for the specified uniform variable.
///
public static void Uniform4(int location, ref vec4dInt vector)
{
GLLib.Uniform4(location, vector.X, vector.Y, vector.Z, vector.W);
}
///
/// [requires: v2.0]
/// Specify the value of a uniform variable for the current program object.
///
///
/// Specifies the location of the uniform variable to be modified.
///
///
/// Specifies the new vector to be used for the specified uniform variable.
///
public static void Uniform2(int location, vec2dInt vector)
{
GLLib.Uniform2(location, vector.X, vector.Y);
}
///
/// [requires: v2.0]
/// Specify the value of a uniform variable for the current program object.
///
///
/// Specifies the location of the uniform variable to be modified.
///
///
/// Specifies the new vector to be used for the specified uniform variable.
///
public static void Uniform3(int location, vec3dInt vector)
{
GLLib.Uniform3(location, vector.X, vector.Y, vector.Z);
}
///
/// [requires: v2.0]
/// Specify the value of a uniform variable for the current program object.
///
///
/// Specifies the location of the uniform variable to be modified.
///
///
/// Specifies the new vector to be used for the specified uniform variable.
///
public static void Uniform4(int location, vec4dInt vector)
{
GLLib.Uniform4(location, vector.X, vector.Y, vector.Z, vector.W);
}
///
/// [requires: v2.0]
/// Specify the value of a uniform variable for the current program object.
/// In shader code, this is represented as a .
///
///
/// Specifies the location of the uniform variable to be modified.
///
///
/// Specifies the new vector to be used for the specified uniform variable.
///
public static void Uniform4(int location, Color4 color)
{
GLLib.Uniform4(location, color.R, color.G, color.B, color.A);
}
///
/// [requires: v2.0]
/// Specify the value of a uniform variable for the current program object.
/// In shader code, this is represented as a .
///
///
/// Specifies the location of the uniform variable to be modified.
///
///
/// Specifies the new vector to be used for the specified uniform variable.
///
public static void Uniform4(int location, Quaternion quaternion)
{
GLLib.Uniform4(location, quaternion.X, quaternion.Y, quaternion.Z, quaternion.W);
}
///
/// [requires: v2.0]
/// Specify the value of a uniform variable for the current program object.
///
///
/// Specifies the location of the uniform variable to be modified.
///
///
/// Whether or not the matrix should be transposed.
///
/// Specifies the new vector to be used for the specified uniform variable.
///
public static void UniformMatrix2(int location, bool transpose, ref matrix2x2 matrix)
{
unsafe
{
fixed (float* matrix_ptr = &matrix.row0.X)
{
GLLib.UniformMatrix2(location, 1, transpose, matrix_ptr);
}
}
}
/*
///
/// [requires: v4.0 or ARB_gpu_shader_fp64|VERSION_4_0]
/// Specify the value of a uniform variable for the current program object.
///
///
/// Specifies the location of the uniform variable to be modified.
///
///
/// Whether or not the matrix should be transposed.
///
/// Specifies the new vector to be used for the specified uniform variable.
///
public static void UniformMatrix2(int location, bool transpose, ref Matrix2d matrix)
{
unsafe
{
fixed (double* matrix_ptr = &matrix.Row0.X)
{
GLLib.UniformMatrix2(location, 1, transpose, matrix_ptr);
}
}
}
*/
///
/// [requires: v2.0]
/// Specify the value of a uniform variable for the current program object.
///
///
/// Specifies the location of the uniform variable to be modified.
///
///
/// Whether or not the matrix should be transposed.
///
/// Specifies the new vector to be used for the specified uniform variable.
///
public static void UniformMatrix2x3(int location, bool transpose, ref matrix2x3 matrix)
{
unsafe
{
fixed (float* matrix_ptr = &matrix.row0.X)
{
GLLib.UniformMatrix2x3(location, 1, transpose, matrix_ptr);
}
}
}
/*
///
/// [requires: v4.0 or ARB_gpu_shader_fp64|VERSION_4_0]
/// Specify the value of a uniform variable for the current program object.
///
///
/// Specifies the location of the uniform variable to be modified.
///
///
/// Whether or not the matrix should be transposed.
///
/// Specifies the new vector to be used for the specified uniform variable.
///
public static void UniformMatrix2x3(int location, bool transpose, ref Matridoublex2x3d matrix)
{
unsafe
{
fixed (double* matrix_ptr = &matrix.Row0.X)
{
GLLib.UniformMatrix2x3(location, 1, transpose, matrix_ptr);
}
}
}
*/
///
/// [requires: v2.1]
/// Specify the value of a uniform variable for the current program object.
///
///
/// Specifies the location of the uniform variable to be modified.
///
///
/// Whether or not the matrix should be transposed.
///
/// Specifies the new vector to be used for the specified uniform variable.
///
public static void UniformMatrix2x4(int location, bool transpose, ref matrix2x4 matrix)
{
unsafe
{
fixed (float* matrix_ptr = &matrix.row0.X)
{
GLLib.UniformMatrix2x4(location, 1, transpose, matrix_ptr);
}
}
}
/*
///
/// [requires: v4.0 or ARB_gpu_shader_fp64|VERSION_4_0]
/// Specify the value of a uniform variable for the current program object.
///
///
/// Specifies the location of the uniform variable to be modified.
///
///
/// Whether or not the matrix should be transposed.
///
/// Specifies the new vector to be used for the specified uniform variable.
///
public static void UniformMatrix2x4(int location, bool transpose, ref Matrix2x4d matrix)
{
unsafe
{
fixed (double* matrix_ptr = &matrix.Row0.X)
{
GLLib.UniformMatrix2x4(location, 1, transpose, matrix_ptr);
}
}
}
*/
///
/// [requires: v2.1]
/// Specify the value of a uniform variable for the current program object.
///
///
/// Specifies the location of the uniform variable to be modified.
///
///
/// Whether or not the matrix should be transposed.
///
/// Specifies the new vector to be used for the specified uniform variable.
///
public static void UniformMatrix3x2(int location, bool transpose, ref matrix3x2 matrix)
{
unsafe
{
fixed (float* matrix_ptr = &matrix.row0.X)
{
GLLib.UniformMatrix3x2(location, 1, transpose, matrix_ptr);
}
}
}
/*
///
/// [requires: v4.0 or ARB_gpu_shader_fp64|VERSION_4_0]
/// Specify the value of a uniform variable for the current program object.
///
///
/// Specifies the location of the uniform variable to be modified.
///
///
/// Whether or not the matrix should be transposed.
///
/// Specifies the new vector to be used for the specified uniform variable.
///
public static void UniformMatrix3x2(int location, bool transpose, ref Matrix3x2d matrix)
{
unsafe
{
fixed (double* matrix_ptr = &matrix.Row0.X)
{
GLLib.UniformMatrix3x2(location, 1, transpose, matrix_ptr);
}
}
}
*/
///
/// [requires: v2.0]
/// Specify the value of a uniform variable for the current program object.
///
///
/// Specifies the location of the uniform variable to be modified.
///
///
/// Whether or not the matrix should be transposed.
///
/// Specifies the new vector to be used for the specified uniform variable.
///
public static void UniformMatrix3(int location, bool transpose, ref matrix3x3 matrix)
{
unsafe
{
fixed (float* matrix_ptr = &matrix.row0.X)
{
GLLib.UniformMatrix3(location, 1, transpose, matrix_ptr);
}
}
}
/*
///
/// [requires: v4.0 or ARB_gpu_shader_fp64|VERSION_4_0]
/// Specify the value of a uniform variable for the current program object.
///
///
/// Specifies the location of the uniform variable to be modified.
///
///
/// Whether or not the matrix should be transposed.
///
/// Specifies the new vector to be used for the specified uniform variable.
///
public static void UniformMatrix3(int location, bool transpose, ref Matrix3d matrix)
{
unsafe
{
fixed (double* matrix_ptr = &matrix.Row0.X)
{
GLLib.UniformMatrix3(location, 1, transpose, matrix_ptr);
}
}
}
*/
///
/// [requires: v2.1]
/// Specify the value of a uniform variable for the current program object.
///
///
/// Specifies the location of the uniform variable to be modified.
///
///
/// Whether or not the matrix should be transposed.
///
/// Specifies the new vector to be used for the specified uniform variable.
///
public static void UniformMatrix3x4(int location, bool transpose, ref matrix3x4 matrix)
{
unsafe
{
fixed (float* matrix_ptr = &matrix.row0.X)
{
GLLib.UniformMatrix3x4(location, 1, transpose, matrix_ptr);
}
}
}
/*
///
/// [requires: v4.0 or ARB_gpu_shader_fp64|VERSION_4_0]
/// Specify the value of a uniform variable for the current program object.
///
///
/// Specifies the location of the uniform variable to be modified.
///
///
/// Whether or not the matrix should be transposed.
///
/// Specifies the new vector to be used for the specified uniform variable.
///
public static void UniformMatrix3x4(int location, bool transpose, ref Matrix3x4d matrix)
{
unsafe
{
fixed (double* matrix_ptr = &matrix.Row0.X)
{
GLLib.UniformMatrix3x4(location, 1, transpose, matrix_ptr);
}
}
}
*/
///
/// [requires: v2.1]
/// Specify the value of a uniform variable for the current program object.
///
///
/// Specifies the location of the uniform variable to be modified.
///
///
/// Whether or not the matrix should be transposed.
///
/// Specifies the new vector to be used for the specified uniform variable.
///
public static void UniformMatrix4x2(int location, bool transpose, ref matrix4x2 matrix)
{
unsafe
{
fixed (float* matrix_ptr = &matrix.row0.X)
{
GLLib.UniformMatrix4x2(location, 1, transpose, matrix_ptr);
}
}
}
/*
///
/// [requires: v4.0 or ARB_gpu_shader_fp64|VERSION_4_0]
/// Specify the value of a uniform variable for the current program object.
///
///
/// Specifies the location of the uniform variable to be modified.
///
///
/// Whether or not the matrix should be transposed.
///
/// Specifies the new vector to be used for the specified uniform variable.
///
public static void UniformMatrix4x2(int location, bool transpose, ref Matrix4x2d matrix)
{
unsafe
{
fixed (double* matrix_ptr = &matrix.Row0.X)
{
GLLib.UniformMatrix4x2(location, 1, transpose, matrix_ptr);
}
}
}
*/
///
/// [requires: v2.1]
/// Specify the value of a uniform variable for the current program object.
///
///
/// Specifies the location of the uniform variable to be modified.
///
///
/// Whether or not the matrix should be transposed.
///
/// Specifies the new vector to be used for the specified uniform variable.
///
public static void UniformMatrix4x3(int location, bool transpose, ref matrix4x3 matrix)
{
unsafe
{
fixed (float* matrix_ptr = &matrix.row0.X)
{
GLLib.UniformMatrix4x3(location, 1, transpose, matrix_ptr);
}
}
}
/*
///
/// [requires: v4.0 or ARB_gpu_shader_fp64|VERSION_4_0]
/// Specify the value of a uniform variable for the current program object.
///
///
/// Specifies the location of the uniform variable to be modified.
///
///
/// Whether or not the matrix should be transposed.
///
/// Specifies the new vector to be used for the specified uniform variable.
///
public static void UniformMatrix4x3(int location, bool transpose, ref Matrix4x3d matrix)
{
unsafe
{
fixed (double* matrix_ptr = &matrix.Row0.X)
{
GLLib.UniformMatrix4x3(location, 1, transpose, matrix_ptr);
}
}
}
*/
///
/// [requires: v2.0]
/// Specify the value of a uniform variable for the current program object.
///
///
/// Specifies the location of the uniform variable to be modified.
///
///
/// Whether or not the matrix should be transposed.
///
/// Specifies the new vector to be used for the specified uniform variable.
///
public static void UniformMatrix4(int location, bool transpose, ref matrix4x4 matrix)
{
unsafe
{
fixed (float* matrix_ptr = &matrix.row0.X)
{
GLLib.UniformMatrix4(location, 1, transpose, matrix_ptr);
}
}
}
/*
///
/// [requires: v4.0 or ARB_gpu_shader_fp64|VERSION_4_0]
/// Specify the value of a uniform variable for the current program object.
///
///
/// Specifies the location of the uniform variable to be modified.
///
///
/// Whether or not the matrix should be transposed.
///
/// Specifies the new vector to be used for the specified uniform variable.
///
public static void UniformMatrix4(int location, bool transpose, ref Matrix4d matrix)
{
unsafe
{
fixed (double* matrix_ptr = &matrix.Row0.X)
{
GLLib.UniformMatrix4(location, 1, transpose, matrix_ptr);
}
}
}
*/
///
/// [requires: v4.1 or ARB_separate_shader_objects|VERSION_4_1]
/// Specify the value of a uniform variable for the specified program object.
///
///
/// Specifies the handle of the program containing the uniform variable to be modified.
///
///
/// Specifies the location of the uniform variable to be modified.
///
///
/// Specifies the new vector to be used for the specified uniform variable.
///
public static void ProgramUniform2(int program, int location, ref vec2d vector)
{
GLLib.ProgramUniform2(program, location, vector.X, vector.Y);
}
///
/// [requires: v4.1 or ARB_separate_shader_objects|VERSION_4_1]
/// Specify the value of a uniform variable for the specified program object.
///
///
/// Specifies the handle of the program containing the uniform variable to be modified.
///
///
/// Specifies the location of the uniform variable to be modified.
///
///
/// Specifies the new vector to be used for the specified uniform variable.
///
public static void ProgramUniform3(int program, int location, ref vec3d vector)
{
GLLib.ProgramUniform3(program, location, vector.X, vector.Y, vector.Z);
}
///
/// [requires: v4.1 or ARB_separate_shader_objects|VERSION_4_1]
/// Specify the value of a uniform variable for the specified program object.
///
///
/// Specifies the handle of the program containing the uniform variable to be modified.
///
///
/// Specifies the location of the uniform variable to be modified.
///
///
/// Specifies the new vector to be used for the specified uniform variable.
///
public static void ProgramUniform4(int program, int location, ref vec4d vector)
{
GLLib.ProgramUniform4(program, location, vector.X, vector.Y, vector.Z, vector.W);
}
///
/// [requires: v4.1 or ARB_separate_shader_objects|VERSION_4_1]
/// Specify the value of a uniform variable for the specified program object.
///
///
/// Specifies the handle of the program containing the uniform variable to be modified.
///
///
/// Specifies the location of the uniform variable to be modified.
///
///
/// Specifies the new vector to be used for the specified uniform variable.
///
public static void ProgramUniform2(int program, int location, vec2d vector)
{
GLLib.ProgramUniform2(program, location, vector.X, vector.Y);
}
///
/// [requires: v4.1 or ARB_separate_shader_objects|VERSION_4_1]
/// Specify the value of a uniform variable for the specified program object.
///
///
/// Specifies the handle of the program containing the uniform variable to be modified.
///
///
/// Specifies the location of the uniform variable to be modified.
///
///
/// Specifies the new vector to be used for the specified uniform variable.
///
public static void ProgramUniform3(int program, int location, vec3d vector)
{
GLLib.ProgramUniform3(program, location, vector.X, vector.Y, vector.Z);
}
///
/// [requires: v4.1 or ARB_separate_shader_objects|VERSION_4_1]
/// Specify the value of a uniform variable for the specified program object.
///
///
/// Specifies the handle of the program containing the uniform variable to be modified.
///
///
/// Specifies the location of the uniform variable to be modified.
///
///
/// Specifies the new vector to be used for the specified uniform variable.
///
public static void ProgramUniform4(int program, int location, vec4d vector)
{
GLLib.ProgramUniform4(program, location, vector.X, vector.Y, vector.Z, vector.W);
}
///
/// [requires: v4.1 or ARB_separate_shader_objects|VERSION_4_1]
/// Specify the value of a uniform variable for the specified program object.
///
///
/// Specifies the handle of the program containing the uniform variable to be modified.
///
///
/// Specifies the location of the uniform variable to be modified.
///
///
/// Specifies the new vector to be used for the specified uniform variable.
///
public static void ProgramUniform2(int program, int location, ref vec2dInt vector)
{
GLLib.ProgramUniform2(program, location, vector.X, vector.Y);
}
///
/// [requires: v4.1 or ARB_separate_shader_objects|VERSION_4_1]
/// Specify the value of a uniform variable for the specified program object.
///
///
/// Specifies the handle of the program containing the uniform variable to be modified.
///
///
/// Specifies the location of the uniform variable to be modified.
///
///
/// Specifies the new vector to be used for the specified uniform variable.
///
public static void ProgramUniform3(int program, int location, ref vec3dInt vector)
{
GLLib.ProgramUniform3(program, location, vector.X, vector.Y, vector.Z);
}
///
/// [requires: v4.1 or ARB_separate_shader_objects|VERSION_4_1]
/// Specify the value of a uniform variable for the specified program object.
///
///
/// Specifies the handle of the program containing the uniform variable to be modified.
///
///
/// Specifies the location of the uniform variable to be modified.
///
///
/// Specifies the new vector to be used for the specified uniform variable.
///
public static void ProgramUniform4(int program, int location, ref vec4dInt vector)
{
GLLib.ProgramUniform4(program, location, vector.X, vector.Y, vector.Z, vector.W);
}
///
/// [requires: v4.1 or ARB_separate_shader_objects|VERSION_4_1]
/// Specify the value of a uniform variable for the specified program object.
///
///
/// Specifies the handle of the program containing the uniform variable to be modified.
///
///
/// Specifies the location of the uniform variable to be modified.
///
///
/// Specifies the new vector to be used for the specified uniform variable.
///
public static void ProgramUniform2(int program, int location, vec2dInt vector)
{
GLLib.ProgramUniform2(program, location, vector.X, vector.Y);
}
///
/// [requires: v4.1 or ARB_separate_shader_objects|VERSION_4_1]
/// Specify the value of a uniform variable for the specified program object.
///
///
/// Specifies the handle of the program containing the uniform variable to be modified.
///
///
/// Specifies the location of the uniform variable to be modified.
///
///
/// Specifies the new vector to be used for the specified uniform variable.
///
public static void ProgramUniform3(int program, int location, vec3dInt vector)
{
GLLib.ProgramUniform3(program, location, vector.X, vector.Y, vector.Z);
}
///
/// [requires: v4.1 or ARB_separate_shader_objects|VERSION_4_1]
/// Specify the value of a uniform variable for the specified program object.
///
///
/// Specifies the handle of the program containing the uniform variable to be modified.
///
///
/// Specifies the location of the uniform variable to be modified.
///
///
/// Specifies the new vector to be used for the specified uniform variable.
///
public static void ProgramUniform4(int program, int location, vec4dInt vector)
{
GLLib.ProgramUniform4(program, location, vector.X, vector.Y, vector.Z, vector.W);
}
///
/// [requires: v4.1 or ARB_separate_shader_objects|VERSION_4_1]
/// Specify the value of a uniform variable for the specified program object.
/// In shader code, this is represented as a .
///
///
/// Specifies the handle of the program containing the uniform variable to be modified.
///
///
/// Specifies the location of the uniform variable to be modified.
///
///
/// Specifies the new vector to be used for the specified uniform variable.
///
public static void ProgramUniform4(int program, int location, Color4 color)
{
GLLib.ProgramUniform4(program, location, color.R, color.G, color.B, color.A);
}
///
/// [requires: v4.1 or ARB_separate_shader_objects|VERSION_4_1]
/// Specify the value of a uniform variable for the specified program object.
/// In shader code, this is represented as a .
///
///
/// Specifies the handle of the program containing the uniform variable to be modified.
///
///
/// Specifies the location of the uniform variable to be modified.
///
///
/// Specifies the new vector to be used for the specified uniform variable.
///
public static void ProgramUniform4(int program, int location, Quaternion quaternion)
{
GLLib.ProgramUniform4(program, location, quaternion.X, quaternion.Y, quaternion.Z, quaternion.W);
}
///
/// [requires: v4.1 or ARB_separate_shader_objects|VERSION_4_1]
/// Specify the value of a uniform variable for the current program object.
///
///
/// Specifies the handle of the program containing the uniform variable to be modified.
///
///
/// Specifies the location of the uniform variable to be modified.
///
///
/// Whether or not the matrix should be transposed.
///
/// Specifies the new vector to be used for the specified uniform variable.
///
public static void ProgramUniformMatrix2(int program, int location, bool transpose, ref matrix2x2 matrix)
{
unsafe
{
fixed (float* matrix_ptr = &matrix.row0.X)
{
GLLib.ProgramUniformMatrix2(program, location, 1, transpose, matrix_ptr);
}
}
}
/*
///
/// [requires: v4.1 or ARB_separate_shader_objects|VERSION_4_1]
/// Specify the value of a uniform variable for the current program object.
///
///
/// Specifies the handle of the program containing the uniform variable to be modified.
///
///
/// Specifies the location of the uniform variable to be modified.
///
///
/// Whether or not the matrix should be transposed.
///
/// Specifies the new vector to be used for the specified uniform variable.
///
public static void ProgramUniformMatrix2(int program, int location, bool transpose, ref Matrix2d matrix)
{
unsafe
{
fixed (double* matrix_ptr = &matrix.Row0.X)
{
GLLib.ProgramUniformMatrix2(program, location, 1, transpose, matrix_ptr);
}
}
}
*/
///
/// [requires: v4.1 or ARB_separate_shader_objects|VERSION_4_1]
/// Specify the value of a uniform variable for the current program object.
///
///
/// Specifies the handle of the program containing the uniform variable to be modified.
///
///
/// Specifies the location of the uniform variable to be modified.
///
///
/// Whether or not the matrix should be transposed.
///
/// Specifies the new vector to be used for the specified uniform variable.
///
public static void ProgramUniformMatrix2x3(int program, int location, bool transpose, ref matrix2x3 matrix)
{
unsafe
{
fixed (float* matrix_ptr = &matrix.Row0.X)
{
GLLib.ProgramUniformMatrix2x3(program, location, 1, transpose, matrix_ptr);
}
}
}
/*
///
/// [requires: v4.1 or ARB_separate_shader_objects|VERSION_4_1]
/// Specify the value of a uniform variable for the current program object.
///
///
/// Specifies the handle of the program containing the uniform variable to be modified.
///
///
/// Specifies the location of the uniform variable to be modified.
///
///
/// Whether or not the matrix should be transposed.
///
/// Specifies the new vector to be used for the specified uniform variable.
///
public static void ProgramUniformMatrix2x3(int program, int location, bool transpose, ref Matrix2x3d matrix)
{
unsafe
{
fixed (double* matrix_ptr = &matrix.Row0.X)
{
GLLib.ProgramUniformMatrix2x3(program, location, 1, transpose, matrix_ptr);
}
}
}
*/
///
/// [requires: v4.1 or ARB_separate_shader_objects|VERSION_4_1]
/// Specify the value of a uniform variable for the current program object.
///
///
/// Specifies the handle of the program containing the uniform variable to be modified.
///
///
/// Specifies the location of the uniform variable to be modified.
///
///
/// Whether or not the matrix should be transposed.
///
/// Specifies the new vector to be used for the specified uniform variable.
///
public static void ProgramUniformMatrix2x4(int program, int location, bool transpose, ref matrix2x4 matrix)
{
unsafe
{
fixed (float* matrix_ptr = &matrix.row0.X)
{
GLLib.ProgramUniformMatrix2x4(program, location, 1, transpose, matrix_ptr);
}
}
}
/*
///
/// [requires: v4.1 or ARB_separate_shader_objects|VERSION_4_1]
/// Specify the value of a uniform variable for the current program object.
///
///
/// Specifies the handle of the program containing the uniform variable to be modified.
///
///
/// Specifies the location of the uniform variable to be modified.
///
///
/// Whether or not the matrix should be transposed.
///
/// Specifies the new vector to be used for the specified uniform variable.
///
public static void ProgramUniformMatrix2x4(int program, int location, bool transpose, ref Matrix2x4d matrix)
{
unsafe
{
fixed (double* matrix_ptr = &matrix.Row0.X)
{
GLLib.ProgramUniformMatrix2x4(program, location, 1, transpose, matrix_ptr);
}
}
}
*/
///
/// [requires: v4.1 or ARB_separate_shader_objects|VERSION_4_1]
/// Specify the value of a uniform variable for the current program object.
///
///
/// Specifies the handle of the program containing the uniform variable to be modified.
///
///
/// Specifies the location of the uniform variable to be modified.
///
///
/// Whether or not the matrix should be transposed.
///
/// Specifies the new vector to be used for the specified uniform variable.
///
public static void ProgramUniformMatrix3x2(int program, int location, bool transpose, ref matrix3x2 matrix)
{
unsafe
{
fixed (float* matrix_ptr = &matrix.row0.X)
{
GLLib.ProgramUniformMatrix3x2(program, location, 1, transpose, matrix_ptr);
}
}
}
/*
///
/// [requires: v4.1 or ARB_separate_shader_objects|VERSION_4_1]
/// Specify the value of a uniform variable for the current program object.
///
///
/// Specifies the handle of the program containing the uniform variable to be modified.
///
///
/// Specifies the location of the uniform variable to be modified.
///
///
/// Whether or not the matrix should be transposed.
///
/// Specifies the new vector to be used for the specified uniform variable.
///
public static void ProgramUniformMatrix3x2(int program, int location, bool transpose, ref Matrix3x2d matrix)
{
unsafe
{
fixed (double* matrix_ptr = &matrix.Row0.X)
{
GLLib.ProgramUniformMatrix3x2(program, location, 1, transpose, matrix_ptr);
}
}
}
*/
///
/// [requires: v4.1 or ARB_separate_shader_objects|VERSION_4_1]
/// Specify the value of a uniform variable for the current program object.
///
///
/// Specifies the handle of the program containing the uniform variable to be modified.
///
///
/// Specifies the location of the uniform variable to be modified.
///
///
/// Whether or not the matrix should be transposed.
///
/// Specifies the new vector to be used for the specified uniform variable.
///
public static void ProgramUniformMatrix3(int program, int location, bool transpose, ref matrix3x3 matrix)
{
unsafe
{
fixed (float* matrix_ptr = &matrix.row0.X)
{
GLLib.ProgramUniformMatrix3(program, location, 1, transpose, matrix_ptr);
}
}
}
/*
///
/// [requires: v4.1 or ARB_separate_shader_objects|VERSION_4_1]
/// Specify the value of a uniform variable for the current program object.
///
///
/// Specifies the handle of the program containing the uniform variable to be modified.
///
///
/// Specifies the location of the uniform variable to be modified.
///
///
/// Whether or not the matrix should be transposed.
///
/// Specifies the new vector to be used for the specified uniform variable.
///
public static void ProgramUniformMatrix3(int program, int location, bool transpose, ref Matrix3d matrix)
{
unsafe
{
fixed (double* matrix_ptr = &matrix.Row0.X)
{
GLLib.ProgramUniformMatrix3(program, location, 1, transpose, matrix_ptr);
}
}
}
*/
///
/// [requires: v4.1 or ARB_separate_shader_objects|VERSION_4_1]
/// Specify the value of a uniform variable for the current program object.
///
///
/// Specifies the handle of the program containing the uniform variable to be modified.
///
///
/// Specifies the location of the uniform variable to be modified.
///
///
/// Whether or not the matrix should be transposed.
///
/// Specifies the new vector to be used for the specified uniform variable.
///
public static void ProgramUniformMatrix3x4(int program, int location, bool transpose, ref matrix3x4 matrix)
{
unsafe
{
fixed (float* matrix_ptr = &matrix.row0.X)
{
GLLib.ProgramUniformMatrix3x4(program, location, 1, transpose, matrix_ptr);
}
}
}
/*
///
/// [requires: v4.1 or ARB_separate_shader_objects|VERSION_4_1]
/// Specify the value of a uniform variable for the current program object.
///
///
/// Specifies the handle of the program containing the uniform variable to be modified.
///
///
/// Specifies the location of the uniform variable to be modified.
///
///
/// Whether or not the matrix should be transposed.
///
/// Specifies the new vector to be used for the specified uniform variable.
///
public static void ProgramUniformMatrix3x4(int program, int location, bool transpose, ref Matrix3x4d matrix)
{
unsafe
{
fixed (double* matrix_ptr = &matrix.Row0.X)
{
GLLib.ProgramUniformMatrix3x4(program, location, 1, transpose, matrix_ptr);
}
}
}
*/
///
/// [requires: v4.1 or ARB_separate_shader_objects|VERSION_4_1]
/// Specify the value of a uniform variable for the current program object.
///
///
/// Specifies the handle of the program containing the uniform variable to be modified.
///
///
/// Specifies the location of the uniform variable to be modified.
///
///
/// Whether or not the matrix should be transposed.
///
/// Specifies the new vector to be used for the specified uniform variable.
///
public static void ProgramUniformMatrix4x2(int program, int location, bool transpose, ref matrix4x2 matrix)
{
unsafe
{
fixed (float* matrix_ptr = &matrix.row0.X)
{
GLLib.ProgramUniformMatrix4x2(program, location, 1, transpose, matrix_ptr);
}
}
}
/*
///
/// [requires: v4.1 or ARB_separate_shader_objects|VERSION_4_1]
/// Specify the value of a uniform variable for the current program object.
///
///
/// Specifies the handle of the program containing the uniform variable to be modified.
///
///
/// Specifies the location of the uniform variable to be modified.
///
///
/// Whether or not the matrix should be transposed.
///
/// Specifies the new vector to be used for the specified uniform variable.
///
public static void ProgramUniformMatrix4x2(int program, int location, bool transpose, ref Matrix4x2d matrix)
{
unsafe
{
fixed (double* matrix_ptr = &matrix.Row0.X)
{
GLLib.ProgramUniformMatrix4x2(program, location, 1, transpose, matrix_ptr);
}
}
}
*/
///
/// [requires: v4.1 or ARB_separate_shader_objects|VERSION_4_1]
/// Specify the value of a uniform variable for the current program object.
///
///
/// Specifies the handle of the program containing the uniform variable to be modified.
///
///
/// Specifies the location of the uniform variable to be modified.
///
///
/// Whether or not the matrix should be transposed.
///
/// Specifies the new vector to be used for the specified uniform variable.
///
public static void ProgramUniformMatrix4x3(int program, int location, bool transpose, ref matrix4x3 matrix)
{
unsafe
{
fixed (float* matrix_ptr = &matrix.row0.X)
{
GLLib.ProgramUniformMatrix4x3(program, location, 1, transpose, matrix_ptr);
}
}
}
/*
///
/// [requires: v4.1 or ARB_separate_shader_objects|VERSION_4_1]
/// Specify the value of a uniform variable for the current program object.
///
///
/// Specifies the handle of the program containing the uniform variable to be modified.
///
///
/// Specifies the location of the uniform variable to be modified.
///
///
/// Whether or not the matrix should be transposed.
///
/// Specifies the new vector to be used for the specified uniform variable.
///
public static void ProgramUniformMatrix4x3(int program, int location, bool transpose, ref Matrix4x3d matrix)
{
unsafe
{
fixed (double* matrix_ptr = &matrix.Row0.X)
{
GLLib.ProgramUniformMatrix4x3(program, location, 1, transpose, matrix_ptr);
}
}
}
*/
///
/// [requires: v4.1 or ARB_separate_shader_objects|VERSION_4_1]
/// Specify the value of a uniform variable for the current program object.
///
///
/// Specifies the handle of the program containing the uniform variable to be modified.
///
///
/// Specifies the location of the uniform variable to be modified.
///
///
/// Whether or not the matrix should be transposed.
///
/// Specifies the new vector to be used for the specified uniform variable.
///
public static void ProgramUniformMatrix4(int program, int location, bool transpose, ref matrix4x4 matrix)
{
unsafe
{
fixed (float* matrix_ptr = &matrix.row0.X)
{
GLLib.ProgramUniformMatrix4(program, location, 1, transpose, matrix_ptr);
}
}
}
/*
///
/// [requires: v4.1 or ARB_separate_shader_objects|VERSION_4_1]
/// Specify the value of a uniform variable for the current program object.
///
///
/// Specifies the handle of the program containing the uniform variable to be modified.
///
///
/// Specifies the location of the uniform variable to be modified.
///
///
/// Whether or not the matrix should be transposed.
///
/// Specifies the new vector to be used for the specified uniform variable.
///
public static void ProgramUniformMatrix4(int program, int location, bool transpose, ref Matrix4d matrix)
{
unsafe
{
fixed (double* matrix_ptr = &matrix.Row0.X)
{
GLLib.ProgramUniformMatrix4(program, location, 1, transpose, matrix_ptr);
}
}
}
*/
///
/// [requires: v2.0]
/// Returns information about an active attribute variable for the specified program object.
///
///
/// Specifies the program object to be queried.
///
///
/// Specifies the index of the attribute variable to be queried.
///
///
/// Returns the size of the attribute variable.
///
///
/// Returns the data type of the attribute variable.
///
///
/// The name of the attribute variable.
///
public static string GetActiveAttrib(int program, int index, out int size, out ActiveAttribType type)
{
int length;
GetProgram(program, OpenTK.Graphics.OpenGL.GetProgramParameterName.ActiveAttributeMaxLength, out length);
string str;
GetActiveAttrib(program, index, length == 0 ? 1 : length * 2, out length, out size, out type, out str);
return str;
}
///
/// [requires: v2.0]
/// Returns information about an active uniform variable for the specified program object.
///
///
/// Specifies the program object to be queried.
///
///
/// Specifies the index of the uniform variable to be queried.
///
/// [length: 1]
/// Returns the size of the uniform variable.
///
/// [length: 1]
/// Returns the data type of the uniform variable.
///
/// [length: bufSize]
/// The name of the uniform variable.
///
public static string GetActiveUniform(int program, int uniformIndex, out int size, out ActiveUniformType type)
{
int length;
GetProgram(program, OpenTK.Graphics.OpenGL.GetProgramParameterName.ActiveUniformMaxLength, out length);
string str;
GetActiveUniform(program, uniformIndex, length == 0 ? 1 : length, out length, out size, out type, out str);
return str;
}
///
/// [requires: v3.1 or ARB_uniform_buffer_object|VERSION_3_1]
/// Query the name of an active uniform.
///
///
/// Specifies the program containing the active uniform index uniformIndex.
///
///
/// Specifies the index of the active uniform whose name to query.
///
///
/// The name of the active uniform at uniformIndex within program.
///
public static string GetActiveUniformName(int program, int uniformIndex)
{
int length;
GetProgram(program, OpenTK.Graphics.OpenGL.GetProgramParameterName.ActiveUniformMaxLength, out length);
string str;
GetActiveUniformName(program, uniformIndex, length == 0 ? 1 : length * 2, out length, out str);
return str;
}
///
/// [requires: v3.1 or ARB_uniform_buffer_object|VERSION_3_1]
/// Retrieve the name of an active uniform block.
///
///
/// Specifies the name of a program containing the uniform block.
///
///
/// Specifies the index of the uniform block within program.
///
///
/// The name of the uniform block at uniformIndex.
///
public static string GetActiveUniformBlockName(int program, int uniformIndex)
{
int length;
GetProgram(program, OpenTK.Graphics.OpenGL.GetProgramParameterName.ActiveUniformBlockMaxNameLength, out length);
string str;
GetActiveUniformBlockName(program, uniformIndex, length == 0 ? 1 : length * 2, out length, out str);
return str;
}
///
/// [requires: v2.0]
/// Replaces the source code in a shader object.
///
///
/// Specifies the handle of the shader object whose source code is to be replaced.
///
///
/// Specifies a string containing the source code to be loaded into the shader.
///
public static void ShaderSource(Int32 shader, System.String @string)
{
unsafe
{
int length = @string.Length;
GLLib.ShaderSource((UInt32)shader, 1, new string[] { @string }, &length);
}
}
///
/// [requires: v2.0]
/// Returns the information log for a shader object.
///
///
/// Specifies the shader object whose information log is to be queried.
///
///
/// The information log.
///
public static string GetShaderInfoLog(Int32 shader)
{
string info;
GetShaderInfoLog(shader, out info);
return info;
}
///
/// [requires: v2.0]
/// Returns the information log for a shader object.
///
///
/// Specifies the shader object whose information log is to be queried.
///
/// [length: bufSize]
/// Specifies a string that is used to return the information log.
///
public static void GetShaderInfoLog(Int32 shader, out string info)
{
unsafe
{
int length;
GLLib.GetShader(shader, ShaderParameter.InfoLogLength, out length);
if (length == 0)
{
info = String.Empty;
return;
}
GLLib.GetShaderInfoLog((UInt32)shader, length * 2, &length, out info);
}
}
///
/// [requires: v2.0]
/// Returns the information log for a program object.
///
///
/// Specifies the program object whose information log is to be queried.
///
///
/// The information log.
///
public static string GetProgramInfoLog(Int32 program)
{
string info;
GetProgramInfoLog(program, out info);
return info;
}
///
/// [requires: v2.0]
/// Returns the information log for a program object.
///
///
/// Specifies the program object whose information log is to be queried.
///
/// [length: bufSize]
/// Specifies a string that is used to return the information log.
///
public static void GetProgramInfoLog(Int32 program, out string info)
{
unsafe
{
int length;
GLLib.GetProgram(program, OpenTK.Graphics.OpenGL.GetProgramParameterName.InfoLogLength, out length); if (length == 0)
{
info = String.Empty;
return;
}
GLLib.GetProgramInfoLog((UInt32)program, length * 2, &length, out info);
}
}
///
/// Helper function that defines the coordinate origin of the Point Sprite.
///
///
/// A OpenTK.Graphics.OpenGL.GLLib.PointSpriteCoordOriginParameter token,
/// denoting the origin of the Point Sprite.
///
public static void PointParameter(PointSpriteCoordOriginParameter param)
{
GLLib.PointParameter(PointParameterName.PointSpriteCoordOrigin, (int)param);
}
///
/// [requires: v2.0]
/// Specifies the value of a generic vertex attribute.
///
///
/// Specifies the index of the generic vertex attribute to be modified.
///
///
/// Specifies the new x and y values to be used for the specified vertex attribute.
///
public static void VertexAttrib2(Int32 index, ref vec2d v)
{
GLLib.VertexAttrib2(index, v.X, v.Y);
}
///
/// [requires: v2.0]
/// Specifies the value of a generic vertex attribute.
///
///
/// Specifies the index of the generic vertex attribute to be modified.
///
///
/// Specifies the new x, y and z values to be used for the specified vertex attribute.
///
public static void VertexAttrib3(Int32 index, ref vec3d v)
{
GLLib.VertexAttrib3(index, v.X, v.Y, v.Z);
}
///
/// [requires: v2.0]
/// Specifies the value of a generic vertex attribute.
///
///
/// Specifies the index of the generic vertex attribute to be modified.
///
///
/// Specifies the new x, y, z and w values to be used for the specified vertex attribute.
///
public static void VertexAttrib4(Int32 index, ref vec4d v)
{
GLLib.VertexAttrib4(index, v.X, v.Y, v.Z, v.W);
}
///
/// [requires: v2.0]
/// Specifies the value of a generic vertex attribute.
///
///
/// Specifies the index of the generic vertex attribute to be modified.
///
///
/// Specifies the new x and y values to be used for the specified vertex attribute.
///
public static void VertexAttrib2(Int32 index, vec2d v)
{
GLLib.VertexAttrib2(index, v.X, v.Y);
}
///
/// [requires: v2.0]
/// Specifies the value of a generic vertex attribute.
///
///
/// Specifies the index of the generic vertex attribute to be modified.
///
///
/// Specifies the new x, y and z values to be used for the specified vertex attribute.
///
public static void VertexAttrib3(Int32 index, vec3d v)
{
GLLib.VertexAttrib3(index, v.X, v.Y, v.Z);
}
///
/// [requires: v2.0]
/// Specifies the value of a generic vertex attribute.
///
///
/// Specifies the index of the generic vertex attribute to be modified.
///
///
/// Specifies the new x, y, z and w values to be used for the specified vertex attribute.
///
public static void VertexAttrib4(Int32 index, vec4d v)
{
GLLib.VertexAttrib4(index, v.X, v.Y, v.Z, v.W);
}
///
/// [requires: v1.3][deprecated: v3.2]
/// Set the current texture coordinates.
///
///
/// Specifies the texture unit whose coordinates should be modified. The number of texture units is
/// implementation dependent, but must be at least two. Symbolic constant must be one of Texture, where i
/// ranges from 0 to MaxTextureCoords - 1, which is an implementation-dependent value.
///
///
/// Specifies the s and t texture coordinates for target texture unit.
///
public static void MultiTexCoord2(TextureUnit target, ref vec2d v)
{
GLLib.MultiTexCoord2(target, v.X, v.Y);
}
///
/// [requires: v1.3][deprecated: v3.2]
/// Set the current texture coordinates.
///
///
/// Specifies the texture unit whose coordinates should be modified. The number of texture units is
/// implementation dependent, but must be at least two. Symbolic constant must be one of Texture, where i
/// ranges from 0 to MaxTextureCoords - 1, which is an implementation-dependent value.
///
///
/// Specifies the s, t, and r texture coordinates for target texture unit.
///
public static void MultiTexCoord3(TextureUnit target, ref vec3d v)
{
GLLib.MultiTexCoord3(target, v.X, v.Y, v.Z);
}
///
/// [requires: v1.3][deprecated: v3.2]
/// Set the current texture coordinates.
///
///
/// Specifies the texture unit whose coordinates should be modified. The number of texture units is
/// implementation dependent, but must be at least two. Symbolic constant must be one of Texture, where i
/// ranges from 0 to MaxTextureCoords - 1, which is an implementation-dependent value.
///
///
/// Specifies the s, t, r, and q texture coordinates for target texture unit.
///
public static void MultiTexCoord4(TextureUnit target, ref vec4d v)
{
GLLib.MultiTexCoord4(target, v.X, v.Y, v.Z, v.W);
}
/*
///
/// [requires: v2.0]
/// Specifies the value of a generic vertex attribute.
///
///
/// Specifies the index of the generic vertex attribute to be modified.
///
///
/// Specifies the new x and y values to be used for the specified vertex attribute.
///
public static void VertexAttrib2(Int32 index, ref vec2d v)
{
GLLib.VertexAttrib2(index, v.X, v.Y);
}
*/
///
/// [requires: v2.0]
/// Specifies the value of a generic vertex attribute.
///
///
/// Specifies the index of the generic vertex attribute to be modified.
///
///
/// Specifies the new x, y and z values to be used for the specified vertex attribute.
///
public static void VertexAttrib3(Int32 index, ref Vector3d v)
{
GLLib.VertexAttrib3(index, v.X, v.Y, v.Z);
}
///
/// [requires: v2.0]
/// Specifies the value of a generic vertex attribute.
///
///
/// Specifies the index of the generic vertex attribute to be modified.
///
///
/// Specifies the new x, y, z and w values to be used for the specified vertex attribute.
///
public static void VertexAttrib4(Int32 index, ref Vector4d v)
{
GLLib.VertexAttrib4(index, v.X, v.Y, v.Z, v.W);
}
///
/// [requires: v2.0]
/// Specifies the value of a generic vertex attribute.
///
///
/// Specifies the index of the generic vertex attribute to be modified.
///
///
/// Specifies the new x and y values to be used for the specified vertex attribute.
///
public static void VertexAttrib2(Int32 index, vec2d v)
{
GLLib.VertexAttrib2(index, v.X, v.Y);
}
///
/// [requires: v2.0]
/// Specifies the value of a generic vertex attribute.
///
///
/// Specifies the index of the generic vertex attribute to be modified.
///
///
/// Specifies the new x, y and z values to be used for the specified vertex attribute.
///
public static void VertexAttrib3(Int32 index, Vector3d v)
{
GLLib.VertexAttrib3(index, v.X, v.Y, v.Z);
}
///
/// [requires: v2.0]
/// Specifies the value of a generic vertex attribute.
///
///
/// Specifies the index of the generic vertex attribute to be modified.
///
///
/// Specifies the new x, y, z and w values to be used for the specified vertex attribute.
///
public static void VertexAttrib4(Int32 index, Vector4d v)
{
GLLib.VertexAttrib4(index, v.X, v.Y, v.Z, v.W);
}
///
/// [requires: v1.3][deprecated: v3.2]
/// Set the current texture coordinates.
///
///
/// Specifies the texture unit whose coordinates should be modified. The number of texture units is
/// implementation dependent, but must be at least two. Symbolic constant must be one of Texture, where i
/// ranges from 0 to MaxTextureCoords - 1, which is an implementation-dependent value.
///
///
/// Specifies the s and t texture coordinates for target texture unit.
///
public static void MultiTexCoord2(TextureUnit target, ref vec2d v)
{
GLLib.MultiTexCoord2(target, v.X, v.Y);
}
///
/// [requires: v1.3][deprecated: v3.2]
/// Set the current texture coordinates.
///
///
/// Specifies the texture unit whose coordinates should be modified. The number of texture units is
/// implementation dependent, but must be at least two. Symbolic constant must be one of Texture, where i
/// ranges from 0 to MaxTextureCoords - 1, which is an implementation-dependent value.
///
///
/// Specifies the s, t, and r texture coordinates for target texture unit.
///
public static void MultiTexCoord3(TextureUnit target, ref Vector3d v)
{
GLLib.MultiTexCoord3(target, v.X, v.Y, v.Z);
}
///
/// [requires: v1.3][deprecated: v3.2]
/// Set the current texture coordinates.
///
///
/// Specifies the texture unit whose coordinates should be modified. The number of texture units is
/// implementation dependent, but must be at least two. Symbolic constant must be one of Texture, where i
/// ranges from 0 to MaxTextureCoords - 1, which is an implementation-dependent value.
///
///
/// Specifies the s, t, r, and q texture coordinates for target texture unit.
///
public static void MultiTexCoord4(TextureUnit target, ref Vector4d v)
{
GLLib.MultiTexCoord4(target, v.X, v.Y, v.Z, v.W);
}
///
/// [requires: v1.0][deprecated: v3.2]
/// Draw a rectangle.
///
///
/// Specifies the vertices of the rectangle.
///
public static void Rect(RectangleF rect)
{
GLLib.Rect(rect.Left, rect.Top, rect.Right, rect.Bottom);
}
///
/// [requires: v1.0][deprecated: v3.2]
/// Draw a rectangle.
///
///
/// Specifies the vertices of the rectangle.
///
public static void Rect(Rectangle rect)
{
GLLib.Rect(rect.Left, rect.Top, rect.Right, rect.Bottom);
}
///
/// [requires: v1.0][deprecated: v3.2]
/// Draw a rectangle.
///
///
/// Specifies the vertices of the rectangle.
///
public static void Rect(ref RectangleF rect)
{
GLLib.Rect(rect.Left, rect.Top, rect.Right, rect.Bottom);
}
///
/// [requires: v1.0][deprecated: v3.2]
/// Draw a rectangle.
///
///
/// Specifies the vertices of the rectangle.
///
public static void Rect(ref Rectangle rect)
{
GLLib.Rect(rect.Left, rect.Top, rect.Right, rect.Bottom);
}
///
/// [requires: v1.1][deprecated: v3.2]
/// Define an array of vertex data.
///
///
/// Specifies the number of coordinates per vertex. Must be 2, 3, or 4. The initial value is 4.
///
///
/// Specifies the data type of each coordinate in the array. Symbolic constants Short, Int, Float, or Double
/// are accepted. The initial value is Float.
///
///
/// Specifies the byte offset between consecutive vertices. If stride is 0, the vertices are understood to
/// be tightly packed in the array. The initial value is 0.
///
///
/// Specifies the first coordinate of the first vertex in the array. The initial value is 0.
///
public static void VertexPointer(int size, VertexPointerType type, int stride, int offset)
{
VertexPointer(size, type, stride, (IntPtr)offset);
}
///
/// [requires: v1.1][deprecated: v3.2]
/// Define an array of normals.
///
///
/// Specifies the data type of each coordinate in the array. Symbolic constants Byte, Short, Int, Float, and
/// Double are accepted. The initial value is Float.
///
///
/// Specifies the byte offset between consecutive normals. If stride is 0, the normals are understood to be
/// tightly packed in the array. The initial value is 0.
///
/// [length: type,stride]
/// Specifies the first coordinate of the first normal in the array. The initial value is 0.
///
public static void NormalPointer(NormalPointerType type, int stride, int offset)
{
NormalPointer(type, stride, (IntPtr)offset);
}
///
/// [requires: v1.1][deprecated: v3.2]
/// Define an array of color indexes.
///
///
/// Specifies the data type of each color index in the array. Symbolic constants UnsignedByte, Short, Int,
/// Float, and Double are accepted. The initial value is Float.
///
///
/// Specifies the byte offset between consecutive color indexes. If stride is 0, the color indexes are
/// understood to be tightly packed in the array. The initial value is 0.
///
///
/// Specifies the first index in the array. The initial value is 0.
///
public static void IndexPointer(IndexPointerType type, int stride, int offset)
{
IndexPointer(type, stride, (IntPtr)offset);
}
///
///[requires: v1.1][deprecated: v3.2]
/// Define an array of colors.
///
///
/// Specifies the number of components per color. Must be 3 or 4. The initial value is 4.
///
///
/// Specifies the data type of each color component in the array. Symbolic constants Byte, UnsignedByte, Short,
/// UnsignedShort, Int, UnsignedInt, Float, and Double are accepted. The initial value is Float.
///
///
/// Specifies the byte offset between consecutive colors. If stride is 0, the colors are understood to be
/// tightly packed in the array. The initial value is 0.
///
///
/// Specifies the first component of the first color element in the array. The initial value is 0.
///
public static void ColorPointer(int size, ColorPointerType type, int stride, int offset)
{
ColorPointer(size, type, stride, (IntPtr)offset);
}
///
/// [requires: v1.4][deprecated: v3.2]
/// Define an array of fog coordinates.
///
///
/// Specifies the data type of each fog coordinate. Symbolic constants Float, or Double are accepted.
/// The initial value is Float.
///
///
/// Specifies the byte offset between consecutive fog coordinates. If stride is 0, the array elements are
/// understood to be tightly packed. The initial value is 0.
///
///
/// Specifies the first coordinate of the first fog coordinate in the array. The initial value is 0.
///
public static void FogCoordPointer(FogPointerType type, int stride, int offset)
{
FogCoordPointer(type, stride, (IntPtr)offset);
}
///
/// [requires: v1.1][deprecated: v3.2]
/// Define an array of edge flags.
///
///
/// Specifies the byte offset between consecutive edge flags. If stride is 0, the edge flags are understood to
/// be tightly packed in the array. The initial value is 0.
///
///
/// Specifies the first edge flag in the array. The initial value is 0.
///
public static void EdgeFlagPointer(int stride, int offset)
{
EdgeFlagPointer(stride, (IntPtr)offset);
}
///
/// [requires: v1.1][deprecated: v3.2]
/// Define an array of texture coordinates.
///
///
/// Specifies the number of coordinates per array element. Must be 1, 2, 3, or 4. The initial value is 4.
///
///
/// Specifies the data type of each texture coordinate. Symbolic constants Short, Int, Float, or Double are
/// accepted. The initial value is Float.
///
///
/// Specifies the byte offset between consecutive texture coordinate sets. If stride is 0, the array
/// elements are understood to be tightly packed. The initial value is 0.
///
///
/// Specifies the first coordinate of the first texture coordinate set in the array. The initial value is 0.
///
public static void TexCoordPointer(int size, TexCoordPointerType type, int stride, int offset)
{
TexCoordPointer(size, type, stride, (IntPtr)offset);
}
///
/// [requires: v2.0]
/// Define an array of generic vertex attribute data.
///
///
/// Specifies the index of the generic vertex attribute to be modified.
///
///
/// Specifies the number of components per generic vertex attribute. Must be 1, 2, 3, 4. Additionally, the
/// symbolic constant Bgra is accepted by glVertexAttribPointer. The initial value is 4.
///
///
/// Specifies the data type of each component in the array. The symbolic constants Byte, UnsignedByte, Short,
/// UnsignedShort, Int, and UnsignedInt are accepted by glVertexAttribPointer and glVertexAttribIPointer.
/// Additionally HalfFloat, Float, Double, Fixed, Int2101010Rev, UnsignedInt2101010Rev and
/// UnsignedInt10F11F11FRev are accepted by glVertexAttribPointer. Double is also accepted by
/// glVertexAttribLPointer and is the only token accepted by the type parameter for that function.
/// The initial value is Float.
///
///
/// For glVertexAttribPointer, specifies whether fixed-point data values should be normalized (True) or
/// converted directly as fixed-point values (False) when they are accessed.
///
///
/// Specifies the byte offset between consecutive generic vertex attributes. If stride is 0, the generic vertex
/// attributes are understood to be tightly packed in the array. The initial value is 0.
///
///
/// Specifies the first component of the first generic vertex attribute in the array in the data store of the
/// buffer currently bound to the ArrayBuffer target. The initial value is 0.
///
public static void VertexAttribPointer(int index, int size, VertexAttribPointerType type, bool normalized, int stride, int offset)
{
VertexAttribPointer(index, size, type, normalized, stride, (IntPtr)offset);
}
///
/// [requires: v1.0]
/// Gets a series of consequtive float values as a vector.
///
///
/// The name of the property that holds the values.
///
///
/// The vector which will hold the values.
///
public static void GetFloat(GetPName pname, out vec2d vector)
{
unsafe
{
fixed (vec2d* ptr = &vector)
{
GetFloat(pname, (float*)ptr);
}
}
}
///
/// [requires: v1.0]
/// Gets a series of consequtive float values as a vector.
///
///
/// The name of the property that holds the values.
///
///
/// The vector which will hold the values.
///
public static void GetFloat(GetPName pname, out vec3d vector)
{
unsafe
{
fixed (vec3d* ptr = &vector)
{
GetFloat(pname, (float*)ptr);
}
}
}
///
/// [requires: v1.0]
/// Gets a series of consequtive float values as a vector.
///
///
/// The name of the property that holds the values.
///
///
/// The vector which will hold the values.
///
public static void GetFloat(GetPName pname, out vec4d vector)
{
unsafe
{
fixed (vec4d* ptr = &vector)
{
GetFloat(pname, (float*)ptr);
}
}
}
///
/// [requires: v1.0]
/// Gets a series of consequtive float values as a matrix.
///
///
/// The name of the property that holds the values.
///
///
/// The matrix which will hold the values.
///
public static void GetFloat(GetPName pname, out matrix4x4 matrix)
{
unsafe
{
fixed (matrix4x4* ptr = &matrix)
{
GetFloat(pname, (float*)ptr);
}
}
}
///
/// [requires: v1.0]
/// Gets a series of consequtive 64-bit float values as a vector.
///
///
/// The name of the property that holds the values.
///
///
/// The vector which will hold the values.
///
public static void GetDouble(GetPName pname, out vec2d vector)
{
unsafe
{
fixed (vec2d* ptr = &vector)
{
GetDouble(pname, (double*)ptr);
}
}
}
/*
///
/// [requires: v1.0]
/// Gets a series of consequtive 64-bit float values as a vector.
///
///
/// The name of the property that holds the values.
///
///
/// The vector which will hold the values.
///
public static void GetDouble(GetPName pname, out Vector3d vector)
{
unsafe
{
fixed (Vector3d* ptr = &vector)
{
GetDouble(pname, (double*)ptr);
}
}
}
*//*
///
/// [requires: v1.0]
/// Gets a series of consequtive 64-bit float values as a vector.
///
///
/// The name of the property that holds the values.
///
///
/// The vector which will hold the values.
///
public static void GetDouble(GetPName pname, out Vector4d vector)
{
unsafe
{
fixed (Vector4d* ptr = &vector)
{
GetDouble(pname, (double*)ptr);
}
}
}
*//*
///
/// [requires: v1.0]
/// Gets a series of consequtive 64-bit float values as a matrix.
///
///
/// The name of the property that holds the values.
///
///
/// The matrix which will hold the values.
///
public static void GetDouble(GetPName pname, out Matrix4d matrix)
{
unsafe
{
fixed (Matrix4d* ptr = &matrix)
{
GetDouble(pname, (double*)ptr);
}
}
}
*/
///
/// [requires: v1.0]
/// Set the viewport. This function assumes a lower left corner of (0, 0).
///
///
/// Specifies the width and height of the viewport. When a GLLib context is first attached to a window,
/// width and height are set to the dimensions of that window.
///
public static void Viewport(Size size)
{
GLLib.Viewport(0, 0, size.Width, size.Height);
}
///
/// [requires: v1.0]
/// Set the viewport.
///
///
/// Specifies the lower left corner of the viewport.
///
///
/// Specifies the width and height of the viewport. When a GLLib context is first attached to a window,
/// width and height are set to the dimensions of that window.
///
public static void Viewport(Point location, Size size)
{
GLLib.Viewport(location.X, location.Y, size.Width, size.Height);
}
///
/// [requires: v1.0]
/// Set the viewport.
///
///
/// Specifies the lower left corner, as well as the width and height of the viewport. When a GLLib context is
/// first attached to a window, width and height are set to the dimensions of that window.
///
public static void Viewport(Rectangle rectangle)
{
GLLib.Viewport(rectangle.X, rectangle.Y, rectangle.Width, rectangle.Height);
}
public static void Viewport(Box2i box)
{
GLLib.Viewport(box.Min.X, box.Min.Y, box.Size.X, box.Size.Y);
}
#if MINIMAL
///
/// [requires: v1.0]
/// Set the viewport.
///
///
/// Specifies the lower left corner of the viewport.
///
///
/// Specifies the width and height of the viewport. When a GLLib context is first attached to a window,
/// width and height are set to the dimensions of that window.
///
public static void Viewport(OpenTK.Point location, OpenTK.Size size)
{
GLLib.Viewport(location.X, location.Y, size.Width, size.Height);
}
///
/// [requires: v1.0]
/// Set the viewport.
///
///
/// Specifies the lower left corner, as well as the width and height of the viewport. When a GLLib context is
/// first attached to a window, width and height are set to the dimensions of that window.
///
public static void Viewport(OpenTK.Rectangle rectangle)
{
GLLib.Viewport(rectangle.X, rectangle.Y, rectangle.Width, rectangle.Height);
}
#endif
///
/// [requires: v1.0][deprecated: v3.2]
/// Set texture environment parameters.
///
///
/// Specifies a texture environment. May be TextureEnv, TextureFilterControl or PointSprite.
///
///
/// Specifies the symbolic name of a single-valued texture environment parameter. May be either TextureEnvMode,
/// TextureLodBias, CombineRgb, CombineAlpha, Src0Rgb, Src1Rgb, Src2Rgb, Src0Alpha, Src1Alpha, Src2Alpha,
/// Operand0Rgb, Operand1Rgb, Operand2Rgb, Operand0Alpha, Operand1Alpha, Operand2Alpha, RgbScale, AlphaScale,
/// or CoordReplace.
///
///
/// Specifies the color to apply.
///
public static void TexEnv(TextureEnvTarget target, TextureEnvParameter pname, Color color)
{
Color4 c = new Color4(color.R, color.G, color.B, color.A);
unsafe
{
TexEnv(target, pname, &c.R);
}
}
///
/// [requires: v1.0][deprecated: v3.2]
/// Set texture environment parameters.
///
///
/// Specifies a texture environment. May be TextureEnv, TextureFilterControl or PointSprite.
///
///
/// Specifies the symbolic name of a single-valued texture environment parameter. May be either TextureEnvMode,
/// TextureLodBias, CombineRgb, CombineAlpha, Src0Rgb, Src1Rgb, Src2Rgb, Src0Alpha, Src1Alpha, Src2Alpha,
/// Operand0Rgb, Operand1Rgb, Operand2Rgb, Operand0Alpha, Operand1Alpha, Operand2Alpha, RgbScale, AlphaScale,
/// or CoordReplace.
///
///
/// Specifies the color to apply.
///
public static void TexEnv(TextureEnvTarget target, TextureEnvParameter pname, Color4 color)
{
unsafe
{
TexEnv(target, pname, &color.R);
}
}
}
#pragma warning disable 1574 // XML comment cref attribute could not be resolved, compiler bug in Mono 3.4.0
///
/// Defines the signature of a debug callback for
/// .
///
/// The id of this debug message.
/// The category for this debug message.
/// The severity for this debug message.
/// The length of this debug message.
/// A pointer to a null-terminated ASCII C string, representing the content of this debug message.
/// A pointer to a user-specified parameter.
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
public delegate void DebugProcAmd(int id,
AmdDebugOutput category, AmdDebugOutput severity,
int length, IntPtr message, IntPtr userParam);
///
/// Defines the signature of a debug callback for
/// .
///
/// The for this debug message.
/// The for this debug message.
/// The id of this debug message.
/// The for this debug message.
/// The length of this debug message.
/// A pointer to a null-terminated ASCII C string, representing the content of this debug message.
/// A pointer to a user-specified parameter.
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
public delegate void DebugProcArb(
DebugSource source, DebugType type, int id,
DebugSeverity severity, int length, IntPtr message,
IntPtr userParam);
///
/// Defines the signature of a debug callback for
/// .
///
/// The for this debug message.
/// The for this debug message.
/// The id of this debug message.
/// The for this debug message.
/// The length of this debug message.
/// A pointer to a null-terminated ASCII C string, representing the content of this debug message.
/// A pointer to a user-specified parameter.
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
public delegate void DebugProc(
DebugSource source, DebugType type, int id,
DebugSeverity severity, int length, IntPtr message,
IntPtr userParam);
///
/// Defines the signature of a debug callback for
/// .
///
/// The for this debug message.
/// The for this debug message.
/// The id of this debug message.
/// The for this debug message.
/// The length of this debug message.
/// A pointer to a null-terminated ASCII C string, representing the content of this debug message.
/// A pointer to a user-specified parameter.
[UnmanagedFunctionPointer(CallingConvention.Winapi)]
public delegate void DebugProcKhr(
DebugSource source, DebugType type, int id,
DebugSeverity severity, int length, IntPtr message,
IntPtr userParam);
#pragma warning restore 1574 // XML comment cref attribute could not be resolved, compiler bug in Mono 3.4.0
}