Jump to content

reepblue

Developers
  • Posts

    2,524
  • Joined

  • Last visited

Everything posted by reepblue

  1. I know @klepto2 was experimenting with C# bindings and Josh said he plans to support it sometime in the future.
  2. Can text sprites also properly support this if they don't already? Would be nice to have for close captioning.
  3. You can't cure blindness, just focus on those who can see.
  4. Hopefully there can be a window function that does this cross platform. This is useful to ensure a window is shown on top after a splash window.
  5. @Josh I submitted a pull request for the pre-processor. I've reproduced this situation and the update responds accordingly. I also added a -forcebuild flag that'll force the application to regenerate the files automatically.
  6. It's possible with a string comparison. After the file time check, we can have it read line 2 of each file via stream to see if it's a 100% match. If it doesn't match, it regenerates both files. We can move the timestamp to line 1 to make it much simpler. I can look into this tonight. We should also dedicate the project to use the full engine to avoid code conflicts, but on the other hand, building it with UAK is sooo much faster. I'm leaving that call up to you.
  7. FYI, you can config the preprocessor to your desired project layout. Run the application in PowerShell with -help for more information.
  8. It's only one library and I have everything as a premake script. I was getting errors which at the time thought were related to the runtime setting, but now looking back at it, the library and project files were not a perfect match. I think I need to look at this again.
  9. It's hard to recommend computers for other people in my opinion. This could be disappointing, too much, or just right. What do you plan to do with it 90% of the time? If it's to build Ultra Engine projects, I really think the CPU will be fine. I never felt CPU bottlenecked outside of VR. My VR machine has a 3rd Generation Ryzen 7 chip and I felt it's more than enough. My development machines use both 7th generation i5 Intel with 8GB of DDR4 RAM and only now I'm noticing limitations when compiling Ultra Engine projects. (And using a spinning drive to store source code doesn't help..) If you have a 4k display, obviously you're gonna want a more capable card to take advantage of it. However, if you're like me still happy with a 1080p display, it should be fine. My friend has a similar GPU and I've never heard him complain about issues playing games with his 1440p monitor. You can always upgrade the storage and the GPU if/when those prices ever become reasonable again I see the motherboard as a pretty much a forever thing on the otherhand. What bugs me is that there's only 2 RAM slots on this board. If you were to upgrade the machine to 32GB, you would need to replace both modules. My other nitpicks is that it's water cooled so it'll require more maintenance (But I recommend it in warmer climates), and looks tacky as hell with the RGB; but that's a personal preference. I do not have any experience buying a prebuilt machine unless it was a laptop or a Mac. If you're willing to build, I would check to see how much it'll cost to buy the parts alone.
  10. Make it so that if you update a script the connection doesn't silently break but displays an error. Or turns an evil red on the problem node. I personally felt the flowgraph editor was limited and I only used it for simple interactions. For things like logic gates, I was better of using the object value for accessing the entity directly. I'm still biased in favor of Source's entity I/O system over anything to be fair.
  11. If you have any insight in getting static libraries to link with Ultra Engine, let me know. I couldn't seem to get it to work due to how the engine is compiled.
  12. My Leadwerks glass materials no longer work correctly upon reloading lvl7. Also getting this gross artifact. Nott sure if you wanted to move off of this thread for minor bugs, but decided to post these here.
  13. Here's an example on how to create a fully functioning application with a 3D viewport. #include "UltraEngine.h" using namespace UltraEngine; const int TOOLBARHEIGHT = 48; const int STATUSBARHEIGHT = 32; const int SIDEPANELWIDTH = 300; const int CONSOLEHEIGHT = 120; int main(int argc, const char* argv[]) { AsyncRender(false); //Get displays auto displays = GetDisplays(); //Create window auto mainwindow = CreateWindow("3D Viewport", 0, 0, 1024, 768, displays[0], WINDOW_CENTER | WINDOW_TITLEBAR | WINDOW_RESIZABLE); mainwindow->SetMinSize(800, 600); //Create user interface auto ui = CreateInterface(mainwindow); iVec2 sz = ui->root->ClientSize(); //------------------------------------------------------- // Create main menu //------------------------------------------------------- auto mainmenu = CreateMenu("", ui->root); //File menu auto menu_file = CreateMenu("File", mainmenu); CreateMenu("New", menu_file); CreateMenu("", menu_file); auto menu_open = CreateMenu("Open", menu_file); auto menu_save = CreateMenu("Save", menu_file); auto menu_saveas = CreateMenu("Save as...", menu_file); CreateMenu("", menu_file); auto menu_recentfiles = CreateMenu("Recent files", menu_file); std::array<shared_ptr<Widget>, 10> menu_recentfile; for (int n = 0; n < menu_recentfile.size(); ++n) { menu_recentfile[n] = CreateMenu("Recent file " + String(n + 1), menu_recentfiles); } CreateMenu("", menu_file); auto menu_exit = CreateMenu("Exit", menu_file); //Edit menu auto menu_edit = CreateMenu("Edit", mainmenu); CreateMenu("Undo", menu_edit); CreateMenu("Redo", menu_edit); CreateMenu("", menu_edit); CreateMenu("Cut", menu_edit); CreateMenu("Copy", menu_edit); CreateMenu("Past", menu_edit); CreateMenu("", menu_edit); CreateMenu("Select all", menu_edit); CreateMenu("Select none", menu_edit); CreateMenu("Invert selection", menu_edit); //View menu auto menu_view = CreateMenu("View", mainmenu); auto menu_perspective = CreateMenu("Perspective", menu_view); auto menu_top = CreateMenu("XZ - Top", menu_view); auto menu_side = CreateMenu("XZ - Side", menu_view); auto menu_front = CreateMenu("XY - Front", menu_view); menu_perspective->SetState(true); //Tools menu auto menu_tools = CreateMenu("Tools", mainmenu); auto menu_options = CreateMenu("Options", menu_tools); //Help menu auto menu_help = CreateMenu("Help", mainmenu); auto menu_helpcontents = CreateMenu("Help Contents", menu_help); auto menu_about = CreateMenu("About", menu_help); //------------------------------------------------------- // Create toolbar //------------------------------------------------------- auto toolbar = CreatePanel(0, mainmenu->size.y, sz.x, TOOLBARHEIGHT, ui->root); toolbar->SetLayout(1, 1, 1, 0); int x = 4, y = 4; auto toolbarbutton_open = CreateButton("", x, y, TOOLBARHEIGHT - 8, TOOLBARHEIGHT - 8, toolbar, BUTTON_TOOLBAR); toolbarbutton_open->SetFontScale(2); toolbarbutton_open->SetIcon(LoadIcon("https://raw.githubusercontent.com/UltraEngine/Documentation/master/Assets/Icons/open.svg")); x += TOOLBARHEIGHT; auto toolbarbutton_save = CreateButton("", x, y, TOOLBARHEIGHT - 8, TOOLBARHEIGHT - 8, toolbar, BUTTON_TOOLBAR); toolbarbutton_save->SetFontScale(2); toolbarbutton_save->SetIcon(LoadIcon("https://raw.githubusercontent.com/UltraEngine/Documentation/master/Assets/Icons/save.svg")); x += TOOLBARHEIGHT; auto toolbarbutton_options = CreateButton("", x, y, TOOLBARHEIGHT - 8, TOOLBARHEIGHT - 8, toolbar, BUTTON_TOOLBAR); toolbarbutton_options->SetFontScale(2); toolbarbutton_options->SetIcon(LoadIcon("https://raw.githubusercontent.com/UltraEngine/Documentation/master/Assets/Icons/settings.svg")); x += TOOLBARHEIGHT; auto toolbarbutton_help = CreateButton("", x, y, TOOLBARHEIGHT - 8, TOOLBARHEIGHT - 8, toolbar, BUTTON_TOOLBAR); toolbarbutton_help->SetIcon(LoadIcon("https://raw.githubusercontent.com/UltraEngine/Documentation/master/Assets/Icons/help.svg")); toolbarbutton_help->SetFontScale(2); //------------------------------------------------------- // Create status bar //------------------------------------------------------- auto statusbar = CreatePanel(0, sz.y - STATUSBARHEIGHT, sz.x, STATUSBARHEIGHT, ui->root); statusbar->SetLayout(1, 1, 0, 1); auto statusbarlabel_view = CreateLabel("Perspective", 4, 0, 300, statusbar->size.y, statusbar, LABEL_LEFT | LABEL_MIDDLE); //------------------------------------------------------- // Create main panel //------------------------------------------------------- auto mainpanel = CreatePanel(0, toolbar->position.y + toolbar->size.y, sz.x, sz.y - toolbar->size.y - toolbar->position.y - statusbar->size.y, ui->root); mainpanel->SetLayout(1, 1, 1, 1); sz = mainpanel->ClientSize(); //Create console auto console = CreateTextArea(4, mainpanel->size.y - CONSOLEHEIGHT, mainpanel->size.x - SIDEPANELWIDTH - 8, CONSOLEHEIGHT - 28 - 4, mainpanel); console->SetLayout(1, 1, 0, 1); auto widget_input = CreateTextField(4, mainpanel->size.y - 28, mainpanel->size.x - SIDEPANELWIDTH - 8, 28, mainpanel, TEXTFIELD_ENTERKEYACTIONEVENT); widget_input->SetLayout(1, 1, 0, 1); //Main viewport auto mainviewport = CreatePanel(4, 4, mainpanel->size.x - SIDEPANELWIDTH - 8, mainpanel->size.y - 8 - CONSOLEHEIGHT, mainpanel, PANEL_BORDER); mainviewport->SetLayout(1, 1, 1, 1); mainviewport->SetColor(0, 0, 0); auto viewport = CreateWindow("", mainviewport->GetPosition(true).x, mainviewport->GetPosition(true).y, mainviewport->GetSize().x, mainviewport->GetSize().y, mainwindow, WINDOW_CHILD | WINDOW_CLIENTCOORDS | WINDOW_RESIZABLE); //Create a world auto world = CreateWorld(); //Create a framebuffer auto framebuffer = CreateFramebuffer(viewport); //Create a camera auto camera = CreateCamera(world); camera->SetClearColor(0.125); camera->SetFov(70); camera->SetPosition(0, 0, -3); //Create a light auto light = CreateDirectionalLight(world); light->SetRotation(35, 45, 0); //Create a box auto box = CreateBox(world); //------------------------------------------------------- // Create side panel //------------------------------------------------------- auto sidepanel = CreatePanel(sz.x - SIDEPANELWIDTH, 0, SIDEPANELWIDTH, sz.y, mainpanel); sidepanel->SetLayout(0, 1, 1, 1); auto tabber = CreateTabber(0, 0, SIDEPANELWIDTH, sz.y, sidepanel); tabber->SetLayout(1, 1, 1, 1); tabber->AddItem("Objects", true); tabber->AddItem("Scene"); //Object panel sz = tabber->ClientSize(); auto objectpanel = CreatePanel(0, 0, sz.x, sz.y, tabber); objectpanel->SetLayout(1, 1, 1, 1); //tabber->items[0].extra = objectpanel; //Scene panel auto scenepanel = CreatePanel(0, 0, sz.x, sz.y, tabber); scenepanel->SetHidden(true); scenepanel->SetLayout(1, 1, 1, 1); //tabber->items[1].extra = scenepanel; x = 8; y = 12; CreateLabel("Category:", x, y, 200, 30, objectpanel); y += 24; auto objectcategorybox = CreateComboBox(x, y, sz.x - x * 2, 30, objectpanel); objectcategorybox->SetLayout(1, 1, 1, 0); objectcategorybox->AddItem("Primitives", true); objectcategorybox->AddItem("Extended primitives"); objectcategorybox->AddItem("Cameras"); objectcategorybox->AddItem("Lights"); objectcategorybox->AddItem("Splines"); y += 44; CreateLabel("Object:", x, y, 200, 30, objectpanel); y += 24; auto objectbox = CreateComboBox(x, y, sz.x - x * 2, 30, objectpanel); objectbox->SetLayout(1, 1, 1, 0); objectbox->AddItem("Box", true); objectbox->AddItem("Wedge"); objectbox->AddItem("Cylinder"); objectbox->AddItem("Sphere"); y += 44; x = 80; CreateButton("Create", x, y, sz.x - 2 * x, 28, objectpanel); x = 8; y = 12; auto scenebrowser = CreateTreeView(x, y, sz.x - 2 * x, 400 - y, scenepanel); scenebrowser->SetLayout(1, 1, 1, 1); auto node = scenebrowser->root->AddNode("Scene"); node->Expand(); node->AddNode("Box 1"); node->AddNode("Box 2"); node->AddNode("Box 3"); y += scenebrowser->size.y + x; auto propertiespanel = CreatePanel(x, y, sz.x, sz.y - y, scenepanel); propertiespanel->SetLayout(1, 1, 0, 1); y = 8; CreateLabel("Name:", x, y + 4, 60, 30, propertiespanel); auto widget_name = CreateTextField(x * 2 + 60, y, sz.x - 4 * x - 60, 30, propertiespanel); widget_name->SetText("Box 1"); y += 40; CreateLabel("Value:", x, y + 4, 60, 30, propertiespanel); CreateSlider(x * 2 + 60, y, sz.x - 4 * x - 60, 30, propertiespanel, SLIDER_HORIZONTAL | SLIDER_TRACKBAR); y += 40; //------------------------------------------------------- // Options window //------------------------------------------------------- auto optionswindow = CreateWindow("Options", 0, 0, 400, 500, mainwindow, WINDOW_HIDDEN | WINDOW_TITLEBAR | WINDOW_CENTER); auto optionsui = CreateInterface(optionswindow); sz = optionsui->root->ClientSize(); auto button_option1 = CreateButton("Option 1", 12, 12, 300, 30, optionsui->root, BUTTON_CHECKBOX); button_option1->SetState(WIDGETSTATE_SELECTED); auto button_option2 = CreateButton("Option 2", 12, 12 + 32, 300, 30, optionsui->root, BUTTON_RADIO); button_option2->SetState(WIDGETSTATE_SELECTED); auto button_option3 = CreateButton("Option 3", 12, 12 + 32 * 2, 300, 30, optionsui->root, BUTTON_RADIO); auto button_applyoptions = CreateButton("OK", sz.x - 2 * (8 + 80), sz.y - 8 - 30, 80, 30, optionsui->root, BUTTON_OK); auto button_closeoptions = CreateButton("Cancel", sz.x - 8 - 80, sz.y - 8 - 30, 80, 30, optionsui->root, BUTTON_CANCEL); //------------------------------------------------------- // Main loop //------------------------------------------------------- while (true) { while (PeekEvent()) { const Event event = WaitEvent(); switch (event.id) { case EVENT_WINDOWSIZE: if (event.source == mainwindow) { // If the window resize event is captured auto window = event.source->As<UltraEngine::Window>(); // Get the new size of the applications window UltraEngine::iVec2 sz = mainwindow->ClientSize(); // Set the position and size of the viewport window viewport->SetShape(mainviewport->GetPosition(true).x, mainviewport->GetPosition(true).y, mainviewport->GetSize().x, mainviewport->GetSize().y); } break; case EVENT_PRINT: console->AddText(event.text + "\n"); break; case EVENT_WIDGETACTION: if (event.source == menu_exit) { EmitEvent(EVENT_WINDOWCLOSE, mainwindow); } else if (event.source == menu_open) { RequestFile("Open File"); } else if (event.source == menu_save or event.source == menu_saveas) { RequestFile("Save File", "", "All Files", 0, true); } else if (event.source == menu_helpcontents) { RunFile("https://www.ultraengine.com/learn"); } else if (event.source == menu_about) { Notify("3D Viewport"); } else if (event.source == menu_perspective or event.source == menu_top or event.source == menu_side or event.source == menu_front) { menu_perspective->SetState(WIDGETSTATE_UNSELECTED); menu_top->SetState(WIDGETSTATE_UNSELECTED); menu_side->SetState(WIDGETSTATE_UNSELECTED); menu_front->SetState(WIDGETSTATE_UNSELECTED); auto menuitem = event.source->As<Widget>(); menuitem->SetState(WIDGETSTATE_SELECTED); statusbarlabel_view->SetText(menuitem->text); } else if (event.source == toolbarbutton_open) { EmitEvent(EVENT_WIDGETACTION, menu_open); } else if (event.source == toolbarbutton_save) { EmitEvent(EVENT_WIDGETACTION, menu_save); } else if (event.source == toolbarbutton_options) { EmitEvent(EVENT_WIDGETACTION, menu_options); } else if (event.source == toolbarbutton_help) { EmitEvent(EVENT_WIDGETACTION, menu_helpcontents); } else if (event.source == widget_input) { if (!widget_input->text.empty()) { console->AddText(widget_input->text + "\n"); widget_input->SetText(""); } widget_input->Activate(); } else if (event.source == menu_options) { optionswindow->SetHidden(false); optionswindow->Activate(); mainwindow->Disable(); } else if (event.source == button_applyoptions or event.source == button_closeoptions) { EmitEvent(EVENT_WINDOWCLOSE, optionswindow); } break; case EVENT_WIDGETSELECT: if (event.source == tabber) { for (int n = 0; n < tabber->items.size(); ++n) { if (n == event.data) { objectpanel->SetHidden(true); scenepanel->SetHidden(false); } else { objectpanel->SetHidden(false); scenepanel->SetHidden(true); } } } break; case EVENT_WINDOWCLOSE: if (event.source == mainwindow) { if (Confirm("Are you sure you want to quit?")) { return 0; } } else if (event.source == optionswindow) { mainwindow->Enable(); mainwindow->Activate(); optionswindow->SetHidden(true); } } } box->Turn(0, 45 / 60.0f, 0); world->Update(); world->Render(framebuffer); } return 0; }
  14. You can just point it to NULL or hide the camera until you need it again. If you're only rendering the camera once, it shouldn't cause an impact on performance.
  15. Know the exact font that was used? Was it the same as the Leadwerks logo? Ether way, I appreciate these.
  16. Hopefully they'll respond back soon.
  17. I enabled the Console in the compile options for Debug. And yes, I see artificing with the terrain, so this is something on AMD.
  18. Maybe next time before you ship an executable, run it pass Virus Total. This is what I do when I'm not sure about something. Speaking of which, in my own libraries, I was running into Windows Defender thinking the code I made was a trojan. I think I was trying to make a console logger or something.
  19. I mean you could, it just would be a lot of typing and not really flexible.
  20. Leadwerks supported this for a long time. This should be supported but I haven't personally tried.
  21. The source code is available for the preprocessor. If you feel like investigating, you can #if 0 out most of the code and slowly re-enable things until you get a hit. I'm not sure what's causing the false positive, it might detect it's generating code? We don't seem to be doing anything suspicious as far as I can tell.
  22. Hi, There's no editor nor an easier way to assign components to entities without code. You can load maps from Leadwerks. in the meantime. You can easily start your next project by getting the feel of the new engine and API and writing your core framework.
  23. Confirmed with an RX480, no validation errors. Loading shader family "Shaders/PBR.json" Loading shader family "Shaders/Terrain.json" Loading pixmap "https://raw.githubusercontent.com/UltraEngine/Documentation/master/Assets/Terrain/512.r16" Loading texture "https://raw.githubusercontent.com/UltraEngine/Documentation/master/Assets/Materials/Ground/river_small_rocks_diff_4k.dds" Loading texture "https://raw.githubusercontent.com/UltraEngine/Documentation/master/Assets/Materials/Ground/river_small_rocks_nor_gl_4k.dds" Loading texture "https://raw.githubusercontent.com/UltraEngine/Documentation/master/Assets/Materials/Ground/Rocks_Dirt_Ground_2k.dds" Loading texture "https://raw.githubusercontent.com/UltraEngine/Documentation/master/Assets/Materials/Ground/Rocks_Dirt_Ground_2k_dot3.dds" Loading texture "https://raw.githubusercontent.com/UltraEngine/Documentation/master/Assets/Materials/Ground/Rocks_Dirt_Ground_2k_disp.dds" Loading shader family "Shaders/Sky.json" Loading posteffect "Shaders/PostEffects/Refraction.json" UNASSIGNED-khronos-validation-createinstance-status-message(INFO / SPEC): msgNum: -671457468 - Validation Information: [ UNASSIGNED-khronos-validation-createinstance-status-message ] Object 0: handle = 0x15f12652f00, type = VK_OBJECT_TYPE_INSTANCE; | MessageID = 0xd7fa5f44 | Khronos Validation Layer Active: Settings File: Found at C:\Users\reepb\AppData\Local\LunarG\vkconfig\override\vk_layer_settings.txt specified by VkConfig application override. Current Enables: None. Current Disables: VK_VALIDATION_FEATURE_DISABLE_THREAD_SAFETY_EXT. Objects: 1 [0] 0x15f12652f00, type: 1, name: NULL UNASSIGNED-cache-file-error(INFO / SPEC): msgNum: -256165483 - Validation Information: [ UNASSIGNED-cache-file-error ] Object 0: handle = 0x15f16dd36f0, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0xf0bb3995 | Cannot open shader validation cache at C:\Users\reepb\AppData\Local\Temp/shader_validation_cache.bin for reading (it may not exist yet) Objects: 1 [0] 0x15f16dd36f0, type: 3, name: NULL Deleting texture "https://raw.githubusercontent.com/UltraEngine/Documentation/master/Assets/Materials/Ground/river_small_rocks_nor_gl_4k.dds" Deleting texture "https://raw.githubusercontent.com/UltraEngine/Documentation/master/Assets/Materials/Ground/river_small_rocks_diff_4k.dds" Deleting texture "https://raw.githubusercontent.com/UltraEngine/Documentation/master/Assets/Materials/Ground/Rocks_Dirt_Ground_2k_disp.dds" Deleting texture "https://raw.githubusercontent.com/UltraEngine/Documentation/master/Assets/Materials/Ground/Rocks_Dirt_Ground_2k_dot3.dds" Deleting texture "https://raw.githubusercontent.com/UltraEngine/Documentation/master/Assets/Materials/Ground/Rocks_Dirt_Ground_2k.dds" Deleting shader family "Shaders/Terrain.json" Deleting shader family "Shaders/Sky.json" C:\Users\reepb\Documents\Ultra Engine\Projects\AMDTest\AMDTest_d.exe (process 9236) exited with code 0. To automatically close the console when debugging stops, enable Tools->Options->Debugging->Automatically close the console when debugging stops. Press any key to close this window . . .
  24. I can check on my RX480 to see if I get any validation errors. Yeah, AMD testing was pretty limited during the closed beta. We just made sure it initialized.
×
×
  • Create New...