I'm trying to draw square pixels using GL_POINTS but the pixels are rounded. I've tried using glDisable(GL_POINT_SMOOTH) but it doesn't seem to change anything.
Here's my code:
glDisable(GL_POINT_SMOOTH);
glPointSize(8);
glBegin(GL_POINTS);
glVertex2i(500, 400);
glEnd();
The glPointSize reference page (https://registry.khronos.org/OpenGL-Refpages/gl4/html/glPointSize.xhtml) notes that if you (or any library you're using) has called glEnable(GL_PROGRAM_POINT_SIZE) then the vertex shader will control the size of the points (rather than glPointSize() being in control).
Also, some platforms may have rather severe limits on the maximum point size: It might be the case that the maximum size is 1 (!) which means that (in effect) you don't have the ability to do square pixels at all. To check your platform's capabilities:
[ref: https://registry.khronos.org/OpenGL-Refpages/gl4/html/glGet.xhtml]