Jump to content

World::Render of prev world prevent vegetation rendering in new world


Go to solution Solved by Josh,

Recommended Posts

Posted

If you comment out "loadingWorld->Render(framebuffer);" trees will be seen, otherwise not

#include "Leadwerks.h"
#include "ComponentSystem.h"

using namespace Leadwerks;

int main(int argc, const char* argv[]) {
    RegisterComponents();
    //Get the displays
    auto displays = GetDisplays();

    //Create a window
    auto window = CreateWindow("Ultra Engine", 0, 0, 1280, 720, displays[0], WINDOW_CENTER | WINDOW_TITLEBAR);

    //Create a framebuffer
    auto framebuffer = CreateFramebuffer(window);

	auto loadingWorld = CreateWorld();
	loadingWorld->Render(framebuffer);

    //Create a world
    auto world = CreateWorld();
    auto scene = LoadMap(world, "maps/veg_test2.map");

    while (window->Closed() == false) {
        world->Update();
        world->Render(framebuffer);

    }
    return 0;
}

Test map: veg_test2.zip

  • Like 1

Check out Slipgate Tactics demo, which is made with Ultra Engine/Leadwerks 5:

https://www.leadwerks.com/community/topic/61480-slipgate-tactics-demo/

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...