rprInstanceGetBaseShape

Gets the parent shape of an instance.

rpr_status rprInstanceGetBaseShape(

rpr_shape shape,

rpr_shape * out_shape);

Parameters

Parameter

Description

shape

The instance whose parent shape we wish to discover.

out_shape

A pointer to the shape object returned.

Notes

A base, parent shape holds the geometry for its instance. You can release the base shape’s pointer but the object will still be retained by the instance (due to reference counting). You might want to ask instance for its base shape in this case.

A shape can be either a mesh or an instance. An instance is intended to re-use geometry with different transforms and shader settings. You could, therefore, create a single cube mesh and then generate 1000 instances of that cube with varying transforms and shaders. In this case only one copy of the geometry would be created (instead of 1001).

Output

A pointer to a shape object.

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.

Errors

Possible error codes:

  • RPR_ERROR_INVALID_PARAMETER