public MaxwellTriangle(){
  ByteBuffer vbb=ByteBuffer.allocateDirect(triangleCoords.length * 4);
  vbb.order(ByteOrder.nativeOrder());
  vertexBuffer=vbb.asFloatBuffer();
  vertexBuffer.put(triangleCoords);
  vertexBuffer.position(0);
  ByteBuffer cbb=ByteBuffer.allocateDirect(colors.length * 4);
  cbb.order(ByteOrder.nativeOrder());
  colorBuffer=cbb.asFloatBuffer();
  colorBuffer.put(colors);
  colorBuffer.position(0);
  indexBuffer=ByteBuffer.allocateDirect(indices.length);
  indexBuffer.order(ByteOrder.nativeOrder());
  indexBuffer.put(indices);
  indexBuffer.position(0);
}

public MaxwellTriangle ( ) { ByteBuffer vbb = ByteBuffer . allocateDirect ( triangleCoords . length * 4 ) ; vbb . order ( ByteOrder . nativeOrder ( ) ) ; vertexBuffer = vbb . asFloatBuffer ( ) ; vertexBuffer . put ( triangleCoords ) ; vertexBuffer . position ( 0 ) ; ByteBuffer cbb = ByteBuffer . allocateDirect ( colors . length * 4 ) ; cbb . order ( ByteOrder . nativeOrder ( ) ) ; colorBuffer = cbb . asFloatBuffer ( ) ; colorBuffer . put ( colors ) ; colorBuffer . position ( 0 ) ; indexBuffer = ByteBuffer . allocateDirect ( indices . length ) ; indexBuffer . order ( ByteOrder . nativeOrder ( ) ) ; indexBuffer . put ( indices ) ; indexBuffer . position ( 0 ) ; }
sets up the drawing object data for use in an opengl es context .
