summaryrefslogtreecommitdiff
path: root/src/main/main.c
diff options
context:
space:
mode:
authorAlessandro Iezzi <aiezzi@alessandroiezzi.it>2025-05-17 01:21:21 +0200
committerAlessandro Iezzi <aiezzi@alessandroiezzi.it>2025-05-17 01:21:21 +0200
commit87cde6f952917522a1c13524354ac52f2bcb0fbe (patch)
tree22234ffc7c612103d999eeb9f309e0bb2cbb146a /src/main/main.c
parente7f81ff8f43b49331c368e3be09326551e0e6213 (diff)
downloadtris-87cde6f952917522a1c13524354ac52f2bcb0fbe.tar.gz
tris-87cde6f952917522a1c13524354ac52f2bcb0fbe.zip
Draw the game field
Diffstat (limited to 'src/main/main.c')
-rw-r--r--src/main/main.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/main/main.c b/src/main/main.c
index 76876f0..6e10477 100644
--- a/src/main/main.c
+++ b/src/main/main.c
@@ -17,15 +17,27 @@
* along with Tris Game. If not, see <http://www.gnu.org/licenses/>.
*/
+#include <GL/gl.h>
+#include <GL/glx.h>
#include <stdio.h>
#include <stdlib.h>
#include "ui/ui.h"
#include "engine/engine.h"
+#include "game.h"
#define WIDTH 640
#define HEIGHT 480
-void draw_frame() {
+void
+draw_frame()
+{
+ glClearColor(0.0f, 0.0f, 0.2f, 1.0f);
+ glClear(GL_COLOR_BUFFER_BIT);
+ glEnable(GL_LINE_SMOOTH);
+ glEnable(GL_BLEND);
+ glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
+
+ game_draw_field(100, 10, 10);
}
int main(void) {