diff --git a/servers/display_server_offscreen.cpp b/servers/display_server_offscreen.cpp index cc68a2db76c8..285ffb1e72cc 100644 --- a/servers/display_server_offscreen.cpp +++ b/servers/display_server_offscreen.cpp @@ -742,31 +742,7 @@ DisplayServer::WindowID DisplayServerOffscreen::_create_window(WindowMode p_mode wd.pre_fs_valid = true; } -#ifdef RD_ENABLED - if (rendering_context) { - union { -#ifdef VULKAN_ENABLED - RenderingContextDriverVulkanHeadless::WindowPlatformData vulkan; -#endif - } wpd; -#ifdef VULKAN_ENABLED - if (rendering_driver == "vulkan") { - // Do nothing (wpd is empty). - } -#endif - // if (rendering_context->window_create(id, &wpd) != OK) { - // ERR_PRINT(vformat("Failed to create %s window.", rendering_driver)); - // memdelete(rendering_context); - // rendering_context = nullptr; - // windows.erase(id); - // return INVALID_WINDOW_ID; - // } - - // rendering_context->window_set_size(id, window_rect.size.width, window_rect.size.height); - // rendering_context->window_set_vsync_mode(id, p_vsync_mode); - wd.context_created = true; - } -#endif + wd.context_created = true; if (p_mode == WINDOW_MODE_MAXIMIZED) { wd.maximized = true; diff --git a/servers/rendering_context_driver_vulkan_headless.cpp b/servers/rendering_context_driver_vulkan_headless.cpp index 16141d361992..d0498ea83f57 100644 --- a/servers/rendering_context_driver_vulkan_headless.cpp +++ b/servers/rendering_context_driver_vulkan_headless.cpp @@ -56,9 +56,6 @@ RenderingContextDriverVulkanHeadless::~RenderingContextDriverVulkanHeadless() { } RenderingContextDriver::SurfaceID RenderingContextDriverVulkanHeadless::surface_create(const void *p_platform_data) { - // Unused. - const WindowPlatformData *wpd = (const WindowPlatformData *)(p_platform_data); - // NOTE: The VK_EXT_headless_surface extension could be used to create a valid offscreen surface. // However, it is not supported by all drivers, and is not necessary for headless rendering. // The main benefit of creating a headless surface would be that the rest of the rendering code