vulkan-project/renderer.hpp
2022-10-14 20:58:20 +02:00

36 lines
1015 B
C++

#pragma once
// includes for child classes
#include "texture_manager.hpp"
#include "vertex.hpp"
#include <gz-util/log.hpp>
#include <vulkan/vulkan_core.h>
#include <vector>
namespace gz::vk {
/// Defined in texture_manager.hpp
class TextureManager;
/// Defined in vulkan_instance.hpp
class VulkanInstance;
class Renderer {
public:
Renderer(VulkanInstance& instance, TextureManager& textureManager) : vk(instance), textureManager(textureManager) {};
protected:
void cleanup_();
VulkanInstance& vk;
TextureManager& textureManager;
std::vector<VkCommandBuffer> commandBuffers;
/// On device local memory
VkBuffer vertexBuffer;
VkDeviceMemory vertexBufferMemory;
VkDeviceSize vertexBufferSize;
VkBuffer indexBuffer;
VkDeviceMemory indexBufferMemory;
VkDeviceSize indexBufferSize;
}; // class RendererBase
} // namespace gz::vk