On most situations, I get a crash when loading a map. I first discovered this on a complex project and I thought it was me doing something stupid. Turns out, on a very basic project, the problem still happens.
#include "Leadwerks.h"
using namespace Leadwerks;
int main(int argc, const char* argv[])
{
//Get the displays
auto displays = GetDisplays();
//Create a window
auto window = CreateWindow("Leadwerks", 0, 0, 1280, 720, displays[0], WINDOW_CENTER | WINDOW_TITLEBAR);
//Create a world
auto world = CreateWorld();
//Create a framebuffer
auto framebuffer = CreateFramebuffer(window);
auto scene = LoadScene(world, "Maps/Start.map");
//Main loop
while (window->Closed() == false and window->KeyDown(KEY_ESCAPE) == false)
{
world->Update();
world->Render(framebuffer);
}
return 0;
}
SceneCrash.7z