Cocoa Port: Restore the HUD visibility state of an OpenGL presenter if it ever needs to be reinitialized.
This commit is contained in:
parent
7239c6cfd6
commit
e25fd2e8c5
|
@ -5060,15 +5060,22 @@ void OGLVideoOutput::Init()
|
||||||
this->_filtersPreferGPU = this->_canFilterOnGPU;
|
this->_filtersPreferGPU = this->_canFilterOnGPU;
|
||||||
this->_willFilterOnGPU = false;
|
this->_willFilterOnGPU = false;
|
||||||
|
|
||||||
for (size_t i = 0; i < _layerList->size(); i++)
|
std::vector<bool> wasPreviouslyVisibleList;
|
||||||
|
for (size_t i = 0; i < this->_layerList->size(); i++)
|
||||||
{
|
{
|
||||||
delete (*_layerList)[i];
|
wasPreviouslyVisibleList.push_back( (*this->_layerList)[i]->IsVisible() );
|
||||||
|
delete (*this->_layerList)[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
this->_layerList->clear();
|
this->_layerList->clear();
|
||||||
this->_layerList->push_back(new OGLDisplayLayer(this));
|
this->_layerList->push_back(new OGLDisplayLayer(this));
|
||||||
this->_layerList->push_back(new OGLHUDLayer(this));
|
this->_layerList->push_back(new OGLHUDLayer(this));
|
||||||
|
|
||||||
|
for (size_t i = 0; i < wasPreviouslyVisibleList.size(); i++)
|
||||||
|
{
|
||||||
|
(*this->_layerList)[i]->SetVisibility(wasPreviouslyVisibleList[i]);
|
||||||
|
}
|
||||||
|
|
||||||
// Render State Setup (common to both shaders and fixed-function pipeline)
|
// Render State Setup (common to both shaders and fixed-function pipeline)
|
||||||
glEnable(GL_BLEND);
|
glEnable(GL_BLEND);
|
||||||
glDisable(GL_DEPTH_TEST);
|
glDisable(GL_DEPTH_TEST);
|
||||||
|
|
Loading…
Reference in New Issue