Added vertex attributes
This commit is contained in:
parent
506d3a1c35
commit
8f7d8cd8bc
|
@ -305,7 +305,16 @@ namespace SHADE
|
||||||
|
|
||||||
void SHImGuiVulkanBackend::SHBreachInstance::InitializePipeline(ImGuiIO& io) noexcept
|
void SHImGuiVulkanBackend::SHBreachInstance::InitializePipeline(ImGuiIO& io) noexcept
|
||||||
{
|
{
|
||||||
|
SHVertexInputState vInputState{};
|
||||||
|
vInputState.AddBinding(false, true,
|
||||||
|
{
|
||||||
|
SHVertexAttribute(SHAttribFormat::FLOAT_2D),
|
||||||
|
SHVertexAttribute(SHAttribFormat::FLOAT_2D),
|
||||||
|
SHVertexAttribute(SHAttribFormat::UINT32_1D),
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
//Handle<SHVkPipeline> newPipeline = device->CreatePipeline()
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
|
@ -35,11 +35,13 @@ namespace SHADE
|
||||||
struct SHBreachInstance : public SHImGuiWindow
|
struct SHBreachInstance : public SHImGuiWindow
|
||||||
{
|
{
|
||||||
Handle<SHVkPipeline> pipeline;
|
Handle<SHVkPipeline> pipeline;
|
||||||
|
Handle<SHVkRenderpass> renderpass;
|
||||||
std::chrono::time_point<std::chrono::steady_clock> lastFrameTime;
|
std::chrono::time_point<std::chrono::steady_clock> lastFrameTime;
|
||||||
Handle<SHVkImage> fontsTexture;
|
Handle<SHVkImage> fontsTexture;
|
||||||
std::vector<uint32_t> fontsMipOffset;
|
std::vector<uint32_t> fontsMipOffset;
|
||||||
public:
|
public:
|
||||||
void CreateFontsTexture (Handle<SHVkImage> image, ImGuiIO& io) noexcept;
|
void CreateFontsTexture (Handle<SHVkImage> image, ImGuiIO& io) noexcept;
|
||||||
|
void InitializeRenderpass (void) noexcept;
|
||||||
void InitializePipeline(ImGuiIO& io) noexcept;
|
void InitializePipeline(ImGuiIO& io) noexcept;
|
||||||
};
|
};
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -117,7 +117,7 @@ namespace SHADE
|
||||||
dirty = isDirty;
|
dirty = isDirty;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::tuple<uint32_t, uint32_t, vk::Format> SHVertexInputState::GetInfoFromAttribFormat(SHAttribFormat attribFormat) const noexcept
|
std::tuple<SHVertexInputState::numAttribSlots, SHVertexInputState::bytesRequired, vk::Format> SHVertexInputState::GetInfoFromAttribFormat(SHAttribFormat attribFormat) const noexcept
|
||||||
{
|
{
|
||||||
switch (attribFormat)
|
switch (attribFormat)
|
||||||
{
|
{
|
||||||
|
@ -138,6 +138,9 @@ namespace SHADE
|
||||||
case SHAttribFormat::MAT_4D:
|
case SHAttribFormat::MAT_4D:
|
||||||
return std::make_tuple(4, 16, vk::Format::eR32G32B32A32Sfloat);
|
return std::make_tuple(4, 16, vk::Format::eR32G32B32A32Sfloat);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case SHAttribFormat::UINT32_1D:
|
||||||
|
return std::make_tuple(1, 4, vk::Format::eR32Uint);
|
||||||
}
|
}
|
||||||
return std::make_tuple(0, 0, vk::Format::eR32Sfloat);
|
return std::make_tuple(0, 0, vk::Format::eR32Sfloat);
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,7 +18,10 @@ namespace SHADE
|
||||||
// that a mat2 can be interpreted as (x, y, x, y), (o, o, o, o) instead of (x, y, o, o), (o, o, o, o)?
|
// that a mat2 can be interpreted as (x, y, x, y), (o, o, o, o) instead of (x, y, o, o), (o, o, o, o)?
|
||||||
MAT_2D,
|
MAT_2D,
|
||||||
MAT_3D,
|
MAT_3D,
|
||||||
MAT_4D
|
MAT_4D,
|
||||||
|
|
||||||
|
// integer formats
|
||||||
|
UINT32_1D,
|
||||||
};
|
};
|
||||||
|
|
||||||
struct SHVertexAttribute
|
struct SHVertexAttribute
|
||||||
|
|
Loading…
Reference in New Issue