title: Draw Point or filled in circle
body: <p>In OpenGL, when I want to draw a filled circle, I'd do:</p>
  
  <pre><code>void DrawPoint(float X, float Y, float Z, float Radius) const
  {
      glRasterPos2f(X, Y);
      glPointSize(Radius);
      glBegin(GL_POINTS);
          glVertex3f(X, Y, Z);
      glEnd();
      glPointSize(this-&gt;PointSize);
      glFlush();
  }
  </code></pre>
  
  <p>However, I could not find any equivalent for <code>glPointSize</code> in Direct-X. So I tried:</p>
  
  <pre><code>struct Vector3
  {
      double X, Y, Z;
  };
  
  #include &lt;vector&gt;
  void DrawCircle1(float X, float Y, DWORD Color)
  {
      const int sides = 20;
      std::vector&lt;D3DXVECTOR3&gt; points;
      for(int i = 0; i &lt; sides; ++i)
      {
          double angle = D3DX_PI * 2 / sides * i;
          points.emplace_back(D3DXVECTOR3(sin(angle), cos(angle), 0));
      }
  
      device-&gt;DrawPrimitiveUP(D3DPT_TRIANGLEFAN, sides, &amp;points[0], sizeof(D3DXVECTOR3));
  }
  
  void DrawCircle2(float CenterX, float CenterY, float Radius, int Rotations)
  {
      std::vector&lt;D3DXVECTOR3&gt; Points;
      float Theta = 2 * 3.1415926535897932384626433832795 / float(Rotations);
      float Cos = cosf(Theta);
      float Sine = sinf(Theta);
      float X = Radius, Y = 0, Temp = 0;
  
      for(int I = 0; I &lt; Rotations; ++I)
      {
          Points.push_back(D3DXVECTOR3(X + CenterX, Y + CenterY, 0));
          Temp = X;
          X = Cos * X - Sine * Y;
          Y = Sine * Temp + Cos * Y;
      }
  
      device-&gt;DrawPrimitiveUP(D3DPT_TRIANGLEFAN, Points.size(), &amp;Points[0], sizeof(D3DXVECTOR3));
  }
  </code></pre>
  
  <p>But none of these work. I cannot figure out why nothing works. The first one draws a gigantic circle that is black and the second one draws a long triangle.</p>
  
  <p>Any ideas how I can draw a filled in circle or a point of a certain size and colour in Direct-X?</p>