Exemple #1
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);
   }
 }
Exemple #2
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);
     }
   }
 }