Hi all,
This is my first program on OpenGL with using GLUT library and under windows.
I had used the GNU C compiler ‘gcc’ to compile this.
#include <stdlib.h>
#define GLUT_DISABLE_ATEXIT_HACK ;; this is a dirty hack,but we have to do this.
#include <GL/gl.h>
#include <GL/glut.h>
void renderScene(void);
int main (int argc , char ** argv)
{
glutInit(&argc , argv);
glutInitWindowPosition( 100,100);
glutInitWindowSize( 320,320);
glutInitDisplayMode(GLUT_DEPTH |GLUT_SINGLE | GLUT_RGBA );
glutCreateWindow( "OpenGL Window");
glutDisplayFunc( renderScene);
glutMainLoop();
}
void renderScene( void)
{
glClear ( GL_COLOR_BUFFER_BIT);
glLineWidth( 3);
glEnable ( GL_LINE_SMOOTH);
glBegin(GL_LINE_LOOP);
glVertex3f(-0.75,-0.75,0);
glVertex3f(0.75,-0.75, 0);
glVertex3f(0.0,0.9,0);
glEnd();
glBegin(GL_LINE_LOOP);
glVertex3f(-0.75,0.75,0);
glVertex3f(0.75,0.75,0);
glVertex3f( 0.0,-0.9,0);
glEnd();
glFlush();
}
And this is how it visible on the screen.

glut opengl star
Do it yourself and comment.
and on Backtrack linux live CD version this compiles without any change in the source code.
see,

and even without compiling.Using wine win32 emulator,

–happy coding–