void renderScene()
{
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glClear(GL_ACCUM_BUFFER_BIT);
glClearColor(0, 0, 0, 1);
glAccum(GL_RETURN, 1.0);
glAccum(GL_MULT, 0.5 );
glPointSize(10);
glBegin(GL_POINTS);
glColor3f( 1.0f, 1.0f, 1.0f );
glVertex2f( xpos, ypos );
xpos = xpos + xvel;
ypos = ypos + yvel;
if(xpos >= 500)
{
xvel = -xvel;
}
if(xpos <= -500)
{
xvel = -xvel;
}
if(ypos >= 500)
{
yvel = -yvel;
}
if(ypos <= -500)
{
yvel = -yvel;
}
glEnd();
glAccum(GL_ACCUM, 1.0);
glutSwapBuffers();
}