From c6240e8a3d08010ddd79af48988865c90f39261e Mon Sep 17 00:00:00 2001 From: Peder Bergebakken Sundt Date: Mon, 21 Feb 2022 13:17:22 +0100 Subject: [PATCH] Revert "Revert "Changes for assignment 2"" This reverts commit 751c02edc8bb4cb99c2c6fac22f6504fd7716bc3. --- src/gamelogic.cpp | 3 +++ src/program.cpp | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/src/gamelogic.cpp b/src/gamelogic.cpp index 8f24f26..5b8c282 100644 --- a/src/gamelogic.cpp +++ b/src/gamelogic.cpp @@ -18,6 +18,9 @@ #define GLM_ENABLE_EXPERIMENTAL #include +#include "utilities/imageLoader.hpp" +#include "utilities/glfont.h" + enum KeyFrameAction { BOTTOM, TOP }; diff --git a/src/program.cpp b/src/program.cpp index 54b56eb..2256a69 100644 --- a/src/program.cpp +++ b/src/program.cpp @@ -27,6 +27,10 @@ void runProgram(GLFWwindow* window, CommandLineOptions options) // Disable built-in dithering glDisable(GL_DITHER); + // Enable transparency + glEnable(GL_BLEND); + glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + // Set default colour after clearing the colour buffer glClearColor(0.3f, 0.5f, 0.8f, 1.0f);