Skip to content

Commit

Permalink
use ImTextureID in Vulkan Image
Browse files Browse the repository at this point in the history
  • Loading branch information
Nisal Dissanayake committed Jun 12, 2024
1 parent 7d11054 commit 0a8ea62
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
4 changes: 1 addition & 3 deletions Walnut/src/Walnut/GraphicsAPI/Vulkan/VulkanImage.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
#include "VulkanImage.h"

#include "VulkanGraphics.h"

#include "../../ImageFormat.h"

namespace Walnut
Expand Down Expand Up @@ -180,7 +178,7 @@ void VulkanImage::CreateDescriptorSet()
m_DescriptorSet = (VkDescriptorSet)ImGui_ImplVulkan_AddTexture(m_Sampler, m_ImageView, VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL);
}

VkDescriptorSet VulkanImage::GetDescriptorSet()
ImTextureID VulkanImage::GetDescriptorSet()
{
return m_DescriptorSet;
}
Expand Down
4 changes: 2 additions & 2 deletions Walnut/src/Walnut/GraphicsAPI/Vulkan/VulkanImage.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once

#include <vulkan/vulkan.h>
#include "VulkanGraphics.h"
#include <Walnut/ImageFormat.h>

namespace GraphicsAPI
Expand All @@ -18,7 +18,7 @@ namespace GraphicsAPI
void UploadToBuffer(const void* data, size_t uploadSize, size_t alignedSize);
void CreateSampler();
void CreateDescriptorSet();
VkDescriptorSet GetDescriptorSet();
ImTextureID GetDescriptorSet();
bool ImageAvailable();
void ResourceFree();
VkBuffer GetStagingBuffer();
Expand Down

0 comments on commit 0a8ea62

Please sign in to comment.