rprContextCreateCamera

Creates a new camera.

AMD Radeon ProRender uses a single rpr_camera type to represent several real-world camera setups, including the pinhole camera.

As a physically-based system, AMD Radeon ProRender cameras have all the controls common to real-world photography: focal length, F-stop and exposure. These values are set with calls to separate functions such as rprCameraLookAt() and rprCameraSetFocalLength().

rpr_status rprContextCreateCamera(

rpr_context context,

rpr_camera * out_camera);

Parameters

Parameter

Description

context

The current rendering context.

out_camera

A pointer to the created camera object.

Notes

Cameras need to be attached to the scene to be used.

Output

A pointer to a camera 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_SYSTEM_MEMORY

  • RPR_ERROR_OUT_OF_VIDEO_MEMORY