glPointSize does not seem to work

I am trying to implement a sample program that draws three dots in a window.

No matter what point size I specify, the dots are always very tiny when I re-build and execute.

Here is my code:

#include <iostream.h>
#include <gl/glut.h>

//<<<<<<<<< myInit >>>>>>>>>>>>
void myInit(void)
{

glClearColor(1.0,1.0,1.0,0.0);
glColor3f(1.0, 0.0, 0.0);
glPointSize(10.0);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
gluOrtho2D(0.0, 640.0, 0.0, 480.0);
}

//<<<<<<<<< myDisplay >>>>>>>>>
void myDisplay(void)
{
cout << “In myDisplay…” << endl;
glClear(GL_COLOR_BUFFER_BIT); glBegin(GL_POINTS);
glVertex2i(100, 50);
glVertex2i(100, 130);
glVertex2i(150, 130);
glEnd();
glFlush();
}

//<<<<<<<<<<<< main >>>>>>>>>>>>>
void main(int argc, char** argv)
{
glutInit(&argc, argv);
glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB);
glutInitWindowSize(640,480); glutInitWindowPosition(100,150); glutCreateWindow(“my first attempt”);
glutDisplayFunc(myDisplay); myInit();
glutMainLoop();
}

Thanks.

perhaps your videocard/drivers cant handle large points?
look here http://www.gamedeveloper.org/delphi3d/hardware/

I might be wrong about this, but I seem to recall that you need to enable blending to get pointsize to work. It’s been a while though.

thats only if u want round points

I am not sure about this but I think that you need to call glPointSize just before glBegin. To obtain round points use glEnable (GL_POINT_SMOOTH); before glBegin.

It shouldn’t matter where you put the glPointSize() as long as it’s somewhere before the glBegin()…right?

Chris