LATEST UPDATE

CIMA study stuff added

BOX

Monday, July 19, 2010

1st lab of ht

#include
#include
#include
#include
using namespace std;
int screenWidth = 640; int screenHeight =480;
int main(it argc , char **argv)
{
glutlnit(&argc,argv);
glutlnitDisplayModel(GLUT_SINGLE GLUT_RGB);
glutlnitWindowSize(screenWidth,screenHeight);
glutlnitWindowPosition(30,30);
glutCreateWindow("HT FIRST GL PPROGRAM ");
glutDisplayFunc(myDisplay); // register display func. as callback
glutMainLoop(); //gui loop that waits for events to occur
return 0;
}


void myDisplay(void) //user defined display function
{
glClearColor(0.9f,0.9f,0.9f,0.0); //set background color
glClear(GL_COLOR_BUFFER_BIT); //clears fb with bg color
glColor3f(1,0,0); // set forground color
glFlush(); //send buffer pixel to display screen
}

No comments:

Post a Comment

UBIT

SMS AT ANY NETWORK

STAND UP 4 THE CHAMPION

Search This Blog