From f55f7c3eea0e6fb562576670b53e1bcf766a27b5 Mon Sep 17 00:00:00 2001 From: Ravbug Date: Sat, 29 Jun 2024 17:49:32 -0700 Subject: [PATCH] Update for API changes --- CMakeLists.txt | 7 ------- RavEngine | 2 +- main.cpp | 6 +++--- 3 files changed, 4 insertions(+), 11 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c40dd36..525c2df 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -68,10 +68,3 @@ INSTALL(CODE COMPONENT Runtime ) endif() - - -message( - CMAKE_SHARED_LINKER_FLAGS = ${CMAKE_SHARED_LINKER_FLAGS} - CMAKE_SHARED_LINKER_FLAGS_RELEASE = ${CMAKE_SHARED_LINKER_FLAGS_RELEASE} - CMAKE_SHARED_LINKER_FLAGS_DEBUG = ${CMAKE_SHARED_LINKER_FLAGS_DEBUG} -) diff --git a/RavEngine b/RavEngine index 908a052..19c13c3 160000 --- a/RavEngine +++ b/RavEngine @@ -1 +1 @@ -Subproject commit 908a052bb5bbe73cee30a966b174fcd25952a95d +Subproject commit 19c13c3ae97ebc5422f24b8e9023867916c9d73d diff --git a/main.cpp b/main.cpp index b47872b..51c4e5a 100644 --- a/main.cpp +++ b/main.cpp @@ -5,6 +5,7 @@ #include #include #include +#include using namespace RavEngine; using namespace std; @@ -46,7 +47,7 @@ struct HelloCubeWorld : public RavEngine::World { // setup inside Entity::Create for Unreal-style inheritance. // We will start by loading the cube mesh. The cube is one of the default primitives that comes with RavEngine. - auto cubeMesh = MeshAsset::Manager::Get("cube.obj"); + auto cubeMesh = MeshCollectionStaticManager::Get("cube.obj"); // Next we need to define a material for the cube. We can use the default material. // RavEngine can optimize your rendering for you by batching if you minimize the number of Material Instances you create, @@ -58,8 +59,7 @@ struct HelloCubeWorld : public RavEngine::World { // the engine to crash, as that is an invalid state. // The EmplaceComponent method constructs the component inline and attaches it to the entity. // Component creation and deletion must happen on the main thread. - // Note that you must also inform the engine if your material is Lit or Unlit. Lit is shown below. - cubeEntity.EmplaceComponent(cubeMesh, LitMeshMaterialInstance(cubeMat)); + cubeEntity.EmplaceComponent(cubeMesh, cubeMat); // We want to be able to see our cube, so we need a camera. In RavEngine, cameras are also components, so // we need another entity to hold that.