rprContextCreateBuffer

Creates a buffer from memory data.

Buffers are used as arbitrary lists for input to other nodes.

rpr_status rprContextCreateBuffer(

rpr_context context,

rpr_buffer_desc const * buffer_desc,

void const * data,

rpr_buffer * out_buffer);

Parameters

Parameter

Description

context

The context to create image for.

buffer_desc

Buffer layout description.

data

Image data in system memory, can be NULL in which case the memory is allocated.

out_buffer

A pointer to the created buffer object.

Notes

Buffer lists can be floating point or integer type.

Output

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

  • RPR_ERROR_UNSUPPORTED_IMAGE_FORMAT