Lot of small fixes/improvements
This commit is contained in:
@@ -112,6 +112,7 @@ namespace Nz
|
||||
|
||||
context->glDrawBuffers(GLsizei(colorBufferCount), fboDrawBuffers.data());
|
||||
|
||||
//FIXME: Don't clear when not needed
|
||||
for (std::size_t i = 0; i < colorBufferCount; ++i)
|
||||
{
|
||||
Nz::Color color = command.clearValues[i].color;
|
||||
@@ -127,6 +128,7 @@ namespace Nz
|
||||
GLenum buffer = GL_BACK;
|
||||
context->glDrawBuffers(1, &buffer);
|
||||
|
||||
//FIXME: Don't clear when not needed
|
||||
Nz::Color color = command.clearValues[0].color;
|
||||
context->glClearColor(color.r / 255.f, color.g / 255.f, color.b / 255.f, color.a / 255.f);
|
||||
context->glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
|
||||
|
||||
@@ -112,7 +112,7 @@ namespace Nz
|
||||
m_commandBuffer.SetViewport(viewportRegion);
|
||||
}
|
||||
|
||||
void OpenGLCommandBufferBuilder::TextureBarrier(PipelineStageFlags srcStageMask, PipelineStageFlags dstStageMask, MemoryAccessFlags srcAccessMask, MemoryAccessFlags dstAccessMask, TextureLayout oldLayout, TextureLayout newLayout, const Texture& texture)
|
||||
void OpenGLCommandBufferBuilder::TextureBarrier(PipelineStageFlags /*srcStageMask*/, PipelineStageFlags /*dstStageMask*/, MemoryAccessFlags /*srcAccessMask*/, MemoryAccessFlags /*dstAccessMask*/, TextureLayout /*oldLayout*/, TextureLayout /*newLayout*/, const Texture& /*texture*/)
|
||||
{
|
||||
/* nothing to do */
|
||||
}
|
||||
|
||||
@@ -31,14 +31,15 @@ namespace Nz
|
||||
return m_uploadPool;
|
||||
}
|
||||
|
||||
void OpenGLRenderImage::SubmitCommandBuffer(CommandBuffer* commandBuffer, QueueTypeFlags queueTypeFlags)
|
||||
void OpenGLRenderImage::Present()
|
||||
{
|
||||
m_owner.Present();
|
||||
m_uploadPool.Reset();
|
||||
}
|
||||
|
||||
void OpenGLRenderImage::SubmitCommandBuffer(CommandBuffer* commandBuffer, QueueTypeFlags /*queueTypeFlags*/)
|
||||
{
|
||||
OpenGLCommandBuffer* oglCommandBuffer = static_cast<OpenGLCommandBuffer*>(commandBuffer);
|
||||
oglCommandBuffer->Execute();
|
||||
}
|
||||
|
||||
void OpenGLRenderImage::Present()
|
||||
{
|
||||
m_owner.Present();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -377,7 +377,7 @@ namespace Nz::GL
|
||||
return false;
|
||||
}
|
||||
|
||||
if (DescribePixelFormat(m_deviceContext, pixelFormat, sizeof(PIXELFORMATDESCRIPTOR), &descriptor) != 0)
|
||||
if (m_loader.DescribePixelFormat(m_deviceContext, pixelFormat, sizeof(PIXELFORMATDESCRIPTOR), &descriptor) != 0)
|
||||
{
|
||||
m_params.bitsPerPixel = descriptor.cColorBits + descriptor.cAlphaBits;
|
||||
m_params.depthBits = descriptor.cDepthBits;
|
||||
|
||||
Reference in New Issue
Block a user