This is the tutorial I am looking at for Open GL.
http://fly.srk.fer.hr/~unreal/theredbook/chapter01.html
Here is the program I'm trying to get to work
But I get a list of errors that stem, seemingly, from the same source. One such example is the following.Code:#include <iostream> #include <gl.h> using namespace std; int main() { glClearColor(0.0, 0.0, 0.0, 0.0); glClear(GL_COLOR_BUFFER_BIT); glColor3f(1.0, 1.0, 1.0); glOrtho(-1.0, 1.0, -1.0, 1.0, -1.0, 1.0); glBegin(GL_POLYGON); glVertex2f(-0.5, -0.5); glVertex2f(-0.5, 0.5); glVertex2f(0.5, 0.5); glVertex2f(0.5, -0.5); glEnd(); glFlush(); cin.get(); }
" undefined reference to 'glClearColor@16' "
I just started to look into OpenGL recently, and some help is greatly appreciated. And if anyone knows a better tutorial, other than cprogramming.com, then please do tell.