PDA

View Full Version : bitmap_output not working



keerthana
05-12-2015, 12:16 PM
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<GL/glut.h>
#include<math.h>
#define M_PI 3.14

float rotatex=45.0,rotatey=-27.0,rotatez=13.0;
float xloc=0,yloc=0,zloc=0;
float bgcolg=0.9,bgcolr=1,bgcolb=0,ballx=-0.03f,bally=3.1f,ballz=1.0f;
static GLfloat spin=360.0;/*fan rotation variable*/
static GLfloat u=0.45;
static GLfloat v=0.45;
static GLfloat w=0.45;
static GLfloat b=0.45;
static GLfloat c=0.00;
static GLfloat d=0.00;
static GLfloat e=0.00;
static GLfloat a=-40;
static int z=0;
int xflag,yflag,zflag;
int page=0;
void *font, *currentfont;

void drawstr(float x,float y,float z,char *string)// Used to draw single character
{
char *i;
glRasterPos3f(x,y,z);
for(i=string;*i!='\0';i++)
{ glColor3f(1.0,1.0,1.0);

glutBitmapCharacter(currentfont,*i);
}
}

void setFont(void *font)// To set font
{
currentfont=font;
}



void main_page() // To display the starting page
{
setFont(GLUT_BITMAP_TIMES_ROMAN_24);
drawstr(320.0,850.0,0.0," COLLEGE OF ENGINEERING");
drawstr(320.0,800.0,0.0,"6th SEM,COMPUTER SCIENCE and ENGINEERING");
drawstr(475.0,720.0,0.0,"BANGLORE");
drawstr(430.0,660.0,0.0,"MINI PROJECT ON");
drawstr(350.0,580.0,0.0,"3D SHIP");
drawstr(455.0,540,0.0,"using OpenGL");
drawstr(455,480,0.0,"Submitted by : ");
drawstr(260.0,420.0,0.0,"* -------");
drawstr(270.0,380.0,0.0," (------)");
drawstr(565.0,420.0,0.0,"* -------");
drawstr(630.0,380.0,0.0," (------)");
drawstr(430.0,320.0,0.0,"Under the guidance of : ");
drawstr(455.0,275.0,0.0,"D.KHASIM.VALI");
drawstr(420.0,235.0,0.0,"Asst.Professor, Dept CS&E");
setFont(GLUT_BITMAP_HELVETICA_18);
glColor3f(0.0,0.0,0.0);
drawstr(770.0,100.0,0.0,"Press d to go to project .....");
glFlush();
}

void spinclockwise(void)
{
w=0.3;u=0;v=1;b=0.5;c=1;d=1;e=0;
a=a+0.1;
if(a>40)
a-=100.0;
spin=spin-1.0;
if(spin<0)
spin=spin+360.0;

glutPostRedisplay();

}

void drawball(void) //sun
{
glColor3f(bgcolr,bgcolg,bgcolb);
glTranslatef(ballx,bally,ballz);
glutSolidSphere(0.11,50,50);
}

void tree()
{
glColor3f(0.5,0.35,0.05); //tree trunk
glBegin(GL_POLYGON);
glVertex2f(-2.6,0.6);
glVertex2f(-2.5,0.6);
glVertex2f(-2.5,0.3);
glVertex2f(-2.6,0.3);
glEnd();

glColor3f(0,0.8,0); //tree
glBegin(GL_POLYGON);
glVertex2f(-2.65,0.7);
glVertex2f(-2.7,0.6);
glVertex2f(-2.4,0.6);
glVertex2f(-2.45,0.7);
glEnd();

glColor3f(0,0.8,0); //tree top
glBegin(GL_TRIANGLES);
glVertex2f(-2.7,0.7);
glVertex2f(-2.4,0.7);
glVertex2f(-2.55,1);
glEnd();

}


void tree3()
{
glColor3f(0.5,0.35,0.05); //tree trunk
glBegin(GL_POLYGON);
glVertex2f(1.7,0.8);
glVertex2f(1.8,0.8);
glVertex2f(1.8,1.1);
glVertex2f(1.7,1.1);
glEnd();

glColor3f(0,0.7,0); //tree
glBegin(GL_POLYGON);
glVertex2f(1.6,1.1);
glVertex2f(1.9,1.1);
glVertex2f(1.85,1.2);
glVertex2f(1.65,1.2);
glEnd();

glColor3f(0,0.7,0); //tree top
glBegin(GL_TRIANGLES);
glVertex2f(1.6,1.2);
glVertex2f(1.9,1.2);
glVertex2f(1.75,1.5);
glEnd();

}

void tree2()
{

glColor3f(0.5,0.35,0.05); //tree trunk
glBegin(GL_POLYGON);
glVertex2f(-0.7,0.5);
glVertex2f(-0.7,0.2);
glVertex2f(-0.6,0.2);
glVertex2f(-0.6,0.5);
glEnd();

glColor3f(0,0.7,0); //tree
glBegin(GL_POLYGON);
glVertex2f(-0.8,0.5);
glVertex2f(-0.5,0.5);
glVertex2f(-0.55,0.6);
glVertex2f(-0.75,0.6);
glEnd();

glColor3f(0,0.7,0); //tree top
glBegin(GL_TRIANGLES);
glVertex2f(-0.8,0.6);
glVertex2f(-0.5,0.6);
glVertex2f(-0.65,0.9);
glEnd();

}

void tree1()
{
glColor3f(0.5,0.35,0.05); //tree trunk
glBegin(GL_POLYGON);
glVertex2f(-1.5,0.8);
glVertex2f(-1.5,0.5);
glVertex2f(-1.4,0.5);
glVertex2f(-1.4,0.8);
glEnd();

glColor3f(0,0.8,0); //tree
glBegin(GL_POLYGON);
glVertex2f(-1.6,0.8);
glVertex2f(-1.3,0.8);
glVertex2f(-1.35,0.9);
glVertex2f(-1.55,0.9);
glEnd();

glColor3f(0,0.8,0); //tree top
glBegin(GL_TRIANGLES);
glVertex2f(-1.6,0.9);
glVertex2f(-1.3,0.9);
glVertex2f(-1.45,1.2);
glEnd();

}

void house()
{
//cube
glBegin(GL_POLYGON); //base
glColor3f(0.9,0.5,1.0);
glVertex3f(0,0.3,0);
glVertex3f(0.6,0.3,0);
glColor3f(0.5,0.9,1);
glVertex3f(0.6,0.3,0.6);
glVertex3f(0,0.3,0.6);
glEnd();

glBegin(GL_POLYGON); //top
glColor3f(0.9,0.5,1.0);
glVertex3f(0,0.8,0);
glVertex3f(0.6,0.8,0);
glColor3f(0.5,0.9,1);
glVertex3f(0.6,0.8,0.6);
glVertex3f(0,0.8,0.6);
glEnd();

glBegin(GL_POLYGON); //left
glColor3f(0.9,0.5,1);
glVertex3f(0,0.8,0);
glVertex3f(0,0.3,0);
glColor3f(0.5,0.9,1);
glVertex3f(0,0.3,0.6);
glVertex3f(0,0.8,0.6);
glEnd();

glBegin(GL_POLYGON); //front
glColor3f(0.9,0.5,1.0);
glVertex3f(0,0.8,0.6);
glVertex3f(0,0.3,0.6);
glColor3f(0.5,0.9,1);
glVertex3f(0.6,0.3,0.6);
glVertex3f(0.6,0.8,0.6);
glEnd();

glBegin(GL_POLYGON); //right
glColor3f(0.9,0.5,1.0);
glVertex3f(0.6,0.8,0.6);
glVertex3f(0.6,0.8,0);
glColor3f(0.5,0.9,1);
glVertex3f(0.6,0.3,0);
glVertex3f(0.6,0.3,0.6);
glEnd();

glBegin(GL_POLYGON); //back
glColor3f(0.9,0.5,1.0);
glVertex3f(0,0.8,0);
glVertex3f(0,0.8,0.6);
glColor3f(0.5,0.9,1);
glVertex3f(0.6,0.3,0);
glVertex3f(0,0.3,0);
glEnd();

//pyramid

glBegin(GL_POLYGON);
glColor3f(0.6,0.6,0.60);
glVertex3f(0.3,1.2,0.3);
glVertex3f(0,0.8,0);
glColor3f(1.6,1.6,0.6);
glVertex3f(0.6,0.8,0);
glEnd();

glBegin(GL_POLYGON);
glColor3f(0.6,0.6,0.6);
glVertex3f(0.3,1.2,0.3);
glVertex3f(0.6,0.8,0);
glColor3f(1.6,1.6,0.6);
glVertex3f(0.6,0.8,0.6);
glEnd();

glBegin(GL_POLYGON);
glColor3f(0.6,0.6,0.6);
glVertex3f(0.3,1.2,0.3);
glVertex3f(0.6,0.8,0.6);
glColor3f(1.6,1.6,0.6);
glVertex3f(0,0.8,0.6);
glEnd();

glBegin(GL_POLYGON);
glColor3f(0.6,0.6,0.6);
glVertex3f(0.3,1.2,0.3);
glVertex3f(0,0.8,0.6);
glColor3f(1.6,1.6,0.6);
glVertex3f(0,0.8,0);
glEnd();

glBegin(GL_POLYGON); //house door
glColor3f(0.6,0.4,0.4);
glVertex3f(0.2,0.3,0.62);
glVertex3f(0.2,0.5,0.62);
glVertex3f(0.4,0.5,0.62);
glVertex3f(0.4,0.3,0.62);
glEnd();

}


void cube() //bridge
{
glBegin(GL_POLYGON);
glColor3f(1,0,0);
glVertex3f(3,0,0);
glVertex3f(3,0.2,0);
glVertex3f(3.5,0.2,0);
glVertex3f(3.5,0,0);
glEnd();

glBegin(GL_POLYGON);
glColor3f(0,1,0);
glVertex3f(3.5,0,1);
glVertex3f(3.5,0.2,1);
glVertex3f(3,0.2,1);
glVertex3f(3,0,1);
glEnd();

glBegin(GL_POLYGON);
glColor3f(0,0,0);
glVertex3f(3,0,0);
glVertex3f(3,0.2,0);
glVertex3f(3,0.2,1);
glVertex3f(3,0,1);
glEnd();

glBegin(GL_POLYGON);
glColor3f(1,0.2,0.1);
glVertex3f(3.5,0,1);
glVertex3f(3.5,0.2,1);
glVertex3f(3.5,0.2,0);
glVertex3f(3.5,0,0);
glEnd();

glBegin(GL_POLYGON);
glColor3f(1,1,0);
glVertex3f(3.5,0.2,0);
glVertex3f(3,0.2,0);
glVertex3f(3,0.2,1);
glVertex3f(3.5,0.2,1);
glEnd();

glBegin(GL_POLYGON);
glColor3f(1,1,1);
glVertex3f(3.5,0,0);
glVertex3f(3,0,0);
glVertex3f(3,0,1);
glVertex3f(3.5,0,1);
glEnd();
}

void humanhead()
{
glColor3f(0,0,0); //head
glTranslatef(2,0.4,-0.9);
glutSolidSphere(0.04,20,20);
}

void humanbody()
{
glColor3f(0,0,0);
glBegin(GL_POLYGON); //body
glVertex3f(2.0,0.35,1);
glVertex3f(2.04,0.5,1);
glVertex3f(2.1,0.5,1);
glVertex3f(2.15,0.35,1);
glEnd();

glBegin(GL_POLYGON); //legs
glVertex3f(2.04,0.25,1);
glVertex3f(2.04,0.34,1);
glVertex3f(2.06,0.34,1);
glVertex3f(2.06,0.25,1);
glEnd();

glBegin(GL_POLYGON);
glVertex3f(2.08,0.25,1);
glVertex3f(2.08,0.34,1);
glVertex3f(2.105,0.34,1);
glVertex3f(2.105,0.25,1);
glEnd();

glBegin(GL_POLYGON); //hands
glVertex3f(1.98,0.35,1);
glVertex3f(2.02,0.5,1);
glVertex3f(2,0.5,1);
glVertex3f(1.96,0.35,1);
glEnd();

glBegin(GL_POLYGON);
glVertex3f(2.17,0.35,1);
glVertex3f(2.12,0.5,1);
glVertex3f(2.14,0.5,1);
glVertex3f(2.19,0.35,1);
glEnd();
}

void mountain()
{
glColor3f(1,0,0);
glBegin(GL_POLYGON);
glVertex3f(-3.9,0.9,-1);
glVertex3f(-2.75,1.25,-1);
glVertex3f(-2.0,0.9,-1);
glEnd();

glBegin(GL_POLYGON);
glVertex3f(-2,0.9,-1);
glVertex3f(-2.25,1,-1);
glVertex3f(-1.25,1.2,-1);
glVertex3f(-0.25,1,-1);
glVertex3f(-0.5,0.9,-1);
glEnd();

glBegin(GL_TRIANGLES);
glVertex3f(-0.5,0.9,-1);
glVertex3f(0.25,1.25,-1);
glVertex3f(1,0.9,-1);
glEnd();

glBegin(GL_POLYGON);
glVertex3f(1,0.9,-1);
glVertex3f(0.75,1,-1);
glVertex3f(1.5,1.2,-1);
glVertex3f(2.25,1,-1);
glVertex3f(2,0.9,-1);
glEnd();

glBegin(GL_TRIANGLES);
glVertex3f(2,0.9,-1);
glVertex3f(2.75,1.25,-1);
glVertex3f(3.9,0.9,-1);
glEnd();
}


void windmill()
{
glColor3f(0,0,0);
glBegin(GL_POLYGON); //MILL STAND 1
glVertex3f(-2.26,1,-1);
glVertex3f(-2.24,1,-1);
glVertex3f(-2.24,1.42,-1);
glVertex3f(-2.26,1.42,-1);
glEnd();

glColor3f(0,0,0); // MILL STAND 2
glBegin(GL_POLYGON);
glVertex3f(0.75,1.5,-1);
glVertex3f(0.77,1.5,-1);
glVertex3f(0.77,1,-1);
glVertex3f(0.75,1,-1);
glEnd();
}


void millblades()
{
glPushMatrix();
glLoadIdentity();
glTranslatef (-2.245,1.4,-1);/*rotation about fixed point*/
glRotatef(spin,0.0,0.0,1.0);
glTranslatef (2.245,-1.4,-1);
glColor3f(0,0,1); //BLADES 1
glBegin(GL_POLYGON);
glVertex3f(-2.245,1.4,-1);
glVertex3f(-2.35,1.37,-1);
glVertex3f(-2.55,1.4,-1);
glVertex3f(-2.45,1.43,-1);
glEnd();

glBegin(GL_POLYGON); // BLADES 1
glVertex3f(-2.245,1.4,-1);
glVertex3f(-2.25,1.3,-1);
glVertex3f(-2.15,1.1,-1);
glVertex3f(-2.19,1.28,-1);
glEnd();

glBegin(GL_POLYGON); //BLADES 1
glVertex3f(-2.245,1.4,-1);
glVertex3f(-2.2,1.55,-1);
glVertex3f(-2,1.7,-1);
glVertex3f(-2.23,1.52,-1);
glEnd();
glPopMatrix();

glPushMatrix();
glLoadIdentity();
glTranslatef (0.75,1.5,-1);/*rotation about fixed point*/
glRotatef(spin,0.0,0.0,1.0);
glTranslatef (-0.75,-1.5,1);
glColor3f(0,0,1);
glBegin(GL_POLYGON); //BLADES 2
glVertex3f(0.6,1.47,-1);
glVertex3f(0.75,1.5,-1);
glVertex3f(0.65,1.42,-1);
glVertex3f(0.45,1.4,-1);
glEnd();

glBegin(GL_POLYGON); //BLADES2
glVertex3f(0.75,1.5,-1);
glVertex3f(0.82,1.35,-1);
glVertex3f(1,1.2,-1);
glVertex3f(0.9,1.36,-1);
glEnd();

glBegin(GL_POLYGON); //BLADES 2
glVertex3f(0.75,1.5,-1);
glVertex3f(0.77,1.63,-1);
glVertex3f(0.76,1.82,-1);
glVertex3f(0.73,1.66,-1);
glEnd();
glPopMatrix();

}



void line()
{
glColor3f(0,0,0);
glBegin(GL_LINES);
glVertex3f(0,1.9,0); // y-axis
glVertex3f(0,-1.9,0);
glVertex3f(3.7,0,0); // x-axis
glVertex3f(-3.7,0,0);
glEnd();

glColor3f(0,0,0);
glBegin(GL_POLYGON); //back left support for bridge
glVertex3f(2.56,-0.2,1.1);
glVertex3f(2.56,-0.4,1.1);
glVertex3f(2.59,-0.4,1.1);
glVertex3f(2.59,-0.2,1.1);
glEnd();
glBegin(GL_POLYGON); //back right support for bridge
glVertex3f(2.99,-0.3,1.1);
glVertex3f(2.99,-0.5,1.1);
glVertex3f(3.02,-0.5,1.1);
glVertex3f(3.02,-0.3,1.1);
glEnd();
glBegin(GL_POLYGON); //middle left support for bridge
glVertex3f(2.3,-0.53,-1);
glVertex3f(2.3,-0.7,-1);
glVertex3f(2.335,-0.7,-1);
glVertex3f(2.335,-0.53,-1);
glEnd();
glBegin(GL_POLYGON); //middle right support for bridge
glVertex3f(2.77,-0.55,2.2);
glVertex3f(2.77,-0.71,2.2);
glVertex3f(2.805,-0.71,2.2);
glVertex3f(2.805,-0.55,2.2);
glEnd();
glBegin(GL_POLYGON); //front left support for bridge
glVertex3f(2.1,-0.8,-1);
glVertex3f(2.1,-0.93,-1);
glVertex3f(2.13,-0.93,-1);
glVertex3f(2.13,-0.8,-1);
glEnd();
glBegin(GL_POLYGON); //front right support for bridge
glVertex3f(2.53,-0.90,2.5);
glVertex3f(2.53,-1.04,2.5);
glVertex3f(2.57,-1.04,2.5);
glVertex3f(2.57,-0.90,2.5);
glEnd();

glColor3f(0.2,0,1);
glBegin(GL_POLYGON); // water
glVertex3f(-4,-0.5,-1);
glVertex3f(4,-0.5,-1);
glVertex3f(4,-2,-1);
glVertex3f(-4,-2,-1);
glEnd();

glColor3f(1,0.8,0); //gap
glBegin(GL_POLYGON);
glVertex3f(-4,-0.5,-1);
glVertex3f(4,-0.5,-1);
glVertex3f(4,0,-1);
glVertex3f(-4,0,-1);
glEnd();

glColor3f(1,0.7,0);
glBegin(GL_POLYGON);
glVertex3f(-4,-0.5,1);
glVertex3f(4,-0.5,1);
glVertex3f(4,-0.3,1);
glVertex3f(-4,-0.3,1);
glEnd();

glColor3f(0,1,0);
glBegin(GL_POLYGON); // land
glVertex3f(-4,0,-1);
glVertex3f(-4,1,-1);
glVertex3f(4,1,-1);
glVertex3f(4,0,-1);
glEnd();
/*glColor3f(1,1,1);
glBegin(GL_POLYGON); // sky
glVertex3f(-4,1,-1);
glVertex3f(-4,2,-1);
glVertex3f(4,2,-1);
glVertex3f(4,1,-1);
glEnd();*/
}

void ship(void) //ship
{
glColor3f(0.8,0,0); //base
glBegin(GL_POLYGON);
glVertex2f(-3.68,-1.3);
glVertex2f(-3.62,-1.3);
glVertex2f(-3.62,-1.32);
glVertex2f(-2.4,-1.32);
glVertex2f(-2.4,-1.3);
glVertex2f(-2.22,-1.3);
glVertex2f(-2.22,-1.32);
glVertex2f(-2.5,-1.51);
glVertex2f(-3.5,-1.51);
glVertex2f(-3.68,-1.32);
glEnd();
glColor3f(0,0.7,0); //first layer
glBegin(GL_POLYGON);
glVertex2f(-3.6,-1.3);
glVertex2f(-3.6,-1.21);
glVertex2f(-2.5,-1.21);
glVertex2f(-2.5,-1.3);
glEnd();
glColor3f(0,0.6,0);
glBegin(GL_POLYGON);
glVertex2f(-2.5,-1.3);
glVertex2f(-2.5,-1.21);
glVertex2f(-2.39,-1.17);
glVertex2f(-2.39,-1.3);
glEnd();
glColor3f(0,0,0.8); //second layer
glBegin(GL_POLYGON);
glVertex2f(-3.55,-1.21);
glVertex2f(-3.55,-1.10);
glVertex2f(-2.56,-1.10);
glVertex2f(-2.56,-1.21);
glEnd();
glColor3f(0,0,0.7);
glBegin(GL_POLYGON);
glVertex2f(-2.56,-1.21);
glVertex2f(-2.56,-1.10);
glVertex2f(-2.42,-1.06);
glVertex2f(-2.42,-1.19);
glVertex2f(-2.5,-1.21);
glEnd();
glColor3f(0.9,0.5,0); //cyliners
glBegin(GL_POLYGON);
glVertex2f(-3.40,-1.10);
glVertex2f(-3.40,-1);
glVertex2f(-3.30,-1);
glVertex2f(-3.30,-1.10);
glEnd();
glColor3f(0.9,0.5,0);
glBegin(GL_POLYGON);
glVertex2f(-3.20,-1.10);
glVertex2f(-3.20,-0.93);
glVertex2f(-3.10,-0.93);
glVertex2f(-3.10,-1.10);
glEnd();
glColor3f(0.9,0.5,0);
glBegin(GL_POLYGON);
glVertex2f(-3.00,-1.10);
glVertex2f(-3.00,-0.85);
glVertex2f(-2.90,-0.85);
glVertex2f(-2.90,-1.10);
glEnd();
glColor3f(0,0,0); //pole
glBegin(GL_POLYGON);
glVertex2f(-2.6,-1.10);
glVertex2f(-2.62,-1.10);
glVertex2f(-2.62,-0.58);
glVertex2f(-2.6,-0.58);
glEnd();
glColor3f(1,1,1); //sail
glBegin(GL_POLYGON);
glVertex2f(-2.7,-0.62);
glVertex2f(-2.52,-0.59);
glVertex2f(-2.43,-0.80);
glVertex2f(-2.75,-0.84);
glEnd();
glBegin(GL_POLYGON);
glVertex2f(-2.75,-0.88);
glVertex2f(-2.43,-0.83);
glVertex2f(-2.36,-1.00);
glVertex2f(-2.80,-1.07);
glEnd();
}

void display(void)
{
glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT);
glLoadIdentity();
line();
tree();
tree1();
tree2();
tree3();
humanbody();
mountain();
windmill();
millblades();

glRotatef(rotatex, 1.0, 0.0, 0.0);
glRotatef(rotatey, 0.0, 1.0, 0.0);
glRotatef(rotatez, 0.0, 0.0, 1.0);

cube();

glPushMatrix();
drawball();
glPopMatrix();

glPushMatrix();
humanhead();
glPopMatrix();

glRotatef(-33,1,0,0);
glRotatef(25,0,1,0);
glRotatef(4,0,0,1);

house();

glTranslatef(xloc,yloc,zloc);
ship();

if (xloc > 4.3) xflag = 0;
else if (xloc <= -3) xflag = 1;

//Increment to move right, decrement to move left
//Change value to change speed
if (xflag) xloc += 0.006;
else xloc -= 0.006;

glFlush();
glutSwapBuffers();
}

void DisplayPoint()
{
if(page==0)
{
glLoadIdentity();
main_page();
glutPostRedisplay();
}
else if(page==1)
{
display();
}
}



void key(unsigned char k,int x,int y)
{
if(k=='d')
{
page=1;
glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT);
glLoadIdentity();
display();
glFlush();
glutSwapBuffers();
}
}

void myReshape(int w,int h)
{
glViewport(0,0,w,h);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
if(w<=h)
glOrtho(-2.0,2.0,-2.0*(GLfloat)h/(GLfloat)w,2.0*(GLfloat)h/(GLfloat)w,-10.0,10.0);
else
glOrtho(-2.0*(GLfloat)w/(GLfloat)h,2.0*(GLfloat)w/(GLfloat)h,-2.0,2.0,-10.0,10.0);
glMatrixMode(GL_MODELVIEW);
glutPostRedisplay();
}




void main(int argc,char **argv)
{
glutInit(&argc,argv);
glutInitDisplayMode(GLUT_DOUBLE|GLUT_RGB|GLUT_DEPT H);
glutInitWindowSize(2024,768);
glutCreateWindow("3d gasket");
glutReshapeFunc(myReshape);
glutDisplayFunc(DisplayPoint);
glutKeyboardFunc(key);
glutIdleFunc(spinclockwise);
glEnable(GL_DEPTH_TEST);
glClearColor(1,1,1,0);
glutMainLoop();
}





This is mini project created in which in the first window details have to be displayed .
But the first window is not appearing.
Please help in correcting the problem.