# renderer_api_types.h ## Index
`struct tm_renderer_handle_t`
`enum tm_renderer_shader_stage`

State block enumeration.
`enum tm_renderer_state_block_type`
`enum tm_renderer_state_value_type`
`struct tm_renderer_shader_blob_t`
`enum tm_renderer_memory_map_flags`
## API
### `struct tm_renderer_handle_t`
A `tm_renderer_handle_t` identifies a GPU resource allocated using one of the `create_*()` methods in the `tm_renderer_resource_command_buffer_api`. ~~~c typedef struct tm_renderer_handle_t { // Handle identifying a resource in the render backend. uint32_t resource; // Optional bindless srv & uav handles identifying the bindless array element of the resource // if the backend is setup to run in bindless mode (only used for buffers, images and samplers). uint32_t bindless_srv; uint32_t bindless_uav; } tm_renderer_handle_t; ~~~
### `enum tm_renderer_shader_stage`
~~~c typedef enum tm_renderer_shader_stage { // Shader program is intended to be bound as a vertex shader. TM_RENDERER_SHADER_STAGE_VERTEX, // Shader program is intended to be bound as a tessellation control / hull shader. TM_RENDERER_SHADER_STAGE_HULL, // Shader program is intended to be bound as a tessellation evaluation / domain shader. TM_RENDERER_SHADER_STAGE_DOMAIN, // Shader program is intended to be bound as a geometry shader. TM_RENDERER_SHADER_STAGE_GEOMETRY, // Shader program is intended to be bound as a pixel shader. TM_RENDERER_SHADER_STAGE_PIXEL, // Shader program is intended to be bound as a compute shader. TM_RENDERER_SHADER_STAGE_COMPUTE, // Shader program is intended to be bound as a ray generation shader. TM_RENDERER_SHADER_STAGE_RAYGEN, // Shader program is intended to be bound as a ray any hit shader. TM_RENDERER_SHADER_STAGE_ANY_HIT, // Shader program is intended to be bound as a ray closest hit shader. TM_RENDERER_SHADER_STAGE_CLOSEST_HIT, // Shader program is intended to be bound as a ray miss shader. TM_RENDERER_SHADER_STAGE_MISS, // Shader program is intended to be bound as a ray intersection shader. TM_RENDERER_SHADER_STAGE_INTERSECTION, // Specifies the last item in this enumeration, useful for looping. TM_RENDERER_SHADER_STAGE_MAX } tm_renderer_shader_stage ~~~

State block enumeration.

### `enum tm_renderer_state_block_type`
Default state block types available in most graphics APIs. ~~~c typedef enum tm_renderer_state_block_type { // State block controlling tessellation states TM_RENDERER_STATE_BLOCK_TYPE_TESSELLATION, // State block controlling raster states TM_RENDERER_STATE_BLOCK_TYPE_RASTER, // State block controlling depth stencil states TM_RENDERER_STATE_BLOCK_TYPE_DEPTH_STENCIL, // State block describing a texture sampler TM_RENDERER_STATE_BLOCK_TYPE_TEXTURE_SAMPLER, // State block describing the blend states for a single render target in an MRT chain TM_RENDERER_STATE_BLOCK_TYPE_RENDER_TARGET_BLEND, // State block describing the blend states TM_RENDERER_STATE_BLOCK_TYPE_BLEND, // State block describing the multi-sample states TM_RENDERER_STATE_BLOCK_TYPE_MULTI_SAMPLE, // Maximum number of default block types. Render backend can extend on this. TM_RENDERER_STATE_BLOCK_TYPE_MAX_STATE_BLOCK_TYPES } tm_renderer_state_block_type; ~~~
### `enum tm_renderer_state_value_type`
~~~c typedef enum tm_renderer_state_value_type { // State value is a boolean TM_RENDERER_STATE_VALUE_TYPE_BOOL, // State value is a user-defined uint32 TM_RENDERER_STATE_VALUE_TYPE_UINT32, // State value is a user-defined float32 TM_RENDERER_STATE_VALUE_TYPE_FLOAT32, // State value is an enum value of type [[enum TM_RENDERER_COMPARE_OP]]. TM_RENDERER_STATE_VALUE_TYPE_COMPARE_OP, // State value is an enum value of type [[enum TM_RENDERER_RASTER_VALUE_CULL]]. TM_RENDERER_STATE_VALUE_TYPE_CULL, // State value is an enum value of type [[enum TM_RENDERER_RASTER_VALUE_FRONT_FACE]]. TM_RENDERER_STATE_VALUE_TYPE_FRONT_FACE, // State value is an enum value of type [[enum TM_RENDERER_RASTER_VALUE_POLYGON_MODE]]. TM_RENDERER_STATE_VALUE_TYPE_POLYGON_MODE, // State value is an enum value of type [[enum TM_RENDERER_STENCIL_OP]]. TM_RENDERER_STATE_VALUE_TYPE_STENCIL_OP, // State value is an enum value of type [[enum TM_RENDERER_FILTER]]. TM_RENDERER_STATE_VALUE_TYPE_FILTER, // State value is an enum value of type [[enum TM_RENDERER_MIP_MODE]]. TM_RENDERER_STATE_VALUE_TYPE_MIP_MODE, // State value is an enum value of type [[enum TM_RENDERER_ADDRESS_MODE]]. TM_RENDERER_STATE_VALUE_TYPE_ADDRESS_MODE, // State value is an enum value of type [[enum TM_RENDERER_BORDER_COLOR_FLOAT_TRANSPARENT]]. TM_RENDERER_STATE_VALUE_TYPE_BORDER_COLOR, // State value is an enum value of type [[enum TM_RENDERER_BLEND_FACTOR]]. TM_RENDERER_STATE_VALUE_TYPE_BLEND_FACTOR, // State value is an enum value of type [[enum TM_RENDERER_BLEND_OP]]. TM_RENDERER_STATE_VALUE_TYPE_BLEND_OPERATION, // State value is an enum value of type [[enum TM_RENDERER_BLEND_WRITE_MASK]]. TM_RENDERER_STATE_VALUE_TYPE_BLEND_WRITE_MASK, // State value is an enum value of type [[enum TM_RENDERER_LOGICAL_OP]]. TM_RENDERER_STATE_VALUE_TYPE_LOGICAL_OPERATION, // State value is a nested state block, type is encoded in lower 24 bit and is one of // [[enum TM_RENDERER_STATE_BLOCK]] TM_RENDERER_STATE_VALUE_TYPE_STATE_BLOCK = 0xff000000, // Maximum number of default value types. Render backend can extend on this. TM_RENDERER_STATE_VALUE_TYPE_MAX_VALUE_TYPES } tm_renderer_state_value_type ~~~
### `struct tm_renderer_shader_blob_t`
~~~c typedef struct tm_renderer_shader_blob_t { uint64_t size; uint8_t *data; } tm_renderer_shader_blob_t; ~~~
### `enum tm_renderer_memory_map_flags`
~~~c typedef enum tm_renderer_memory_map_flags { // If `CPU_CACHED` flag is set, the memory returned from `map_create_` is guaranteed to go through the CPU cache hierarchy // typically this adds an overhead in the form of extra buffer copies or similar. Only use this flag if you need to // read from the returned memory in `data`. // // !!! note: Note: // Not specifying this flag does not guarantee that the returned pointer will be uncached or in write-combined memory, // but assume that it might be. TM_RENDERER_MEMORY_MAP_FLAGS_CPU_CACHED = 0x1 } tm_renderer_memory_map_flags; ~~~