Example usage for com.google.gwt.typedarrays.client Float32Array create

List of usage examples for com.google.gwt.typedarrays.client Float32Array create

Introduction

In this page you can find the example usage for com.google.gwt.typedarrays.client Float32Array create.

Prototype

public static final native Float32Array create(ArrayBuffer buffer, int byteOffset) ;

Source Link

Usage

From source file:com.googlecode.gwtgl.wrapper.FloatArray.java

License:Apache License

/**
 * Create a new Float32Array object using the passed ArrayBuffer for its storage. Optional byteOffset and length can be used to limit the section of the buffer referenced. The byteOffset indicates the offset in bytes from the start of the ArrayBuffer, and the length is the count of elements from the offset that this WebGLByteArray will reference. If both byteOffset and length are omitted, the WebGLTypeNameArray spans the entire ArrayBuffer range. If the length is omitted, the WebGLTypeNameArray extends from the given byteOffset until the end of the ArrayBuffer.
 * //ww w.  j ava  2  s.com
 * The given byteOffset must be a multiple of the element size of the specific type, otherwise an exception is raised.
 * 
 * If a given byteOffset and length references an area beyond the end of the ArrayBuffer an exception is raised.Create a new WebGLTypeNameArray object using the passed ArrayBuffer for its storage. Optional byteOffset and length can be used to limit the section of the buffer referenced. The byteOffset indicates the offset in bytes from the start of the ArrayBuffer, and the length is the count of elements from the offset that this WebGLByteArray will reference. If both byteOffset and length are omitted, the WebGLTypeNameArray spans the entire ArrayBuffer range. If the length is omitted, the WebGLTypeNameArray extends from the given byteOffset until the end of the ArrayBuffer.
 * 
 * The given byteOffset must be a multiple of the element size of the specific type, otherwise an exception is raised.
 * 
 * If a given byteOffset and length references an area beyond the end of the ArrayBuffer an exception is raised.
 * 
 * @param buffer
 * @param byteOffset
 */
public FloatArray(ArrayBuffer buffer, int byteOffset) {
    super(Float32Array.create(buffer, byteOffset));
}