Files
OpenVulkano/openVulkanoCpp/Vulkan/VulkanDrawContext.hpp

34 lines
844 B
C++

/*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/
#pragma once
#include "Renderer.hpp"
namespace openVulkanoCpp::Vulkan
{
class VulkanDrawContext
{
VulkanShader* m_lastShader = nullptr;
public:
size_t encoderThreadId;
size_t currentImageId;
vk::CommandBuffer& commandBuffer;
Renderer* renderer;
VulkanDrawContext(size_t encThreadId, size_t currentImgId, vk::CommandBuffer& buffer, Renderer* render)
: encoderThreadId(encThreadId), currentImageId(currentImgId), commandBuffer(buffer), renderer(render)
{}
void EncodeShader(Scene::Shader* shader);
void EncodeShader(VulkanShader* shader);
VulkanShader* GetShader() const { return m_lastShader; }
};
}