hey I'm trying to run this program on netbeans on Ubuntu
#include <windows.h>
#include <GL/gl.h>
#include <GL/glext.h>
#include <GL/glu.h>
#include <GL/glut.h>
void myInit(void)
{
glClearColor(1.0,0.0,0.0,0.0);
glColor3f(0.0f, 0.0f, 1.0f);
glPointSize(9.0);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
gluOrtho2D(0.0, 640.0, 0.0, 480.0);
}
//<<<<<<<<<<<<<<<<<<<<<<<< myDisplay >>>>>>>>>>>>>>>>>
void myDisplay(void)
{
glClear(GL_COLOR_BUFFER_BIT);
glBegin(GL_POINTS);
glVertex2i(400, 350);
glVertex2i(100, 130);
glVertex2i(150, 130);
glEnd();
glFlush();
}
//<<<<<<<<<<<<<<<<<<<<<<<< main >>>>>>>>>>>>>>>>>>>>>>
void main(int argc, char** argv)
{
glutInit(&argc, argv);
glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB);
glutInitWindowSize(640,480);
glutInitWindowPosition(300, 0);
glutCreateWindow("my first attempt");
glutDisplayFunc(myDisplay);
myInit();
glutMainLoop();
}
the problem is that this program runs perfectly on windows but on Linux it doesn't and I think the problem is in <windows.h>
so is there an equivalent library that will make this program work?? and is there any other libraries required to run this on linux. oh and btw I've installed all the opengl libraries .