aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/opengl_widget.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/opengl_widget.cc b/src/opengl_widget.cc
index 5a82d23..adc851e 100644
--- a/src/opengl_widget.cc
+++ b/src/opengl_widget.cc
@@ -41,6 +41,7 @@ void OpenGLWidget::loadSkybox() {
if (!skybox_program.addShaderFromSourceFile(QOpenGLShader::Fragment, ":/shaders/skybox.frag")) {
qFatal("Error compiling skybox.frag: %s", skybox_program.log().toLocal8Bit().constData());
}
+ skybox_program.bindAttributeLocation("in_pos", 0);
if (!skybox_program.link()) {
qFatal("Error linking the skybox shader program: %s", skybox_program.log().toLocal8Bit().constData());
}
@@ -111,6 +112,9 @@ void OpenGLWidget::initializeGL() {
if (!main_program.addShaderFromSourceFile(QOpenGLShader::Fragment, ":/shaders/main.frag")) {
qFatal("Error compiling main.frag: %s", main_program.log().toLocal8Bit().constData());
}
+ main_program.bindAttributeLocation("in_pos", 0);
+ main_program.bindAttributeLocation("in_norm", 1);
+ main_program.bindAttributeLocation("in_uv", 2);
if (!main_program.link()) {
qFatal("Error linking the main shader program: %s", main_program.log().toLocal8Bit().constData());
}