Canardia Posted January 19 Share Posted January 19 #include "UltraEngine.h" using namespace UltraEngine; int main(int argc, const char* argv[]) { // Get the displays auto displays = GetDisplays(); // Create a window auto window = CreateWindow("Ultra Engine", 0, 0, 1280 * displays[0]->scale, 720 * displays[0]->scale, displays[0], WINDOW_CENTER | WINDOW_TITLEBAR); // Create a framebuffer auto framebuffer = CreateFramebuffer(window); // Create a world auto world = CreateWorld(); // Let there be light and a ship auto camera = CreateCamera(world); camera->Move(0, 20, -20); camera->Turn(30, 0, 0); auto ship = CreateBoxBrush(world, 10, 10, 10); auto light = CreatePointLight(world, 100); light->Move(0, 20, 0); // Slice the dice Plane plane = Plane(0,0,1,0); auto A = CreateBrush(world); auto B = CreateBrush(world); // comment the next line out if you don't want a crash ship->Move(0, 0, 50); // cash me ousside howbow dah ship->Slice(plane, A, B); ship = B->Copy(world, false, false)->As<Brush>(); // Move the sliced result right ship->Move(20, 0, 0); // Main loop while (!window->Closed() and !window->KeyDown(KEY_ESCAPE)) { world->Update(); world->Render(framebuffer); } return 0; } Quote ■ Ryzen 9 ■ RX 6800M ■ 16GB ■ XF8 ■ Windows 11 ■ ■ Ultra ■ LE 2.5 ■ 3DWS 5.6 ■ Reaper ■ C/C++ ■ C# ■ Fortran 2008 ■ Story ■ ■ Homepage: https://canardia.com ■ Link to comment Share on other sites More sharing options...
Solution Josh Posted January 19 Solution Share Posted January 19 There is a bug where a brush will crash in its UpdateBounds routine if it has no vertices. I am fixing it now... 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.