I've been working on learning opengl from the red book.. I was working on a small app that was working well when suddenly.. all of my lines went from white to blue? I rewrote a skeleton that was basically as small as I could make it... lines are still blue... I don't see anything I'm doing wrong, I've checked it against other examples, but.. I obviously must be. Can someone see an obvious problem?
Code :#include <iostream> #include "GL/glut.h" using namespace std; void reshape(int w, int h) { glMatrixMode(GL_PROJECTION); glViewport(0, 0, w, h); glLoadIdentity(); gluOrtho2D (0.0, w, 0.0, h); glMatrixMode(GL_MODELVIEW); } void draw( ) { glMatrixMode( GL_MODELVIEW ); glLoadIdentity(); glClear( GL_COLOR_BUFFER_BIT ); // set the pen color = white glColor3f( 1.0, 1.0, 1.0 ); glBegin( GL_LINE_STRIP ); glVertex2f( 100, 100 ); glVertex2f( 200, 200 ); glEnd(); // but it shows up as blue? glFinish(); } int main( int argc, char** argv ) { glutInit( &argc, argv ); glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB); glutInitWindowSize(300, 300); glutInitWindowPosition(200,200); glutCreateWindow("helloworld"); glClearColor( 0.0, 0.0, 0.0, 1.0 ); glutDisplayFunc( draw ); glutReshapeFunc( reshape ); glutMainLoop(); return 0; }
Any help here is super super appreciated!



