1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Fix wireframe mode in opengl3 driver (#15626)

`GL_LINES` isn't suitable, because it makes lines between pairs of 2 vertices,
not loops around 3 vertices.
Support for OpenGL ES isn't simple, as it has no `glPolygonMode`. And showing broken
wireframe (i.e. with `GL_LINES`) would cause confusion.
This commit is contained in:
DS 2025-01-06 19:39:17 +01:00 committed by GitHub
parent f467bde6ac
commit 431c5c8b36
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 22 additions and 9 deletions

View file

@ -2256,16 +2256,20 @@ void Game::toggleDebug()
smgr->setGlobalDebugData(state == 4 ? bbox_debug_flag : 0,
state == 4 ? 0 : bbox_debug_flag);
if (state == 1)
if (state == 1) {
m_game_ui->showTranslatedStatusText("Debug info shown");
else if (state == 2)
} else if (state == 2) {
m_game_ui->showTranslatedStatusText("Profiler graph shown");
else if (state == 3)
m_game_ui->showTranslatedStatusText("Wireframe shown");
else if (state == 4)
} else if (state == 3) {
if (driver->getDriverType() == video::EDT_OGLES2)
m_game_ui->showTranslatedStatusText("Wireframe not supported by video driver");
else
m_game_ui->showTranslatedStatusText("Wireframe shown");
} else if (state == 4) {
m_game_ui->showTranslatedStatusText("Bounding boxes shown");
else
} else {
m_game_ui->showTranslatedStatusText("All debug info hidden");
}
}