Merge pull request #84288 from bruvzg/angle_detect_2
[macOS] Improve ANGLE support detection.
This commit is contained in:
commit
95b8a75aaf
|
@ -173,6 +173,15 @@ Error EGLManager::_gldisplay_create_context(GLDisplay &p_gldisplay) {
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Error EGLManager::open_display(void *p_display) {
|
||||||
|
int gldisplay_id = _get_gldisplay_id(p_display);
|
||||||
|
if (gldisplay_id < 0) {
|
||||||
|
return ERR_CANT_CREATE;
|
||||||
|
} else {
|
||||||
|
return OK;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
int EGLManager::display_get_native_visual_id(void *p_display) {
|
int EGLManager::display_get_native_visual_id(void *p_display) {
|
||||||
int gldisplay_id = _get_gldisplay_id(p_display);
|
int gldisplay_id = _get_gldisplay_id(p_display);
|
||||||
ERR_FAIL_COND_V(gldisplay_id < 0, ERR_CANT_CREATE);
|
ERR_FAIL_COND_V(gldisplay_id < 0, ERR_CANT_CREATE);
|
||||||
|
|
|
@ -92,6 +92,7 @@ private:
|
||||||
public:
|
public:
|
||||||
int display_get_native_visual_id(void *p_display);
|
int display_get_native_visual_id(void *p_display);
|
||||||
|
|
||||||
|
Error open_display(void *p_display);
|
||||||
Error window_create(DisplayServer::WindowID p_window_id, void *p_display, void *p_native_window, int p_width, int p_height);
|
Error window_create(DisplayServer::WindowID p_window_id, void *p_display, void *p_native_window, int p_width, int p_height);
|
||||||
|
|
||||||
void window_destroy(DisplayServer::WindowID p_window_id);
|
void window_destroy(DisplayServer::WindowID p_window_id);
|
||||||
|
|
|
@ -4501,7 +4501,7 @@ DisplayServerMacOS::DisplayServerMacOS(const String &p_rendering_driver, WindowM
|
||||||
#if defined(GLES3_ENABLED)
|
#if defined(GLES3_ENABLED)
|
||||||
if (rendering_driver == "opengl3_angle") {
|
if (rendering_driver == "opengl3_angle") {
|
||||||
gl_manager_angle = memnew(GLManagerANGLE_MacOS);
|
gl_manager_angle = memnew(GLManagerANGLE_MacOS);
|
||||||
if (gl_manager_angle->initialize() != OK) {
|
if (gl_manager_angle->initialize() != OK || gl_manager_angle->open_display(nullptr) != OK) {
|
||||||
memdelete(gl_manager_angle);
|
memdelete(gl_manager_angle);
|
||||||
gl_manager_angle = nullptr;
|
gl_manager_angle = nullptr;
|
||||||
bool fallback = GLOBAL_GET("rendering/gl_compatibility/fallback_to_native");
|
bool fallback = GLOBAL_GET("rendering/gl_compatibility/fallback_to_native");
|
||||||
|
|
Loading…
Reference in New Issue