Exemplo n.º 1
0
void Painter::renderTileDebug(const RenderTile& tile) {
    MBGL_DEBUG_GROUP(std::string { "debug " } + util::toString(tile.id));
    if (frame.debugOptions != MapDebugOptions::NoDebug) {
        setClipping(tile.clip);
        if (frame.debugOptions & (MapDebugOptions::Timestamps | MapDebugOptions::ParseStatus)) {
            renderDebugText(tile.tile, tile.matrix);
        }
        if (frame.debugOptions & MapDebugOptions::TileBorders) {
            renderDebugFrame(tile.matrix);
        }
    }
}
Exemplo n.º 2
0
void Screen_GP_Clung::renderGUI(glm::mat4 & projectionMatrix)
{
	m_textureProgram.use();

	glm::mat4 textProjectionMatrix = m_displayCamera.getCameraMatrix();
	GLint textpUniform = m_textureProgram.getUniformLocation("P");
	glUniformMatrix4fv(textpUniform, 1, GL_FALSE, &textProjectionMatrix[0][0]);

	m_textSpriteBatch.begin();

	char buffer[256];
	sprintf_s(buffer, "Health: %.f", m_player->getHealth());
	m_spriteFont->draw(m_textSpriteBatch, buffer, glm::vec2(0.0f, 0.0f), glm::vec2(0.25), 0.0f, Engine::ColorRGBA8(255, 255, 255, 255));

	if (m_debug) renderDebugText(projectionMatrix);
	m_textSpriteBatch.end();
	m_textSpriteBatch.renderBatch();
	m_textureProgram.unuse();
}