Merge pull request #54526 from bruvzg/opengl_mt

This commit is contained in:
Rémi Verschelde 2021-11-09 00:10:20 +01:00 committed by GitHub
commit 98a1e4fbd7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1674,6 +1674,11 @@ Error OS_OSX::initialize(const VideoMode &p_desired, int p_video_driver, int p_a
CGLSetParameter((CGLContextObj)[context CGLContextObj], kCGLCPSurfaceBackingSize, &dim[0]); CGLSetParameter((CGLContextObj)[context CGLContextObj], kCGLCPSurfaceBackingSize, &dim[0]);
CGLEnable((CGLContextObj)[context CGLContextObj], kCGLCESurfaceBackingSize); CGLEnable((CGLContextObj)[context CGLContextObj], kCGLCESurfaceBackingSize);
if (get_render_thread_mode() != RENDER_THREAD_UNSAFE) {
CGLError err = CGLEnable((CGLContextObj)[context CGLContextObj], kCGLCEMPEngine); // Enable multithreading.
ERR_FAIL_COND_V(err != kCGLNoError, ERR_UNAVAILABLE);
}
set_use_vsync(p_desired.use_vsync); set_use_vsync(p_desired.use_vsync);
if (!is_no_window_mode_enabled()) { if (!is_no_window_mode_enabled()) {