Skip to content

Commit 48dc716

Browse files
fix a bug to do with the types of IImageView::remaining_... also add some nice defaults to the creation parameters
1 parent 98b05e5 commit 48dc716

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

include/nbl/asset/IImageView.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ template<class ImageType>
1515
class IImageView : public IDescriptor
1616
{
1717
public:
18-
static inline constexpr size_t remaining_mip_levels = ~static_cast<size_t>(0u);
19-
static inline constexpr size_t remaining_array_layers = ~static_cast<size_t>(0u);
18+
static inline constexpr uint32_t remaining_mip_levels = ~static_cast<uint32_t>(0u);
19+
static inline constexpr uint32_t remaining_array_layers = ~static_cast<uint32_t>(0u);
2020

2121
// no flags for now, yet
2222
enum E_CREATE_FLAGS
@@ -89,8 +89,8 @@ class IImageView : public IDescriptor
8989
core::smart_refctd_ptr<ImageType> image;
9090
E_TYPE viewType;
9191
E_FORMAT format;
92-
SComponentMapping components;
93-
IImage::SSubresourceRange subresourceRange;
92+
SComponentMapping components = {};
93+
IImage::SSubresourceRange subresourceRange = {IImage::EAF_COLOR_BIT,0,remaining_mip_levels,0,remaining_array_layers};
9494
};
9595
//!
9696
inline static bool validateCreationParameters(const SCreationParams& _params)

0 commit comments

Comments
 (0)