feat(rendering): enabled multisampling

This commit is contained in:
maelstrom 2025-07-03 14:02:21 +02:00
parent 3052b376e2
commit 64bc82007b
3 changed files with 9 additions and 0 deletions

View file

@ -23,6 +23,7 @@ int main() {
glfwSetErrorCallback(errorCatcher);
glfwInit();
glfwWindowHint(GLFW_SAMPLES, 4);
GLFWwindow *window = glfwCreateWindow(1200, 900, "OpenBlocks Client ALPHA", NULL, NULL);
glfwSetKeyCallback(window, keyCallback);
glfwSetMouseButtonCallback(window, mouseButtonCallback);

View file

@ -64,6 +64,7 @@ void renderInit(GLFWwindow* window, int width, int height) {
glEnable(GL_DEPTH_TEST);
glEnable(GL_BLEND);
glEnable(GL_MULTISAMPLE);
glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
// glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);

View file

@ -6,9 +6,16 @@
#include <QTranslator>
#include <QStyleFactory>
#include <QBasicTimer>
#include <QSurfaceFormat>
#include <qfont.h>
#include <qsurfaceformat.h>
int main(int argc, char *argv[])
{
QSurfaceFormat format;
format.setSamples(4);
QSurfaceFormat::setDefaultFormat(format);
QApplication a(argc, argv);
Logger::init();