Karma Engine
Loading...
Searching...
No Matches
VulkanTexutre.h
1#pragma once
2
3#include "Karma/Renderer/Texture.h"
4#include "VulkanBuffer.h"
5
6namespace Karma
7{
8 class VulkanTexture : public Texture
9 {
10 public:
13
14 void CreateTextureImage(VulkanImageBuffer* vImageBuffer);
15 void CreateTextureImageView();
16 void CreateTextureSampler();
17
18 // Upload the VulkanImageBuffer to GPU when Texture is instantiated
19 void GenerateVulkanTexture(VulkanImageBuffer* vImageBuffer);
20
21 // Getters
22 VkImageView GetImageView() const { return m_TextureImageView; }
23 VkSampler GetImageSampler() const { return m_TextureSampler; }
24
25 private:
26 // Vulkan context relevant stuff
27 VkDevice m_Device;
28 VkPhysicalDevice m_PhysicalDevice;
29
30 // Texture relevant stuff
31 VkImage m_TextureImage;
32
33 VkDeviceMemory m_TextureImageMemory;
34 VkImageView m_TextureImageView;
35 VkSampler m_TextureSampler;
36 };
37}
Definition Texture.h:18
Definition VulkanBuffer.h:101
Definition VulkanTexutre.h:9