Radeon ProRender

Parameters Enumeration

The Parameters Enumeration demo illustrates how to use getters of the RPR API to get current states/values of different objects.

Example of code for the context parameters:

uint64_t param_count = 0;
CHECK(rprContextGetInfo(context, RPR_CONTEXT_PARAMETER_COUNT, sizeof(uint64_t), &param_count, NULL));

std::cout<<param_count<<" parameters :"<<std::endl;

for(uint64_t i = 0; i < param_count; i++)
    rpr_context_info paramID = (rpr_context_info)0;
    CHECK( rprContextGetParameterInfo(context, int(i), RPR_PARAMETER_NAME, sizeof(paramID), &paramID, NULL) );

    std::string paramName_;
    stringMapper.RPRContextInput_id_to_string(paramID, paramName_);
    rpr_parameter_type type;
    CHECK( rprContextGetParameterInfo(context, int(i), RPR_PARAMETER_TYPE, sizeof(type), &type, NULL));
    // ... Manage parameter here

See full code