Polish interaction between windowing, input and rendering
- Adapt GL make/release API to the current architecture. - Fix DisplayServer being locked while dispatching input (prevent deadlocks).
This commit is contained in:
@@ -260,21 +260,6 @@ void EGLManager::release_current() {
|
||||
eglMakeCurrent(current_display.egl_display, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);
|
||||
}
|
||||
|
||||
void EGLManager::make_current() {
|
||||
if (!current_window) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!current_window->initialized) {
|
||||
WARN_PRINT("Current OpenGL window is uninitialized!");
|
||||
return;
|
||||
}
|
||||
|
||||
GLDisplay ¤t_display = displays[current_window->gldisplay_id];
|
||||
|
||||
eglMakeCurrent(current_display.egl_display, current_window->egl_surface, current_window->egl_surface, current_display.egl_context);
|
||||
}
|
||||
|
||||
void EGLManager::swap_buffers() {
|
||||
if (!current_window) {
|
||||
return;
|
||||
|
||||
@@ -98,7 +98,6 @@ public:
|
||||
void window_destroy(DisplayServer::WindowID p_window_id);
|
||||
|
||||
void release_current();
|
||||
void make_current();
|
||||
void swap_buffers();
|
||||
|
||||
void window_make_current(DisplayServer::WindowID p_window_id);
|
||||
|
||||
Reference in New Issue
Block a user