LATEST UPDATE

CIMA study stuff added

BOX

Monday, July 26, 2010

HT RUNNING CODE



















#include
#include
#include
#include"glut.h"

using namespace std;

void myDisplay(void);
void myDisplay(void) //user defined display function
{
glClear(GL_COLOR_BUFFER_BIT); //cleats fb with bg color
glClearColor(0.45f,0.5f,0.5f,0.0);//set background color
glColor3f(1,1,1);//set forground color
glFlush();//sends buffer pixels to display screen
}



int main(int argc, char **argv)
{
int screenWidth =640; int screenHeight =480;
glutInit(&argc,argv);
glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB);

glutInitWindowSize(screenWidth, screenHeight);
glutInitWindowPosition(30,30);
//glutInitCreateWindow("ibbi`s first program");
glutCreateWindow("Lab1:Basics ::IBRAHIM ");
glutDisplayFunc(myDisplay); // register display function as callback

glutMainLoop(); //glui loop that wait for events to occur

return 0;
}



No comments:

Post a Comment

UBIT

SMS AT ANY NETWORK

STAND UP 4 THE CHAMPION

Search This Blog