mirror of
https://codeberg.org/kbruen/y3s2-gui-project.git
synced 2025-04-20 23:03:56 +03:00
Compare commits
5 commits
Author | SHA1 | Date | |
---|---|---|---|
3bd635b066 | |||
5119beb058 | |||
d92154db83 | |||
9d48e31906 | |||
011b57f051 |
6 changed files with 19 additions and 2 deletions
5
examples/maze5.txt
Normal file
5
examples/maze5.txt
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
XX
|
||||||
|
|
||||||
|
XX XX
|
||||||
|
|
||||||
|
XX
|
5
examples/maze6.txt
Normal file
5
examples/maze6.txt
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
XXXXXXXXXX
|
||||||
|
X X X X
|
||||||
|
X XXX X
|
||||||
|
X X X
|
||||||
|
XXXXXXXXXX
|
|
@ -26,11 +26,11 @@ MazeScreen::MazeScreen(const std::vector<std::vector<int>>& maze):
|
||||||
}
|
}
|
||||||
|
|
||||||
void MazeScreen::display() {
|
void MazeScreen::display() {
|
||||||
|
glClearColor(0.8, 0.8, 0.8, 1);
|
||||||
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
|
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
|
||||||
glMatrixMode(GL_MODELVIEW);
|
glMatrixMode(GL_MODELVIEW);
|
||||||
glLoadIdentity();
|
glLoadIdentity();
|
||||||
|
|
||||||
//configures the camera with the position_x and position_z variables
|
|
||||||
gluLookAt(
|
gluLookAt(
|
||||||
posX,
|
posX,
|
||||||
0,
|
0,
|
||||||
|
|
|
@ -20,3 +20,9 @@ void NoMazeScreen::display() {
|
||||||
glFlush();
|
glFlush();
|
||||||
glutSwapBuffers();
|
glutSwapBuffers();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void NoMazeScreen::keyboard(unsigned char key, int x, int y) {
|
||||||
|
if (key == '\e') {
|
||||||
|
exit(EXIT_SUCCESS);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -4,4 +4,5 @@
|
||||||
|
|
||||||
struct NoMazeScreen : public GlutEvents {
|
struct NoMazeScreen : public GlutEvents {
|
||||||
virtual void display();
|
virtual void display();
|
||||||
|
virtual void keyboard(unsigned char key, int x, int y);
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
Name: y3s2-gui-project
|
Name: y3s2-gui-project
|
||||||
Version: 1.0.5
|
Version: 1.0.7
|
||||||
Release: 1%{?dist}
|
Release: 1%{?dist}
|
||||||
Summary: Maze project in OpenGL for Graphics and User Interfaces lecture in year 3, semester 2
|
Summary: Maze project in OpenGL for Graphics and User Interfaces lecture in year 3, semester 2
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue