title: OpenGL Cube Structure
body: <p>Iam new to OpenGL and also new to C++ .
  I created a main.cpp where i do everything .I Create an <code>GLfloat data[]</code> where i store my Cube's Vertices and also one <code>GLfloat color[]</code> for the Color. I create a VAO and a VBO and i have method, where i compile a simple Vertex and Fragment Shader.</p>
  
  <p>The problem is,that my Code is very long,so i thought about creating a Cube Class,Triangle Class and so on.</p>
  
  <p>My Question is now, can i use the same VAO for several Objects or do i use a new VAO for each Object?.</p>
  
  <p>The other thing is, that i dont exactly know how to program this.I'am missing the structure(I used Java before).</p>
  
  <p>My thoughts were :</p>
  
  <pre><code>class Cube {
     public:
       Cube();
       Cube(GLfloat position[],GLfloat color[]);
       //But i need the same Shaders for each Object , so do i initialize it here or somewhere else?
       compileShader();
       drawCube();
  </code></pre>
  
  <p>}</p>
  
  <p>Note that this are only my thoughts about it..Maybe someone can help me out with this :)</p>