Restore polygon mode after entities rendering

Default setting are causing issues so we just reset the polygon mode
since this won't matter once everything has moved to the new rendering
pipeline.
This commit is contained in:
Atlante45 2015-05-07 13:34:22 +02:00
parent 366964e424
commit cafaeed822
2 changed files with 5 additions and 5 deletions

View file

@ -3254,6 +3254,11 @@ void Application::displaySide(Camera& theCamera, bool selfAvatarOnly, RenderArgs
renderMode = RenderArgs::MIRROR_RENDER_MODE;
}
_entities.render(renderMode, renderSide, renderDebugFlags);
if (!Menu::getInstance()->isOptionChecked(MenuOption::Wireframe)) {
// Restaure polygon mode
glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
}
}
// render JS/scriptable overlays

View file

@ -93,11 +93,6 @@ void GLBackend::render(Batch& batch) {
command++;
offset++;
}
// Restaure GL default state
for (auto command : gpu::GLBackend::GLState::_resetStateCommands) {
command->run(this);
}
}
void GLBackend::renderBatch(Batch& batch) {