MythTV  master
mythvertexbuffervulkan.h
Go to the documentation of this file.
1 #ifndef MYTHVBOVULKAN_H
2 #define MYTHVBOVULKAN_H
3 
4 // MythTV
6 
8 {
9  public:
10  static MythBufferVulkan* Create(MythVulkanObject* Vulkan, VkDeviceSize Size);
11  virtual ~MythBufferVulkan();
12 
13  VkBuffer GetBuffer () const;
14  void* GetMappedMemory () const;
15  void Update (VkCommandBuffer CommandBuffer = nullptr);
16 
17  protected:
18  MythBufferVulkan(MythVulkanObject* Vulkan, VkDeviceSize Size);
19 
20  VkDeviceSize m_bufferSize { 0 };
21  VkBuffer m_buffer { MYTH_NULL_DISPATCH };
22  VkDeviceMemory m_bufferMemory { MYTH_NULL_DISPATCH };
23  VkBuffer m_stagingBuffer { MYTH_NULL_DISPATCH };
24  VkDeviceMemory m_stagingMemory { MYTH_NULL_DISPATCH };
25  void* m_mappedMemory { nullptr };
26 
27  private:
28  Q_DISABLE_COPY(MythBufferVulkan)
29 };
30 
32 {
33  public:
34  static MythVertexBufferVulkan* Create(MythVulkanObject* Vulkan, VkDeviceSize Size);
35 
36  bool NeedsUpdate (QRect Source, QRect Dest, int Alpha, int Rotation);
37  void Update (QRect Source, QRect Dest, int Alpha, int Rotation,
38  VkCommandBuffer CommandBuffer = nullptr);
39 
40  protected:
41  MythVertexBufferVulkan(MythVulkanObject* Vulkan, VkDeviceSize Size);
42 
43  private:
44  QRect m_source;
45  QRect m_dest;
46  int m_rotation { 0 };
47  int m_alpha { 255 };
48 };
49 
50 #endif
MUI_PUBLIC
#define MUI_PUBLIC
Definition: mythuiexp.h:9
MythVulkanObject
Definition: mythrendervulkan.h:29
MYTH_NULL_DISPATCH
#define MYTH_NULL_DISPATCH
Definition: mythrendervulkan.h:26
MythVertexBufferVulkan
Definition: mythvertexbuffervulkan.h:31
MythVulkanObject::Create
static MythVulkanObject * Create(MythRenderVulkan *Render)
Definition: mythrendervulkan.cpp:16
Source
Definition: channelsettings.cpp:68
MythBufferVulkan::Create
static MythBufferVulkan * Create(MythVulkanObject *Vulkan, VkDeviceSize Size)
Definition: mythvertexbuffervulkan.cpp:7
MythBufferVulkan::Update
void Update(VkCommandBuffer CommandBuffer=nullptr)
Definition: mythvertexbuffervulkan.cpp:56
MythVertexBufferVulkan::m_source
QRect m_source
Definition: mythvertexbuffervulkan.h:44
MythVertexBufferVulkan::m_dest
QRect m_dest
Definition: mythvertexbuffervulkan.h:45
mythrendervulkan.h
MythBufferVulkan
Definition: mythvertexbuffervulkan.h:7