No problems here. I just made some small changes to make the light easier to see:
#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->SetAmbientLight(0);
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);
auto light = CreatePointLight(world);
light->SetPosition(0, 2, 0);
light->SetRange(0.1, 20);
//Main loop
while (window->Closed() == false and window->KeyHit(KEY_ESCAPE) == false) {
world->Update();
world->Render(framebuffer);
if (window->KeyHit(KEY_SPACE)) {
light = nullptr;//crash
}
}
return 0;
}