title: How to use glDrawArrays to display cube in JOGL
body: <p>I am new in with Java OpenGL (JOGL). I want to display a 3D cube in JOGL. </p>
  
  <p>I have vertex array information with me.</p>
  
  <pre><code>double vertices[]= {
      0 0 0,
      0 0 1,
      0 1 0,
      0 1 1,
      1 0 0,
      1 0 1,
      1 1 0,
      1 1 1,
  };
  </code></pre>
  
  <p>I want to use <code>glDrawArrays()</code> to display it. Since I have display a model having a <strong>huge amount of vertices.</strong></p>
  
  <p>The display method is given below.</p>
  
  <pre><code>public void display(GLAutoDrawable drawable) {
      GL2 gl = drawable.getGL().getGL2();
  
      gl.glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
      gl.glLoadIdentity();
  
      gl.glBegin(GL_TRIANGLE_STRIP);
  
      gl.glEnd();
  }
  </code></pre>
  
  <p>I need to use <code>GL_TRIANGLES</code> or <code>GL_TRIANGLE_STRIP</code> only and <code>not GL_QUADS</code>.</p>
  
  <p>If anyone knows how to use <code>glDrawArrays();</code> in <strong>JOGL</strong> please help me. I want JOGL syntax and not opengl.</p>