depth-prepass #1
@@ -7,5 +7,4 @@
|
||||
namespace fgl::engine
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@ namespace fgl::engine
|
||||
|
||||
[[nodiscard]] const vk::Extent2D& getExtent() const { return m_extent; }
|
||||
|
||||
[[nodiscard]] std::shared_ptr< ImageView > getView( Sampler sampler = {});
|
||||
[[nodiscard]] std::shared_ptr< ImageView > getView( Sampler sampler = {} );
|
||||
|
||||
[[nodiscard]] vk::ImageMemoryBarrier transitionTo(
|
||||
vk::ImageLayout old_layout, vk::ImageLayout new_layout, const vk::ImageSubresourceRange& range ) const;
|
||||
|
||||
@@ -4,20 +4,16 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <glm/vec3.hpp>
|
||||
#include <glm/vec4.hpp>
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include "engine/types.hpp"
|
||||
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Weffc++"
|
||||
#include "glm/vec3.hpp"
|
||||
#include "glm/vec4.hpp"
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
#include "engine/constants.hpp"
|
||||
#include "engine/descriptors/Descriptor.hpp"
|
||||
#include "engine/descriptors/DescriptorSetLayout.hpp"
|
||||
#include "engine/memory/buffers/vector/DeviceVector.hpp"
|
||||
#include "engine/types.hpp"
|
||||
|
||||
namespace fgl::engine
|
||||
{
|
||||
|
||||
@@ -4,11 +4,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Weffc++"
|
||||
#pragma GCC diagnostic ignored "-Wduplicated-branches"
|
||||
#include <glm/glm.hpp>
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
#include <filesystem>
|
||||
#include <memory>
|
||||
|
||||
@@ -5,12 +5,8 @@
|
||||
#include "ModelVertex.hpp"
|
||||
|
||||
#define GLM_ENABLE_EXPERIMENTAL
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Weffc++"
|
||||
#pragma GCC diagnostic ignored "-Wduplicated-branches"
|
||||
#include <glm/gtx/hash.hpp>
|
||||
#include <glm/vec2.hpp>
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
#include "Model.hpp"
|
||||
#include "ModelInstance.hpp"
|
||||
|
||||
@@ -4,13 +4,9 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Weffc++"
|
||||
#include <glm/vec2.hpp>
|
||||
#include <glm/vec3.hpp>
|
||||
#include <glm/vec4.hpp>
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
#include <vulkan/vulkan.hpp>
|
||||
|
||||
#include "SimpleVertex.hpp"
|
||||
|
||||
@@ -6,17 +6,12 @@
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wold-style-cast"
|
||||
#pragma GCC diagnostic ignored "-Weffc++"
|
||||
#include "objectloaders/tiny_gltf.h"
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
#include "ModelInstanceInfo.hpp"
|
||||
#include "assets/material/Material.hpp"
|
||||
#include "engine/memory/buffers/vector/DeviceVector.hpp"
|
||||
#include "engine/primitives/boxes/OrientedBoundingBox.hpp"
|
||||
#include "memory/buffers/vector/IndexedVector.hpp"
|
||||
#include "objectloaders/tiny_gltf.h"
|
||||
|
||||
namespace fgl::engine
|
||||
{
|
||||
|
||||
@@ -4,11 +4,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Weffc++"
|
||||
#include <glm/vec2.hpp>
|
||||
#include <glm/vec3.hpp>
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
#include <vector>
|
||||
|
||||
|
||||
@@ -2,12 +2,8 @@
|
||||
// Created by kj16609 on 7/5/25.
|
||||
//
|
||||
#pragma once
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Weffc++"
|
||||
#pragma GCC diagnostic ignored "-Wduplicated-branches"
|
||||
#include <glm/mat3x3.hpp>
|
||||
#include <glm/mat4x4.hpp>
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
#include "rendering/RenderingFormats.hpp"
|
||||
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
|
||||
#include <tracy/Tracy.hpp>
|
||||
|
||||
#include "engine/assets/model/Primitive.hpp"
|
||||
#include "engine/assets/model/ModelVertex.hpp"
|
||||
#include "engine/assets/model/Primitive.hpp"
|
||||
|
||||
namespace fgl::engine
|
||||
{
|
||||
@@ -23,7 +23,8 @@ namespace fgl::engine
|
||||
throw std::runtime_error( "Unknown model file extension" );
|
||||
}
|
||||
|
||||
void ModelBuilder::loadVerts( const std::vector< ModelVertex >& verts, const std::vector< std::uint32_t >& indicies )
|
||||
void ModelBuilder::
|
||||
loadVerts( const std::vector< ModelVertex >& verts, const std::vector< std::uint32_t >& indicies )
|
||||
{
|
||||
ZoneScoped;
|
||||
VertexBufferSuballocation vertex_suballoc { this->m_vertex_buffer, verts };
|
||||
|
||||
@@ -24,8 +24,7 @@ namespace fgl::engine
|
||||
|
||||
ModelBuilder() = delete;
|
||||
|
||||
ModelBuilder(
|
||||
const memory::Buffer& parent_vertex_buffer, const memory::Buffer& parent_index_buffer ) :
|
||||
ModelBuilder( const memory::Buffer& parent_vertex_buffer, const memory::Buffer& parent_index_buffer ) :
|
||||
m_vertex_buffer( parent_vertex_buffer ),
|
||||
m_index_buffer( parent_index_buffer )
|
||||
{}
|
||||
|
||||
@@ -4,15 +4,8 @@
|
||||
|
||||
#include "SceneBuilder.hpp"
|
||||
|
||||
#include "engine/assets/model/Model.hpp"
|
||||
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wold-style-cast"
|
||||
#pragma GCC diagnostic ignored "-Weffc++"
|
||||
#include "objectloaders/tiny_gltf.h"
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
#include "assets/model/ModelVertex.hpp"
|
||||
#include "engine/assets/model/Model.hpp"
|
||||
#include "engine/assets/stores.hpp"
|
||||
#include "engine/camera/RenderCamera.hpp"
|
||||
#include "engine/debug/logging/logging.hpp"
|
||||
@@ -20,6 +13,7 @@
|
||||
#include "engine/gameobjects/GameObject.hpp"
|
||||
#include "gameobjects/components/TransformComponent.hpp"
|
||||
#include "mikktspace/mikktspace.hpp"
|
||||
#include "objectloaders/tiny_gltf.h"
|
||||
|
||||
namespace fgl::engine
|
||||
{
|
||||
|
||||
@@ -4,14 +4,10 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Weffc++"
|
||||
#pragma GCC diagnostic ignored "-Wduplicated-branches"
|
||||
#define GLM_ENABLE_EXPERIMENTAL
|
||||
#include <glm/gtx/hash.hpp>
|
||||
#include <glm/vec2.hpp>
|
||||
#include <glm/vec3.hpp>
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
#include <filesystem>
|
||||
#include <vector>
|
||||
|
||||
@@ -2,11 +2,7 @@
|
||||
// Created by kj16609 on 5/18/24.
|
||||
//
|
||||
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wold-style-cast"
|
||||
#pragma GCC diagnostic ignored "-Weffc++"
|
||||
#include <objectloaders/tiny_obj_loader.h>
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
#include <fstream>
|
||||
#include <unordered_map>
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace fgl::engine
|
||||
{
|
||||
class Texture;
|
||||
|
||||
using TextureStore = AssetStore< Texture>;
|
||||
using TextureStore = AssetStore< Texture >;
|
||||
|
||||
TextureStore& getTextureStore();
|
||||
|
||||
|
||||
@@ -10,15 +10,9 @@
|
||||
#include "engine/debug/logging/logging.hpp"
|
||||
#include "engine/descriptors/DescriptorSet.hpp"
|
||||
#include "engine/math/noise/perlin/generator.hpp"
|
||||
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Weffc++"
|
||||
#pragma GCC diagnostic ignored "-Wold-style-cast"
|
||||
#pragma GCC diagnostic ignored "-Wconversion"
|
||||
#include "engine/utility/IDPool.hpp"
|
||||
#include "imgui/backends/imgui_impl_vulkan.h"
|
||||
#include "objectloaders/stb_image.h"
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
namespace fgl::engine
|
||||
{
|
||||
|
||||
@@ -4,21 +4,15 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Weffc++"
|
||||
#pragma GCC diagnostic ignored "-Wduplicated-branches"
|
||||
#define GLM_ENABLE_EXPERIMENTAL
|
||||
#include <glm/glm.hpp>
|
||||
#include <glm/gtx/string_cast.hpp>
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
#include "CameraViewpoint.hpp"
|
||||
#include "CompositeSwapchain.hpp"
|
||||
#include "GBufferSwapchain.hpp"
|
||||
#include "debug/Track.hpp"
|
||||
#include "engine/descriptors/DescriptorSet.hpp"
|
||||
#include "engine/memory/buffers/HostSingleT.hpp"
|
||||
#include "engine/memory/buffers/UniqueFrameSuballocation.hpp"
|
||||
#include "engine/primitives/Frustum.hpp"
|
||||
#include "engine/rendering/types.hpp"
|
||||
|
||||
|
||||
@@ -10,16 +10,12 @@ namespace fgl::engine
|
||||
{
|
||||
template < typename T >
|
||||
concept is_bindable_buffer = requires( T t ) {
|
||||
{
|
||||
t.descriptorInfo()
|
||||
} -> std::same_as< vk::DescriptorBufferInfo >;
|
||||
{ t.descriptorInfo() } -> std::same_as< vk::DescriptorBufferInfo >;
|
||||
};
|
||||
|
||||
template < typename T >
|
||||
concept is_bindable_image = requires( T t ) {
|
||||
{
|
||||
t.descriptorInfo()
|
||||
} -> std::same_as< vk::DescriptorImageInfo >;
|
||||
{ t.descriptorInfo() } -> std::same_as< vk::DescriptorImageInfo >;
|
||||
};
|
||||
|
||||
template < typename T > concept is_bindable = is_bindable_image< T > || is_bindable_buffer< T >;
|
||||
|
||||
@@ -10,8 +10,6 @@ namespace fgl::engine
|
||||
{
|
||||
template < typename T >
|
||||
concept is_constant_range = requires( T t ) {
|
||||
{
|
||||
t.m_range
|
||||
} -> std::same_as< const vk::PushConstantRange& >;
|
||||
{ t.m_range } -> std::same_as< const vk::PushConstantRange& >;
|
||||
};
|
||||
} // namespace fgl::engine
|
||||
@@ -9,15 +9,9 @@ namespace fgl::engine
|
||||
|
||||
template < typename T >
|
||||
concept is_image = requires( T a ) {
|
||||
{
|
||||
a.getVkImage()
|
||||
} -> std::same_as< vk::Image& >;
|
||||
{
|
||||
a.format()
|
||||
} -> std::same_as< vk::Format >;
|
||||
{
|
||||
a.extent()
|
||||
} -> std::same_as< vk::Extent2D >;
|
||||
{ a.getVkImage() } -> std::same_as< vk::Image& >;
|
||||
{ a.format() } -> std::same_as< vk::Format >;
|
||||
{ a.extent() } -> std::same_as< vk::Extent2D >;
|
||||
};
|
||||
|
||||
}
|
||||
} // namespace fgl::engine
|
||||
@@ -4,11 +4,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Weffc++"
|
||||
#include <glm/mat4x4.hpp>
|
||||
#include <glm/vec3.hpp>
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
#include "types.hpp"
|
||||
|
||||
|
||||
@@ -4,12 +4,8 @@
|
||||
|
||||
#include "glm.hpp"
|
||||
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Weffc++"
|
||||
#pragma GCC diagnostic ignored "-Wduplicated-branches"
|
||||
#define GLM_ENABLE_EXPERIMENTAL
|
||||
#include <glm/gtx/quaternion.hpp>
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
std::format_context::iterator std::formatter< glm::qua< float > >::format( const glm::quat& quat, format_context& ctx )
|
||||
const
|
||||
|
||||
@@ -4,11 +4,7 @@
|
||||
|
||||
#include "matrix.hpp"
|
||||
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Weffc++"
|
||||
#pragma GCC diagnostic ignored "-Wduplicated-branches"
|
||||
#include <glm/glm.hpp>
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
std::format_context::iterator std::formatter< glm::vec4 >::format( const glm::vec4& vec, format_context& ctx ) const
|
||||
{
|
||||
|
||||
@@ -4,17 +4,11 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wold-style-cast"
|
||||
#pragma GCC diagnostic ignored "-Weffc++"
|
||||
#pragma GCC diagnostic ignored "-Wnon-virtual-dtor"
|
||||
#pragma GCC diagnostic ignored "-Wnoexcept"
|
||||
#include <spdlog/spdlog.h>
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
#include "formatters/filesystem.hpp"
|
||||
#include "formatters/matrix.hpp"
|
||||
#include "formatters/glm.hpp"
|
||||
#include "formatters/matrix.hpp"
|
||||
|
||||
namespace fgl::engine::log
|
||||
{
|
||||
|
||||
@@ -5,12 +5,7 @@
|
||||
#include "FlameGraph.hpp"
|
||||
|
||||
#include <cassert>
|
||||
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wold-style-cast"
|
||||
#pragma GCC diagnostic ignored "-Weffc++"
|
||||
#include <imgui.h>
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
#include "engine/FGL_DEFINES.hpp"
|
||||
#include "engine/clock.hpp"
|
||||
@@ -30,9 +25,9 @@ namespace fgl::engine::debug
|
||||
|
||||
using Duration = ProfilingClock::duration;
|
||||
|
||||
Duration getDuration() const { return m_end - m_start; }
|
||||
[[nodiscard]] Duration getDuration() const { return m_end - m_start; }
|
||||
|
||||
Duration getTotalTime() const
|
||||
[[nodiscard]] Duration getTotalTime() const
|
||||
{
|
||||
if ( m_parent != nullptr ) return m_parent->getTotalTime();
|
||||
|
||||
|
||||
@@ -17,7 +17,6 @@ namespace fgl::engine
|
||||
namespace fgl::engine::descriptors
|
||||
{
|
||||
|
||||
|
||||
class DescriptorPool
|
||||
{
|
||||
vk::raii::DescriptorPool m_pool;
|
||||
|
||||
@@ -4,13 +4,9 @@
|
||||
|
||||
#include "drawers.hpp"
|
||||
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Weffc++"
|
||||
#pragma GCC diagnostic ignored "-Wold-style-cast"
|
||||
#include <imgui.h>
|
||||
|
||||
#include "editor/src/gui/helpers.hpp"
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
namespace fgl::engine
|
||||
{
|
||||
|
||||
@@ -4,11 +4,7 @@
|
||||
|
||||
#include "ComponentEditorInterface.hpp"
|
||||
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Weffc++"
|
||||
#pragma GCC diagnostic ignored "-Wold-style-cast"
|
||||
#include <imgui.h>
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
namespace fgl::engine
|
||||
{
|
||||
|
||||
@@ -4,11 +4,7 @@
|
||||
|
||||
#include "GameObjectComponent.hpp"
|
||||
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Weffc++"
|
||||
#pragma GCC diagnostic ignored "-Wold-style-cast"
|
||||
#include <imgui.h>
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
namespace fgl::engine
|
||||
{
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
//
|
||||
#include "GlobalIlluminator.hpp"
|
||||
|
||||
|
||||
namespace fgl::engine::lights
|
||||
{
|
||||
|
||||
|
||||
@@ -20,8 +20,6 @@ namespace fgl::engine::intersections
|
||||
return top_in_range && bottom_in_range;
|
||||
}
|
||||
|
||||
|
||||
|
||||
template bool contains< CS::World >( const AxisAlignedBoundingBox< CS::World >&, const Coordinate< CS::World >& );
|
||||
|
||||
} // namespace fgl::engine::intersections
|
||||
|
||||
@@ -4,12 +4,7 @@
|
||||
|
||||
#include "generator.hpp"
|
||||
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Weffc++"
|
||||
#include <glm/geometric.hpp>
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
|
||||
#include <tracy/Tracy.hpp>
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
@@ -4,10 +4,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Weffc++"
|
||||
#include <glm/vec2.hpp>
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
#include <vector>
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
namespace fgl::engine::memory
|
||||
{
|
||||
|
||||
void deferredDelete( auto&& item ) {}
|
||||
void deferredDelete( auto&& item )
|
||||
{}
|
||||
|
||||
}
|
||||
} // namespace fgl::engine::memory
|
||||
|
||||
@@ -26,7 +26,8 @@ namespace fgl::engine
|
||||
HostSingleT( HostSingleT&& ) = delete;
|
||||
HostSingleT& operator=( const HostSingleT& ) = delete;
|
||||
|
||||
HostSingleT( const memory::Buffer& buffer ) : memory::BufferSuballocation( buffer, sizeof( T ), alignof( T ) ) {}
|
||||
HostSingleT( const memory::Buffer& buffer ) : memory::BufferSuballocation( buffer, sizeof( T ), alignof( T ) )
|
||||
{}
|
||||
|
||||
HostSingleT& operator=( T& t )
|
||||
{
|
||||
|
||||
@@ -4,10 +4,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Weffc++"
|
||||
#include <glm/vec3.hpp>
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
#include <cmath>
|
||||
|
||||
|
||||
@@ -17,29 +17,17 @@ namespace fgl::engine
|
||||
|
||||
template < typename T >
|
||||
concept has_space_type = requires( const T t ) {
|
||||
{
|
||||
T::SpaceType
|
||||
} -> std::same_as< CoordinateSpace >;
|
||||
{ T::SpaceType } -> std::same_as< CoordinateSpace >;
|
||||
};
|
||||
|
||||
template < typename T >
|
||||
concept is_bounding_box = requires( const T t ) {
|
||||
requires has_space_type< T >;
|
||||
{
|
||||
t.right()
|
||||
} -> is_normal_vector;
|
||||
{
|
||||
t.up()
|
||||
} -> is_normal_vector;
|
||||
{
|
||||
t.forward()
|
||||
} -> is_normal_vector;
|
||||
{
|
||||
t.topLeftForward()
|
||||
} -> is_coordinate;
|
||||
{
|
||||
t.bottomLeftBack()
|
||||
} -> is_coordinate;
|
||||
{ t.right() } -> is_normal_vector;
|
||||
{ t.up() } -> is_normal_vector;
|
||||
{ t.forward() } -> is_normal_vector;
|
||||
{ t.topLeftForward() } -> is_coordinate;
|
||||
{ t.bottomLeftBack() } -> is_coordinate;
|
||||
};
|
||||
|
||||
} // namespace fgl::engine
|
||||
|
||||
@@ -4,10 +4,7 @@
|
||||
|
||||
#include "LineBase.hpp"
|
||||
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Weffc++"
|
||||
#include <glm/geometric.hpp>
|
||||
#pragma GCC diagnostic push
|
||||
|
||||
namespace fgl::engine
|
||||
{
|
||||
|
||||
@@ -4,10 +4,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Weffc++"
|
||||
#include <glm/vec3.hpp>
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
namespace fgl::engine
|
||||
{
|
||||
|
||||
@@ -4,12 +4,9 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wduplicated-branches"
|
||||
#define GLM_ENABLE_EXPERIMENTAL
|
||||
#include <glm/gtc/quaternion.hpp>
|
||||
#include <glm/gtx/matrix_decompose.hpp>
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
#include "MatrixEvolvedTypes.hpp"
|
||||
|
||||
|
||||
@@ -82,9 +82,7 @@ namespace fgl::engine
|
||||
//! Checks if CType can be evolved by MType. (The input type must match the input matrix type)
|
||||
template < CoordinateSpace CType, MatrixType MType >
|
||||
concept can_be_evolved = requires() {
|
||||
{
|
||||
DevolvedType< MType >() == CType
|
||||
};
|
||||
{ DevolvedType< MType >() == CType };
|
||||
};
|
||||
|
||||
} // namespace fgl::engine
|
||||
|
||||
@@ -4,10 +4,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Weffc++"
|
||||
#include <glm/mat3x3.hpp>
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
namespace fgl::engine
|
||||
{
|
||||
|
||||
@@ -2,10 +2,7 @@
|
||||
// Created by kj16609 on 2/28/24.
|
||||
//
|
||||
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Weffc++"
|
||||
#include <glm/ext/matrix_transform.hpp>
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
#include "RotationMatrix.hpp"
|
||||
#include "engine/primitives/vectors/NormalVector.hpp"
|
||||
@@ -24,6 +21,4 @@ namespace fgl::engine
|
||||
return Vector( static_cast< glm::mat3 >( rot_mat ) * vec.vec() );
|
||||
}
|
||||
|
||||
|
||||
|
||||
} // namespace fgl::engine
|
||||
|
||||
@@ -21,24 +21,12 @@ namespace fgl::engine
|
||||
|
||||
template < typename T >
|
||||
concept is_plane = requires( T t ) {
|
||||
{
|
||||
T::SpaceType
|
||||
} -> std::same_as< const CoordinateSpace& >;
|
||||
{
|
||||
t.distance()
|
||||
} -> std::same_as< float >;
|
||||
{
|
||||
t.getPosition()
|
||||
} -> is_coordinate;
|
||||
{
|
||||
t.getDirection()
|
||||
} -> is_normal_vector;
|
||||
{
|
||||
t.isForward( std::declval< Coordinate< T::SpaceType > >() )
|
||||
} -> std::same_as< bool >;
|
||||
{
|
||||
t.mapToPlane( std::declval< Coordinate< T::SpaceType > >() )
|
||||
} -> is_coordinate;
|
||||
{ T::SpaceType } -> std::same_as< const CoordinateSpace& >;
|
||||
{ t.distance() } -> std::same_as< float >;
|
||||
{ t.getPosition() } -> is_coordinate;
|
||||
{ t.getDirection() } -> is_normal_vector;
|
||||
{ t.isForward( std::declval< Coordinate< T::SpaceType > >() ) } -> std::same_as< bool >;
|
||||
{ t.mapToPlane( std::declval< Coordinate< T::SpaceType > >() ) } -> is_coordinate;
|
||||
};
|
||||
|
||||
} // namespace fgl::engine
|
||||
@@ -4,11 +4,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Weffc++"
|
||||
#pragma GCC diagnostic ignored "-Wduplicated-branches"
|
||||
#include <glm/glm.hpp>
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
#include "engine/constants.hpp"
|
||||
#include "engine/primitives/CoordinateSpace.hpp"
|
||||
|
||||
@@ -11,15 +11,9 @@ namespace fgl::engine
|
||||
template < typename T >
|
||||
concept is_coordinate = requires( T t ) {
|
||||
requires std::is_base_of_v< glm::vec3, T >;
|
||||
{
|
||||
t.up()
|
||||
} -> std::same_as< float& >;
|
||||
{
|
||||
t.right()
|
||||
} -> std::same_as< float& >;
|
||||
{
|
||||
t.forward()
|
||||
} -> std::same_as< float& >;
|
||||
{ t.up() } -> std::same_as< float& >;
|
||||
{ t.right() } -> std::same_as< float& >;
|
||||
{ t.forward() } -> std::same_as< float& >;
|
||||
};
|
||||
|
||||
}
|
||||
} // namespace fgl::engine
|
||||
|
||||
@@ -3,12 +3,8 @@
|
||||
//
|
||||
#pragma once
|
||||
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Weffc++"
|
||||
#include "glm/vec3.hpp"
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
#include "QuatRotation.hpp"
|
||||
#include "glm/vec3.hpp"
|
||||
|
||||
namespace fgl::engine
|
||||
{
|
||||
|
||||
@@ -13,7 +13,6 @@
|
||||
namespace fgl::engine
|
||||
{
|
||||
|
||||
|
||||
QuatRotation::QuatRotation() : QuatRotation( 0.0f )
|
||||
{}
|
||||
|
||||
@@ -44,7 +43,8 @@ namespace fgl::engine
|
||||
return glm::normalize( q );
|
||||
}
|
||||
|
||||
QuatRotation::QuatRotation( const float x_i, const float y_i, const float z_i ) : glm::quat( toQuat( x_i, y_i, z_i ) )
|
||||
QuatRotation::QuatRotation( const float x_i, const float y_i, const float z_i ) :
|
||||
glm::quat( toQuat( x_i, y_i, z_i ) )
|
||||
{}
|
||||
|
||||
QuatRotation::QuatRotation( const float value ) : QuatRotation( value, value, value )
|
||||
|
||||
@@ -4,12 +4,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Weffc++"
|
||||
#pragma GCC diagnostic ignored "-Wduplicated-branches"
|
||||
#include <glm/glm/glm.hpp>
|
||||
#include <glm/glm/gtc/quaternion.hpp>
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
#define GLM_ENABLE_EXPERIMENTAL
|
||||
#include <glm/fwd.hpp>
|
||||
|
||||
@@ -4,11 +4,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Weffc++"
|
||||
#include <glm/geometric.hpp>
|
||||
#include <glm/vec3.hpp>
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
#include "engine/primitives/CoordinateSpace.hpp"
|
||||
|
||||
|
||||
@@ -4,10 +4,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Weffc++"
|
||||
#include <glm/vec3.hpp>
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
#include "engine/FGL_DEFINES.hpp"
|
||||
#include "engine/constants.hpp"
|
||||
|
||||
@@ -104,6 +104,7 @@ namespace fgl::engine
|
||||
vk::PhysicalDeviceProperties m_properties;
|
||||
|
||||
vk::CommandPoolCreateInfo commandPoolInfo();
|
||||
|
||||
CommandBufferPool& getCmdBufferPool() { return m_command_pool; }
|
||||
|
||||
Device( Window&, Instance& );
|
||||
|
||||
@@ -117,7 +117,7 @@ namespace fgl::engine
|
||||
usage | vk::ImageUsageFlagBits::eInputAttachment | extra_flags,
|
||||
vk::ImageLayout::eUndefined,
|
||||
final_layout ) ) };
|
||||
image_views.emplace_back( itter->getView( ) );
|
||||
image_views.emplace_back( itter->getView() );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -134,7 +134,7 @@ namespace fgl::engine
|
||||
for ( std::uint32_t i = 0; i < count; ++i )
|
||||
{
|
||||
m_attachment_resources.m_images.emplace_back( image );
|
||||
m_attachment_resources.m_image_views.emplace_back( image->getView( ) );
|
||||
m_attachment_resources.m_image_views.emplace_back( image->getView() );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -6,19 +6,9 @@
|
||||
|
||||
#include <cassert>
|
||||
#include <fstream>
|
||||
#include <variant>
|
||||
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wnon-virtual-dtor"
|
||||
#pragma GCC diagnostic ignored "-Wzero-as-null-pointer-constant"
|
||||
#pragma GCC diagnostic ignored "-Wold-style-cast"
|
||||
#pragma GCC diagnostic ignored "-Wuseless-cast"
|
||||
#pragma GCC diagnostic ignored "-Wredundant-tags"
|
||||
#pragma GCC diagnostic ignored "-Wcast-qual"
|
||||
#pragma GCC diagnostic ignored "-Weffc++"
|
||||
#include <slang-com-ptr.h>
|
||||
#include <slang.h>
|
||||
#pragma GCC diagnostic pop
|
||||
#include <variant>
|
||||
|
||||
#include "engine/FGL_DEFINES.hpp"
|
||||
#include "engine/constants.hpp"
|
||||
|
||||
@@ -17,9 +17,7 @@ namespace fgl::engine
|
||||
|
||||
template < typename T >
|
||||
concept is_subpass = requires( T a ) {
|
||||
{
|
||||
a.description()
|
||||
} -> std::same_as< vk::SubpassDescription >;
|
||||
{ a.description() } -> std::same_as< vk::SubpassDescription >;
|
||||
};
|
||||
|
||||
template < typename T >
|
||||
|
||||
@@ -14,23 +14,15 @@ namespace fgl::engine
|
||||
|
||||
template < typename T >
|
||||
concept is_system = requires( T t, FrameInfo info ) {
|
||||
{
|
||||
t.pass( info )
|
||||
};
|
||||
{ t.pass( info ) };
|
||||
};
|
||||
|
||||
template < typename T >
|
||||
concept is_threaded_system = requires( T t, FrameInfo info ) {
|
||||
requires is_system< T >;
|
||||
{
|
||||
t.startPass( info )
|
||||
};
|
||||
{
|
||||
t.wait()
|
||||
};
|
||||
{
|
||||
t.setupSystem( info )
|
||||
} -> std::same_as< vk::raii::CommandBuffer& >;
|
||||
{ t.startPass( info ) };
|
||||
{ t.wait() };
|
||||
{ t.setupSystem( info ) } -> std::same_as< vk::raii::CommandBuffer& >;
|
||||
};
|
||||
|
||||
} // namespace fgl::engine
|
||||
|
||||
Reference in New Issue
Block a user