2626#include " scene_graph/components/image.h"
2727#include " scene_graph/components/pbr_material.h"
2828#include " scene_graph/components/sub_mesh.h"
29- #include " scene_graph/hpp_scene.h"
3029#include " scene_graph/scene.h"
3130
3231namespace vkb
@@ -91,7 +90,6 @@ class GeometrySubpass : public vkb::rendering::Subpass<bindingType>
9190 using MeshType = typename std::conditional<bindingType == BindingType::Cpp, vkb::scene_graph::components::HPPMesh, vkb::sg::Mesh>::type;
9291 using PipelineLayoutType = typename std::conditional<bindingType == BindingType::Cpp, vkb::core::HPPPipelineLayout, vkb::PipelineLayout>::type;
9392 using RasterizationStateType = typename std::conditional<bindingType == BindingType::Cpp, vkb::rendering::HPPRasterizationState, vkb::RasterizationState>::type;
94- using SceneType = typename std::conditional<bindingType == BindingType::Cpp, vkb::scene_graph::HPPScene, vkb::sg::Scene>::type;
9593 using ShaderModuleType = typename std::conditional<bindingType == BindingType::Cpp, vkb::core::HPPShaderModule, vkb::ShaderModule>::type;
9694 using ShaderSourceType = typename std::conditional<bindingType == BindingType::Cpp, vkb::core::HPPShaderSource, vkb::ShaderSource>::type;
9795 using SubMeshType = typename std::conditional<bindingType == BindingType::Cpp, vkb::scene_graph::components::HPPSubMesh, vkb::sg::SubMesh>::type;
@@ -108,7 +106,7 @@ class GeometrySubpass : public vkb::rendering::Subpass<bindingType>
108106 GeometrySubpass (vkb::rendering::RenderContext<bindingType> &render_context,
109107 ShaderSourceType &&vertex_shader,
110108 ShaderSourceType &&fragment_shader,
111- SceneType &scene,
109+ vkb::scene_graph::Scene<bindingType> &scene,
112110 sg::Camera &camera);
113111
114112 virtual ~GeometrySubpass () = default ;
@@ -127,12 +125,12 @@ class GeometrySubpass : public vkb::rendering::Subpass<bindingType>
127125 void set_thread_index (uint32_t index);
128126
129127 protected:
130- void draw_submesh (vkb::core::CommandBuffer<bindingType> &command_buffer, SubMeshType &sub_mesh, FrontFaceType front_face = DefaultFrontFaceTypeValue<FrontFaceType>::value);
131- virtual void draw_submesh_command (vkb::core::CommandBuffer<bindingType> &command_buffer, SubMeshType &sub_mesh);
132- vkb::sg::Camera const &get_camera () const ;
133- std::vector<MeshType *> const &get_meshes () const ;
134- RasterizationStateType const &get_rasterization_state () const ;
135- SceneType const &get_scene () const ;
128+ void draw_submesh (vkb::core::CommandBuffer<bindingType> &command_buffer, SubMeshType &sub_mesh, FrontFaceType front_face = DefaultFrontFaceTypeValue<FrontFaceType>::value);
129+ virtual void draw_submesh_command (vkb::core::CommandBuffer<bindingType> &command_buffer, SubMeshType &sub_mesh);
130+ vkb::sg::Camera const &get_camera () const ;
131+ std::vector<MeshType *> const &get_meshes () const ;
132+ RasterizationStateType const &get_rasterization_state () const ;
133+ vkb::scene_graph::Scene<bindingType> const &get_scene () const ;
136134
137135 /* *
138136 * @brief Sorts objects based on distance from camera and classifies them
@@ -168,7 +166,7 @@ class GeometrySubpass : public vkb::rendering::Subpass<bindingType>
168166 vkb::rendering::HPPRasterizationState base_rasterization_state;
169167 vkb::sg::Camera &camera;
170168 std::vector<vkb::scene_graph::components::HPPMesh *> meshes;
171- vkb::scene_graph::HPPScene *scene;
169+ vkb::scene_graph::SceneCpp *scene;
172170 uint32_t thread_index = 0 ;
173171};
174172
@@ -181,7 +179,7 @@ template <vkb::BindingType bindingType>
181179inline GeometrySubpass<bindingType>::GeometrySubpass(vkb::rendering::RenderContext<bindingType> &render_context,
182180 ShaderSourceType &&vertex_source,
183181 ShaderSourceType &&fragment_source,
184- SceneType &scene_,
182+ vkb::scene_graph::Scene<bindingType> &scene_,
185183 sg::Camera &camera) :
186184 Subpass<bindingType>{render_context, std::move (vertex_source), std::move (fragment_source)}, camera{camera}
187185{
@@ -191,7 +189,7 @@ inline GeometrySubpass<bindingType>::GeometrySubpass(vkb::rendering::RenderConte
191189 }
192190 else
193191 {
194- scene = reinterpret_cast <vkb::scene_graph::HPPScene *>(&scene_);
192+ scene = reinterpret_cast <vkb::scene_graph::SceneCpp *>(&scene_);
195193 }
196194 meshes = scene->get_components <vkb::scene_graph::components::HPPMesh>();
197195}
@@ -369,15 +367,15 @@ inline typename GeometrySubpass<bindingType>::RasterizationStateType const &Geom
369367}
370368
371369template <vkb::BindingType bindingType>
372- inline typename GeometrySubpass <bindingType>::SceneType const &GeometrySubpass<bindingType>::get_scene() const
370+ inline vkb::scene_graph::Scene <bindingType> const &GeometrySubpass<bindingType>::get_scene() const
373371{
374372 if constexpr (bindingType == BindingType::Cpp)
375373 {
376374 return *scene;
377375 }
378376 else
379377 {
380- return *reinterpret_cast <vkb::sg::Scene const *>(scene);
378+ return *reinterpret_cast <vkb::scene_graph::SceneC const *>(scene);
381379 }
382380}
383381
0 commit comments