Code example for ShortBuffer

Methods: clearflipput

	// A: indices - array of indices (shorts) to set 
	//    offset - offset to first index in array 
	//    length - number of indices in array (from offset) 
	// R: [none] 
	public void setIndices(short[] indices, int offset, int length)  {
		this.indices.clear();                           // Clear Existing Indices
		this.indices.put( indices, offset, length );    // Set New Indices
		this.indices.flip();                            // Flip Index Buffer
		this.numIndices = length;                       // Save Number of Indices
	// D: perform all required binding/state changes before rendering batches. 
	//    USAGE: call once before calling draw() multiple times for this buffer. 
	// A: [none] 
	// R: [none] 
	public void bind()  { 
		// bind vertex position pointer 
		vertices.position( 0 );                         // Set Vertex Buffer to Position
		GLES20.glVertexAttribPointer(mPositionHandle, positionCnt, 
Stop searching for code, let great code find you!  Add Codota to your java IDE