klepto2 Posted October 23, 2023 Share Posted October 23, 2023 You requested a feature for my IBl Generator, while i have managed to get it to work as a cli, i still need a Hidden window to get all the work done. As far as I know vulkan is allowing headless rendering for this, where you don't need an actual surface. https://github.com/SaschaWillems/Vulkan/blob/master/examples/renderheadless/renderheadless.cpp It would be nice to have the ability to create a Framebuffer without having a window. Quote Windows 10 Pro 64-Bit-Version NVIDIA Geforce 1080 TI Link to comment Share on other sites More sharing options...
Josh Posted October 23, 2023 Share Posted October 23, 2023 You can render to a texture buffer: https://www.ultraengine.com/learn/Camera_SetRenderTarget Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
klepto2 Posted October 24, 2023 Author Share Posted October 24, 2023 I know that i can render to a texture, but i want to run the Vulkan Pipeline without using a window like this: #include "UltraEngine.h" using namespace UltraEngine; void RenderHook(const UltraEngine::Render::VkRenderer& renderer, shared_ptr<Object> extra) { Print("RENDER_HOOK called..."); } void TransferHook(const UltraEngine::Render::VkRenderer& renderer, shared_ptr<Object> extra) { Print("TRANSFER_HOOK called..."); } int main(int argc, const char* argv[]) { auto cl = ParseCommandLine(argc, argv); EngineSettings settings{}; settings.asyncrender = false; //Create a world auto world = CreateWorld(); //Create a framebuffer auto framebuffer = CreateTextureBuffer(512,512); auto camera = CreateCamera(world); world->AddHook(HOOKID_TRANSFER, TransferHook, world, true); world->AddHook(HOOKID_RENDER, RenderHook, world, true); //Main loop for (int frame = 0; frame < 100; frame++) { world->Update(); world->Render(framebuffer); //camera->Render(); } return 0; } but this leads to an assert error at world->Render(), one solution is to create a hidden window, but it would be nicer if it would work even without the need of a window and a correct framebuffer. Quote Windows 10 Pro 64-Bit-Version NVIDIA Geforce 1080 TI Link to comment Share on other sites More sharing options...
Josh Posted October 24, 2023 Share Posted October 24, 2023 Yeah, currently the first call to CreateFramebuffer() triggers the Vulkan initialization, but since Vulkan is headless it would probably be possible to change this without much trouble... 1 Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.