Exemplo n.º 1
0
 /**
  * Adds the given BufferObject to this VertexArray's list of BufferObjects that are usable as
  * vertex buffers in this array
  *
  * @param name String id for the given BufferObject
  * @param buffer BufferObject with a BufferType of Array
  * @return True if the given BufferObject is a compatible type and was added, false otherwise
  */
 public boolean addVertexBuffer(String name, BufferObject buffer) {
   // check that the buffer type is a valid type
   if (buffer.getType() == BufferType.ARRAY) {
     vbos.put(name, buffer);
     bufferIndices.put(name, highestBufferIndex);
     highestBufferIndex++;
     return true;
   } else {
     return false;
   }
 }