rprContextCreateFrameBuffer
Creates a framebuffer object.
A framebuffer is used to store the final rendering result.
rpr_status rprContextCreateFrameBuffer( |
rpr_context context, |
rpr_framebuffer_format const format, |
|
rpr_framebuffer_desc const * fb_desc, |
|
rpr_framebuffer * out_fb); |
Parameters
Parameter |
Description |
---|---|
context |
The context from which the image will be generated. |
format |
The framebuffer format. |
fb_desc |
Description of the framebuffer layout. The output dimensions of the rendered image. |
out_fb |
A pointer to the created framebuffer object. |
Notes
The framebuffer represents the output buffer of the rendering context. It has a format and dimensions.
Two 4-channel formats are currently supported: RGBA16_F and RGBA32_F. The first being a half float carries 16 bits per channel, the second is of higher precision, at 32 bits per channel.
The dimensions are represented by an rpr_framebuffer_desc
object which has both height and width values. A given context can have only one framebuffer set at a time, but the user can deploy several framebuffers to render into different windows or store varying content.
Output
A pointer to a framebuffer 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