1
0
Fork 0
mirror of https://codeberg.org/kbruen/y3s2-gui-project.git synced 2025-04-20 23:03:56 +03:00

Compare commits

...

5 commits

6 changed files with 19 additions and 2 deletions

5
examples/maze5.txt Normal file
View file

@ -0,0 +1,5 @@
XX
XX XX
XX

5
examples/maze6.txt Normal file
View file

@ -0,0 +1,5 @@
XXXXXXXXXX
X X X X
X XXX X
X X X
XXXXXXXXXX

View file

@ -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,

View file

@ -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);
}
}

View file

@ -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);
}; };

View file

@ -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