@@ -212,6 +212,19 @@ int main()
212
212
213
213
std::cout << " RPR Context creation succeeded." << std::endl;
214
214
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
+
215
228
// Create the scene.
216
229
rpr_scene scene = nullptr ;
217
230
CHECK ( rprContextCreateScene (context, &scene) ); // create the scene
@@ -280,7 +293,6 @@ int main()
280
293
CHECK ( rprShapeSetTransform (matball2, true , &mB .m00 ));
281
294
282
295
283
-
284
296
// create the material system
285
297
rpr_material_system matsys = nullptr ;
286
298
CHECK ( rprContextCreateMaterialSystem (context, 0 , &matsys) );
@@ -449,17 +461,6 @@ int main()
449
461
// As OcioDisplay::Display is going to do the RRT+ODT, we need to give to this function a linear frame_buffer_resolved.
450
462
CHECK ( rprContextSetParameterByKey1f (context, RPR_CONTEXT_DISPLAY_GAMMA , 1 .0f ) );
451
463
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
-
463
464
// Render the scene
464
465
CHECK ( rprContextSetParameterByKey1u (context,RPR_CONTEXT_ITERATIONS, 200 ));
465
466
CHECK ( rprContextRender (context) );
0 commit comments