No Shapes, Lines appear on screen

I’m trying to write a function where I can click on the screen, and a dot will be drawn in the location where I clicked - but nothing ever shows up. I click on the mouse, and nothing happens. I’ve tried making a predefined square and a predefined bunch of lines appear on the screen when I click the mouse, and nothing happens. The only thing that shows up is my test line in the console that I use to verify that my callback function is getting called when I click the mouse (which it is)

I’ve tried changing the colour, changing the point size to 8.0 - but no shapes, dots, or lines ever show up. Does anyone have any insight as to why this is happening? Thanks very much in advance.

glBegin(GL_POINTS);
glVertex2i(x,y);
glEnd();

glBegin(GL_POLYGON);
glVertex2i(1,1);
glVertex2i(-1,-1);
glVertex2i(1,-1);
glVertex2i(-1,1);
glEnd();

Show us how you setup your window and rendering context, how you set your view and projection matrix, and what states you enable.

The glVertex2f sets the Z to 0. From what I can tell you have not setup a camera system, so you can use glTranslatef(0,0,-5); Then, your primitives will be visible.