Search the Community
Showing results for tags 'nvidia'.
-
In my game with on level with many objects memory was increasing pretty fast and fps starts lowering at some point even if nothing happens. In example with single light in release mode memory usage increased for me from 150 to 300 for 5 mins, With more lights and more fps (vsync off and maybe release mode as well) this happens much faster - around 10 Mb per seconds. #include "UltraEngine.h" using namespace UltraEngine; int main(int argc, const char* argv[]) { auto displays = GetDisplays(); auto window = CreateWindow("Ultra Engine", 0, 0, 1280, 720, displays[0], WINDOW_CENTER | WINDOW_TITLEBAR); auto framebuffer = CreateFramebuffer(window); auto world = CreateWorld(); world->RecordStats(true); auto camera = CreateCamera(world); camera->SetClearColor(0.125); camera->SetFov(70); camera->Move(0, 2, -8); auto ground = CreateBox(world, 20, 1, 20); ground->SetPosition(0, -0.5, 0); ground->SetColor(0, 1, 0); vector<shared_ptr<PointLight>> lights; for (int i = -10; i < 10; i++) { auto light = CreatePointLight(world); lights.push_back(light); light->SetPosition(i, 0, 0); } //Main loop while (window->Closed() == false and window->KeyHit(KEY_ESCAPE) == false) { world->Update(); world->Render(framebuffer, false); window->SetText("FPS: " + String(world->renderstats.framerate) + " RAM: " + WString(GetMemoryUsage() / 1024)); } return 0; }
-
After a swap chain is created, if post-processing effects are enabled, it will take three calls to World::Render before anything except a black screen will appear. Related thread: #include "UltraEngine.h" using namespace UltraEngine; int main(int argc, const char* argv[]) { EngineSettings settings; settings.asyncrender = false; Initialize(settings); //Get the displays auto displays = GetDisplays(); //Create window auto window = CreateWindow("Ultra Engine", 0, 0, 1280, 720, displays[0], WINDOW_RESIZABLE | WINDOW_CENTER | WINDOW_TITLEBAR); //Create world auto world = CreateWorld(); //Create framebuffer auto framebuffer = CreateFramebuffer(window); //Create a camera auto camera = CreateCamera(world, PROJECTION_ORTHOGRAPHIC); camera->SetClearColor(0,0,1,1); camera->SetDepthPrepass(false); auto fx = LoadPostEffect("Shaders/FXAA.fx"); camera->AddPostEffect(fx); while (window->Closed() == false and window->KeyDown(KEY_ESCAPE) == false) { auto e = WaitEvent(); if (e.id == EVENT_KEYDOWN and e.data == KEY_SPACE) { camera->SetClearColor(Random(), Random(), Random()); world->Update(); world->Render(framebuffer); } } return 0; }