Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2019-05-05 14:14:37 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2019-05-06 13:05:44 +0300
commit2c0da4a3db96d4aeeeec1cfba4a0a9f5bf0fa970 (patch)
treecf6ee2d2b9b123035bdfbfa7936713b48a5a4f65 /intern/opencolorio/fallback_impl.cc
parent8794779a2dd5744e9fd069361d3774d2b546fda1 (diff)
Color management: add functions to detect scene linear and sRGB color spaces
Same as the ones in Cycles, but intended for GPU textures.
Diffstat (limited to 'intern/opencolorio/fallback_impl.cc')
-rw-r--r--intern/opencolorio/fallback_impl.cc19
1 files changed, 19 insertions, 0 deletions
diff --git a/intern/opencolorio/fallback_impl.cc b/intern/opencolorio/fallback_impl.cc
index 91f009b3b57..dbf56136d8a 100644
--- a/intern/opencolorio/fallback_impl.cc
+++ b/intern/opencolorio/fallback_impl.cc
@@ -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*/)
{
}