mirror of
https://github.com/ConjureETS/LOG750-LAB2.git
synced 2026-03-24 03:21:19 +00:00
fixing skybox depth clipping
This commit is contained in:
parent
04c4c17b58
commit
27c914d132
@ -129,7 +129,7 @@ void Viewer::drawSkybox()
|
||||
|
||||
// Increase size of skybox
|
||||
modelViewMatrix = QMatrix4x4(modelViewMatrix.normalMatrix());
|
||||
modelViewMatrix.scale(100);
|
||||
modelViewMatrix.scale(300);
|
||||
|
||||
float colorMult = 0.2 + std::fabs(0.8 * cos(std::fmod(angle_mult * frame + 300, 360) / 360 * M_PI));
|
||||
|
||||
@ -208,6 +208,7 @@ void Viewer::draw()
|
||||
|
||||
if(!isPickingActivated)
|
||||
drawSkybox();
|
||||
glClear(GL_DEPTH_BUFFER_BIT);
|
||||
glCullFace( GL_BACK );
|
||||
|
||||
|
||||
@ -337,14 +338,11 @@ void Viewer::drawParticles(){
|
||||
camera()->getProjectionMatrix(projectionMatrix);
|
||||
camera()->getModelViewMatrix(modelViewMatrix);
|
||||
|
||||
|
||||
glBindVertexArray(m_VAOs[VAO_Particle]);
|
||||
glBindBuffer(GL_ARRAY_BUFFER, VBO_Particle);
|
||||
glBindBuffer(GL_ARRAY_BUFFER, VBO_Particle_Positions);
|
||||
glBindBuffer(GL_ARRAY_BUFFER, VBO_Particle_Colors);
|
||||
|
||||
|
||||
|
||||
glActiveTexture(GL_TEXTURE0);
|
||||
TexturePrograms[1]->bind();
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user