Professional Documents
Culture Documents
BELGAUM-590 002
____________ ______________
Signature of the guide Signature of guide
Shilpashree .S. B E
___________________
Signature of HOD
Prof C. M. Parmeshwarappa
Date: ___________________
Place: STJIT RNR Signature of Examiner
TABLE OF CONTENTS:
CONTENTS
1.INTRODUCTION
1.1 Introduction to OpenGL……………………………….
1.1.1 OpenGL Command Structure…………………….
1.2 Utility Toolkit – Glut……………………………………
1.3 Introduction to Project…………………………………
2. REQUIREMENTS
2.1 Hardware Requirements………………………………
2.2 Software Requirements………………………………..
2.2.1 Introduction about C++ developer………………
3. SPECIFICATION
3.1 Function Specification………………………………..
3.1.1 glutMouseFunc…………………………………...
3.1.2 glutMotionFunc…………………………………..
3.1.3
4. WORKING
4.1Code Explanation…………………………………….
5. APPLICATIONS………………………………………..
6. CONCLUSION………………………………………….
7. BIBLIOGRAPHY………………………………………
Introduction:
• Computer graphics is an interactive method of pictorial
synthesis of real or imaginary objects from their computer
based models. Another closely related term is the “image
processing” which is the analysis of scenes or the
reconstruction of the models of 2D or 3D objects from
their pictures. These are used today in everyday life, be it a
replay in cricket match, advanced graphics in movies or
the daily weather report display on TV.
oldx = x; oldy = y;
glutPostRedisplay();
}
if (mmb) {
tx += ((float) (x - oldx)) / 500.0;
ty += ((float) (oldy - y)) / 500.0;
oldx = x; oldy = y;
glutPostRedisplay();
}
}
void grab_screen(void)
{
glCopyTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, 0, 0, MAXSIZE, MAXSIZE,0);
void redraw(void)
{
glClear(GL_COLOR_BUFFER_BIT);
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
glTranslatef(tx, ty, 0.0);
glRotatef(ang, 0.0, 0.0, 1.0);
glScalef(scale, scale, scale);
if (autospin) {
ang = 3.0 * cos(atime);
scale = 1.0 + ( sin(atime / 4.0) * 0.1) ;
atime += 0.01;
}
/* seed pattern */
glLoadIdentity();
switch(seedmode) {
case 0:
seed();
break;
case 1:
seed_circle();
break;
case 2:
seed_teapot();
break;
case 3:
seed_text(TEXT);
break;
}
void reset(void)
{
ang = 0.0;
scale = 1.0;
tx = ty = 0.0;
autospin = 0;
glClear(GL_COLOR_BUFFER_BIT);
grab_screen();
}