title: GL Error value 1285: Out of memory
body: <p>I'm trying to render a simple quad in a few different ways.</p>
  
  <p>I can do this very easily when everything is stored in one class.  But I want to be able to render more than a single object on the screen so I'm starting to take the code apart and put various bits of functionality in separate classes.  The problem is, when I put the rendering functionality in the Entity class, I start getting an error.</p>
  
  <p>This is the function, which is is a VertexArrayObject class:</p>
  
  <pre><code>public void render(){
      glBindVertexArray(vaoID);
      glEnableVertexAttribArray(0);
      glEnableVertexAttribArray(1);
  
      glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, vboiID);
  
      this.exitOnGLError("Before render");
      glDrawElements(GL_TRIANGLES, indicesCount, GL_UNSIGNED_BYTE, 0);
      this.exitOnGLError("After render");
  
      glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0);
      glDisableVertexAttribArray(0);
      glDisableVertexAttribArray(1);
      glBindVertexArray(0);
  
      this.exitOnGLError("error rendering vao");
  }
  </code></pre>
  
  <p>Again, all I have done is move this from the main class into a class that manages the VAO and theoretically renders it.</p>
  
  <p>It's giving me error value 1285, and the error call that gets the error is the one labeled "After render".  (exitOnGLError() is an error checking method).</p>
  
  <p>Error 1285 apparently means "Out of memory" which is patently absurd since I'm using a 1 megabyte image file and...I just can't imagine my four vertex float buffer is filling up all my VRAM.</p>
  
  <p>What else could be causing this error?</p>