further improved gizmos

This commit is contained in:
itsmattkc
2020-11-22 18:21:24 +11:00
parent bd215b34bc
commit a6d382f4d4
17 changed files with 118 additions and 85 deletions
+7 -7
View File
@@ -56,14 +56,14 @@ TexturePtr Renderer::CreateTexture(const VideoParams &params, const void *data,
return CreateTexture(params, Texture::k2D, data, linesize);
}
void Renderer::BlitColorManaged(ColorProcessorPtr color_processor, TexturePtr source, bool source_is_premultiplied, Texture *destination, const QMatrix4x4 &matrix)
void Renderer::BlitColorManaged(ColorProcessorPtr color_processor, TexturePtr source, bool source_is_premultiplied, Texture *destination, bool clear_destination, const QMatrix4x4 &matrix)
{
BlitColorManagedInternal(color_processor, source, source_is_premultiplied, destination, destination->params(), matrix);
BlitColorManagedInternal(color_processor, source, source_is_premultiplied, destination, destination->params(), clear_destination, matrix);
}
void Renderer::BlitColorManaged(ColorProcessorPtr color_processor, TexturePtr source, bool source_is_premultiplied, VideoParams params, const QMatrix4x4& matrix)
void Renderer::BlitColorManaged(ColorProcessorPtr color_processor, TexturePtr source, bool source_is_premultiplied, VideoParams params, bool clear_destination, const QMatrix4x4& matrix)
{
BlitColorManagedInternal(color_processor, source, source_is_premultiplied, nullptr, params, matrix);
BlitColorManagedInternal(color_processor, source, source_is_premultiplied, nullptr, params, clear_destination, matrix);
}
void Renderer::Destroy()
@@ -225,7 +225,7 @@ bool Renderer::GetColorContext(ColorProcessorPtr color_processor, Renderer::Colo
void Renderer::BlitColorManagedInternal(ColorProcessorPtr color_processor, TexturePtr source,
bool source_is_premultiplied, Texture *destination,
VideoParams params, const QMatrix4x4& matrix)
VideoParams params, bool clear_destination, const QMatrix4x4& matrix)
{
ColorContext color_ctx;
if (!GetColorContext(color_processor, &color_ctx)) {
@@ -262,9 +262,9 @@ void Renderer::BlitColorManagedInternal(ColorProcessorPtr color_processor, Textu
}
if (destination) {
BlitToTexture(color_ctx.compiled_shader, job, destination);
BlitToTexture(color_ctx.compiled_shader, job, destination, clear_destination);
} else {
Blit(color_ctx.compiled_shader, job, params);
Blit(color_ctx.compiled_shader, job, params, clear_destination);
}
}