Color management: add functions to detect scene linear and sRGB color spaces

Same as the ones in Cycles, but intended for GPU textures.
This commit is contained in:
Brecht Van Lommel
2019-05-05 13:14:37 +02:00
parent 8794779a2d
commit 2c0da4a3db
6 changed files with 139 additions and 11 deletions

View File

@@ -363,6 +363,25 @@ int FallbackImpl::colorSpaceIsData(OCIO_ConstColorSpaceRcPtr * /*cs*/)
return 0;
}
void FallbackImpl::colorSpaceIsBuiltin(OCIO_ConstConfigRcPtr * /*config*/,
OCIO_ConstColorSpaceRcPtr *cs,
bool &is_scene_linear,
bool &is_srgb)
{
if (cs == COLORSPACE_LINEAR) {
is_scene_linear = true;
is_srgb = false;
}
else if (cs == COLORSPACE_SRGB) {
is_scene_linear = false;
is_srgb = true;
}
else {
is_scene_linear = false;
is_srgb = false;
}
}
void FallbackImpl::colorSpaceRelease(OCIO_ConstColorSpaceRcPtr * /*cs*/)
{
}