#ifndef RT_RENDERER_VIRTUAL_RESOURCE_REGISTRY_H
#define RT_RENDERER_VIRTUAL_RESOURCE_REGISTRY_H

#include <stdbool.h>
#include <runtime/runtime.h>
#include "render_resource.h"


#ifdef __cplusplus
extern "C" {
#endif

/* Returns true if the handle refers to an existing resource. */
bool rtIsRenderResourceKnown(rt_render_resource_handle h);

/* Returns a pointer to the resource description or NULL, if the handle does not refer to a valid buffer */
const rt_render_buffer_desc *rtGetRenderBufferDescription(rt_render_resource_handle h);

/* Returns a pointer to the resource description or NULL, if the handle does not refer to a valid texture2d */
const rt_render_texture2d_desc *rtGetRenderTexture2DDescription(rt_render_resource_handle h);

/* Stores the render buffer description and returns a handle to the new resource. */
rt_render_resource_handle  rtCreateRenderBuffer(const rt_render_buffer_desc *desc);

/* Stores the texture2d description and returns a handle to the new resource. */
rt_render_resource_handle rtCreateRenderTexture2D(const rt_render_texture2d_desc *desc);

#ifdef __cplusplus
}
#endif

#endif

