Jump to content

All Activity

This stream auto-updates

  1. Past hour
  2. You are correct. This was recently moved from general options into a per-project setting, but some code was still looking for the setting in the old location.
  3. I am a little bit wary of modifying the way this works, but we can try it.
  4. Today
  5. #2 This is fixed in the build that will go up later today Closing this for now. Please upload the scene file if you would like me to investigate. The brush might be scaled, which could cause the effect you are seeing, but I cannot tell without seeing the scene file.
  6. Is this still happening? Is there any example I can run that will produce the error?
  7. This will be fixed in the build that goes up later today. Updated code. #include "UltraEngine.h" using namespace UltraEngine; int main(int argc, const char* argv[]) { //Get the displays auto displays = GetDisplays(); //Create window auto window = CreateWindow("Ultra Engine", 0, 0, 1280, 720, displays[0]); //Create framebuffer auto framebuffer = CreateFramebuffer(window); //Create world auto world = CreateWorld(); //Create main camera auto camera = CreateCamera(world); camera->SetPosition(0, 0, -3); //Create a model auto box = CreateBox(world); //Create a light auto light = CreateBoxLight(world); light->SetRange(-5, 5); light->SetRotation(34, 45, 0); //Load a font auto font = LoadFont("Fonts/arial.ttf"); //Create user interface with a semi-transparent background auto ui = CreateInterface(camera, font, framebuffer->size); ui->background->SetColor(0, 0, 0, 0.5); //Create widget iVec2 sz = ui->background->ClientSize(); auto button = CreateButton("Button", sz.x / 2 - 75, sz.y / 2 - 15, 150, 30, ui->background); while (true) { box->Turn(0, 1, 0); while (PeekEvent()) { const Event ev = WaitEvent(); switch (ev.id) { case EVENT_WINDOWCLOSE: if (ev.source == window) { return 0; } break; default: ui->ProcessEvent(ev); break; } } if (window->KeyHit(KEY_F2)) { framebuffer->Capture(); } auto captures = framebuffer->GetCaptures(); for (auto c : captures) { auto path = GetPath(PATH_DESKTOP) + "/screenshot.jpg"; c->Save(path); RunFile(path); } world->Update(); world->Render(framebuffer); } return 0; }
  8. I believe this is fixed, in the build that will go up later today... #include "UltraEngine.h" using namespace UltraEngine; #define GUIMODE 1 int main(int argc, const char* argv[]) { //Get the displays auto displays = GetDisplays(); //Create a window auto window = CreateWindow("Ultra Engine", 0, 0, 800, 600, displays[0], WINDOW_TITLEBAR); #if GUIMODE == 1 auto framebuffer = CreateFramebuffer(window); auto world = CreateWorld(); auto font = LoadFont("Fonts/segoeui.ttf"); auto camera = CreateCamera(world); auto ui = CreateInterface(camera, font, framebuffer->size); #else auto ui = CreateInterface(window); #endif //Create widget auto sz = ui->root->ClientSize(); auto widget = CreateTextArea(10, 10, sz.x - 20, sz.y - 20, ui->root, TEXTAREA_WORDWRAP); for (int n = 0; n < 3; ++n) { if (not widget->text.empty()) widget->AddText("\n\n"); widget->AddText("Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."); } widget->SetFontScale(4); while (not window->KeyHit(KEY_ESCAPE)) { #if GUIMODE == 1 while (PeekEvent()) { const auto event = WaitEvent(); if (event.id == EVENT_WINDOWCLOSE) return 0; ui->ProcessEvent(event); } world->Update(); world->Render(framebuffer); #else const auto event = WaitEvent(); if (event.id == EVENT_WINDOWCLOSE) return 0; #endif } return 0; }
  9. 2D revisions are in. If there are any continuing problems please post some code I can run.
  10. Fixed in the next build that goes up on the dev/beta branch.
  11. Does your map have a camera or player in it? Can you please upload the map file so we can try it?
  12. Set and GetDecalLayers are added in Lua now.
  13. One final test in 0.9.9 shows this working. Make sure you call collectgarbage() in Lua after setting the variable to nil. #include "UltraEngine.h" using namespace UltraEngine; int main(int argc, const char* argv[]) { //Get the displays auto displays = GetDisplays(); //Create window auto window = CreateWindow("Ultra Engine", 0, 0, 1280, 720, displays[0]); //Create framebuffer auto framebuffer = CreateFramebuffer(window); //Create world auto world = CreateWorld(); //Create main camera auto camera = CreateCamera(world); camera->SetPosition(0, 0, -3); //Create a model auto box = CreateBox(world); //Create a light auto light = CreateBoxLight(world); light->SetRange(-5, 5); light->SetRotation(34, 45, 0); //Load a font auto font = LoadFont("Fonts/arial.ttf"); //Create user interface with a semi-transparent background auto ui = CreateInterface(camera, font, framebuffer->size); ui->background->SetColor(0, 0, 0, 0.5); //Create widget iVec2 sz = ui->background->ClientSize(); auto button = CreateButton("Button", sz.x / 2 - 75, sz.y / 2 - 15, 150, 30, ui->background); while (true) { box->Turn(0, 1, 0); while (PeekEvent()) { const Event ev = WaitEvent(); switch (ev.id) { case EVENT_WINDOWCLOSE: if (ev.source == window) { return 0; } break; default: if (ui) ui->ProcessEvent(ev); break; } } if (window->KeyHit(KEY_SPACE)) ui = nullptr; world->Update(); world->Render(framebuffer); } return 0; }
  14. Seems fine now? #include "UltraEngine.h" using namespace UltraEngine; shared_ptr<Window> window; shared_ptr<Framebuffer> framebuffer; shared_ptr<World> menuWold; shared_ptr<Interface> ui; shared_ptr<Camera> uiCamera; void initGui() { uiCamera = CreateCamera(menuWold, PROJECTION_ORTHOGRAPHIC); auto default_font = LoadFont("Fonts\\arial.ttf"); ui = CreateInterface(uiCamera, default_font, framebuffer->GetSize()); ui->SetRenderLayers(2); ui->root->SetColor(0.5f, 0.5f, 0.5f, 1.0f); uiCamera->SetPosition((float)framebuffer->GetSize().x * 0.5f, (float)framebuffer->GetSize().y * 0.5f, 0); uiCamera->SetRenderLayers(2); uiCamera->SetClearMode(CLEAR_DEPTH); } int main(int argc, const char* argv[]) { auto displays = GetDisplays(); window = CreateWindow("Ultra Engine", 0, 0, 100, 100, displays[0], WINDOW_DEFAULT); menuWold = CreateWorld(); framebuffer = CreateFramebuffer(window); initGui(); auto btn = CreateButton("", 10, 10, 32, 32, ui->root); while (window->Closed() == false and window->KeyDown(KEY_ESCAPE) == false) { menuWold->Update(); menuWold->Render(framebuffer); } return 0; }
  15. This was fixed by adding some checks for NAN in the bloom shader.
  16. Report is being closed since there is no file I can test to produce this behavior and it is probably fixed.
  17. Works correctly in the latest builds #include "UltraEngine.h" using namespace UltraEngine; int main(int argc, const char* argv[]) { //Get the displays auto displays = GetDisplays(); //Create window auto window = CreateWindow("Ultra Engine", 0, 0, 1280, 720, displays[0]); //Create framebuffer auto framebuffer = CreateFramebuffer(window); //Create world auto world = CreateWorld(); //Create main camera auto camera = CreateCamera(world); camera->SetPosition(0, 0, -3); //Load a font auto font = LoadFont("Fonts/arial.ttf"); //Create user interface with a semi-transparent background auto ui = CreateInterface(camera, font, framebuffer->size); ui->background->SetColor(0, 0, 0, 0.5); //Create widget iVec2 sz = ui->background->ClientSize(); auto button = CreateButton("Button", 100, 200, 150, 30, ui->background); auto button2 = CreateButton("Button2", 500, 200, 150, 30, ui->background); for (int i = 0; i < 5; i++) { button2->AddText("\ntest"); } //Create camera auto orthocamera = CreateCamera(world, PROJECTION_ORTHOGRAPHIC); orthocamera->SetClearMode(CLEAR_DEPTH); orthocamera->SetPosition(float(framebuffer->size.x) * 0.5f, float(framebuffer->size.y) * 0.5f, 0); //UI will only appear in orthographic camera orthocamera->SetRenderLayers(2); ui->SetRenderLayers(2); while (true) { if (window->KeyHit(KEY_SPACE)) { button->AddText("\ntest"); } while (PeekEvent()) { const Event ev = WaitEvent(); switch (ev.id) { case EVENT_WINDOWCLOSE: if (ev.source == window) { return 0; } break; default: ui->ProcessEvent(ev); break; } } world->Update(); world->Render(framebuffer); } return 0; }
  18. This is fixed with the new 2D drawing system.
  19. material:SetBackFaceCullMode(boolean)
  20. 0.9.9 Added Camera::EnablePostEffect(int index) and Camera::DisablePostEffect(). The return type of CreateMenu will now be cast to a Widget, making it more consistent with the rest of the API. If you need to cast it to a menu, you can add ->As<Menu>() at the end of the CreateMenu() command. Lua binding of Camera::AddPostEffect will now return 1 for the first effect added instead of zero. Variious bug fixes.
  21. ( lua ) Command not exposed.
  1. Load more activity
×
×
  • Create New...