title: How to render multiple shapes and objects in OpenGL3.2+?
body: <p>I am following this guide <a href="http://open.gl/" rel="nofollow">http://open.gl/</a> to learn how to program using modern opengl. I am stuck at one thing. Earlier with older opengl Api, I used to create different functions for drawing different types of shapes. Like drawRect(), drawCircle(), etc. All I needed to do was to use glVertex3f() in different combinations inside glBegin() and glEnd(). </p>
  
  <p>But in OpenGl3.2+, even to draw a rectangle, we have to write hell lot of code. I understand that it gives you more control over rendering, but I am confused at what to do when you are rendering multiple stuff like drawing rectangles, circles, etc together. Do I need to write all that code multiple times including shaders or I can reuse the code.</p>
  
  <p>I have implemented this code <a href="http://open.gl/content/code/c2_triangle_elements.txt" rel="nofollow">http://open.gl/content/code/c2_triangle_elements.txt</a> 
  This example draws a rectangle, but what If I wanted to draw a triangle along with this rectangle, then how do I do it.</p>