Implementing ktx texture loading

This commit is contained in:
Dynamitos
2021-08-22 23:07:38 +02:00
parent c5686377be
commit df977110d3
16 changed files with 79 additions and 38 deletions
@@ -144,6 +144,10 @@ public:
PCmdBuffer getCommands();
PRenderCommand createRenderCommand(const std::string& name);
PComputeCommand createComputeCommand(const std::string& name);
VkCommandPool getPoolHandle() const
{
return commandPool;
}
void submitCommands(PSemaphore signalSemaphore = nullptr);
private:
@@ -360,6 +360,7 @@ PStagingManager Graphics::getStagingManager()
return stagingManager;
}
Array<const char *> Graphics::getRequiredExtensions()
{
Array<const char *> extensions;
@@ -249,6 +249,10 @@ public:
{
return samples;
}
inline uint32 getMipLevels() const
{
return mipLevels;
}
inline bool isDepthStencil() const
{
return aspect & (VK_IMAGE_ASPECT_DEPTH_BIT | VK_IMAGE_ASPECT_STENCIL_BIT);
@@ -303,6 +307,10 @@ public:
{
return textureHandle->sizeY;
}
virtual uint32 getSizeZ() const override
{
return textureHandle->sizeZ;
}
virtual Gfx::SeFormat getFormat() const override
{
return textureHandle->format;
@@ -311,6 +319,10 @@ public:
{
return textureHandle->getNumSamples();
}
virtual uint32 getMipLevels() const override
{
return textureHandle->getMipLevels();
}
virtual void changeLayout(Gfx::SeImageLayout newLayout) override;
virtual void* getNativeHandle() override
{