title: Array Buffer Object is disabled
body: <p>I tried to create 3D cubes that had a xpos, ypos, type and a modelInstance stored in them. When I try to run the program I get this error: </p>
  
  <blockquote>
    <p>Exception in thread "LWJGL Application" org.lwjgl.opengl.OpenGLException: Cannot use offsets when Array Buffer Object is disabled</p>
  </blockquote>
  
  <p>How do I enable it?</p>
  
  <p>Here is the class I got the error from:</p>
  
  <pre><code>package com.me.the_unknown;
  
  import java.util.ArrayList;
  
  import com.badlogic.gdx.graphics.Texture;
  import com.badlogic.gdx.graphics.VertexAttributes.Usage;
  import com.badlogic.gdx.graphics.g3d.Model;
  import com.badlogic.gdx.graphics.g3d.ModelBatch;
  import com.badlogic.gdx.graphics.g3d.ModelInstance;
  import com.badlogic.gdx.graphics.g3d.materials.Material;
  import com.badlogic.gdx.graphics.g3d.materials.TextureAttribute;
  import com.badlogic.gdx.graphics.g3d.utils.ModelBuilder;
  
  public class Blocks {
  
      public static ArrayList&lt;Float&gt; blockX = new ArrayList&lt;Float&gt;();
      public static ArrayList&lt;Float&gt; blockY = new ArrayList&lt;Float&gt;();
      public static ArrayList&lt;Integer&gt; blockType = new ArrayList&lt;Integer&gt;();
      public static ArrayList&lt;ModelInstance&gt; blockModelInstance = new ArrayList&lt;ModelInstance&gt;();
  
      public static ModelBatch modelBatch;
      private static ModelBuilder modelBuilder;
  
      //Textures
      public static Texture stonebrick = new Texture("data/blocks/stonebrick.png");
      public static Texture gravel = new Texture("data/blocks/gravel.png");
  
      public static void addBlock(int xpos, int ypos, int type) {
          blockX.add((float) xpos * 5);
          blockY.add((float) ypos * 5);
          blockType.add(type);
          updateBlocks();
      }
  
      private static void updateBlocks() {
          blockModelInstance.clear();
  
          for(int counter = 0; counter &lt; blockX.size(); counter++){
              Model model = null;
              ModelInstance instance;
  
              if(blockType.get(counter) == 1)
                  model = modelBuilder.createBox(5f, 5f, 5f, new Material(TextureAttribute.createDiffuse(stonebrick)), Usage.Position | Usage.Normal | Usage.TextureCoordinates | Usage.Generic);
              if(blockType.get(counter) == 2)
                  model = modelBuilder.createBox(5f, 5f, 5f, new Material(TextureAttribute.createDiffuse(gravel)), Usage.Position | Usage.Normal | Usage.TextureCoordinates | Usage.Generic);
  
              instance = new ModelInstance(model);
              blockModelInstance.add(instance);
  
              model.dispose();
          }
      }
  
      public static void create() {
          modelBuilder = new ModelBuilder();
          updateBlocks();
      }
  }
  </code></pre>