Cleanup some warnings

This commit is contained in:
2024-06-17 06:50:44 -04:00
parent e1890a6dc6
commit 7e6a43acb6
8 changed files with 23 additions and 13 deletions

View File

@@ -109,7 +109,7 @@
set(FGL_CONFIG "-std=c++23 -fmax-errors=3 -fconcepts-diagnostics-depth=8 -march=native -flto -ftree-vectorize")
#if (DEFINED USE_WERROR)
#set(FGL_CONFIG "${FGL_CONFIG} -Werror")
# set(FGL_CONFIG "${FGL_CONFIG} -Werror")
#endif ()
# Safe for debug

View File

@@ -4,9 +4,13 @@
#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 "constants.hpp"
#include "engine/primitives/Frustum.hpp"

View File

@@ -47,7 +47,7 @@ namespace fgl::engine
//! Assets needing to be staged
//TODO: ASYNC Ring buffer queue
std::queue< std::shared_ptr< T > > to_stage;
std::queue< std::shared_ptr< T > > to_stage {};
//TODO: Add tracy monitor to mutex
std::mutex queue_mtx {};

View File

@@ -7,7 +7,11 @@
namespace fgl::engine
{
ImageView::ImageView( std::shared_ptr< ImageHandle >& img ) : m_resource( img ), m_sampler()
ImageView::ImageView( std::shared_ptr< ImageHandle >& img ) :
m_resource( img ),
m_descriptor_info(),
m_image_view( VK_NULL_HANDLE ),
m_sampler()
{
vk::ImageViewCreateInfo view_info {};
view_info.image = img->getVkImage();

View File

@@ -21,12 +21,12 @@ namespace fgl::engine
{
std::shared_ptr< ImageHandle > m_resource;
vk::DescriptorImageInfo m_descriptor_info;
vk::ImageView m_image_view;
Sampler m_sampler;
vk::DescriptorImageInfo m_descriptor_info {};
vk::ImageView m_image_view { VK_NULL_HANDLE };
public:
void setName( const std::string str );

View File

@@ -52,7 +52,8 @@ namespace fgl::engine
m_vertex_buffer( std::move( vertex_buffer ) ),
m_index_buffer( std::move( index_buffer ) ),
m_bounding_box( bounding_box ),
m_mode( mode )
m_mode( mode ),
m_texture( nullptr )
{}
Primitive(

View File

@@ -165,10 +165,11 @@ namespace fgl::engine
return pointInside( t );
}
inline static bool check_points { true };
inline static bool check_lines { true };
inline static bool check_single_line { false };
inline static int line_id { 0 };
//TODO: Implement frustum debug menu
[[maybe_unused]] inline static bool check_points { true };
[[maybe_unused]] inline static bool check_lines { true };
[[maybe_unused]] inline static bool check_single_line { false };
[[maybe_unused]] inline static int line_id { 0 };
void imGuiFrustumSettings()
{

View File

@@ -24,7 +24,7 @@ namespace fgl::engine
using TextureStore = AssetStore< Texture >;
//TODO: Implement texture handle map to avoid loading the same texture multiple times
class Texture final : public AssetInterface< Texture >, public std::enable_shared_from_this< Texture >
class Texture final : public AssetInterface< Texture >
{
template < typename T >
friend class AssetStore;