C++ Qt5 OpenGL Graphics Program to Build 3D Tetris Game Using GLUT Library GUI Desktop App Full Project For Beginners

  • Post author:
  • Post category:c++
  • Post comments:0 Comments

 

 

Tetris

This is a Tetris game developed with C++ and classic OpenGL

playing

Author Notes:

The code files are in the “src” directory.

The “serif.ttf” file contains the font used for rendering text in this program, and it must be in the same directory as the compiled executable.

This project was developed in Debian and Ubuntu, and has not been tested on other platforms.

Compile and Run

video

https://youtu.be/Nf-Kg-4m-60

all commands

step by step

You must open this directory in the terminal and put the following commands:

To install all dependencies:

To compile the tetris game: (The compiler used here is the g++)

After do it, the compiler will generate a “tetris.elf” linux executable file. To run it, you need to put the following command in the terminal:

To compile and run this project at once, you need to put the following command in the terminal:

Details

this project depends on the following libraries and APIS: OpenGL, GLFW 3 and libDrawText 0.3.

OpenGL is used as a rendering engine. The tests were done with version 4.6 of OpenGL, but probably works with older versions.

The GLFW3 library was used to control the windows. It must be installed in the compiler libraries and can be found in the following repository: https://github.com/glfw/glfw

The libDrawText 0.3 library was used to render the texts. It must be installed in the compiler libraries and can be found in the following repository: https://github.com/jtsiomb/libdrawtext

 

 

 

Leave a Reply