package net.vulkanmod.vulkan.memory.buffer;

import net.vulkanmod.vulkan.memory.MemoryType;

public class IndexBuffer extends Buffer {
   public IndexType indexType;

   public IndexBuffer(int size, MemoryType type) {
      this(size, type, IndexBuffer.IndexType.UINT16);
   }

   public IndexBuffer(int size, MemoryType type, IndexType indexType) {
      super(64, type);
      this.indexType = indexType;
      this.createBuffer((long)size);
   }

   public static enum IndexType {
      UINT16(2, 0),
      UINT32(4, 1);

      public final int size;
      public final int value;

      private IndexType(int size, int value) {
         this.size = size;
         this.value = value;
      }

      // $FF: synthetic method
      private static IndexType[] $values() {
         return new IndexType[]{UINT16, UINT32};
      }
   }
}
