Skip to content

Commit

Permalink
Fixed linux build errors
Browse files Browse the repository at this point in the history
  • Loading branch information
apples committed Jul 19, 2024
1 parent b98c0d6 commit d445ea7
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 28 deletions.
26 changes: 1 addition & 25 deletions servers/display_server_offscreen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
3 changes: 0 additions & 3 deletions servers/rendering_context_driver_vulkan_headless.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d445ea7

Please sign in to comment.