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