Skip to content

Commit

Permalink
Checkpoint.
Browse files Browse the repository at this point in the history
  • Loading branch information
edisonlee0212 committed Sep 3, 2024
1 parent 934b877 commit bd8461b
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 15 deletions.
22 changes: 14 additions & 8 deletions EvoEngine_App/TextureBaking/TextureBakingApp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,13 @@

#include "PostProcessingStack.hpp"
#include "Resources.hpp"
#ifdef MESH_REPAIR_PLUGIN
# include "MeshColoring.hpp"
#endif

#include "MeshColoring.hpp"
#include "TextureBaking.hpp"
#ifdef TEXTURE_BAKING_PLUGIN
# include "TextureBaking.hpp"
#endif
#ifdef OPTIX_RAY_TRACER_PLUGIN
# include <CUDAModule.hpp>
# include <RayTracerLayer.hpp>
Expand Down Expand Up @@ -68,9 +72,12 @@ int main() {
#ifdef PHYSICS_PLUGIN
Application::PushLayer<PhysicsLayer>();
#endif

#ifdef MESH_REPAIR_PLUGIN
PrivateComponentRegistration<MeshColoring> mesh_coloring_registry("MeshColoring");
#endif
#ifdef TEXTURE_BAKING_PLUGIN
PrivateComponentRegistration<TextureBaking> texture_baking_registry("TextureBaking");
#endif
#ifdef CPU_RAY_TRACER_PLUGIN
PrivateComponentRegistration<CpuRayTracerCamera> cpu_ray_tracer_camera_registry("CpuRayTracerCamera");
#endif
Expand Down Expand Up @@ -329,7 +336,7 @@ void SetupDemoScene(DemoSetup demo_setup, ApplicationInfo& application_info) {
#ifdef PHYSICS_PLUGIN
Entity LoadPhysicsScene(const std::shared_ptr<Scene>& scene, const std::string& base_entity_name) {
const auto base_entity = scene->CreateEntity(base_entity_name);
#pragma region Create 9 spheres in different PBR properties
# pragma region Create 9 spheres in different PBR properties
const int amount = 5;
constexpr float scale_factor = 0.03f;
const auto collection = scene->CreateEntity("Spheres");
Expand Down Expand Up @@ -364,10 +371,9 @@ Entity LoadPhysicsScene(const std::shared_ptr<Scene>& scene, const std::string&
}
}
scene->SetParent(collection, base_entity);
#pragma endregion
#pragma region Create Boundaries
# pragma endregion
# pragma region Create Boundaries
{

const auto ground = CreateSolidCube(1.0, glm::vec3(1.0f), glm::vec3(0, -35, 0) * scale_factor, glm::vec3(0),
glm::vec3(30, 1, 60) * scale_factor, "Ground");

Expand Down Expand Up @@ -427,7 +433,7 @@ Entity LoadPhysicsScene(const std::shared_ptr<Scene>& scene, const std::string&
joint->SetMotion(MotionAxis::SwingZ, MotionType::Free);
*/
}
#pragma endregion
# pragma endregion
return base_entity;
}
Entity CreateSolidCube(const float& mass, const glm::vec3& color, const glm::vec3& position, const glm::vec3& rotation,
Expand Down
13 changes: 6 additions & 7 deletions EvoEngine_Plugins/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,12 @@ set(EVOENGINE_PLUGINS_PCHS "")
set(EVOENGINE_PLUGINS_DEFS "")
set(EVOENGINE_PLUGINS_DLLS "")

if (WIN32)
option(EVOENGINE_PLUGIN_PHYSICS "Build the physics plugin" OFF)
set(EVOENGINE_PLUGIN_PHYSICS OFF)
if(EVOENGINE_PLUGIN_PHYSICS)
add_subdirectory(Physics)
endif()
endif()
#if (WIN32)
# option(EVOENGINE_PLUGIN_PHYSICS "Build the physics plugin" ON)
# if(EVOENGINE_PLUGIN_PHYSICS)
# add_subdirectory(Physics)
# endif()
#endif()

option(EVOENGINE_PLUGIN_RAY_TRACER "Build the ray tracer plugin" ON)
if(EVOENGINE_PLUGIN_RAY_TRACER)
Expand Down

0 comments on commit bd8461b

Please sign in to comment.