예제 #1
0
 /**
  * Create the mesh.
  *
  * @param context Backend context.
  */
 public void create(BackendContext context) {
   if (mIndicesBuffer != null && !mIndicesBuffer.isCreated()) {
     mIndicesBuffer.create(context);
   }
   for (VertexBufferResource resource : mVertexBuffers) {
     if (!resource.isCreated()) {
       resource.create(context);
     }
   }
 }
예제 #2
0
 /**
  * Load the mesh to gpu.
  *
  * @param context The backend context.
  */
 public void load(BackendContext context) {
   if (mIndicesBuffer != null) {
     mIndicesBuffer.load(context);
   }
   for (VertexBufferResource resource : mVertexBuffers) {
     resource.load(context);
   }
 }