Skip to content

Commit

Permalink
Update for API changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Ravbug committed Jun 30, 2024
1 parent 30e95ba commit f55f7c3
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 11 deletions.
7 changes: 0 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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}
)
2 changes: 1 addition & 1 deletion RavEngine
Submodule RavEngine updated 3030 files
6 changes: 3 additions & 3 deletions main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include <RavEngine/GameObject.hpp>
#include <RavEngine/Dialogs.hpp>
#include <RavEngine/StartApp.hpp>
#include <RavEngine/MeshCollection.hpp>

using namespace RavEngine;
using namespace std;
Expand Down Expand Up @@ -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,
Expand All @@ -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<StaticMesh>(cubeMesh, LitMeshMaterialInstance(cubeMat));
cubeEntity.EmplaceComponent<StaticMesh>(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.
Expand Down

0 comments on commit f55f7c3

Please sign in to comment.