Skip to content

Commit c5f9d77

Browse files
author
devsh
committed
get ImGUI to compile again
1 parent 27be790 commit c5f9d77

File tree

2 files changed

+165
-189
lines changed

2 files changed

+165
-189
lines changed

include/nbl/ext/ImGui/ImGui.h

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class UI final : public core::IReferenceCounted
1010
{
1111
public:
1212
//! Reserved font atlas indicies for default backend textures & samplers descriptor binding's array, remember you can still override font's indices at runtime and don't have to use those at all
13-
static constexpr auto FontAtlasTexId = 0u, FontAtlasSamplerId = 0u;
13+
static constexpr inline auto FontAtlasTexId = 0u, FontAtlasSamplerId = 0u;
1414

1515
//! Reserved indexes for default backend samplers descriptor binding's array - use only if you created your pipeline layout with createDefaultPipelineLayout. If you need more or custom samplers then create the pipeline layout yourself
1616
enum class DefaultSamplerIx : uint16_t
@@ -23,45 +23,45 @@ class UI final : public core::IReferenceCounted
2323

2424
struct SResourceParameters
2525
{
26-
//! for a given pipeline layout we need to know what is intended for UI resources
27-
struct SBindingInfo
28-
{
29-
//! descriptor set index for a resource
30-
uint32_t setIx,
26+
//! for a given pipeline layout we need to know what is intended for UI resources
27+
struct SBindingInfo
28+
{
29+
//! descriptor set index for a resource
30+
uint32_t setIx,
3131

32-
//! binding index for a given resource
33-
bindingIx;
34-
};
32+
//! binding index for a given resource
33+
bindingIx;
34+
};
3535

36-
using binding_flags_t = video::IGPUDescriptorSetLayout::SBinding::E_CREATE_FLAGS;
36+
using binding_flags_t = video::IGPUDescriptorSetLayout::SBinding::E_CREATE_FLAGS;
3737

38-
//! required textures binding creation flags
39-
static constexpr auto TexturesRequiredCreateFlags = core::bitflag(binding_flags_t::ECF_UPDATE_AFTER_BIND_BIT) | binding_flags_t::ECF_PARTIALLY_BOUND_BIT | binding_flags_t::ECF_UPDATE_UNUSED_WHILE_PENDING_BIT;
38+
//! required textures binding creation flags
39+
static constexpr inline auto TexturesRequiredCreateFlags = core::bitflag(binding_flags_t::ECF_UPDATE_AFTER_BIND_BIT) | binding_flags_t::ECF_PARTIALLY_BOUND_BIT | binding_flags_t::ECF_UPDATE_UNUSED_WHILE_PENDING_BIT;
4040

41-
//! required samplers binding creation flags
42-
static constexpr auto SamplersRequiredCreateFlags = core::bitflag(binding_flags_t::ECF_UPDATE_AFTER_BIND_BIT);
41+
//! required samplers binding creation flags
42+
static constexpr inline auto SamplersRequiredCreateFlags = core::bitflag(binding_flags_t::ECF_UPDATE_AFTER_BIND_BIT);
4343

44-
//! required shader stage flags
45-
static constexpr auto RequiredShaderStageFlags = asset::IShader::E_SHADER_STAGE::ESS_FRAGMENT;
44+
//! required shader stage flags
45+
static constexpr inline auto RequiredShaderStageFlags = asset::IShader::E_SHADER_STAGE::ESS_FRAGMENT;
4646

47-
//! required, fill the info to instruct the backend about the required UI resources
48-
SBindingInfo texturesInfo, samplersInfo;
47+
//! required, fill the info to instruct the backend about the required UI resources
48+
SBindingInfo texturesInfo, samplersInfo;
4949

5050
private:
5151
uint32_t texturesCount = {}, samplersCount = {};
5252

53-
friend class UI;
53+
friend class UI;
5454
};
5555

5656
struct SCachedCreationParams
5757
{
5858
using streaming_buffer_t = video::StreamingTransientDataBufferST<core::allocator<uint8_t>>;
5959

6060
//! required buffer allocate flags
61-
static constexpr auto RequiredAllocateFlags = core::bitflag<video::IDeviceMemoryAllocation::E_MEMORY_ALLOCATE_FLAGS>(video::IDeviceMemoryAllocation::EMAF_DEVICE_ADDRESS_BIT);
61+
static constexpr inline auto RequiredAllocateFlags = core::bitflag<video::IDeviceMemoryAllocation::E_MEMORY_ALLOCATE_FLAGS>(video::IDeviceMemoryAllocation::EMAF_DEVICE_ADDRESS_BIT);
6262

6363
//! required buffer usage flags
64-
static constexpr auto RequiredUsageFlags = core::bitflag(asset::IBuffer::EUF_INDIRECT_BUFFER_BIT) | asset::IBuffer::EUF_INDEX_BUFFER_BIT | asset::IBuffer::EUF_VERTEX_BUFFER_BIT | asset::IBuffer::EUF_SHADER_DEVICE_ADDRESS_BIT;
64+
static constexpr inline auto RequiredUsageFlags = core::bitflag(asset::IBuffer::EUF_INDIRECT_BUFFER_BIT) | asset::IBuffer::EUF_INDEX_BUFFER_BIT | asset::IBuffer::EUF_VERTEX_BUFFER_BIT | asset::IBuffer::EUF_SHADER_DEVICE_ADDRESS_BIT;
6565

6666
//! required, you provide us information about your required UI binding resources which we validate at creation time
6767
SResourceParameters resources;
@@ -163,7 +163,7 @@ class UI final : public core::IReferenceCounted
163163
static core::smart_refctd_ptr<video::IGPUGraphicsPipeline> createPipeline(SCreationParameters& creationParams);
164164
static bool createMDIBuffer(SCreationParameters& creationParams);
165165
// NOTE: in the future this will also need a compute queue to do mip-maps
166-
static video::ISemaphore::future_t<video::IQueue::RESULT> createFontAtlasTexture(const SCreationParameters& creationParams, void* const imFontAtlas, core::smart_refctd_ptr<video::IGPUImageView>& outFontView);
166+
static core::smart_refctd_ptr<video::IGPUImageView> createFontAtlasTexture(const SCreationParameters& creationParams, void* const imFontAtlas);
167167

168168
void handleMouseEvents(const SUpdateParameters& params) const;
169169
void handleKeyEvents(const SUpdateParameters& params) const;

0 commit comments

Comments
 (0)