diff --git a/src/shaders/skyboxshader.frag b/src/shaders/skyboxshader.frag index 6d1e725..053285a 100644 --- a/src/shaders/skyboxshader.frag +++ b/src/shaders/skyboxshader.frag @@ -7,5 +7,5 @@ uniform sampler2D skybox; void main() { //fColor = texture(skybox, texCoords); - fColor = texture(skybox, texCoords); + fColor = texture(skybox, texCoords); } diff --git a/src/viewer/simpleViewer.cpp b/src/viewer/simpleViewer.cpp index 7353d97..6673290 100644 --- a/src/viewer/simpleViewer.cpp +++ b/src/viewer/simpleViewer.cpp @@ -328,8 +328,8 @@ void Viewer::initShaders() if ((s_vUvLocation = skyboxRenderShaderProgram->attributeLocation("vUv")) < 0) qDebug() << "Unable to find shader location for " << "vUv"; - s_texture = new QOpenGLTexture(QImage("src/data/skybox.jpg")); - //s_texture = new QOpenGLTexture(QImage("src/data/uvLayoutGrid.png")); + s_texture = new QOpenGLTexture(QImage("src/data/skybox.jpg"));/*/ + s_texture = new QOpenGLTexture(QImage("src/data/uvLayoutGrid.png"));//*/ s_texture->setMinificationFilter(QOpenGLTexture::LinearMipMapLinear); s_texture->setMagnificationFilter(QOpenGLTexture::Linear); } @@ -371,27 +371,25 @@ void Viewer::initGeometries() { 0.5, -0.5, -0.5 }, { -0.5, -0.5, 0.5 }, { -0.5, -0.5, -0.5 } }; - float ux = 0; - float vy = 0; GLfloat uvs[numVerticesCube][2] = { - { 0, 0}, { 0, 0}, { 0, 0}, - { 0, 0}, { 0, 0}, { 0, 0}, + { 1.0, .25 }, { 1.0, .50 }, { .75, .50 }, + { .75, .50 }, { .75, .25 }, { 1.0, .25 }, - { .25 + ux, .25 + vy }, { .50 + ux, .25 + vy }, { .50 + ux, .50 + vy }, - { 0, 0}, { 0, 0}, { 0, 0}, + { .25, .25 }, { .50, .25 }, { .50, .50 }, + { .50, .50 }, { .25, .50 }, { .25, .25 }, - { 0, 0}, { 0, 0}, { 0, 0}, - { 0, 0}, { 0, 0}, { 0, 0}, + { .00, .25}, { .25, .25}, { .25, .50}, + { .25, .50}, { .00, .50}, { .00, .25}, - { 0, 0}, { 0, 0}, { 0, 0}, - { 0, 0}, { 0, 0}, { 0, 0}, + { .75, .25}, { .50, .50}, { .50, .25}, + { .50, .50}, { .75, .25}, { .75, .50}, - { 0, 0}, { 0, 0}, { 0, 0}, - { 0, 0}, { 0, 0}, { 0, 0}, + { .25, .00 }, { .49, .00 }, { .49, .25 }, + { .49, .25 }, { .25, .25 }, { .25, .00 }, - { 0, 0}, { 0, 0}, { 0, 0}, - { 0, 0}, { 0, 0}, { 0, 0}, + { .25, .50 }, { .49, .75 }, { .49, .50 }, + { .49, .75 }, { .25, .50 }, { .25, .75 }, };