Josh Posted yesterday at 04:00 PM Posted yesterday at 04:00 PM If you want to make the window background black before graphics start rendering, here is one possible way: auto window = CreateWindow("Leadwerks", 0, 0, 1280, 720, displays[0], WINDOW_CENTER | WINDOW_TITLEBAR | WINDOW_HIDDEN); auto ui = CreateInterface(window); ui->background->SetColor(0,0,0); window->SetHidden(false); window->Activate(); ui = nullptr; If you do this in Lua make sure you call collectgarbage() to delete the UI object. 2 Quote Let's build cool stuff and have fun.
Yue Posted yesterday at 04:06 PM Posted yesterday at 04:06 PM I thought that with a 3D world it wouldn't be feasible because I would have to go through the process of creating the world and then creating the UI to give it that color. And it would always remain white. Quote Murphy's Law: We don't fix bugs, we document them as features. – Murphy Games
Yue Posted yesterday at 04:10 PM Posted yesterday at 04:10 PM It doesn't work in Lua, the window is white. -- Objects local window = CWindow:New() ui = CreateInterface(window:Get()) ui.background:SetColor(0,0,0) window:Get():SetHidden(false); window:Get():Activate() ui = nil Quote Murphy's Law: We don't fix bugs, we document them as features. – Murphy Games
Josh Posted yesterday at 04:44 PM Author Posted yesterday at 04:44 PM 32 minutes ago, Yue said: It doesn't work in Lua, the window is white. -- Objects local window = CWindow:New() ui = CreateInterface(window:Get()) ui.background:SetColor(0,0,0) window:Get():SetHidden(false); window:Get():Activate() ui = nil You window probably isn't hidden to start with. Quote Let's build cool stuff and have fun.
reepblue Posted 5 hours ago Posted 5 hours ago I just render a splash screen with a logo on it until the start render event fires. Sometimes there is a millisecond of white but it's nothing to lose sleep over. Quote Cyclone - Ultra Game System - Component Preprocessor - Tex2TGA - Darkness Awaits Template (Leadwerks) If you like my work, consider supporting me on Patreon!
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.