From 311eeb72944f93f873d1cd1784ee2bf423e1e7c2 Mon Sep 17 00:00:00 2001 From: Tobias Mayer Date: Tue, 24 Oct 2023 18:48:35 +0200 Subject: [PATCH] Add OpenColorIO 2.3 compatibility The signature of the `getTexture` function changed and the calling code needs to be adapted. Signed-off-by: Tobias Mayer --- app/render/renderer.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/app/render/renderer.cpp b/app/render/renderer.cpp index d00fa0d40c..94f484939a 100644 --- a/app/render/renderer.cpp +++ b/app/render/renderer.cpp @@ -240,9 +240,17 @@ bool Renderer::GetColorContext(const ColorTransformJob &color_job, Renderer::Col const char* sampler_name = nullptr; unsigned int width = 0, height = 0; OCIO::GpuShaderDesc::TextureType channel = OCIO::GpuShaderDesc::TEXTURE_RGB_CHANNEL; +#if OCIO_VERSION_HEX >= 0x02030000 + OCIO::GpuShaderDesc::TextureDimensions dimensions = OCIO::GpuShaderDesc::TEXTURE_2D; +#endif OCIO::Interpolation interpolation = OCIO::INTERP_LINEAR; - shader_desc->getTexture(i, tex_name, sampler_name, width, height, channel, interpolation); + shader_desc->getTexture(i, tex_name, sampler_name, width, height, channel, +#if OCIO_VERSION_HEX >= 0x02030000 + // OCIO::GpuShaderDesc::TextureDimensions + dimensions, +#endif + interpolation); if (!tex_name || !*tex_name || !sampler_name || !*sampler_name