Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to do offscreen rendering without Surface in Vulkan?

Tags:

vulkan

Similar to surfaceless context in OpenGL can we do it in Vulkan.

like image 398
abhijit jagdale Avatar asked Aug 10 '16 23:08

abhijit jagdale


People also ask

What is offscreen rendering?

Offscreen rendering lets you obtain the content of a BrowserWindow in a bitmap, so it can be rendered anywhere, for example, on texture in a 3D scene. The offscreen rendering in Electron uses a similar approach to that of the Chromium Embedded Framework project.

What is Swapchain Vulkan?

This infrastructure is known as the swapchain and must be created explicitly in Vulkan. The swapchain is essentially a queue of images that are waiting to be presented to the screen. Our application will acquire such an image to draw to it, and then return it to the queue.


1 Answers

Sure it's even designed to do so from the start.

Instead of getting your images from a swapchain, create them and allocate and bind memory for it yourself.

Getting the result back will then require a copy into a host-visible readback buffer after the render.

like image 61
ratchet freak Avatar answered Sep 27 '22 16:09

ratchet freak