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:
parent
f467bde6ac
commit
431c5c8b36
2 changed files with 22 additions and 9 deletions
|
@ -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");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue