Implicit Window::MakeReady on context set.
This commit is contained in:
parent
ec7c74d04c
commit
fa9c681c7c
|
@ -43,7 +43,6 @@ bool MainWindow::Initialize() {
|
|||
}
|
||||
window_->Initialize();
|
||||
window_->set_context(xe::ui::gl::GLContext::Create(window_.get()));
|
||||
window_->MakeReady();
|
||||
|
||||
#if XE_PLATFORM_WIN32
|
||||
el::io::FileManager::RegisterFileSystem(
|
||||
|
|
|
@ -154,13 +154,9 @@ X_STATUS Emulator::Setup(ui::Window* display_window) {
|
|||
|
||||
// Finish initializing the display.
|
||||
display_window_->loop()->PostSynchronous([this]() {
|
||||
{
|
||||
xe::ui::GraphicsContextLock context_lock(display_window_->context());
|
||||
auto profiler_display =
|
||||
display_window_->context()->CreateProfilerDisplay();
|
||||
auto profiler_display = display_window_->context()->CreateProfilerDisplay();
|
||||
Profiler::set_display(std::move(profiler_display));
|
||||
}
|
||||
display_window_->MakeReady();
|
||||
});
|
||||
|
||||
return result;
|
||||
|
|
|
@ -75,8 +75,10 @@ class Window {
|
|||
virtual bool Initialize() { return true; }
|
||||
void set_context(std::unique_ptr<GraphicsContext> context) {
|
||||
context_ = std::move(context);
|
||||
if (context_) {
|
||||
MakeReady();
|
||||
}
|
||||
}
|
||||
virtual bool MakeReady();
|
||||
|
||||
bool LoadLanguage(std::string filename);
|
||||
bool LoadSkin(std::string filename);
|
||||
|
@ -116,6 +118,8 @@ class Window {
|
|||
protected:
|
||||
Window(Loop* loop, const std::wstring& title);
|
||||
|
||||
virtual bool MakeReady();
|
||||
|
||||
virtual bool InitializeElemental(Loop* loop,
|
||||
el::graphics::Renderer* renderer);
|
||||
|
||||
|
|
Loading…
Reference in New Issue