PDA

View Full Version : Not able to draw at certain x positions



fizzlesticks
02-11-2012, 11:57 PM
Hi, I just started using openGL and am having a little trouble. At certain x positions my program is just displaying black verticle lines. Here's a picture of the problem imageshack (http://imageshack.us/photo/my-images/220/problembw.png/)

And here's the display code.



void draw(){
glClear(GL_COLOR_BUFFER_BIT);
glBegin(GL_POINTS);
for(int y=-100;y<100;y++){
for(int x=-400;x<400;x++){
glVertex2i(x,y);
}
}
glEnd();
glFlush();
}


Does anyone know why this is happening?

Thanks.