title: OpenGL glusphere() doesnt draw - error 1282 invalid operation
body: <p>I want to draw a simple sphere in OpenGL.</p>
  
  <p>Includes:</p>
  
  <pre><code>#include &lt;GL/glew.h&gt;
  #include &lt;GL/glfw.h&gt;
  #include &lt;GL/glut.h&gt;
  </code></pre>
  
  <p>And some others....</p>
  
  <p>Declaration of GLUquadric</p>
  
  <pre><code>//before "infinite draw cycle"
  GLUquadric* sphere;
  sphere=gluNewQuadric();
  gluQuadricNormals(sphere, GL_SMOOTH);
  </code></pre>
  
  <p>and "inifite draw cycle" </p>
  
  <pre><code>do{
      // Clear the screen
      glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
  
      // Use our shader
      glUseProgram(programID);
  
      // Send our transformation to the currently bound shader 
      glUniformMatrix4fv(PID, 1, GL_FALSE, &amp;Projection[0][0]);
      //kamera and directions vector defined elsewhere
      View = glm::lookAt(kamera,kamera+direction,up);
      glm::mat4 Model_View;
      glm::mat4 tempView;
      glm::mat4 Model;    
  
      //drawing some wall using vertexs
      tempView = glm::translate(View,glm::vec3(20,0,0));
      tempView = glm::rotate(tempView, 180.0f, glm::vec3(0,1,0));
      Model = glm::scale(glm::mat4(1.0f),glm::vec3(1,5,15));
      Model_View = tempView * Model;
      glUniformMatrix4fv(MVID, 1, GL_FALSE, &amp;Model_View[0][0]);
      glDrawArrays(GL_TRIANGLES, 0,5*2*3);
  
      glColor3f(1.0f,0.0f,1.0f);
      gluSphere(sphere , 2 , 30 , 30);
      // Swap buffers
      glfwSwapBuffers();
  }
  while( condition... );
  </code></pre>
  
  <p>Ofc I cut code parts regarding some other objects drawing.
  I just started with OpenGL (www.opengl-tutorial.org) and have no idea why this doesnt work. No compilation errors, but there is runtime error 1282 invalid operation (functions glGetError() and gluErrorString() )</p>
  
  <p>What could be possibly wrong?</p>
  
  <p><strong>EDIT</strong>
  Solution was from</p>
  
  <pre><code>glfwOpenWindowHint(GLFW_OPENGL_VERSION_MAJOR, 4);
  glfwOpenWindowHint(GLFW_OPENGL_VERSION_MINOR, 3);
  </code></pre>
  
  <p>to</p>
  
  <pre><code>glfwOpenWindowHint(GLFW_OPENGL_VERSION_MAJOR, 2);
  glfwOpenWindowHint(GLFW_OPENGL_VERSION_MINOR, 1);
  </code></pre>