Skip to content

Commit

Permalink
[CelestialObject] Now mirroring texture like MC.
Browse files Browse the repository at this point in the history
  • Loading branch information
Unarelith committed Jul 14, 2020
1 parent e99e45e commit d85f40a
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions source/client/graphics/CelestialObject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,14 @@ void CelestialObject::updateVertexBuffer() const {
texRect.sizeY = m_phaseSize / float(m_texture->getSize().y);
}

vertices[0].texCoord[0] = texRect.x + texRect.sizeX;
vertices[0].texCoord[1] = texRect.y;
vertices[1].texCoord[0] = texRect.x;
vertices[1].texCoord[1] = texRect.y;
vertices[2].texCoord[0] = texRect.x;
vertices[2].texCoord[1] = texRect.y + texRect.sizeY;
vertices[3].texCoord[0] = texRect.x + texRect.sizeX;
vertices[3].texCoord[1] = texRect.y + texRect.sizeY;
vertices[3].texCoord[0] = texRect.x;
vertices[3].texCoord[1] = texRect.y;
vertices[2].texCoord[0] = texRect.x + texRect.sizeX;
vertices[2].texCoord[1] = texRect.y;
vertices[1].texCoord[0] = texRect.x + texRect.sizeX;
vertices[1].texCoord[1] = texRect.y + texRect.sizeY;
vertices[0].texCoord[0] = texRect.x;
vertices[0].texCoord[1] = texRect.y + texRect.sizeY;
}

gk::VertexBuffer::bind(&m_vbo);
Expand Down

0 comments on commit d85f40a

Please sign in to comment.