Files
stgsharp/源代码/StgSharp/Graphics/gl_functions/GLeaFunc.cs
T

1150 lines
70 KiB
C#
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.InteropServices;
namespace StgSharp.Graphics
{
public partial class gl
{
/// <summary>
/// bind a named texture to a texturing target.
/// </summary>
/// <param name="target">
/// <para>Specifies the target to which the texture is bound. </para>
/// <para> Must be either GL_TEXTURE_1D, GL_TEXTURE_2D, GL_TEXTURE_3D, or GL_TEXTURE_CUBE_MAP.</para>
/// </param>
/// <param name="texture">
/// Specifies the name of a texture.
/// </param>
[DllImport("opengl32.dll", ExactSpelling = false, EntryPoint = "glBindTexture", CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall)]
public static extern void BindTexture(uint target, uint texture);
/// <summary>
/// specify pixel arithmetic.
/// </summary>
/// <param name="sfactor">
/// <para>Specifies how the red, green, blue, and alpha source blending factors are computed.</para>
/// <para>The following symbolic constants are accepted:</para>
/// <para>GL_ZERO, GL_ONE, GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR, GL_DST_COLOR, GL_ONE_MINUS_DST_COLOR, GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA,</para>
/// <para>GL_DST_ALPHA, GL_ONE_MINUS_DST_ALPHA, GL_CONSTANT_COLOR,GL_ONE_MINUS_CONSTANT_COLOR, GL_CONSTANT_ALPHA, GL_ONE_MINUS_CONSTANT_ALPHA, and GL_SRC_ALPHA_SATURATE.</para>
/// <para> The initial value is GL_ONE. </para>
/// </param>
/// <param name="dfactor">
/// <para>Specifies how the red, green, blue, and alpha destination blending factors are computed.</para>
/// <para> The following symbolic constants are accepted: GL_ZERO, GL_ONE, GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR,</para>
/// <para>GL_DST_COLOR, GL_ONE_MINUS_DST_COLOR, GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA, GL_DST_ALPHA, GL_ONE_MINUS_DST_ALPHA.</para>
/// <para>GL_CONSTANT_COLOR, GL_ONE_MINUS_CONSTANT_COLOR, GL_CONSTANT_ALPHA, and GL_ONE_MINUS_CONSTANT_ALPHA.</para>
/// <para>The initial value is GL_ZERO. </para>
/// </param>
[DllImport("opengl32.dll", ExactSpelling = false, EntryPoint = "glBlendFunc", CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall)]
public static extern void BlendFunc(uint sfactor, uint dfactor);
/// <summary>
/// clear buffers to preset values.
/// </summary>
/// <param name="mask">
/// <para> Bitwise OR of masks that indicate the buffers to be cleared.</para>
/// <para>The four masks are GL_COLOR_BUFFER_BIT, GL_DEPTH_BUFFER_BIT, GL_ACCUM_BUFFER_BIT,and GL_STENCIL_BUFFER_BIT.</para>
/// </param>
[DllImport("opengl32.dll", ExactSpelling = false, EntryPoint = "glClear", CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall)]
public static extern void Clear(uint mask);
/// <summary>
/// specify clear values for the color buffers.
/// </summary>
/// <param name="red">
/// Specify the red value used when the color buffers are cleared. The initial value is 0.
/// </param>
/// <param name="green">
/// Specify the green value used when the color buffers are cleared. The initial value is 0.
/// </param>
/// <param name="blue">
/// Specify the blue value used when the color buffers are cleared. The initial value is 0.
/// </param>
/// <param name="alpha">
/// Specify the alpha value used when the color buffers are cleared. The initial value is 0.
/// </param>
[DllImport("opengl32.dll", ExactSpelling = false, EntryPoint = "glClearColor", CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall)]
public static extern void ClearColor(float red, float green, float blue, float alpha);
/// <summary>
/// specify the clear value for the depth buffer.
/// </summary>
/// <param name="depth">
/// Specifies the depth value used when the depth buffer is cleared. The initial value is 1.
/// </param>
[DllImport("opengl32.dll", ExactSpelling = false, EntryPoint = "glClearDepth", CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall)]
public static extern void ClearDepth(double depth);
/// <summary>
/// specify the clear value for the stencil buffer.
/// </summary>
/// <param name="s">
/// Specifies the index used when the stencil buffer is cleared. The initial value is 0.
/// </param>
[DllImport("opengl32.dll", ExactSpelling = false, EntryPoint = "glClearStencil", CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall)]
public static extern void ClearStencil(int s);
/// <summary>
/// enable and disable writing of frame buffer color components.
/// </summary>
/// <param name="red">
/// <para>Specify whether red can or cannot be written into the frame buffer. The initial value is GL_TRUE, </para>
/// <para> indicating that the color component can be written. </para>
/// </param>
/// <param name="green">
/// <para> Specify whether green can or cannot be written into the frame buffer. The initial value is GL_TRUE, </para>
/// <para>indicating that the color component can be written. </para>
/// </param>
/// <param name="blue">
/// <para>Specify whether blue can or cannot be written into the frame buffer. The initial value is GL_TRUE, </para>
/// <para>indicating that the color component can be written. </para>
/// </param>
/// <param name="alpha">
/// <para>Specify whether alpha can or cannot be written into the frame buffer. The initial value is GL_TRUE, </para>
/// <para>indicating that the color component can be written. </para>
/// </param>
[DllImport("opengl32.dll", ExactSpelling = false, EntryPoint = "glColorMask", CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall)]
public static extern void ColorMask(bool red, bool green, bool blue, bool alpha);
/// <summary>
/// copy pixels into a 1D texture image.
/// </summary>
/// <param name="target">
/// Specifies the target texture. Must be GL_TEXTURE_1D.
/// </param>
/// <param name="level">
/// <para> Specifies the level-of-detail number. Level 0 is the base image level.</para>
/// <para> Level n is the nth mipmap reduction image. </para>
/// </param>
/// <param name="internalFormat">
/// <para>Specifies the internal format of the texture.</para>
/// <para>Must be one of the following symbolic constants: </para>
/// <para>GL_ALPHA, GL_ALPHA4, GL_ALPHA8, GL_ALPHA12, GL_ALPHA16, GL_COMPRESSED_ALPHA, GL_COMPRESSED_LUMINANCE, GL_COMPRESSED_LUMINANCE_ALPHA, GL_COMPRESSED_INTENSITY,</para>
/// <para> GL_COMPRESSED_RGB, GL_COMPRESSED_RGBA, GL_DEPTH_COMPONENT, GL_DEPTH_COMPONENT16,GL_DEPTH_COMPONENT24, GL_DEPTH_COMPONENT32, GL_LUMINANCE, GL_LUMINANCE4, GL_LUMINANCE8,</para>
/// <para>GL_LUMINANCE12, GL_LUMINANCE16, GL_LUMINANCE_ALPHA, GL_LUMINANCE4_ALPHA4, GL_LUMINANCE6_ALPHA2,GL_LUMINANCE8_ALPHA8, GL_LUMINANCE12_ALPHA4, GL_LUMINANCE12_ALPHA12, GL_LUMINANCE16_ALPHA16, </para>
/// <para>GL_INTENSITY, GL_INTENSITY4, GL_INTENSITY8, GL_INTENSITY12, GL_INTENSITY16, GL_RGB, GL_R3_G3_B2,GL_RGB4, GL_RGB5, GL_RGB8, GL_RGB10, GL_RGB12, GL_RGB16, GL_RGBA, GL_RGBA2, GL_RGBA4, GL_RGB5_A1, </para>
/// <para> GL_RGBA8, GL_RGB10_A2, GL_RGBA12, GL_RGBA16, GL_SLUMINANCE, GL_SLUMINANCE8, GL_SLUMINANCE_ALPHA, GL_SLUMINANCE8_ALPHA8, GL_SRGB, GL_SRGB8, GL_SRGB_ALPHA, or GL_SRGB8_ALPHA8. </para>
/// </param>
/// <param name="x">
/// Specify the window coordinates of the left corner of the row of pixels to be copied.
/// </param>
/// <param name="y">
/// Specify the window coordinates of the left corner of the row of pixels to be copied.
/// </param>
/// <param name="width">
/// <para> Specifies the width of the texture image. Must be 0 or 2^n+2(border) for some integer n. </para>
/// <para>The height of the texture image is 1. </para>
/// </param>
/// <param name="border">
/// Specifies the width of the border. Must be either 0 or 1.
/// </param>
[DllImport("opengl32.dll", ExactSpelling = false, EntryPoint = "glCopyTexImage1D", CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall)]
public static extern void CopyTexImage1D(uint target, int level, uint internalFormat, int x, int y, int width, int border);
/// <summary>
/// copy pixels into a 2D texture image.
/// </summary>
/// <param name="target">
/// <para>Specifies the target texture. </para>
/// <para>Must be GL_TEXTURE_2D, GL_TEXTURE_CUBE_MAP_POSITIVE_X, GL_TEXTURE_CUBE_MAP_NEGATIVE_X,</para>
/// <para>GL_TEXTURE_CUBE_MAP_POSITIVE_Y, GL_TEXTURE_CUBE_MAP_NEGATIVE_Y, GL_TEXTURE_CUBE_MAP_POSITIVE_Z, or GL_TEXTURE_CUBE_MAP_NEGATIVE_Z. </para>
/// </param>
/// <param name="level">
/// <para>Specifies the level-of-detail number. Level 0 is the base image level.</para>
/// <para>Level n is the nth mipmap reduction image. </para>
/// </param>
/// <param name="internalFormat">
/// <para>Specifies the internal format of the texture. </para>
/// <para>Must be one of the following symbolic constants: </para>
/// <para> GL_ALPHA, GL_ALPHA4, GL_ALPHA8, GL_ALPHA12, GL_ALPHA16, GL_COMPRESSED_ALPHA,GL_COMPRESSED_LUMINANCE, GL_COMPRESSED_LUMINANCE_ALPHA, GL_COMPRESSED_INTENSITY, </para>
/// <para>GL_COMPRESSED_RGB, GL_COMPRESSED_RGBA, GL_DEPTH_COMPONENT, GL_DEPTH_COMPONENT16,GL_DEPTH_COMPONENT24, GL_DEPTH_COMPONENT32, GL_LUMINANCE, GL_LUMINANCE4, GL_LUMINANCE8, </para>
/// <para>GL_LUMINANCE12, GL_LUMINANCE16, GL_LUMINANCE_ALPHA, GL_LUMINANCE4_ALPHA4, GL_LUMINANCE6_ALPHA2,GL_LUMINANCE8_ALPHA8, GL_LUMINANCE12_ALPHA4, GL_LUMINANCE12_ALPHA12, GL_LUMINANCE16_ALPHA16,</para>
/// <para>GL_INTENSITY, GL_INTENSITY4, GL_INTENSITY8, GL_INTENSITY12, GL_INTENSITY16, GL_RGB, GL_R3_G3_B2,GL_RGB4, GL_RGB5, GL_RGB8, GL_RGB10, GL_RGB12, GL_RGB16, GL_RGBA, GL_RGBA2, GL_RGBA4, GL_RGB5_A1,</para>
/// <para> GL_RGBA8, GL_RGB10_A2, GL_RGBA12, GL_RGBA16, GL_SLUMINANCE, GL_SLUMINANCE8, GL_SLUMINANCE_ALPHA,GL_SLUMINANCE8_ALPHA8, GL_SRGB, GL_SRGB8, GL_SRGB_ALPHA, or GL_SRGB8_ALPHA8. </para>
/// </param>
/// <param name="x">
/// Specify the window coordinates of the lower left corner of the rectangular region of pixels to be copied.
/// </param>
/// <param name="y">
/// Specify the window coordinates of the lower left corner of the rectangular region of pixels to be copied.
/// </param>
/// <param name="width">
/// Specifies the width of the texture image. Must be 0 or 2^n+2(border) for some integer n.
/// </param>
/// <param name="height">
/// Specifies the height of the texture image. Must be 0 or 2^m+2(border) for some integer m.
/// </param>
/// <param name="border">
/// Specifies the width of the border. Must be either 0 or 1.
/// </param>
[DllImport("opengl32.dll", ExactSpelling = false, EntryPoint = "glCopyTexImage2D", CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall)]
public static extern void CopyTexImage2D(uint target, int level, uint internalFormat, int x, int y, int width, int height, int border);
/// <summary>
/// copy a one-dimensional texture subimage.
/// </summary>
/// <param name="target">
/// Specifies the target texture. Must be GL_TEXTURE_1D.
/// </param>
/// <param name="level">
/// <para>Specifies the level-of-detail number. Level 0 is the base image level.</para>
/// <para>Level n is the nth mipmap reduction image. </para>
/// </param>
/// <param name="xoffset">
/// Specifies the texel offset within the texture array.
/// </param>
/// <param name="x">
/// Specify the window coordinates of the left corner of the row of pixels to be copied.
/// </param>
/// <param name="y">
/// Specify the window coordinates of the left corner of the row of pixels to be copied.
/// </param>
/// <param name="width">
/// Specifies the width of the texture subimage.
/// </param>
[DllImport("opengl32.dll", ExactSpelling = false, EntryPoint = "glCopyTexSubImage1D", CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall)]
public static extern void CopyTexSubImage1D(uint target, int level, int xoffset, int x, int y, int width);
/// <summary>
/// copy a two-dimensional texture subimage.
/// </summary>
/// <param name="target">
/// <para>Specifies the target texture. </para>
/// <para>Must be GL_TEXTURE_2D, GL_TEXTURE_CUBE_MAP_POSITIVE_X, GL_TEXTURE_CUBE_MAP_NEGATIVE_X,</para>
/// <para>GL_TEXTURE_CUBE_MAP_POSITIVE_Y, GL_TEXTURE_CUBE_MAP_NEGATIVE_Y, GL_TEXTURE_CUBE_MAP_POSITIVE_Z,or GL_TEXTURE_CUBE_MAP_NEGATIVE_Z. </para>
/// </param>
/// <param name="level">
/// <para>Specifies the level-of-detail number. Level 0 is the base image level.</para>
/// <para>Level n is the nth mipmap reduction image. </para>
/// </param>
/// <param name="xoffset">
/// Specifies a texel offset in the x direction within the texture array.
/// </param>
/// <param name="yoffset">
/// Specifies a texel offset in the y direction within the texture array.
/// </param>
/// <param name="x">
/// Specify the window coordinates of the lower left corner of the rectangular region of pixels to be copied.
/// </param>
/// <param name="y">
/// Specify the window coordinates of the lower left corner of the rectangular region of pixels to be copied.
/// </param>
/// <param name="width">
/// Specifies the width of the texture subimage.
/// </param>
/// <param name="height">
/// Specifies the height of the texture subimage.
/// </param>
[DllImport("opengl32.dll", ExactSpelling = false, EntryPoint = "glCopyTexSubImage2D", CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall)]
public static extern void CopyTexSubImage2D(uint target, int level, int xoffset, int yoffset, int x, int y, int width, int height);
/// <summary>
/// specify whether front- or back-facing facets can be culled.
/// </summary>
/// <param name="mode">
/// <para>Specifies whether front- or back-facing facets are candidates for culling. </para>
/// <para>Symbolic constants GL_FRONT, GL_BACK, and GL_FRONT_AND_BACK are accepted. </para>
/// <para>The initial value is GL_BACK. </para>
/// </param>
[DllImport("opengl32.dll", ExactSpelling = false, EntryPoint = "glCullFace", CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall)]
public static extern void CullFace(uint mode);
/// <summary>
/// delete named textures.
/// </summary>
/// <param name="n">
/// Specifies the number of textures to be deleted.
/// </param>
/// <param name="textures">
/// Specifies an array of textures to be deleted.
/// </param>
[DllImport("opengl32.dll", ExactSpelling = false, EntryPoint = "glDeleteTextures", CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall)]
public static extern void DeleteTextures(int n, uint[] textures);
/// <summary>
/// specify the value used for depth buffer comparisons.
/// </summary>
/// <param name="func">
/// <para>Specifies the depth comparison function. </para>
/// <para>Symbolic constants GL_NEVER, GL_LESS, GL_EQUAL, GL_LEQUAL, GL_GREATER, GL_NOTEQUAL, GL_GEQUAL, </para>
/// <para>and GL_ALWAYS are accepted. The initial value is GL_LESS. </para>
/// </param>
[DllImport("opengl32.dll", ExactSpelling = false, EntryPoint = "glDepthFunc", CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall)]
public static extern void DepthFunc(uint func);
/// <summary>
/// enable or disable writing into the depth buffer.
/// </summary>
/// <param name="flag">
/// <para>Specifies whether the depth buffer is enabled for writing. </para>
/// <para>If flag is GL_FALSE, depth buffer writing is disabled. Otherwise, it is enabled.</para>
/// <para>Initially, depth buffer writing is enabled. </para>
/// </param>
[DllImport("opengl32.dll", ExactSpelling = false, EntryPoint = "glDepthMask", CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall)]
public static extern void DepthMask(bool flag);
/// <summary>
/// specify mapping of depth values from normalized device coordinates to window coordinates.
/// </summary>
/// <param name="zNear">
/// Specifies the mapping of the near clipping plane to window coordinates. The initial value is 0.
/// </param>
/// <param name="zFar">
/// Specifies the mapping of the far clipping plane to window coordinates. The initial value is 1.
/// </param>
[DllImport("opengl32.dll", ExactSpelling = false, EntryPoint = "glDepthRange", CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall)]
public static extern void DepthRange(double zNear, double zFar);
/// <summary>
/// disable server-side GL capabilities.
/// </summary>
/// <param name="cap">
/// Specifies a symbolic constant indicating a GL capability.
/// </param>
[DllImport("opengl32.dll", ExactSpelling = false, EntryPoint = "glDisable", CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall)]
public static extern void Disable(uint cap);
/// <summary>
/// render primitives from array data.
/// </summary>
/// <param name="mode">
/// <para>Specifies what kind of primitives to render. </para>
/// <para>Symbolic constants GL_POINTS, GL_LINE_STRIP, GL_LINE_LOOP, GL_LINES, GL_TRIANGLE_STRIP,</para>
/// <para>GL_TRIANGLE_FAN, GL_TRIANGLES, GL_QUAD_STRIP, GL_QUADS, and GL_POLYGON are accepted</para>
/// </param>
/// <param name="first">
/// Specifies the starting index in the enabled arrays.
/// </param>
/// <param name="count">
/// Specifies the number of indices to be rendered.
/// </param>
[DllImport("opengl32.dll", ExactSpelling = false, EntryPoint = "glDrawArrays", CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall)]
public static extern void DrawArrays(uint mode, int first, int count);
/// <summary>
/// specify which color buffers are to be drawn into.
/// </summary>
/// <param name="mode">
/// <para>Specifies up to four color buffers to be drawn into.</para>
/// <para>Symbolic constants GL_NONE, GL_FRONT_LEFT, GL_FRONT_RIGHT, GL_BACK_LEFT, GL_BACK_RIGHT, GL_FRONT, GL_BACK, GL_LEFT, GL_RIGHT, GL_FRONT_AND_BACK,</para>
/// <para>and GL_AUXi, where i is between 0 and the value of GL_AUX_BUFFERS minus 1, are accepted.</para>
/// </param>
[DllImport("opengl32.dll", ExactSpelling = false, EntryPoint = "glDrawBuffer", CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall)]
public static extern void DrawBuffer(uint mode);
/// <summary>
/// render primitives from array data.
/// </summary>
/// <param name="mode">
/// <para>Specifies what kind of primitives to render. </para>
/// <para>Symbolic constants GL_POINTS, GL_LINE_STRIP, GL_LINE_LOOP, GL_LINES,GL_TRIANGLE_STRIP, GL_TRIANGLE_FAN, GL_TRIANGLES, GL_QUAD_STRIP, GL_QUADS, and GL_POLYGON are accepted. </para>
/// </param>
/// <param name="count">
/// Specifies the number of elements to be rendered.
/// </param>
/// <param name="type">
/// <para>Specifies the type of the values in indices.</para>
/// <para>Must be one of GL_UNSIGNED_BYTE, GL_UNSIGNED_SHORT, or GL_UNSIGNED_INT. </para>
/// </param>
/// <param name="indices">
/// <para>Specifies a pointer to the location where the indices are stored. </para>
/// <para>please using the function glaux.ArrayToPointer to get array pointer.</para>
/// </param>
[DllImport("opengl32.dll", ExactSpelling = false, EntryPoint = "glDrawElements", CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall)]
public static extern void DrawElements(uint mode, int count, uint type, IntPtr indices);
/// <summary>
/// enable server-side GL capabilities
/// </summary>
/// <param name="cap">
/// Specifies a symbolic constant indicating a GL capability.
/// </param>
[DllImport("opengl32.dll", ExactSpelling = false, EntryPoint = "glEnable", CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall)]
public static extern void Enable(uint cap);
/// <summary>
/// block until all GL execution is complete.
/// </summary>
[DllImport("opengl32.dll", ExactSpelling = false, EntryPoint = "glFinish", CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall)]
public static extern void Finish();
/// <summary>
/// force execution of GL commands in finite time
/// </summary>
[DllImport("opengl32.dll", ExactSpelling = false, EntryPoint = "glFlush", CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall)]
public static extern void Flush();
/// <summary>
/// define front- and back-facing polygons.
/// </summary>
/// <param name="mode">
/// <para>Specifies the orientation of front-facing polygons. GL_CW and GL_CCW are accepted.</para>
/// <para>The initial value is GL_CCW.</para>
/// </param>
[DllImport("opengl32.dll", ExactSpelling = false, EntryPoint = "glFrontFace", CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall)]
public static extern void FrontFace(uint mode);
/// <summary>
/// generate texture names.
/// </summary>
/// <param name="n">
/// Specifies the number of texture names to be generated.
/// </param>
/// <param name="textures">
/// Specifies an array in which the generated texture names are stored.
/// </param>
[DllImport("opengl32.dll", ExactSpelling = false, EntryPoint = "glGenTextures", CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall)]
public static extern void GenTextures(int n, uint[] textures);
/// <summary>
/// return the value or values of a selected parameter
/// </summary>
/// <param name="pname">
/// <para>Specifies the parameter value to be returned. </para>
/// <para>The symbolic constants in the list below are accepted. </para>
/// </param>
/// <param name="Params">
/// Returns the value or values of the specified parameter.
/// </param>
[DllImport("opengl32.dll", ExactSpelling = false, EntryPoint = "glGetBooleanv", CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall)]
public static extern void GetBoolean(uint pname, bool[] Params);
/// <summary>
/// return the value or values of a selected parameter.
/// </summary>
/// <param name="pname">
/// Specifies the parameter value to be returned. The symbolic constants in the list below are accepted.
/// </param>
/// <param name="Params">
/// Returns the value or values of the specified parameter.
/// </param>
[DllImport("opengl32.dll", ExactSpelling = false, EntryPoint = "glGetDoublev", CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall)]
public static extern void GetDouble(uint pname, double[] Params);
/// <summary>
/// return error information.
/// </summary>
/// <returns>
/// returns the value of the error flag.
/// </returns>
[DllImport("opengl32.dll", ExactSpelling = false, EntryPoint = "glGetError", CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall)]
public static extern uint GetError();
/// <summary>
/// return the value or values of a selected parameter.
/// </summary>
/// <param name="pname">
/// Specifies the parameter value to be returned. The symbolic constants in the list below are accepted.
/// </param>
/// <param name="Params">
/// Returns the value or values of the specified parameter.
/// </param>
[DllImport("opengl32.dll", ExactSpelling = false, EntryPoint = "glGetFloatv", CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall)]
public static extern void GetFloat(uint pname, float[] Params);
/// <summary>
/// return the value or values of a selected parameter.
/// </summary>
/// <param name="pname">
/// Specifies the parameter value to be returned. The symbolic constants in the list below are accepted.
/// </param>
/// <param name="Params">
/// Returns the value or values of the specified parameter.
/// </param>
[DllImport("opengl32.dll", ExactSpelling = false, EntryPoint = "glGetIntegerv", CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall)]
public static extern void GetInteger(uint pname, int[] Params);
/// <summary>
/// return the address of the specified pointer.
/// </summary>
/// <param name="pname">
/// <para>Specifies the array or buffer pointer to be returned.</para>
/// <para>Symbolic constants GL_COLOR_ARRAY_POINTER, GL_EDGE_FLAG_ARRAY_POINTER, GL_FOG_COORD_ARRAY_POINTER, </para>
/// <para>GL_FEEDBACK_BUFFER_POINTER, GL_INDEX_ARRAY_POINTER, GL_NORMAL_ARRAY_POINTER, </para>
/// <para>GL_SECONDARY_COLOR_ARRAY_POINTER, GL_SELECTION_BUFFER_POINTER, GL_TEXTURE_COORD_ARRAY_POINTER,or GL_VERTEX_ARRAY_POINTER are accepted. </para>
/// </param>
/// <param name="Params">
/// Returns the pointer value specified by pname.
/// </param>
[DllImport("opengl32.dll", ExactSpelling = false, EntryPoint = "glGetPointerv", CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall)]
public static extern void GetPointer(uint pname, IntPtr[] Params);
/// <summary>
/// return a string describing the current GL connection.
/// </summary>
/// <param name="name">
/// <para>Specifies a symbolic constant, one of GL_VENDOR, GL_RENDERER, GL_VERSION, GL_SHADING_LANGUAGE_VERSION,or GL_EXTENSIONS. </para>
/// </param>
/// <returns></returns>
[DllImport("opengl32.dll", ExactSpelling = false, EntryPoint = "glGetString", CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall)]
public static extern IntPtr GetString(uint name);
/// <summary>
/// return a texture image
/// </summary>
/// <param name="target">
/// <para>Specifies which texture is to be obtained.</para>
/// <para>GL_TEXTURE_1D, GL_TEXTURE_2D, GL_TEXTURE_3D, GL_TEXTURE_CUBE_MAP_POSITIVE_X, </para>
/// <para>GL_TEXTURE_CUBE_MAP_NEGATIVE_X, GL_TEXTURE_CUBE_MAP_POSITIVE_Y, GL_TEXTURE_CUBE_MAP_NEGATIVE_Y, </para>
/// <para>GL_TEXTURE_CUBE_MAP_POSITIVE_Z, and GL_TEXTURE_CUBE_MAP_NEGATIVE_Z are accepted. </para>
/// </param>
/// <param name="level">
/// <para>Specifies the level-of-detail number of the desired image. Level 0 is the base image level. </para>
/// <para>Level n is the nth mipmap reduction image.</para>
/// </param>
/// <param name="format">
/// <para>Specifies a pixel format for the returned data. </para>
/// <para>The supported formats are GL_RED, GL_GREEN, GL_BLUE, GL_ALPHA, GL_RGB, GL_BGR, GL_RGBA, GL_BGRA,</para>
/// <para>GL_LUMINANCE, and GL_LUMINANCE_ALPHA. </para>
/// </param>
/// <param name="type">
/// <para>Specifies a pixel type for the returned data. </para>
/// <para>The supported types are GL_UNSIGNED_BYTE, GL_BYTE, GL_UNSIGNED_SHORT, GL_SHORT, GL_UNSIGNED_INT, </para>
/// <para>GL_INT, GL_FLOAT, GL_UNSIGNED_BYTE_3_3_2, GL_UNSIGNED_BYTE_2_3_3_REV, GL_UNSIGNED_SHORT_5_6_5,</para>
/// <para>GL_UNSIGNED_SHORT_5_6_5_REV, GL_UNSIGNED_SHORT_4_4_4_4, GL_UNSIGNED_SHORT_4_4_4_4_REV,</para>
/// <para>GL_UNSIGNED_SHORT_5_5_5_1, GL_UNSIGNED_SHORT_1_5_5_5_REV, GL_UNSIGNED_INT_8_8_8_8, </para>
/// <para>GL_UNSIGNED_INT_8_8_8_8_REV, GL_UNSIGNED_INT_10_10_10_2, and GL_UNSIGNED_INT_2_10_10_10_REV. </para>
/// </param>
/// <param name="pixels">
/// <para> Returns the texture image. Should be a pointer to an array of the type specified by type.</para>
/// <para> You can use the function glaux.ArrayToPointer to get the array pointer.</para>
/// </param>
[DllImport("opengl32.dll", ExactSpelling = false, EntryPoint = "glGetTexImage", CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall)]
public static extern void GetTexImage(uint target, int level, uint format, uint type, IntPtr pixels);
/// <summary>
/// Returns the texture image. Should be a pointer to an array of the type specified by type.
/// </summary>
/// <param name="target">
/// <para>Specifies the symbolic name of the target texture, either GL_TEXTURE_1D, GL_TEXTURE_2D,</para>
/// <para>GL_TEXTURE_3D, GL_PROXY_TEXTURE_1D, GL_PROXY_TEXTURE_2D, GL_PROXY_TEXTURE_3D, </para>
/// <para>GL_TEXTURE_CUBE_MAP_POSITIVE_X, GL_TEXTURE_CUBE_MAP_NEGATIVE_X, GL_TEXTURE_CUBE_MAP_POSITIVE_Y,</para>
/// <para>GL_TEXTURE_CUBE_MAP_NEGATIVE_Y, GL_TEXTURE_CUBE_MAP_POSITIVE_Z, GL_TEXTURE_CUBE_MAP_NEGATIVE_Z, or GL_PROXY_TEXTURE_CUBE_MAP. </para>
/// </param>
/// <param name="level">
/// <para>Specifies the level-of-detail number of the desired image.</para>
/// <para>Level 0 is the base image level. Level n is the nth mipmap reduction image. </para>
/// </param>
/// <param name="pname">
/// <para>Specifies the symbolic name of a texture parameter.</para>
/// <para>GL_TEXTURE_WIDTH, GL_TEXTURE_HEIGHT, GL_TEXTURE_DEPTH, GL_TEXTURE_INTERNAL_FORMAT,</para>
/// <para>GL_TEXTURE_BORDER, GL_TEXTURE_RED_SIZE, GL_TEXTURE_GREEN_SIZE, GL_TEXTURE_BLUE_SIZE, </para>
/// <para>GL_TEXTURE_ALPHA_SIZE, GL_TEXTURE_LUMINANCE_SIZE, GL_TEXTURE_INTENSITY_SIZE, GL_TEXTURE_DEPTH_SIZE,</para>
/// <para>GL_TEXTURE_COMPRESSED, and GL_TEXTURE_COMPRESSED_IMAGE_SIZE are accepted. </para>
/// </param>
/// <param name="Params">
/// Returns the requested data.
/// </param>
[DllImport("opengl32.dll", ExactSpelling = false, EntryPoint = "glGetTexLevelParameterfv", CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall)]
public static extern void GetTexLevelParameter(uint target, int level, uint pname, float[] Params);
/// <summary>
/// Returns the texture image. Should be a pointer to an array of the type specified by type.
/// </summary>
/// <param name="target">
/// <para>Specifies the symbolic name of the target texture, either GL_TEXTURE_1D, GL_TEXTURE_2D,</para>
/// <para>GL_TEXTURE_3D, GL_PROXY_TEXTURE_1D, GL_PROXY_TEXTURE_2D, GL_PROXY_TEXTURE_3D, </para>
/// <para>GL_TEXTURE_CUBE_MAP_POSITIVE_X, GL_TEXTURE_CUBE_MAP_NEGATIVE_X, GL_TEXTURE_CUBE_MAP_POSITIVE_Y,</para>
/// <para>GL_TEXTURE_CUBE_MAP_NEGATIVE_Y, GL_TEXTURE_CUBE_MAP_POSITIVE_Z, GL_TEXTURE_CUBE_MAP_NEGATIVE_Z,or GL_PROXY_TEXTURE_CUBE_MAP. </para>
/// </param>
/// <param name="level">
/// <para>Specifies the level-of-detail number of the desired image.</para>
/// <para>Level 0 is the base image level. Level n is the nth mipmap reduction image. </para>
/// </param>
/// <param name="pname">
/// <para>Specifies the symbolic name of a texture parameter.</para>
/// <para>GL_TEXTURE_WIDTH, GL_TEXTURE_HEIGHT, GL_TEXTURE_DEPTH, GL_TEXTURE_INTERNAL_FORMAT,</para>
/// <para>GL_TEXTURE_BORDER, GL_TEXTURE_RED_SIZE, GL_TEXTURE_GREEN_SIZE, GL_TEXTURE_BLUE_SIZE</para> ,
/// <para> GL_TEXTURE_ALPHA_SIZE, GL_TEXTURE_LUMINANCE_SIZE, GL_TEXTURE_INTENSITY_SIZE, GL_TEXTURE_DEPTH_SIZE,</para>
/// <para> GL_TEXTURE_COMPRESSED, and GL_TEXTURE_COMPRESSED_IMAGE_SIZE are accepted. </para>
/// </param>
/// <param name="Params">
/// Returns the requested data.
/// </param>
[DllImport("opengl32.dll", ExactSpelling = false, EntryPoint = "glGetTexLevelParameteriv", CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall)]
public static extern void GetTexLevelParameter(uint target, int level, uint pname, int[] Params);
/// <summary>
/// return texture parameter values.
/// </summary>
/// <param name="target">
/// <para>Specifies the symbolic name of the target texture. </para>
/// <para>GL_TEXTURE_1D, GL_TEXTURE_2D, GL_TEXTURE_3D, and GL_TEXTURE_CUBE_MAP are accepted. </para>
/// </param>
/// <param name="pname">
/// <para>Specifies the symbolic name of a texture parameter. </para>
/// <para>GL_TEXTURE_MAG_FILTER, GL_TEXTURE_MIN_FILTER, GL_TEXTURE_MIN_LOD, GL_TEXTURE_MAX_LOD,</para>
/// <para>GL_TEXTURE_BASE_LEVEL, GL_TEXTURE_MAX_LEVEL, GL_TEXTURE_WRAP_S, GL_TEXTURE_WRAP_T, </para>
/// <para>GL_TEXTURE_WRAP_R, GL_TEXTURE_BORDER_COLOR, GL_TEXTURE_PRIORITY, GL_TEXTURE_RESIDENT, </para>
/// <para>GL_TEXTURE_COMPARE_MODE, GL_TEXTURE_COMPARE_FUNC, GL_DEPTH_TEXTURE_MODE,and GL_GENERATE_MIPMAP are accepted. </para>
/// </param>
/// <param name="Params">
/// Returns the texture parameters.
/// </param>
[DllImport("opengl32.dll", ExactSpelling = false, EntryPoint = "glGetTexParameterfv", CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall)]
public static extern void GetTexParameter(uint target, uint pname, float[] Params);
/// <summary>
/// return texture parameter values.
/// </summary>
/// <param name="target">
/// <para>Specifies the symbolic name of the target texture. </para>
/// <para>GL_TEXTURE_1D, GL_TEXTURE_2D, GL_TEXTURE_3D, and GL_TEXTURE_CUBE_MAP are accepted.</para>
/// </param>
/// <param name="pname">
/// <para>Specifies the symbolic name of a texture parameter. </para>
/// <para>GL_TEXTURE_MAG_FILTER, GL_TEXTURE_MIN_FILTER, GL_TEXTURE_MIN_LOD, GL_TEXTURE_MAX_LOD,</para>
/// <para>GL_TEXTURE_BASE_LEVEL, GL_TEXTURE_MAX_LEVEL, GL_TEXTURE_WRAP_S, GL_TEXTURE_WRAP_T, </para>
/// <para>GL_TEXTURE_WRAP_R, GL_TEXTURE_BORDER_COLOR, GL_TEXTURE_PRIORITY, GL_TEXTURE_RESIDENT, </para>
/// <para>GL_TEXTURE_COMPARE_MODE, GL_TEXTURE_COMPARE_FUNC, GL_DEPTH_TEXTURE_MODE,and GL_GENERATE_MIPMAP are accepted. </para>
/// </param>
/// <param name="Params">
/// Returns the texture parameters.
/// </param>
[DllImport("opengl32.dll", ExactSpelling = false, EntryPoint = "glGetTexParameteriv", CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall)]
public static extern void GetTexParameter(uint target, uint pname, int[] Params);
/// <summary>
/// specify implementation-specific hints.
/// </summary>
/// <param name="target">
/// <para>Specifies a symbolic constant indicating the behavior to be controlled. </para>
/// <para>GL_FOG_HINT, GL_GENERATE_MIPMAP_HINT, GL_LINE_SMOOTH_HINT, GL_PERSPECTIVE_CORRECTION_HINT, </para>
/// <para>GL_POINT_SMOOTH_HINT, GL_POLYGON_SMOOTH_HINT, GL_TEXTURE_COMPRESSION_HINT,and GL_FRAGMENT_SHADER_DERIVATIVE_HINT are accepted. </para>
/// </param>
/// <param name="mode">
/// <para>Specifies a symbolic constant indicating the desired behavior.</para>
/// <para>GL_FASTEST, GL_NICEST, and GL_DONT_CARE are accepted. </para>
/// </param>
[DllImport("opengl32.dll", ExactSpelling = false, EntryPoint = "glHint", CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall)]
public static extern void Hint(uint target, uint mode);
/// <summary>
/// test whether a capability is enabled
/// </summary>
/// <param name="cap">
/// Specifies a symbolic constant indicating a GL capability.
/// </param>
/// <returns>
/// returns GL_TRUE if cap is an enabled capability and returns GL_FALSE otherwise.
/// </returns>
[DllImport("opengl32.dll", ExactSpelling = false, EntryPoint = "glIsEnabled", CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall)]
public static extern bool IsEnabled(uint cap);
/// <summary>
/// determine if a name corresponds to a texture
/// </summary>
/// <param name="texture">
/// Specifies a value that may be the name of a texture.
/// </param>
/// <returns>
/// returns GL_TRUE if texture is currently the name of a texture.
/// </returns>
[DllImport("opengl32.dll", ExactSpelling = false, EntryPoint = "glIsTexture", CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall)]
public static extern bool IsTexture(uint texture);
/// <summary>
/// specify the width of rasterized lines.
/// </summary>
/// <param name="width">
/// Specifies the width of rasterized lines. The initial value is 1.
/// </param>
[DllImport("opengl32.dll", ExactSpelling = false, EntryPoint = "glLineWidth", CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall)]
public static extern void LineWidth(float width);
/// <summary>
/// specify a logical pixel operation for color index rendering.
/// </summary>
/// <param name="opcode">
/// <para>Specifies a symbolic constant that selects a logical operation. </para>
/// <para>The following symbols are accepted: GL_CLEAR, GL_SET, GL_COPY, GL_COPY_INVERTED, GL_NOOP, GL_INVERT,</para>
/// <para>GL_AND, GL_NAND, GL_OR, GL_NOR, GL_XOR, GL_EQUIV, GL_AND_REVERSE, GL_AND_INVERTED, GL_OR_REVERSE, </para>
/// <para>and GL_OR_INVERTED. The initial value is GL_COPY. </para>
/// </param>
[DllImport("opengl32.dll", ExactSpelling = false, EntryPoint = "glLogicOp", CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall)]
public static extern void LogicOp(uint opcode);
/// <summary>
/// set pixel storage modes.
/// </summary>
/// <param name="pname">
/// <para>Specifies the symbolic name of the parameter to be set.</para>
/// <para>Six values affect the packing of pixel data into memory: GL_PACK_SWAP_BYTES, GL_PACK_LSB_FIRST,</para>
/// <para>GL_PACK_ROW_LENGTH, GL_PACK_IMAGE_HEIGHT, GL_PACK_SKIP_PIXELS, GL_PACK_SKIP_ROWS, GL_PACK_SKIP_IMAGES,</para>
/// <para>and GL_PACK_ALIGNMENT. Six more affect the unpacking of pixel data from memory: GL_UNPACK_SWAP_BYTES,</para>
/// <para>GL_UNPACK_LSB_FIRST, GL_UNPACK_ROW_LENGTH, GL_UNPACK_IMAGE_HEIGHT, GL_UNPACK_SKIP_PIXELS,GL_UNPACK_SKIP_ROWS, GL_UNPACK_SKIP_IMAGES, and GL_UNPACK_ALIGNMENT. </para>
/// </param>
/// <param name="param">
/// Specifies the value that pname is set to.
/// </param>
[DllImport("opengl32.dll", ExactSpelling = false, EntryPoint = "glPixelStoref", CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall)]
public static extern void PixelStore(uint pname, float param);
/// <summary>
/// set pixel storage modes.
/// </summary>
/// <param name="pname">
/// <para>Specifies the symbolic name of the parameter to be set. </para>
/// <para>Six values affect the packing of pixel data into memory: GL_PACK_SWAP_BYTES, GL_PACK_LSB_FIRST,</para>
/// <para>GL_PACK_ROW_LENGTH, GL_PACK_IMAGE_HEIGHT, GL_PACK_SKIP_PIXELS, GL_PACK_SKIP_ROWS, GL_PACK_SKIP_IMAGES,</para>
/// <para>and GL_PACK_ALIGNMENT. Six more affect the unpacking of pixel data from memory: GL_UNPACK_SWAP_BYTES,</para>
/// <para>GL_UNPACK_LSB_FIRST, GL_UNPACK_ROW_LENGTH, GL_UNPACK_IMAGE_HEIGHT, GL_UNPACK_SKIP_PIXELS,</para>
/// <para>GL_UNPACK_SKIP_ROWS, GL_UNPACK_SKIP_IMAGES, and GL_UNPACK_ALIGNMENT. </para>
/// </param>
/// <param name="param">
/// Specifies the value that pname is set to.
/// </param>
[DllImport("opengl32.dll", ExactSpelling = false, EntryPoint = "glPixelStorei", CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall)]
public static extern void PixelStore(uint pname, int param);
/// <summary>
/// specify the diameter of rasterized points.
/// </summary>
/// <param name="size">
/// Specifies the diameter of rasterized points. The initial value is 1.
/// </param>
[DllImport("opengl32.dll", ExactSpelling = false, EntryPoint = "glPointSize", CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall)]
public static extern void PointSize(float size);
/// <summary>
/// select a polygon rasterization mode.
/// </summary>
/// <param name="face">
/// <para>Specifies the polygons that mode applies to.</para>
/// <para>Must be GL_FRONT for front-facing polygons, GL_BACK for back-facing polygons,or GL_FRONT_AND_BACK for front- and back-facing polygons. </para>
/// </param>
/// <param name="mode">
/// <para>Specifies how polygons will be rasterized. Accepted values are GL_POINT, GL_LINE, and GL_FILL. </para>
/// <para>The initial value is GL_FILL for both front- and back-facing polygons. </para>
/// </param>
[DllImport("opengl32.dll", ExactSpelling = false, EntryPoint = "glPolygonMode", CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall)]
public static extern void PolygonMode(uint face, uint mode);
/// <summary>
/// set the scale and units used to calculate depth values.
/// </summary>
/// <param name="factor">
/// <para>Specifies a scale factor that is used to create a variable depth offset for each polygon. </para>
/// <para>The initial value is 0.</para>
/// </param>
/// <param name="units">
/// <para>Is multiplied by an implementation-specific value to create a constant depth offset. </para>
/// <para>The initial value is 0. </para>
/// </param>
[DllImport("opengl32.dll", ExactSpelling = false, EntryPoint = "glPolygonOffset", CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall)]
public static extern void PolygonOffset(float factor, float units);
/// <summary>
/// select a color buffer source for pixels.
/// </summary>
/// <param name="mode">
/// <para>Specifies a color buffer. </para>
/// <para>Accepted values are GL_FRONT_LEFT, GL_FRONT_RIGHT, GL_BACK_LEFT, GL_BACK_RIGHT, GL_FRONT,GL_BACK, GL_LEFT, GL_RIGHT, and GL_AUXi, where i is between 0 and the value of GL_AUX_BUFFERS minus 1. </para>
/// </param>
[DllImport("opengl32.dll", ExactSpelling = false, EntryPoint = "glReadBuffer", CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall)]
public static extern void ReadBuffer(uint mode);
/// <summary>
/// read a block of pixels from the frame buffer.
/// </summary>
/// <param name="x">
/// <para>Specify the window coordinates of the first pixel that is read from the frame buffer. </para>
/// <para>This location is the lower left corner of a rectangular block of pixels. </para>
/// </param>
/// <param name="y">
/// <para>Specify the window coordinates of the first pixel that is read from the frame buffer.</para>
/// <para>This location is the lower left corner of a rectangular block of pixels. </para>
/// </param>
/// <param name="width">
/// Specify the dimensions of the pixel rectangle. width and height of one correspond to a single pixel.
/// </param>
/// <param name="height">
/// Specify the dimensions of the pixel rectangle. width and height of one correspond to a single pixel.
/// </param>
/// <param name="format">
/// <para>Specifies the format of the pixel data. </para>
/// <para>The following symbolic values are accepted: GL_COLOR_INDEX, GL_STENCIL_INDEX, GL_DEPTH_COMPONENT, </para>
/// <para>GL_RED, GL_GREEN, GL_BLUE, GL_ALPHA, GL_RGB, GL_BGR, GL_RGBA, GL_BGRA, GL_LUMINANCE, and GL_LUMINANCE_ALPHA. </para>
/// </param>
/// <param name="type">
/// <para>Specifies the data type of the pixel data. </para>
/// <para>Must be one of GL_UNSIGNED_BYTE, GL_BYTE, GL_BITMAP, GL_UNSIGNED_SHORT, GL_SHORT, GL_UNSIGNED_INT, </para>
/// <para>GL_INT, GL_FLOAT, GL_UNSIGNED_BYTE_3_3_2, GL_UNSIGNED_BYTE_2_3_3_REV, GL_UNSIGNED_SHORT_5_6_5, </para>
/// <para>GL_UNSIGNED_SHORT_5_6_5_REV, GL_UNSIGNED_SHORT_4_4_4_4, GL_UNSIGNED_SHORT_4_4_4_4_REV,</para>
/// <para>GL_UNSIGNED_SHORT_5_5_5_1, GL_UNSIGNED_SHORT_1_5_5_5_REV, GL_UNSIGNED_INT_8_8_8_8, </para>
/// <para>GL_UNSIGNED_INT_8_8_8_8_REV, GL_UNSIGNED_INT_10_10_10_2, or GL_UNSIGNED_INT_2_10_10_10_REV. </para>
/// </param>
/// <param name="pixels">
/// <para>Returns the pixel data. </para>
/// <para>You can use the function glaux.ArrayToPointer to get the array pointer.</para>
/// </param>
[DllImport("opengl32.dll", ExactSpelling = false, EntryPoint = "glReadPixels", CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall)]
public static extern void ReadPixels(int x, int y, int width, int height, uint format, uint type, IntPtr pixels);
/// <summary>
/// define the scissor box.
/// </summary>
/// <param name="x">
/// Specify the lower left corner of the scissor box. Initially (0, 0).
/// </param>
/// <param name="y">
/// Specify the lower left corner of the scissor box. Initially (0, 0).
/// </param>
/// <param name="width">
/// <para>Specify the width of the scissor box. </para>
/// <para>When a GL context is first attached to a window, width and height are set to the dimensions of that window. </para>
/// </param>
/// <param name="height">
/// Specify the height of the scissor box. When a GL context is first attached to a window, width and height are set to the dimensions of that window.
/// </param>
[DllImport("opengl32.dll", ExactSpelling = false, EntryPoint = "glScissor", CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall)]
public static extern void Scissor(int x, int y, int width, int height);
/// <summary>
/// set front and back function and reference value for stencil testing.
/// </summary>
/// <param name="func">
/// <para>Specifies the test function. </para>
/// <para>Eight symbolic constants are valid: GL_NEVER, GL_LESS, GL_LEQUAL, GL_GREATER, GL_GEQUAL, </para>
/// <para>GL_EQUAL, GL_NOTEQUAL, and GL_ALWAYS. The initial value is GL_ALWAYS. </para>
/// </param>
/// <param name="Ref">
/// <para>Specifies the reference value for the stencil test. </para>
/// <para>ref is clamped to the range [0,2n−1], where n is the number of bitplanes in the stencil buffer. </para>
/// <para>The initial value is 0. </para>
/// </param>
/// <param name="mask">
/// <para>Specifies a mask that is ANDed with both the reference value and the stored stencil value when the test is done.</para>
/// <para>The initial value is all 1's.</para>
/// </param>
[DllImport("opengl32.dll", ExactSpelling = false, EntryPoint = "glStencilFunc", CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall)]
public static extern void StencilFunc(uint func, int Ref, uint mask);
/// <summary>
/// control the front and back writing of individual bits in the stencil planes.
/// </summary>
/// <param name="mask">
/// <para>Specifies a bit mask to enable and disable writing of individual bits in the stencil planes. </para>
/// <para>Initially, the mask is all 1's.</para>
/// </param>
[DllImport("opengl32.dll", ExactSpelling = false, EntryPoint = "glStencilMask", CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall)]
public static extern void StencilMask(uint mask);
/// <summary>
/// set front and back stencil test actions.
/// </summary>
/// <param name="fail">
/// <para>Specifies the action to take when the stencil test fails. </para>
/// <para>Eight symbolic constants are accepted:</para>
/// <para>GL_KEEP, GL_ZERO, GL_REPLACE, GL_INCR, GL_INCR_WRAP, GL_DECR, GL_DECR_WRAP, and GL_INVERT.</para>
/// <para>The initial value is GL_KEEP. </para>
/// </param>
/// <param name="zfail">
/// <para>Specifies the stencil action when the stencil test passes, but the depth test fails. </para>
/// <para>dpfail accepts the same symbolic constants as sfail. The initial value is GL_KEEP. </para>
/// </param>
/// <param name="zpass">
/// <para>Specifies the stencil action when both the stencil test and the depth test pass, </para>
/// <para>or when the stencil test passes and either there is no depth buffer or depth testing is not enabled. </para>
/// <para>dppass accepts the same symbolic constants as sfail. The initial value is GL_KEEP. </para>
/// </param>
[DllImport("opengl32.dll", ExactSpelling = false, EntryPoint = "glStencilOp", CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall)]
public static extern void StencilOp(uint fail, uint zfail, uint zpass);
/// <summary>
/// specify a one-dimensional texture image.
/// </summary>
/// <param name="target">
/// Specifies the target texture. Must be GL_TEXTURE_1D or GL_PROXY_TEXTURE_1D.
/// </param>
/// <param name="level">
/// <para>Specifies the level-of-detail number. Level 0 is the base image level. </para>
/// <para>Level n is the nth mipmap reduction image</para>
/// </param>
/// <param name="internalformat">
/// <para> Specifies the number of color components in the texture. </para>
/// <para>Must be 1, 2, 3, or 4, or one of the following symbolic constants: GL_ALPHA, GL_ALPHA4, GL_ALPHA8,</para>
/// <para>GL_ALPHA12, GL_ALPHA16, GL_COMPRESSED_ALPHA, GL_COMPRESSED_LUMINANCE, GL_COMPRESSED_LUMINANCE_ALPHA,</para>
/// <para>GL_COMPRESSED_INTENSITY, GL_COMPRESSED_RGB, GL_COMPRESSED_RGBA, GL_DEPTH_COMPONENT, GL_DEPTH_COMPONENT16,</para>
/// <para>GL_DEPTH_COMPONENT24, GL_DEPTH_COMPONENT32, GL_LUMINANCE, GL_LUMINANCE4, GL_LUMINANCE8, GL_LUMINANCE12,</para>
/// <para>GL_LUMINANCE16, GL_LUMINANCE_ALPHA, GL_LUMINANCE4_ALPHA4, GL_LUMINANCE6_ALPHA2, GL_LUMINANCE8_ALPHA8, </para>
/// <para> GL_LUMINANCE12_ALPHA4, GL_LUMINANCE12_ALPHA12, GL_LUMINANCE16_ALPHA16, GL_INTENSITY, GL_INTENSITY4, </para>
/// <para>GL_INTENSITY8, GL_INTENSITY12, GL_INTENSITY16, GL_R3_G3_B2, GL_RGB, GL_RGB4, GL_RGB5, GL_RGB8, GL_RGB10,</para>
/// <para>GL_RGB12, GL_RGB16, GL_RGBA, GL_RGBA2, GL_RGBA4, GL_RGB5_A1, GL_RGBA8, GL_RGB10_A2, GL_RGBA12, GL_RGBA16,</para>
/// <para>GL_SLUMINANCE, GL_SLUMINANCE8, GL_SLUMINANCE_ALPHA, GL_SLUMINANCE8_ALPHA8, GL_SRGB, GL_SRGB8, GL_SRGB_ALPHA, or GL_SRGB8_ALPHA8.</para>
/// </param>
/// <param name="width">
/// <para>Specifies the width of the texture image including the border if any. </para>
/// <para>If the GL version does not support non-power-of-two sizes, this value must be 2^n+2(border) for some integer n.</para>
/// <para>All implementations support texture images that are at least 64 texels wide. </para>
/// <para>The height of the 1D texture image is 1. </para>
/// </param>
/// <param name="border">
/// Specifies the width of the border. Must be either 0 or 1.
/// </param>
/// <param name="format">
/// <para>Specifies the format of the pixel data. </para>
/// <para>The following symbolic values are accepted: </para>
/// <para>GL_COLOR_INDEX, GL_RED, GL_GREEN, GL_BLUE, GL_ALPHA, GL_RGB, GL_BGR, GL_RGBA, GL_BGRA, GL_LUMINANCE, and GL_LUMINANCE_ALPHA.</para>
/// </param>
/// <param name="type">
/// <para>Specifies the data type of the pixel data. </para>
/// <para>The following symbolic values are accepted: GL_UNSIGNED_BYTE, GL_BYTE, GL_BITMAP, GL_UNSIGNED_SHORT,</para>
/// <para>GL_SHORT, GL_UNSIGNED_INT, GL_INT, GL_FLOAT, GL_UNSIGNED_BYTE_3_3_2, GL_UNSIGNED_BYTE_2_3_3_REV,</para>
/// <para>GL_UNSIGNED_SHORT_5_6_5, GL_UNSIGNED_SHORT_5_6_5_REV, GL_UNSIGNED_SHORT_4_4_4_4,</para>
/// <para>GL_UNSIGNED_SHORT_4_4_4_4_REV, GL_UNSIGNED_SHORT_5_5_5_1, GL_UNSIGNED_SHORT_1_5_5_5_REV, </para>
/// <para>GL_UNSIGNED_INT_8_8_8_8, GL_UNSIGNED_INT_8_8_8_8_REV, GL_UNSIGNED_INT_10_10_10_2,and GL_UNSIGNED_INT_2_10_10_10_REV. </para>
/// </param>
/// <param name="pixels">
/// <para>Specifies a pointer to the image data in memory. </para>
/// <para>You can use the function glaux.ArrayToPointer to get the array pointer.</para>
/// </param>
[DllImport("opengl32.dll", ExactSpelling = false, EntryPoint = "glTexImage1D", CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall)]
public static extern void TexImage1D(uint target, int level, int internalformat, int width, int border, uint format, uint type,IntPtr pixels);
/// <summary>
/// specify a two-dimensional texture image.
/// </summary>
/// <param name="target">
/// <para>Specifies the target texture. </para>
/// <para>Must be GL_TEXTURE_2D, GL_PROXY_TEXTURE_2D, GL_TEXTURE_CUBE_MAP_POSITIVE_X,</para>
/// <para>GL_TEXTURE_CUBE_MAP_NEGATIVE_X, GL_TEXTURE_CUBE_MAP_POSITIVE_Y, GL_TEXTURE_CUBE_MAP_NEGATIVE_Y, </para>
/// <para>GL_TEXTURE_CUBE_MAP_POSITIVE_Z, GL_TEXTURE_CUBE_MAP_NEGATIVE_Z, or GL_PROXY_TEXTURE_CUBE_MAP. </para>
/// </param>
/// <param name="level">
/// <para>Specifies the level-of-detail number. Level 0 is the base image level. </para>
/// <para>Level n is the nth mipmap reduction image. </para>
/// </param>
/// <param name="internalformat">
/// <para>Specifies the number of color components in the texture. </para>
/// <para>Must be 1, 2, 3, or 4, or one of the following symbolic constants: GL_ALPHA, GL_ALPHA4, GL_ALPHA8,</para>
/// <para>GL_ALPHA12, GL_ALPHA16, GL_COMPRESSED_ALPHA, GL_COMPRESSED_LUMINANCE, GL_COMPRESSED_LUMINANCE_ALPHA,</para>
/// <para>GL_COMPRESSED_INTENSITY, GL_COMPRESSED_RGB, GL_COMPRESSED_RGBA, GL_DEPTH_COMPONENT, GL_DEPTH_COMPONENT16,</para>
/// <para>GL_DEPTH_COMPONENT24, GL_DEPTH_COMPONENT32, GL_LUMINANCE, GL_LUMINANCE4, GL_LUMINANCE8, GL_LUMINANCE12,</para>
/// <para>GL_LUMINANCE16, GL_LUMINANCE_ALPHA, GL_LUMINANCE4_ALPHA4, GL_LUMINANCE6_ALPHA2, GL_LUMINANCE8_ALPHA8,</para>
/// <para>GL_LUMINANCE12_ALPHA4, GL_LUMINANCE12_ALPHA12, GL_LUMINANCE16_ALPHA16, GL_INTENSITY, GL_INTENSITY4, </para>
/// <para>GL_INTENSITY8, GL_INTENSITY12, GL_INTENSITY16, GL_R3_G3_B2, GL_RGB, GL_RGB4, GL_RGB5, GL_RGB8, GL_RGB10,</para>
/// <para>GL_RGB12, GL_RGB16, GL_RGBA, GL_RGBA2, GL_RGBA4, GL_RGB5_A1, GL_RGBA8, GL_RGB10_A2, GL_RGBA12, GL_RGBA16,</para>
/// <para>GL_SLUMINANCE, GL_SLUMINANCE8, GL_SLUMINANCE_ALPHA, GL_SLUMINANCE8_ALPHA8, GL_SRGB, GL_SRGB8, GL_SRGB_ALPHA, or GL_SRGB8_ALPHA8. </para>
/// </param>
/// <param name="width">
/// <para>Specifies the width of the texture image including the border if any.</para>
/// <para>If the GL version does not support non-power-of-two sizes, this value must be 2^n+2(border) for some integer n.</para>
/// <para>All implementations support texture images that are at least 64 texels wide. </para>
/// </param>
/// <param name="height">
/// <para>Specifies the height of the texture image including the border if any. </para>
/// <para>If the GL version does not support non-power-of-two sizes, this value must be 2^m+2(border) for some integer m.</para>
/// <para>All implementations support texture images that are at least 64 texels high. </para>
/// </param>
/// <param name="border">
/// Specifies the width of the border. Must be either 0 or 1.
/// </param>
/// <param name="format">
/// <para>Specifies the format of the pixel data. </para>
/// <para>The following symbolic values are accepted: GL_COLOR_INDEX, GL_RED, GL_GREEN, GL_BLUE, GL_ALPHA, </para>
/// <para>GL_RGB, GL_BGR, GL_RGBA, GL_BGRA, GL_LUMINANCE, and GL_LUMINANCE_ALPHA. </para>
/// </param>
/// <param name="type">
/// <para>Specifies the data type of the pixel data.</para>
/// <para>The following symbolic values are accepted: GL_UNSIGNED_BYTE, GL_BYTE, GL_BITMAP, GL_UNSIGNED_SHORT, </para>
/// <para>GL_SHORT, GL_UNSIGNED_INT, GL_INT, GL_FLOAT, GL_UNSIGNED_BYTE_3_3_2, GL_UNSIGNED_BYTE_2_3_3_REV,</para>
/// <para>GL_UNSIGNED_SHORT_5_6_5, GL_UNSIGNED_SHORT_5_6_5_REV, GL_UNSIGNED_SHORT_4_4_4_4, </para>
/// <para>GL_UNSIGNED_SHORT_4_4_4_4_REV, GL_UNSIGNED_SHORT_5_5_5_1, GL_UNSIGNED_SHORT_1_5_5_5_REV, </para>
/// <para>GL_UNSIGNED_INT_8_8_8_8, GL_UNSIGNED_INT_8_8_8_8_REV, GL_UNSIGNED_INT_10_10_10_2,and GL_UNSIGNED_INT_2_10_10_10_REV.</para>
/// </param>
/// <param name="pixels">
/// <para>Specifies a pointer to the image data in memory. </para>
/// <para>You can use the function glaux.ArrayToPointer to get the array pointer.</para>
/// </param>
[DllImport("opengl32.dll", ExactSpelling = false, EntryPoint = "glTexImage2D", CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall)]
public static extern void TexImage2D(uint target, int level, int internalformat, int width, int height, int border, uint format, uint type, IntPtr pixels);
/// <summary>
/// set texture parameters.
/// </summary>
/// <param name="target">
/// Specifies the target texture, which must be either GL_TEXTURE_1D, GL_TEXTURE_2D, GL_TEXTURE_3D,or GL_TEXTURE_CUBE_MAP.
/// </param>
/// <param name="pname">
/// <para>Specifies the symbolic name of a single-valued texture parameter. </para>
/// <para>pname can be one of the following: GL_TEXTURE_MIN_FILTER, GL_TEXTURE_MAG_FILTER, GL_TEXTURE_MIN_LOD,</para>
/// <para>GL_TEXTURE_MAX_LOD, GL_TEXTURE_BASE_LEVEL, GL_TEXTURE_MAX_LEVEL, GL_TEXTURE_WRAP_S, GL_TEXTURE_WRAP_T, </para>
/// <para>GL_TEXTURE_WRAP_R, GL_TEXTURE_PRIORITY, GL_TEXTURE_COMPARE_MODE, GL_TEXTURE_COMPARE_FUNC,GL_DEPTH_TEXTURE_MODE, or GL_GENERATE_MIPMAP.</para>
/// </param>
/// <param name="param">
/// Specifies the value of pname.
/// </param>
[DllImport("opengl32.dll", ExactSpelling = false, EntryPoint = "glTexParameterf", CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall)]
public static extern void TexParameter(uint target, uint pname, float param);
/// <summary>
/// set texture parameters
/// </summary>
/// <param name="target">
/// Specifies the target texture, which must be either GL_TEXTURE_1D, GL_TEXTURE_2D or GL_TEXTURE_3D.
/// </param>
/// <param name="pname">
/// <para>Specifies the symbolic name of a texture parameter.</para>
/// <para>pname can be one of the following: GL_TEXTURE_MIN_FILTER, GL_TEXTURE_MAG_FILTER, GL_TEXTURE_MIN_LOD, </para>
/// <para> GL_TEXTURE_MAX_LOD, GL_TEXTURE_BASE_LEVEL, GL_TEXTURE_MAX_LEVEL, GL_TEXTURE_WRAP_S, GL_TEXTURE_WRAP_T,</para>
/// <para>GL_TEXTURE_WRAP_R, GL_TEXTURE_BORDER_COLOR, GL_TEXTURE_PRIORITY, GL_TEXTURE_COMPARE_MODE, </para>
/// <para>GL_TEXTURE_COMPARE_FUNC, GL_DEPTH_TEXTURE_MODE, or GL_GENERATE_MIPMAP. </para>
/// </param>
/// <param name="Params">
/// Specifies an array where the value or values of pname are stored.
/// </param>
[DllImport("opengl32.dll", ExactSpelling = false, EntryPoint = "glTexParameterfv", CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall)]
public static extern void TexParameter(uint target, uint pname, float[] Params);
/// <summary>
/// set texture parameters.
/// </summary>
/// <param name="target">
/// <para>Specifies the target texture, which must be either GL_TEXTURE_1D, GL_TEXTURE_2D, GL_TEXTURE_3D,or GL_TEXTURE_CUBE_MAP. </para>
/// </param>
/// <param name="pname">
/// <para>Specifies the symbolic name of a single-valued texture parameter. </para>
/// <para>pname can be one of the following: GL_TEXTURE_MIN_FILTER, GL_TEXTURE_MAG_FILTER, GL_TEXTURE_MIN_LOD,</para>
/// <para>GL_TEXTURE_MAX_LOD, GL_TEXTURE_BASE_LEVEL, GL_TEXTURE_MAX_LEVEL, GL_TEXTURE_WRAP_S, GL_TEXTURE_WRAP_T, </para>
/// <para>GL_TEXTURE_WRAP_R, GL_TEXTURE_PRIORITY, GL_TEXTURE_COMPARE_MODE, GL_TEXTURE_COMPARE_FUNC,GL_DEPTH_TEXTURE_MODE, or GL_GENERATE_MIPMAP. </para>
/// </param>
/// <param name="param">
/// Specifies the value of pname.
/// </param>
[DllImport("opengl32.dll", ExactSpelling = false, EntryPoint = "glTexParameteri", CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall)]
public static extern void TexParameter(uint target, uint pname, int param);
/// <summary>
/// set texture parameters
/// </summary>
/// <param name="target">
/// Specifies the target texture, which must be either GL_TEXTURE_1D, GL_TEXTURE_2D or GL_TEXTURE_3D.
/// </param>
/// <param name="pname">
/// <para>Specifies the symbolic name of a texture parameter.</para>
/// <para>pname can be one of the following: GL_TEXTURE_MIN_FILTER, GL_TEXTURE_MAG_FILTER, GL_TEXTURE_MIN_LOD, </para>
/// <para> GL_TEXTURE_MAX_LOD, GL_TEXTURE_BASE_LEVEL, GL_TEXTURE_MAX_LEVEL, GL_TEXTURE_WRAP_S, GL_TEXTURE_WRAP_T,</para>
/// <para> GL_TEXTURE_WRAP_R, GL_TEXTURE_BORDER_COLOR, GL_TEXTURE_PRIORITY, GL_TEXTURE_COMPARE_MODE, </para>
/// <para>GL_TEXTURE_COMPARE_FUNC, GL_DEPTH_TEXTURE_MODE, or GL_GENERATE_MIPMAP. </para>
/// </param>
/// <param name="Params">
/// Specifies an array where the value or values of pname are stored.
/// </param>
[DllImport("opengl32.dll", ExactSpelling = false, EntryPoint = "glTexParameteriv", CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall)]
public static extern void TexParameter(uint target, uint pname, int[] Params);
/// <summary>
/// specify a one-dimensional texture subimage.
/// </summary>
/// <param name="target">
/// Specifies the target texture. Must be GL_TEXTURE_1D.
/// </param>
/// <param name="level">
/// <para>Specifies the level-of-detail number. Level 0 is the base image level. </para>
/// <para>Level n is the nth mipmap reduction image.</para>
/// </param>
/// <param name="xoffset">
/// Specifies a texel offset in the x direction within the texture array.
/// </param>
/// <param name="width">
/// Specifies the width of the texture subimage.
/// </param>
/// <param name="format">
/// <para>Specifies the format of the pixel data.</para>
/// <para>The following symbolic values are accepted: </para>
/// <para>GL_COLOR_INDEX, GL_RED, GL_GREEN, GL_BLUE, GL_ALPHA, GL_RGB, GL_BGR, GL_RGBA, GL_BGRA, GL_LUMINANCE, and GL_LUMINANCE_ALPHA. </para>
/// </param>
/// <param name="type">
/// <para>Specifies the data type of the pixel data.</para>
/// <para>The following symbolic values are accepted: GL_UNSIGNED_BYTE, GL_BYTE, GL_BITMAP, GL_UNSIGNED_SHORT,</para>
/// <para>GL_SHORT, GL_UNSIGNED_INT, GL_INT, GL_FLOAT, GL_UNSIGNED_BYTE_3_3_2, GL_UNSIGNED_BYTE_2_3_3_REV,</para>
/// <para>GL_UNSIGNED_SHORT_5_6_5, GL_UNSIGNED_SHORT_5_6_5_REV, GL_UNSIGNED_SHORT_4_4_4_4,</para>
/// <para>GL_UNSIGNED_SHORT_4_4_4_4_REV, GL_UNSIGNED_SHORT_5_5_5_1, GL_UNSIGNED_SHORT_1_5_5_5_REV, </para>
/// <para>GL_UNSIGNED_INT_8_8_8_8, GL_UNSIGNED_INT_8_8_8_8_REV, GL_UNSIGNED_INT_10_10_10_2,and GL_UNSIGNED_INT_2_10_10_10_REV</para>
/// </param>
/// <param name="pixels">
/// <para>Specifies a pointer to the image data in memory.</para>
/// <para>You can use the function glaux.ArrayToPointer to get the array pointer.</para>
/// </param>
[DllImport("opengl32.dll", ExactSpelling = false, EntryPoint = "glTexSubImage1D", CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall)]
public static extern void TexSubImage1D(uint target, int level, int xoffset, int width, uint format, uint type,IntPtr pixels);
/// <summary>
/// specify a two-dimensional texture subimage.
/// </summary>
/// <param name="target">
/// <para>Specifies the target texture. </para>
/// <para>Must be GL_TEXTURE_2D, GL_TEXTURE_CUBE_MAP_POSITIVE_X, GL_TEXTURE_CUBE_MAP_NEGATIVE_X,</para>
///<para> GL_TEXTURE_CUBE_MAP_POSITIVE_Y, GL_TEXTURE_CUBE_MAP_NEGATIVE_Y, GL_TEXTURE_CUBE_MAP_POSITIVE_Z,or GL_TEXTURE_CUBE_MAP_NEGATIVE_Z. </para>
/// </param>
/// <param name="level">
/// <para>Specifies the level-of-detail number. Level 0 is the base image level.</para>
/// <para>Level n is the nth mipmap reduction image. </para>
/// </param>
/// <param name="xoffset">
/// Specifies a texel offset in the x direction within the texture array.
/// </param>
/// <param name="yoffset">
/// Specifies a texel offset in the y direction within the texture array.
/// </param>
/// <param name="width">
/// Specifies the width of the texture subimage.
/// </param>
/// <param name="height">
/// Specifies the height of the texture subimage.
/// </param>
/// <param name="format">
/// <para>Specifies the format of the pixel data. </para>
/// <para>The following symbolic values are accepted:</para>
/// <para>GL_COLOR_INDEX, GL_RED, GL_GREEN, GL_BLUE, GL_ALPHA, GL_RGB, GL_BGR, GL_RGBA, GL_BGRA, GL_LUMINANCE,and GL_LUMINANCE_ALPHA. </para>
/// </param>
/// <param name="type">
/// <para>Specifies the data type of the pixel data. </para>
/// <para>The following symbolic values are accepted: GL_UNSIGNED_BYTE, GL_BYTE, GL_BITMAP, GL_UNSIGNED_SHORT,</para>
/// <para>GL_SHORT, GL_UNSIGNED_INT, GL_INT, GL_FLOAT, GL_UNSIGNED_BYTE_3_3_2, GL_UNSIGNED_BYTE_2_3_3_REV,</para>
/// <para> GL_UNSIGNED_SHORT_5_6_5, GL_UNSIGNED_SHORT_5_6_5_REV, GL_UNSIGNED_SHORT_4_4_4_4, </para>
/// <para>GL_UNSIGNED_SHORT_4_4_4_4_REV, GL_UNSIGNED_SHORT_5_5_5_1, GL_UNSIGNED_SHORT_1_5_5_5_REV, </para>
/// <para>GL_UNSIGNED_INT_8_8_8_8, GL_UNSIGNED_INT_8_8_8_8_REV, GL_UNSIGNED_INT_10_10_10_2,and GL_UNSIGNED_INT_2_10_10_10_REV.</para>
/// </param>
/// <param name="pixels">
/// <para>Specifies a pointer to the image data in memory. </para>
/// <para>You can use the function glaux.ArrayToPointer to get the array pointer.</para>
/// </param>
[DllImport("opengl32.dll", ExactSpelling = false, EntryPoint = "glTexSubImage2D", CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall)]
public static extern void TexSubImage2D(uint target, int level, int xoffset, int yoffset, int width, int height, uint format, uint type,IntPtr pixels);
/// <summary>
/// set the viewport.
/// </summary>
/// <param name="x">
/// Specify the lower left corner of the viewport rectangle, in pixels. The initial value is (0,0).
/// </param>
/// <param name="y">
/// Specify the lower left corner of the viewport rectangle, in pixels. The initial value is (0,0).
/// </param>
/// <param name="width">
/// <para>Specify the width and height of the viewport.</para>
/// <para>When a GL context is first attached to a window, width and height are set to the dimensions of that window. </para>
/// </param>
/// <param name="height">
/// <para>Specify the width and height of the viewport. </para>
/// <para>When a GL context is first attached to a window, width and height are set to the dimensions of that window. </para>
/// </param>
[DllImport("opengl32.dll", ExactSpelling = false, EntryPoint = "glViewport", CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall)]
public static extern void Viewport(int x, int y, int width, int height);
}
}