OpenGL: Implement commands buffers

This commit is contained in:
Lynix
2020-05-11 14:12:13 +02:00
parent fe5b70ae1c
commit 6a23d51147
19 changed files with 621 additions and 162 deletions

View File

@@ -3,6 +3,8 @@
// For conditions of distribution and use, see copyright notice in Config.hpp
#include <Nazara/OpenGLRenderer/OpenGLRenderImage.hpp>
#include <Nazara/OpenGLRenderer/OpenGLCommandBuffer.hpp>
#include <Nazara/OpenGLRenderer/OpenGLCommandBufferBuilder.hpp>
#include <Nazara/OpenGLRenderer/OpenGLRenderWindow.hpp>
#include <stdexcept>
#include <Nazara/OpenGLRenderer/Debug.hpp>
@@ -17,6 +19,11 @@ namespace Nz
void OpenGLRenderImage::Execute(const std::function<void(CommandBufferBuilder& builder)>& callback, QueueTypeFlags queueTypeFlags)
{
OpenGLCommandBuffer commandBuffer;
OpenGLCommandBufferBuilder builder(commandBuffer);
callback(builder);
commandBuffer.Execute();
}
OpenGLUploadPool& OpenGLRenderImage::GetUploadPool()
@@ -26,6 +33,8 @@ namespace Nz
void OpenGLRenderImage::SubmitCommandBuffer(CommandBuffer* commandBuffer, QueueTypeFlags queueTypeFlags)
{
OpenGLCommandBuffer* oglCommandBuffer = static_cast<OpenGLCommandBuffer*>(commandBuffer);
oglCommandBuffer->Execute();
}
void OpenGLRenderImage::Present()