feat(viewport): add aa

This commit is contained in:
parker
2025-06-27 00:53:26 +01:00
parent 0b41e387b9
commit aacbb1e1ac
2 changed files with 2 additions and 0 deletions

View File

@@ -10,6 +10,7 @@ int main(int argc, char **argv)
format.setRenderableType(QSurfaceFormat::OpenGL);
format.setVersion(3, 2);
format.setProfile(QSurfaceFormat::CoreProfile);
format.setSamples(4);
QSurfaceFormat::setDefaultFormat(format);
QApplication app (argc, argv);

View File

@@ -14,6 +14,7 @@ void ViewportGLWidget::initializeGL()
glEnable(GL_DEPTH_TEST);
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glEnable(GL_MULTISAMPLE);
triangleMesh_ = std::make_unique<GLMesh>();
gridMesh_ = std::make_unique<GLGrid>();