How to draw Points?

Hi All,

I am still new to MonoGame programming.
I am trying to draw points at the location of the mouse clicks inside MonoGame window.
What is the simplest way to draw point in MonoGame window?

Thanks for your help

There’s no native support in drawing points, you can either draw a 1x1 texture or use an extension lib (I think maybe MonoGame.Extended have support in basic shapes but I’m not sure).

1 Like

Maybe if you could give us a better idea of what you want the points to look like, we can give more specific advice. Points alone are infinitely small with no volume, so “drawing points” is ambiguous. Do you want a circle drawn at the point? Is this a 2D game?

1 Like

Sorry for the late reply. In fact I am trying to implement the QuadTree algorithm in a graphical manner, I’d like to click anywhere in the Mono Window and each time draw the Quad Tree that represent the change based on the point on the screen. Hence I’d like to be able to put a point at each click.

Thanks for your reply, I’ve seen this method used, and will try it. seems to be this is the simplest way.

I have created a simple project called MonoPoints that implements variable size and color points buffer and drawing.

  1. Mouse scroll wheel changes the point side
  2. Mouse RightClick changes color (it loops in the defaults colors list)
  3. Left MouseClick put the point at the mouse location

Project can be found in my github