mirror of
https://github.com/ConjureETS/LOG750-LAB2.git
synced 2026-03-24 03:21:19 +00:00
completing skybox
This commit is contained in:
parent
a883722d25
commit
487bf12fa7
@ -7,5 +7,5 @@ uniform sampler2D skybox;
|
||||
void main()
|
||||
{
|
||||
//fColor = texture(skybox, texCoords);
|
||||
fColor = texture(skybox, texCoords);
|
||||
fColor = texture(skybox, texCoords);
|
||||
}
|
||||
|
||||
@ -315,8 +315,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);
|
||||
}
|
||||
@ -358,27 +358,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 },
|
||||
|
||||
};
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user