summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorbruvzg <7645683+bruvzg@users.noreply.github.com>2022-09-03 13:40:53 +0300
committerbruvzg <7645683+bruvzg@users.noreply.github.com>2022-09-03 19:16:03 +0300
commit57829b7cc4e3a61be3bbbaeff59410becc1b0850 (patch)
tree98d7bfb9e58e67fa90a9d57573dab36133b45983 /drivers
parentb8977ca333fd0334669de0253f86abf6d401256a (diff)
Re-enable per-pixel transparency support on Linux, macOS, and Windows (for Vulkan and OpenGL rendering drivers).
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gles3/rasterizer_gles3.cpp13
-rw-r--r--drivers/vulkan/vulkan_context.cpp2
2 files changed, 1 insertions, 14 deletions
diff --git a/drivers/gles3/rasterizer_gles3.cpp b/drivers/gles3/rasterizer_gles3.cpp
index 7537636356..cc96294ca5 100644
--- a/drivers/gles3/rasterizer_gles3.cpp
+++ b/drivers/gles3/rasterizer_gles3.cpp
@@ -108,19 +108,6 @@ void RasterizerGLES3::begin_frame(double frame_step) {
}
void RasterizerGLES3::end_frame(bool p_swap_buffers) {
- // if (OS::get_singleton()->is_layered_allowed()) {
- // if (!OS::get_singleton()->get_window_per_pixel_transparency_enabled()) {
- //clear alpha
- // glColorMask(false, false, false, true);
- // glClearColor(0.5, 0, 0, 1);
- // glClear(GL_COLOR_BUFFER_BIT);
- // glColorMask(true, true, true, true);
- // }
- // }
-
- // glClearColor(1, 0, 0, 1);
- // glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_ACCUM_BUFFER_BIT | GL_STENCIL_BUFFER_BIT);
-
if (p_swap_buffers) {
DisplayServer::get_singleton()->swap_buffers();
} else {
diff --git a/drivers/vulkan/vulkan_context.cpp b/drivers/vulkan/vulkan_context.cpp
index b52179b4f3..99ef57abae 100644
--- a/drivers/vulkan/vulkan_context.cpp
+++ b/drivers/vulkan/vulkan_context.cpp
@@ -1706,10 +1706,10 @@ Error VulkanContext::_update_swap_chain(Window *window) {
// Find a supported composite alpha mode - one of these is guaranteed to be set.
VkCompositeAlphaFlagBitsKHR compositeAlpha = VK_COMPOSITE_ALPHA_OPAQUE_BIT_KHR;
VkCompositeAlphaFlagBitsKHR compositeAlphaFlags[4] = {
- VK_COMPOSITE_ALPHA_OPAQUE_BIT_KHR,
VK_COMPOSITE_ALPHA_PRE_MULTIPLIED_BIT_KHR,
VK_COMPOSITE_ALPHA_POST_MULTIPLIED_BIT_KHR,
VK_COMPOSITE_ALPHA_INHERIT_BIT_KHR,
+ VK_COMPOSITE_ALPHA_OPAQUE_BIT_KHR,
};
for (uint32_t i = 0; i < ARRAY_SIZE(compositeAlphaFlags); i++) {
if (surfCapabilities.supportedCompositeAlpha & compositeAlphaFlags[i]) {