Skip to content

Commit

Permalink
[InventoryCube] Rendering fixed.
Browse files Browse the repository at this point in the history
  • Loading branch information
Unarelith committed Mar 7, 2020
1 parent f7d6e00 commit 8e5f78f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions client/source/gui/InventoryCube.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -152,13 +152,16 @@ void InventoryCube::draw(gk::RenderTarget &target, gk::RenderStates states) cons
states.texture = &m_textureAtlas.texture();
states.vertexAttributes = gk::VertexAttribute::Only2d;

glCheck(glEnable(GL_CULL_FACE));
glCheck(glEnable(GL_DEPTH_TEST));
glCheck(glDisable(GL_CULL_FACE));
glCheck(glDisable(GL_DEPTH_TEST));

target.draw(m_vbo, GL_QUADS, 4 * BlockFace::Top, 4, states);
// target.draw(m_vbo, GL_QUADS, 4 * 1, 4, states);
target.draw(m_vbo, GL_QUADS, 4 * BlockFace::West, 4, states);
// target.draw(m_vbo, GL_QUADS, 4 * 3, 4, states);
target.draw(m_vbo, GL_QUADS, 4 * BlockFace::North, 4, states);
// target.draw(m_vbo, GL_QUADS, 4 * 5, 4, states);

glCheck(glEnable(GL_CULL_FACE));
glCheck(glEnable(GL_DEPTH_TEST));
}

0 comments on commit 8e5f78f

Please sign in to comment.