Exemplo n.º 1
0
 /// <summary>
 /// Sends the request. If the request is asynchronous (which is the default), this method returns as soon as the request is sent. If the request is synchronous, this method doesn't return until the response has arrived.
 /// </summary>
 /// <param name="data"></param>
 public virtual void Send(ArrayBufferView data)
 {
 }
 /// <summary>
 /// Used to modify or update some or all of a data store for a bound buffer object.
 ///
 /// Errors:
 ///     gl.INVALID_VALUE        If the new data writes past the end of the buffer.
 ///     gl_INVALID_ENUM            If the target is not GL_ARRAY_BUFFER or GL_ELEMENT_ARRAY_BUFFER.
 ///     glINVALID_OPERATION        No buffer is bound to target.
 /// </summary>
 /// <param name="target">The bind target of the buffer to update. Set to ARRAY_BUFFER or ELEMENT_ARRAY_BUFFER.</param>
 /// <param name="offset">The offset in bytes where data replacement begins. Must be greater than or equal to 0. </param>
 /// <param name="data">The new data to be copied into the buffer.</param>
 public virtual void BufferSubData(int target, int offset, ArrayBufferView data) { }
 /// <summary>
 /// Specifies a two-dimensional texture image or cube Map image from compressed image data. You must call getExtension("WEBGL_compressed_texture_s3tc") to enable compressed textures before calling this method.
 ///
 /// Errors:
 ///     gl.INVALID_VALUE        If internalFormat does not equal one of the specified values.
 ///     gl.INVALID_OPERATION    If width or height are not a multiple of 4.
 ///     gl.INVALID_ENUM         If target isn't one of the specified values.
 ///     gl.INVALID_ENUM            If internalFormat isn't a supported format.
 ///     gl.INVALID_VALUE        If width or width is less than 0 or greater than gl.MAX_TEXTURE_SIZE.
 ///     gl.INVALID_VALUE        If border is not 0.
 /// </summary>
 /// <param name="target">The target texture. One of the following:
 ///     gl.TEXTURE_2D                       Uses a 2D image.
 ///     gl.TEXTURE_CUBE_MAP_POSITIVE_X      Image for the positive X face of the cube map.
 ///     gl.TEXTURE_CUBE_MAP_NEGATIVE_X      Image for the negative X face of the cube map.
 ///     gl.TEXTURE_CUBE_MAP_POSITIVE_Y      Image for the positive Y face of the cube map.
 ///     gl.TEXTURE_CUBE_MAP_NEGATIVE_Y      Image for the negative Y face of the cube map.
 ///     gl.TEXTURE_CUBE_MAP_POSITIVE_Z      Image for the positive Z face of the cube map.
 ///     gl.TEXTURE_CUBE_MAP_NEGATIVE_Z      Image for the negative Z face of the cube map.
 /// </param>
 /// <param name="level">The level of detail. Level 0 equals the base image level.</param>
 /// <param name="internalFormat">The image format of the compressed image stored in memory. Use one of the following:
 ///     COMPRESSED_RGB_S3TC_DXT1_EXT    The byteLength of data (ArrayBufferView) in pixels that's passed must be match the equation floor((width + 3) / 4) * floor((height + 3) / 4) * 8
 ///     COMPRESSED_RGBA_S3TC_DXT1_EXT   The byteLength of data (ArrayBufferView) in pixels that's passed must be match the equation floor((width + 3) / 4) * floor((height + 3) / 4) * 8
 ///     COMPRESSED_RGBA_S3TC_DXT3_EXT   The byteLength of data (ArrayBufferView) in pixels that's passed must be match the equation floor((width + 3) / 4) * floor((height + 3) / 4) * 16
 ///     COMPRESSED_RGBA_S3TC_DXT5_EXT   The byteLength of data (ArrayBufferView) in pixels that's passed must be match the equation floor((width + 3) / 4) * floor((height + 3) / 4) * 16
 /// </param>
 /// <param name="width">The width of the texture image. A 2D texture image needs to be at least 64 texels wide, and cube-mapped texture images should be 16 texels wide. </param>
 /// <param name="height">The height of the texture image. A 2D texture image needs to be at least 64 texels high, and cube-mapped texture images should be 16 texels high. </param>
 /// <param name="border">Width of border.</param>
 /// <param name="data">Object that contains the image data. </param>
 public virtual void CompressedTexImage2D(int target, int level, int internalFormat, int width, int height, int border, ArrayBufferView data) { }
 /// <summary>
 /// Replaces a portion of an existing 2D texture image with all of another image.
 /// When using an ArrayBufferView for pixels and gl.FLOAT for type, the array must be a Float32Array rather than a UInt8Array.
 ///
 /// Errors:
 ///     gl.SECURITY_ERR         Occurs if an image or canvas is supplied and doesn't have the same origin of the canvas associated with the WebGLRenderingContext.
 ///
 ///     gl.INVALID_VALUE        If pixels is null.
 ///                             If level is &lt; 0, or greater than maximum allowable value.
 ///                             If xoffset is greater than the width of the texture image.
 ///                             If yoffset is greater than the height of the texture image.
 ///
 ///     gl.INVALID_OPERATION    If called without a currently bound texture.
 ///                             The type doesn't match the type originally defined for the texture.
 ///                             If type and format aren't compatible values.
 ///
 ///     gl.INVALID_ENUM            If target, format, or type aren't one of the listed values.
 ///
 /// </summary>
 /// <param name="target">The target texture of the active texture unit. Must be one of the following:
 ///     gl.TEXTURE_2D                       Uses a 2D image.
 ///     gl.TEXTURE_CUBE_MAP_POSITIVE_X      Image for the positive X face of the cube map.
 ///     gl.TEXTURE_CUBE_MAP_NEGATIVE_X      Image for the negative X face of the cube map.
 ///     gl.TEXTURE_CUBE_MAP_POSITIVE_Y      Image for the positive Y face of the cube map.
 ///     gl.TEXTURE_CUBE_MAP_NEGATIVE_Y      Image for the negative Y face of the cube map.
 ///     gl.TEXTURE_CUBE_MAP_POSITIVE_Z      Image for the positive Z face of the cube map.
 ///     gl.TEXTURE_CUBE_MAP_NEGATIVE_Z      Image for the negative Z face of the cube map.
 /// </param>
 /// <param name="level">The level of detail to use with the texture.</param>
 /// <param name="xOffset">The x (horizontal) offset within the texture image.</param>
 /// <param name="yOffset">The y (vertical) offset within the texture image.</param>
 /// <param name="width">Width of texture sub-image. Value used only when UInt8Array or Float32Array for pixels is specified. </param>
 /// <param name="height">Height of texture sub-image. Value used only when UInt8Array or Float32Array for pixels is specified. </param>
 /// <param name="format">The format of the source pixel data.
 ///     gl.ALPHA                Each element is a single alpha component. The system converts it to floating point, clamped to the range [0, 1], and assembles it into an RGBA element by placing attaching 0.0 to the red, green and blue channels.
 ///     gl.LUMINANCE            Each element is a single luminance component. The system converts it to floating point value, clamped to the range [0, 1], and assembles it into an RGBA element by placing the luminance value in the red, green and blue channels, and attaching 1.0 to the alpha channel.
 ///     gl.LUMINANCE_ALPHA      Each element is an luminance/alpha double. The systems converts each component to floating point, clamped to the range [0, 1], and assembles them into an RGBA element by placing the luminance value in the red, green and blue channels.
 ///     gl.RGB                  Red, green, and blue channels.
 ///     gl.RGBA                 Red, green, blue, and alpha (transparency) channels.
 /// </param>
 /// <param name="type">The data type of the pixel data.
 ///     gl.UNSIGNED_BYTE
 ///     gl.FLOAT            Call getExtension("gl.OES_texture_float") first to enable. This creates 128bit-per-pixel textures instead of 32bit-per-pixel for the image. </param>
 /// <param name="pixels">The ArrayBufferView to use for the texture.</param>
 public virtual void TexSubImage2D(int target, int level, int xOffset, int yOffset, int width, int height, int format, int type, ArrayBufferView pixels) { }
 /// <summary>
 /// Creates a buffer in memory and initializes it with array data. If no array is provided, the contents of the buffer is initialized to 0.
 /// BufferData deletes any existing data store and sets the state variables gl.BUFFER_SIZE and gl.BUFFER_USAGE to the new values.
 ///
 /// Errors:
 ///     gl.OUT_OF_MEMORY - If WebGL can't create the buffer to the requested size.
 /// </summary>
 /// <param name="target">Set to gl.ARRAY_BUFFER or gl.ELEMENT_ARRAY_BUFFER.</param>
 /// <param name="data">An array of data points</param>
 /// <param name="usage">One of the following values:
 ///     gl.STATIC_DRAW The data store contents are modified once, and used many times as the source for WebGL drawing commands.
 ///     gl.DYNAMIC_DRAW The data store contents are repeatedly respecified, and used many times as the source for WebGL drawing commands.
 ///     gl.STREAM_DRAW The data store contents are specified once, and used occasionally as the source of a WebGL drawing command.
 ///
 ///     Usage is provided only as a performance hint. The usage value doesn't restrict the way the data store is used.</param>
 public virtual void BufferData(int target, ArrayBufferView data, int usage) { }
 /// <summary>
 /// Loads the supplied pixel data into a texture.
 /// When using an ArrayBufferView for pixels and gl.FLOAT for type, the array must be a Float32Array rather than a UInt8Array.
 /// Images that are used as textures are not allowed if the origin of the image isn't the same as the origin of the canvas element. Images are also blocked if they are from a canvas whose origin-clean flag set to false.
 ///
 /// Errors:
 ///     gl.SECURITY_ERR             Occurs if an image or canvas is supplied as the pixel data source and isn't the same origin (same domain) of the canvas associated with the WebGLRenderingContext.
 ///
 ///     gl.INVALID_OPERATION        If the ArrayBufferView doesn't have enough data to fill the specified rectangle.
 ///                                 If format and internalformat don't match.
 ///                                 No texture is bound to target.
 ///                                 If type is gl.UNSIGNED_SHORT_5_6_5 and format isn't gl.RGB.
 ///                                 If type is gl.UNSIGNED_SHORT_4_4_4_4 or gl.UNSIGNED_SHORT_5_5_5_1 and the format isn't gl.RGBA
 ///
 ///     gl.INVALID_VALUE            target is a cube map target and width and height aren't equal.
 ///                                 If pixels is null for any of the non-ArrayBuffer overloads.
 ///                                 The incoming ArrayBufferView or image is bigger than max texture size. Max texture can be retrieved by calling getParameter and using the gl.MAX_CUBE_MAP_TEXTURE_SIZE and gl.MAX_TEXTURE_SIZE enums.
 ///                                 If level, width, or height is a negative value.
 ///                                 If level is greater than log 2(max), where max is the value of gl.MAX_TEXTURE_SIZE when target is gl.TEXTURE_2D.
 ///                                 If width or height are greater than the value of gl.MAX_TEXTURE_SIZE when target is gl.TEXTURE_2D.
 ///                                 If level is greater than log 2(max), where max is the value of gl.MAX_CUBE_MAP_TEXTURE_SIZE when target is not gl.TEXTURE_2D.
 ///                                 If width or height are greater than the value of gl.MAX_CUBE_MAP_TEXTURE_SIZE when target is not a cube map texture target.
 ///
 ///     gl.INVALID_ENUM                If target, format, internalformat, or type aren't one of the listed values.
 /// </summary>
 /// <param name="target">The target texture of the active texture unit. Must be one of the following:
 ///     gl.TEXTURE_2D                       Uses a 2D image.
 ///     gl.TEXTURE_CUBE_MAP_POSITIVE_X      Image for the positive X face of the cube map.
 ///     gl.TEXTURE_CUBE_MAP_NEGATIVE_X      Image for the negative X face of the cube map.
 ///     gl.TEXTURE_CUBE_MAP_POSITIVE_Y      Image for the positive Y face of the cube map.
 ///     gl.TEXTURE_CUBE_MAP_NEGATIVE_Y      Image for the negative Y face of the cube map.
 ///     gl.TEXTURE_CUBE_MAP_POSITIVE_Z      Image for the positive Z face of the cube map.
 ///     gl.TEXTURE_CUBE_MAP_NEGATIVE_Z      Image for the negative Z face of the cube map.
 /// </param>
 /// <param name="level">The level of detail value. </param>
 /// <param name="internalFormat">
 ///     gl.ALPHA                Each element is a single alpha component. The system converts it to floating point, clamped to the range [0, 1], and assembles it into an RGBA element by placing attaching 0.0 to the red, green and blue channels.
 ///     gl.LUMINANCE            Each element is a single luminance component. The system converts it to floating point value, clamped to the range [0, 1], and assembles it into an RGBA element by placing the luminance value in the red, green and blue channels, and attaching 1.0 to the alpha channel.
 ///     gl.LUMINANCE_ALPHA      Each element is an luminance/alpha double. The systems converts each component to floating point, clamped to the range [0, 1], and assembles them into an RGBA element by placing the luminance value in the red, green and blue channels.
 ///     gl.RGB                  Red, green, and blue channels.
 ///     gl.RGBA                 Red, green, blue, and alpha (transparency) channels.
 /// </param>
 /// <param name="width">Width of texture image. Value used only when UInt8Array or Float32Array for pixels is specified.</param>
 /// <param name="height">Height of texture image. Value used only when UInt8Array or Float32Array for pixels is specified.</param>
 /// <param name="border">Specifies the width of the border. Must be 0. Border value used only when UInt8Array or Float32Array for pixels is specified.</param>
 /// <param name="format">Contains the format for the source pixel data. Must match internalformat. </param>
 /// <param name="type">The type of texture data.
 ///     gl.UNSIGNED_BYTE                Provides 8 bits per channel for gl.RGBA.
 ///     gl.FLOAT                        Call getExtension("gl.OES_texture_float") first to enable. This creates 128 bit-per-pixel textures instead of 32 bit-per-pixel for the image.
 ///     gl.UNSIGNED_SHORT_5_6_5         Represents colors in a Uint16Array where red = 5 bits, green=6 bits, and blue=5 bits.
 ///     gl.UNSIGNED_SHORT_4_4_4_4       Represents colors in a Uint16Array where red = 4 bits, green=4 bits, blue=4 bits, and alpha=4 bits.
 ///     gl.UNSIGNED_SHORT_5_5_5_1       Represents colors in a Uint16Array where red = 5 bits, green=5 bits, blue=5 bits and alpha=1 bit.</param>
 /// <param name="pixels">The ArrayBufferView to use as a data source for the texture. A buffer of sufficient size is automatically allocated and its contents is initialized to 0 if pixels is null.</param>
 public virtual void TexImage2D(int target, int level, int internalFormat, int width, int height, int border, int format, int type, ArrayBufferView pixels) { }
Exemplo n.º 7
0
 /// <summary>
 /// Sends the request. If the request is asynchronous (which is the default), this method returns as soon as the request is sent. If the request is synchronous, this method doesn't return until the response has arrived.
 /// </summary>
 /// <param name="data"></param>
 public virtual void Send(ArrayBufferView data)
 {
 }
Exemplo n.º 8
0
 /// <summary>
 /// Sends the request. If the request is asynchronous (which is the default), this method returns as soon as the request is sent. If the request is synchronous, this method doesn't return until the response has arrived.
 /// </summary>
 /// <param name="data"></param>
 public virtual extern void Send(ArrayBufferView data);
Exemplo n.º 9
0
 /// <summary>
 /// Sends the request. If the request is asynchronous (which is the default), this method returns as soon as the request is sent. If the request is synchronous, this method doesn't return until the response has arrived.
 /// </summary>
 /// <param name="data"></param>
 public virtual extern void Send(ArrayBufferView data);
Exemplo n.º 10
0
 public static void TestMethod(ArrayBufferView array, string name)
 {
     Assert.True(array != null, string.Format("ArrayBufferView is an alias of {0}", name));
 }