title: opengl draw in 2D coordinates instead of vertex coordinate system
body: <p>how can i draw in 2D coordinates instead of vertex coordinate system, as this => </p>
  
  <pre><code>drawPoint(50 , 100 ,  0.01f);
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/oBurt.png" alt="enter image description here"></p>
  
  <p>this is my code , a background texture and a point</p>
  
  <pre><code>static void Draw(void)
  {
      glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
      double w = glutGet( GLUT_WINDOW_WIDTH ) / 300.0;
      double h = glutGet( GLUT_WINDOW_HEIGHT ) / 300.0;
      glMatrixMode(GL_PROJECTION);
      glLoadIdentity();
      glMatrixMode(GL_MODELVIEW);
      glLoadIdentity();
  
      glOrtho( -1 * w/2, 1 * w/2, -1 * h/2, 1 * h/2, w/2, -h/2);
      glBegin(GL_POLYGON);
      glTexCoord2f(0.0f, 0.0f); glVertex3f(-w/2.f, -h/2.f,  0.0f);
      glTexCoord2f(1.0f, 0.0f); glVertex3f( w/2.f, -h/2.f,  0.0f);
      glTexCoord2f(1.0f, 1.0f); glVertex3f( w/2.f,  h/2.f,  0.0f);
      glTexCoord2f(0.0f, 1.0f); glVertex3f(-w/2.f,  h/2.f,  0.0f);
      glEnd();
  
    drawPoint(50 , 100 ,  0.01f);
    glutSwapBuffers();
  }
  </code></pre>
  
  <p>the function DrawPoint => draws circles</p>
  
  <pre><code>void drawPoint(GLfloat x, GLfloat y, GLfloat radius){
      glDisable(GL_LIGHTING);
      glDisable(GL_TEXTURE_2D);
      int i;
      int triangleAmount = 20; //# of triangles used to draw circle
  
      //GLfloat radius = 0.8f; //radius
      GLfloat twicePi = 2.0f * 3.1415;
  
      glBegin(GL_TRIANGLE_FAN);
      glColor3f(1.0, 0.0, 0.0);
          glVertex2f(x, y); // center of circle
          for(i = 0; i &lt;= triangleAmount;i++) {
              glVertex2f(
                      x + (radius * cos(i *  twicePi / triangleAmount)),
                  y + (radius * sin(i * twicePi / triangleAmount))
              );
          }
      glEnd();
      glEnable(GL_LIGHTING);
      glEnable(GL_TEXTURE_2D);
  }
  </code></pre>
  
  <p>So I don't know if I have to change the DrawPoint function.</p>
  
  <p>UPDATE : this is my main source</p>
  
  <pre><code> glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB);
      glutInit(&amp;argc, argv);
      glutInitWindowSize(widthX, heightY);
      glutCreateWindow("prg");
      glutReshapeFunc(resize);
      glutDisplayFunc(Draw);
      glutKeyboardFunc(keyPressed);
      glutKeyboardUpFunc(keyUp);
      texture[0] = SOIL_load_OGL_texture 
      (
          "img.jpg",
          SOIL_LOAD_AUTO,
          SOIL_CREATE_NEW_ID,
          SOIL_FLAG_INVERT_Y | SOIL_FLAG_NTSC_SAFE_RGB | SOIL_FLAG_COMPRESS_TO_DXT
      );
      glBindTexture(GL_TEXTURE_2D, texture[0]);
      glEnable(GL_TEXTURE_2D);
      glClearColor(0.0f, 0.0f, 0.0f, 0.5f);
      glEnable(GL_POINT_SMOOTH);
      glHint(GL_POINT_SMOOTH_HINT, GL_NICEST);
      glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST);
      glutMainLoop();
  </code></pre>
  
  <p>UPDATE 2 :</p>
  
  <p>if in this way is impossible, is there a method that transform an x and y into a vector ?, so for example : </p>
  
  <p>DrawPoint(VectConvert(50),VectConvert(100),0.01f);</p>