-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfront.cpp
More file actions
78 lines (69 loc) · 2.6 KB
/
front.cpp
File metadata and controls
78 lines (69 loc) · 2.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
void Write(double x,double y,double z,double scale,char *s);
void redisplay(void);
void myreshape2 (int w, int h);
#include<math.h> // For math routines (such as sqrt & trig)
#include<stdio.h>
#include<GL/glut.h>
#include<string.h>
void Write(double x,double y,double z,double scale,char *s)
{
int i,l=strlen(s);
glPushMatrix();
glTranslatef(x,y,z);
glScalef(scale,scale,scale);
for (i=0;i <l;i++)
glutStrokeCharacter(GLUT_STROKE_ROMAN,s[i]);
glPopMatrix();
}
void redisplay(void)
{
glClear(GL_COLOR_BUFFER_BIT);
glColor3f(1.0, 0.0, 0.0);
Write(-4.0,2.5,0.0,0.003," ATRIA INSTITUTE OF TECHNOLOGY");
Write(- 2.5,1.5,0.0,0.002," ATRIA INSTITUTE OF TECHNOLOGY");
Write(-1.5,0.5,0.0,0.002," ATRIA INSTITUTE OF TECHNOLOGY");
// Write(- 2.5,1.5,0.0,0.002," Graphical Implementation of");
// glColor3f(0,0,1);
// Write(-0.8,1.0,-0.6,0.002," NETWORK SYSTEM ");
// glColor3f(0.7,0,1);
// Write(-1.5,0.5,0.0,0.002,"Press 'C' to continue.......");
// glColor3f(1,0.5,0);
// Write(-2.5,-0.80,0.0,0.0015," Submitted By: ");
// glColor3f(0,0,1);
// Write(-3.0,-1.1,0.0,0.0015,"A.Anitha Jagadeesh Namratha.P");
// glColor3f(0,0,1);
// Write(-3.0,-1.3,0.0,0.0015,"(1AT07CS001) (1AT07CS032)");
// glColor3f(0,0,1);
// Write(-2.2,-1.7,0.0,0.0015," Under The Guidance Of: ");
// glColor3f(0,0,1);
// Write(-2.2,-1.9,0.0,0.0015," Mr. GOUTAM ");
// glColor3f(0,0,1);
// Write(-2.2,-2.1,0.0,0.0015," Lecturer,Dept. of CS&E ");
// glColor3f(0,1,1);
// Write(-1.6,-2.5,0.0,0.0015," ATRIA ");
// Write(-1.8,-2.7,0.0,0.0015," ANANDNAGAR ");
// Write(-1.8,-2.9,0.0,0.0015," Bangalore-560024 ");
glFlush();
}
void myreshape2 (int w, int h)
{
glViewport (0, 0, (GLsizei) w, (GLsizei) h);
glMatrixMode (GL_PROJECTION);
glLoadIdentity ();
gluPerspective( 65.0, (GLfloat) w/(GLfloat) h, 1.0, 20.0);
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
glTranslatef (0.0, 0.0, -5.0);
}
int main( int argc, char** argv )
{
glutInit(&argc, argv);
glutInitWindowSize( 1024, 700 );
//glutInitWindowPosition( 0, 0 );
glutCreateWindow("introduction");
glutReshapeFunc(myreshape2);
glutDisplayFunc(redisplay);
//glutKeyboardFunc(keyboard1);
glutMainLoop( );
return(0); // This line is never reached.
}