Kohi Game Engine
|
Go to the source code of this file.
Data Structures | |
struct | rendergraph_source |
Represents some source of data/resource, to be plugged into a sink. More... | |
struct | rendergraph_sink |
Represents a sortof "socket" which accepts data of a specfic type (i.e. a texture or number), which is provided by a source. More... | |
struct | rendergraph_node |
Represents a single node in a rendergraph. A node is responsible for acquiring and maintaining its required resources, and generally has some sort of input (typically sinks) and some form of output (typically sources) to potentially other nodes. More... | |
struct | rendergraph |
struct | rendergraph_node_sink_config |
struct | rendergraph_node_config |
The configuration for a rendergraph node. More... | |
struct | rendergraph_node_factory |
Macros | |
#define | RG_CHECK(expr) |
Typedefs | |
typedef enum rendergraph_resource_type | rendergraph_resource_type |
Represents a resource type to be used with rendergraph sources and sinks. More... | |
typedef struct rendergraph_source | rendergraph_source |
Represents some source of data/resource, to be plugged into a sink. More... | |
typedef struct rendergraph_sink | rendergraph_sink |
Represents a sortof "socket" which accepts data of a specfic type (i.e. a texture or number), which is provided by a source. More... | |
typedef struct rendergraph_node | rendergraph_node |
Represents a single node in a rendergraph. A node is responsible for acquiring and maintaining its required resources, and generally has some sort of input (typically sinks) and some form of output (typically sources) to potentially other nodes. More... | |
typedef struct rendergraph | rendergraph |
typedef struct rendergraph_node_sink_config | rendergraph_node_sink_config |
typedef struct rendergraph_node_config | rendergraph_node_config |
The configuration for a rendergraph node. More... | |
typedef struct rendergraph_node_factory | rendergraph_node_factory |
Enumerations | |
enum | rendergraph_resource_type { RENDERGRAPH_RESOURCE_TYPE_UNDEFINED , RENDERGRAPH_RESOURCE_TYPE_TEXTURE , RENDERGRAPH_RESOURCE_TYPE_NUMBER , RENDERGRAPH_RESOURCE_TYPE_MAX } |
Represents a resource type to be used with rendergraph sources and sinks. More... | |
Functions | |
KAPI b8 | rendergraph_create (const char *config_str, ktexture global_colourbuffer, ktexture global_depthbuffer, rendergraph *out_graph) |
KAPI void | rendergraph_destroy (rendergraph *graph) |
KAPI b8 | rendergraph_finalize (rendergraph *graph) |
KAPI b8 | rendergraph_initialize (rendergraph *graph) |
KAPI b8 | rendergraph_load_resources (rendergraph *graph) |
KAPI b8 | rendergraph_execute_frame (rendergraph *graph, struct frame_data *p_frame_data) |
KAPI rendergraph_resource_type | string_to_resource_type (const char *str) |
b8 | rendergraph_system_initialize (u64 *memory_requirement, struct rendergraph_system_state *state) |
void | rendergraph_system_shutdown (struct rendergraph_system_state *state) |
Shuts this system down. More... | |
KAPI b8 | rendergraph_system_node_factory_register (struct rendergraph_system_state *state, const rendergraph_node_factory *new_factory) |
Registers the provided factory with the rendergraph system. Note that passing a factory with a duplicate/already existing type will update/overwrite the existing factory of that type. More... | |
#define RG_CHECK | ( | expr | ) |
typedef struct rendergraph rendergraph |
typedef struct rendergraph_node rendergraph_node |
Represents a single node in a rendergraph. A node is responsible for acquiring and maintaining its required resources, and generally has some sort of input (typically sinks) and some form of output (typically sources) to potentially other nodes.
typedef struct rendergraph_node_config rendergraph_node_config |
The configuration for a rendergraph node.
typedef struct rendergraph_node_factory rendergraph_node_factory |
typedef struct rendergraph_node_sink_config rendergraph_node_sink_config |
Configuration structure for a node sink
typedef enum rendergraph_resource_type rendergraph_resource_type |
Represents a resource type to be used with rendergraph sources and sinks.
typedef struct rendergraph_sink rendergraph_sink |
Represents a sortof "socket" which accepts data of a specfic type (i.e. a texture or number), which is provided by a source.
typedef struct rendergraph_source rendergraph_source |
Represents some source of data/resource, to be plugged into a sink.
KAPI b8 rendergraph_create | ( | const char * | config_str, |
ktexture | global_colourbuffer, | ||
ktexture | global_depthbuffer, | ||
rendergraph * | out_graph | ||
) |
KAPI void rendergraph_destroy | ( | rendergraph * | graph | ) |
KAPI b8 rendergraph_execute_frame | ( | rendergraph * | graph, |
struct frame_data * | p_frame_data | ||
) |
KAPI b8 rendergraph_finalize | ( | rendergraph * | graph | ) |
KAPI b8 rendergraph_initialize | ( | rendergraph * | graph | ) |
KAPI b8 rendergraph_load_resources | ( | rendergraph * | graph | ) |
b8 rendergraph_system_initialize | ( | u64 * | memory_requirement, |
struct rendergraph_system_state * | state | ||
) |
Initializes the rendergraph system. Should be called twice, once with to obtain the memory requirement (pass 0 to state) and a second time with allocated memory for state.
memory_requirement | A pointer to hold the memory requirement for this system. |
state | A pointer to the system state. |
KAPI b8 rendergraph_system_node_factory_register | ( | struct rendergraph_system_state * | state, |
const rendergraph_node_factory * | new_factory | ||
) |
Registers the provided factory with the rendergraph system. Note that passing a factory with a duplicate/already existing type will update/overwrite the existing factory of that type.
state | A pointer to the rendergraph system state. |
new_factory | A constant pointer to the factory to be registered. Note that a copy of this is taken. |
void rendergraph_system_shutdown | ( | struct rendergraph_system_state * | state | ) |
Shuts this system down.
state | A pointer to the system state. |
KAPI rendergraph_resource_type string_to_resource_type | ( | const char * | str | ) |