-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathdisplay.cpp
104 lines (70 loc) · 1.89 KB
/
display.cpp
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
#include<iostream>
#include<GL/glut.h>
#include<GL/freeglut.h>
#include<string.h>
#include<GL/gl.h>
#include "elements.cpp"
using namespace std;
void *currentfont;
extern int wel,wh,constant1;
extern float posx,posy;
extern char *image;
void setFont(void *font)
{
currentfont=font;
}
void drawstring(float x,float y,float z,const char *string)
{
const char *c;
glRasterPos3f(x,y,z);
for(c=string;*c!='\0';c++)
{
glutBitmapCharacter(currentfont,*c);
}
}
void First_page() {
glClearColor(0.0,0.0,0.0,1.0);
glClear(GL_COLOR_BUFFER_BIT);
setFont(GLUT_BITMAP_HELVETICA_18);
glColor3f(0,1,1);
drawstring(-0.17,0.8,0.0,"Graphics Editor");
setFont(GLUT_BITMAP_TIMES_ROMAN_10);
drawstring(-0.05,0.75,0.0,"by");
setFont(GLUT_BITMAP_TIMES_ROMAN_24);
glColor3f(1,1,1);
drawstring(-0.9,0.4,0.0,"Shubhang Bhagat - 185060");
drawstring(-0.9,0.25,0.0,"Harsimranjeet Saini - 185087");
drawstring(-0.9,0.1,0.0,"Wable Sanket - 185088");
glColor3f(1,0,0);
drawstring(0.3,0.3,0.0,"CSE-4yr");
setFont(GLUT_BITMAP_HELVETICA_18);
glColor3f(0.5,0.5,1.0);
drawstring(-0.5,-0.45,0.0,"Computer Science and Engineering Department");
drawstring(-0.2,-0.55,0.0,"NIT Hamirpur");
glFlush();
wel=1;
}
void Second_page() {
glClearColor(0.1, 0.1, 0.1, 1.0);
glClear(GL_COLOR_BUFFER_BIT);
setFont(GLUT_BITMAP_8_BY_13);
glColor3f(1.0,1.0,1.0);
drawstring(-0.2,0.15,0.0,"Under the guidance of");
setFont(GLUT_BITMAP_HELVETICA_18);
drawstring(-0.2,0.0,0.0,"Dr. Dharmendra Prasad Mahato");
glFlush();
wel=2;
}
void Third_page() {
wel=7;
glClearColor(1.0,1.0,1.0,1.0);
glClear(GL_COLOR_BUFFER_BIT);
glDrawBuffer(GL_FRONT);
// glRasterPos2f(0.0,0.0);
// glDrawPixels(10,10,GL_RGB,GL_UNSIGNED_BYTE,image);
Elements();
glFlush();
}
void display() {
First_page();
}