/// <summary> /// Creates a new Int8Array out of the specified buffer and byteOffset with the specified length. /// </summary> /// <param name="buffer">Arraybuffer to use as base for contents.</param> /// <param name="byteOffset">Optional. Position in the buffer to start reading data from.</param> /// <param name="length">Optional. Number of elements to consider while creating the array.</param> public Int8Array(ArrayBuffer buffer, uint byteOffset = 0, uint length = 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(ArrayBuffer data) { }
/// <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, ArrayBuffer data, int usage) { }
/// <summary> /// Reads pixel data into an ArrayBufferView object from a rectangular area in the color buffer of the active frame buffer. /// If an error is generated, no change is made to data object referenced by the pixels parameter. /// /// Errors: /// /// gl.INVALID_ENUM If format or type aren't accepted values. /// /// gl.INVALID_VALUE If height or width are negative numbers. /// If pixels is null. /// /// gl.INVALID_OPERATION If format isn't gl.RGBA and type isn't /// gl.UNSIGNED_BYTE If pixels isn't large enough for the pixel data. /// /// gl.INVALID_FRAMEBUFFER_OPERATION If the currently bound frame buffer isn't complete or the render frame buffer is invalid. /// </summary> /// <param name="x">Horizontal coordinate of the first pixel to read in the lower left corner of rectangle. </param> /// <param name="y">Vertical coordinate of the first pixel to read in the lower left corner of rectangle. </param> /// <param name="width">Width of the rectangle.</param> /// <param name="height">Height of the rectangle.</param> /// <param name="format">Format of the pixel data. For example, gl.RGBA.</param> /// <param name="type">Describes the type of data being read: /// 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">Object to read data into. One of the following types: /// Uint8Array when used without extensions. /// Float32Array when using the OES_texture_float extension . /// </param> public virtual void ReadPixels(int x, int y, int width, int height, int format, int type, ArrayBuffer pixels) { }
/// <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(ArrayBuffer data);