rprShapeSetPrimvar

Set primvars data for a specific key.

rpr_int rprShapeSetPrimvar(

rpr_shape shape,

rpr_uint key,

rpr_float const * data,

rpr_uint floatCount,

rpr_uint componentCount,

rpr_primvar_interpolation_type interop);

Parameters

Parameter

Description

shape

The shape to set primvars data for. A shape can have several primvars data. Each primvar of the shape is identified with a key.

key

The key can be any value the API user wants.

data

List of float values.

floatCount

Number of float in the data buffer.

componentCount

Value that specifies the number of float(s) per component. For example if you want to attach an RGB color to vertices, you need componentCount = 3 and floatCount = 3 * number of vertices.

interop

Defines how data is interpolated.

Return

Returns RPR_SUCCESS in case of success, or RPR_ERROR code if a problem was encountered.

To learn how to handle errors in AMD Radeon ProRender SDK, see Error Handling.