Skip to content

Commit d8ef211

Browse files
committed
Demo - OCIO minor change for HybridPro
1 parent f5a0510 commit d8ef211

File tree

1 file changed

+13
-12
lines changed

1 file changed

+13
-12
lines changed

tutorials/29_ocio/main.cpp

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,19 @@ int main()
212212

213213
std::cout << "RPR Context creation succeeded." << std::endl;
214214

215+
216+
const char ocio_config[] = "../../Resources/aces_1.0.3/config.ocio";
217+
218+
if ( useOCIO )
219+
{
220+
// define the OCIO config file path
221+
CHECK( rprContextSetParameterByKeyString(context, RPR_CONTEXT_OCIO_CONFIG_PATH, ocio_config) );
222+
223+
// we are going to use the ACEScg for the Render Color Space.
224+
CHECK( rprContextSetParameterByKeyString(context, RPR_CONTEXT_OCIO_RENDERING_COLOR_SPACE, "ACES - ACEScg") );
225+
}
226+
227+
215228
// Create the scene.
216229
rpr_scene scene = nullptr;
217230
CHECK( rprContextCreateScene(context, &scene) ); // create the scene
@@ -280,7 +293,6 @@ int main()
280293
CHECK( rprShapeSetTransform(matball2, true, &mB.m00));
281294

282295

283-
284296
// create the material system
285297
rpr_material_system matsys = nullptr;
286298
CHECK( rprContextCreateMaterialSystem(context, 0, &matsys) );
@@ -449,17 +461,6 @@ int main()
449461
// As OcioDisplay::Display is going to do the RRT+ODT, we need to give to this function a linear frame_buffer_resolved.
450462
CHECK( rprContextSetParameterByKey1f(context, RPR_CONTEXT_DISPLAY_GAMMA , 1.0f ) );
451463

452-
const char ocio_config[] = "../../Resources/aces_1.0.3/config.ocio";
453-
454-
if ( useOCIO )
455-
{
456-
// define the OCIO config file path
457-
CHECK( rprContextSetParameterByKeyString(context, RPR_CONTEXT_OCIO_CONFIG_PATH, ocio_config) );
458-
459-
// we are going to use the ACEScg for the Render Color Space.
460-
CHECK( rprContextSetParameterByKeyString(context, RPR_CONTEXT_OCIO_RENDERING_COLOR_SPACE, "ACES - ACEScg") );
461-
}
462-
463464
// Render the scene
464465
CHECK( rprContextSetParameterByKey1u(context,RPR_CONTEXT_ITERATIONS, 200));
465466
CHECK( rprContextRender(context) );

0 commit comments

Comments
 (0)