public virtual void drawTriangles(AsIndexBuffer3D indexBuffer)
 {
     drawTriangles(indexBuffer, 0, -1);
 }
 public virtual void drawTriangles(AsIndexBuffer3D indexBuffer, int firstIndex, int numTriangles)
 {
     throw new AsNotImplementedError();
 }
 private void createBuffers()
 {
     int numVertices = mVertexData.getNumVertices();
     int numIndices = (int)(mIndexData.getLength());
     AsContext3D context = AsStarling.getContext();
     if(mVertexBuffer != null)
     {
         mVertexBuffer.dispose();
     }
     if(mIndexBuffer != null)
     {
         mIndexBuffer.dispose();
     }
     if(numVertices == 0)
     {
         return;
     }
     if(context == null)
     {
         throw new AsMissingContextError();
     }
     mVertexBuffer = context.createVertexBuffer(numVertices, AsVertexData.ELEMENTS_PER_VERTEX);
     mVertexBuffer.uploadFromVector(mVertexData.getRawData(), 0, numVertices);
     mIndexBuffer = context.createIndexBuffer(numIndices);
     mIndexBuffer.uploadFromVector(mIndexData, 0, numIndices);
     mSyncRequired = false;
 }
 public virtual void drawTriangles(AsIndexBuffer3D indexBuffer, int firstIndex)
 {
     drawTriangles(indexBuffer, firstIndex, -1);
 }
 private void updateBuffers(AsContext3D context, AsRectangle bounds)
 {
     mVertexData.setPosition(0, bounds.x, bounds.y);
     mVertexData.setPosition(1, bounds.getRight(), bounds.y);
     mVertexData.setPosition(2, bounds.x, bounds.getBottom());
     mVertexData.setPosition(3, bounds.getRight(), bounds.getBottom());
     if(mVertexBuffer == null)
     {
         mVertexBuffer = context.createVertexBuffer(4, AsVertexData.ELEMENTS_PER_VERTEX);
         mIndexBuffer = context.createIndexBuffer(6);
         mIndexBuffer.uploadFromVector(mIndexData, 0, 6);
     }
     mVertexBuffer.uploadFromVector(mVertexData.getRawData(), 0, 4);
 }
 private void onContextCreated(Object _event)
 {
     mVertexBuffer = null;
     mIndexBuffer = null;
     mPassTextures = null;
     createPrograms();
 }
 public virtual void drawTriangles(AsIndexBuffer3D indexBuffer)
 {
     drawTriangles(indexBuffer, 0, -1);
 }
 public virtual void drawTriangles(AsIndexBuffer3D indexBuffer, int firstIndex)
 {
     drawTriangles(indexBuffer, firstIndex, -1);
 }
 public virtual void drawTriangles(AsIndexBuffer3D indexBuffer, int firstIndex, int numTriangles)
 {
     throw new AsNotImplementedError();
 }