mirror of
https://github.com/love2d/love.git
synced 2026-08-16 00:02:12 +02:00
vulkan: captureScreenshot improvements.
- Don't create several persistent screen-sized images and buffers for screenshots, only create one temporary buffer during a frame that requests a screenshot. - Attempt to handle more out-of-memory situations. - Make sure the final screenshot is opaque. - Swap R and B channels in the screenshot ImageData when the backbuffer is BGRA.
This commit is contained in:
@@ -355,7 +355,6 @@ private:
|
||||
VkCompositeAlphaFlagBitsKHR chooseCompositeAlpha(const VkSurfaceCapabilitiesKHR &capabilities);
|
||||
void createSwapChain();
|
||||
void createImageViews();
|
||||
void createScreenshotCallbackBuffers();
|
||||
VkFramebuffer createFramebuffer(FramebufferConfiguration &configuration);
|
||||
VkFramebuffer getFramebuffer(FramebufferConfiguration &configuration);
|
||||
void createDefaultShaders();
|
||||
@@ -449,7 +448,6 @@ private:
|
||||
// We need a vector for each frame in flight.
|
||||
std::vector<std::vector<std::function<void()>>> cleanUpFunctions;
|
||||
std::vector<std::vector<std::function<void()>>> readbackCallbacks;
|
||||
std::vector<ScreenshotReadbackBuffer> screenshotReadbackBuffers;
|
||||
std::set<StrongRef<Shader>> usedShadersInFrame;
|
||||
RenderpassState renderPassState;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user