Example usage for com.google.gwt.typedarrays.client Int32Array getLength

List of usage examples for com.google.gwt.typedarrays.client Int32Array getLength

Introduction

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

Prototype

public final native int getLength() ;

Source Link

Document

The length of the TypedArray in elements, as fixed at construction time.

Usage

From source file:playn.html.HtmlGL20.java

License:Apache License

@Override
public void glGetIntegerv(int pname, IntBuffer params) {
    Int32Array result = (Int32Array) gl.getParameterv(pname);
    int pos = params.position();
    int len = result.getLength();
    for (int i = 0; i < len; i++) {
        params.put(pos + i, result.get(i));
    }/*from w ww .j  av a2 s .  c  o  m*/
}

From source file:playn.html.HtmlGL20.java

License:Apache License

@Override
public void glGetUniformiv(int program, int location, IntBuffer params) {
    Int32Array v = gl.getUniformv(getProgram(program), getUniformLocation(location));
    for (int i = 0; i < v.getLength(); i++) {
        params.put(params.position() + i, v.get(i));
    }/*from   w  w w. j a  va  2  s .c  o  m*/
}