I have been trying for days to compile this code and I always get some sort of undefiened reference error and cannot compile as a result. I would like someone to compile the follwing code and send me the project if it compiles.
//#include <OpenGLSB.h>
//#include <windows.h>
#include <gl/gl.h>
#include <glut.h>
void RenderScene();
void SetupRC();
void RenderScene(void)
{
glClear (GL_COLOR_BUFFER_BIT);
glFlush();
}
void SetupRC(void)
{
glClearColor (0.0f, 0.0f, 0.0f, 0.0f);
}
int main(void)
{
glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB);
glutCreateWindow("Simple");
glutDisplayFunc(RenderScene);
SetupRC();
glutMainLoop();
return 0;
}
This project uses the gl,glu,glut libraries I am don't thing you need windows.h all this code does is bring up a window from the console.
Here is a link to the glut libraries (don't want to slow down this server) http://www.xmission.com/~nate/glut.html
Renderscene is called by glut main loop. Notice I passed that to one of the glut functions.