rprContextCreateDirectionalLight

Creates a directional light source.

rpr_status rprContextCreateDirectionalLight(

rpr_context context,

rpr_light * out_light);

Parameters

Parameter

Description

context

The context to which the directional light will be added.

out_light

A pointer to the created directional light object.

Notes

Directional light sources are useful for simulating sun light or any light source which is a remote point that radiates light in one direction, so that light rays travel in parallel to each other.

Output

A pointer to a directional light 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_OUT_OF_VIDEO_MEMORY

  • RPR_ERROR_OUT_OF_SYSTEM_MEMORY