This file contains global type definitions which are used throughout the entire engine and applicatio...
unsigned int u32
Unsigned 32-bit integer.
Definition: defines.h:25
_Bool b8
8-bit boolean type
Definition: defines.h:58
float f32
32-bit floating point number
Definition: defines.h:47
unsigned short u16
Unsigned 16-bit integer.
Definition: defines.h:22
unsigned long long u64
Unsigned 64-bit integer.
Definition: defines.h:28
unsigned char u8
Unsigned 8-bit integer.
Definition: defines.h:19
This file contains a free list, used for custom memory allocation tracking.
Contains various math types required for the engine.
renderer_config_flag_bits
Definition: renderer_types.h:193
@ RENDERER_CONFIG_FLAG_POWER_SAVING_BIT
Configures the renderer backend in a way that conserves power where possible.
Definition: renderer_types.h:197
@ RENDERER_CONFIG_FLAG_VSYNC_ENABLED_BIT
Indicates that vsync should be enabled.
Definition: renderer_types.h:195
struct renderpass renderpass
Represents a generic renderpass.
struct render_view_packet render_view_packet
A packet for and generated by a render view, which contains data about what is to be rendered.
renderbuffer_track_type
Definition: renderer_types.h:166
@ RENDERBUFFER_TRACK_TYPE_LINEAR
Definition: renderer_types.h:169
@ RENDERBUFFER_TRACK_TYPE_NONE
Definition: renderer_types.h:167
@ RENDERBUFFER_TRACK_TYPE_FREELIST
Definition: renderer_types.h:168
struct render_target_attachment_config render_target_attachment_config
renderpass_clear_flag
The types of clearing to be done on a renderpass. Can be combined together for multiple clearing func...
Definition: renderer_types.h:93
@ RENDERPASS_CLEAR_DEPTH_BUFFER_FLAG
Clear the depth buffer.
Definition: renderer_types.h:99
@ RENDERPASS_CLEAR_NONE_FLAG
No clearing should be done.
Definition: renderer_types.h:95
@ RENDERPASS_CLEAR_STENCIL_BUFFER_FLAG
Clear the stencil buffer.
Definition: renderer_types.h:101
@ RENDERPASS_CLEAR_COLOUR_BUFFER_FLAG
Clear the colour buffer.
Definition: renderer_types.h:97
struct renderer_backend_config renderer_backend_config
The generic configuration for a renderer backend.
struct render_target_config render_target_config
render_target_attachment_store_operation
Definition: renderer_types.h:44
@ RENDER_TARGET_ATTACHMENT_STORE_OPERATION_STORE
Definition: renderer_types.h:46
@ RENDER_TARGET_ATTACHMENT_STORE_OPERATION_DONT_CARE
Definition: renderer_types.h:45
render_target_attachment_load_operation
Definition: renderer_types.h:39
@ RENDER_TARGET_ATTACHMENT_LOAD_OPERATION_DONT_CARE
Definition: renderer_types.h:40
@ RENDER_TARGET_ATTACHMENT_LOAD_OPERATION_LOAD
Definition: renderer_types.h:41
struct pick_packet_data pick_packet_data
struct ui_packet_data ui_packet_data
struct mesh_packet_data mesh_packet_data
struct renderer_plugin renderer_plugin
A generic "interface" for the renderer plugin. The renderer backend is what is responsible for making...
struct renderpass_config renderpass_config
struct render_target_attachment render_target_attachment
struct renderbuffer renderbuffer
struct render_target render_target
Represents a render target, which is used for rendering to a texture or set of textures.
renderbuffer_type
Definition: renderer_types.h:149
@ RENDERBUFFER_TYPE_STORAGE
Buffer is used for data storage.
Definition: renderer_types.h:163
@ RENDERBUFFER_TYPE_VERTEX
Buffer is used for vertex data.
Definition: renderer_types.h:153
@ RENDERBUFFER_TYPE_UNIFORM
Buffer is used for uniform data.
Definition: renderer_types.h:157
@ RENDERBUFFER_TYPE_READ
Buffer is used for reading purposes (i.e copy to from device local, then read)
Definition: renderer_types.h:161
@ RENDERBUFFER_TYPE_INDEX
Buffer is used for index data.
Definition: renderer_types.h:155
@ RENDERBUFFER_TYPE_STAGING
Buffer is used for staging purposes (i.e. from host-visible to device-local memory)
Definition: renderer_types.h:159
@ RENDERBUFFER_TYPE_UNKNOWN
Buffer is use is unknown. Default, but usually invalid.
Definition: renderer_types.h:151
struct geometry_render_data geometry_render_data
struct render_packet render_packet
A structure which is generated by the application and sent once to the renderer to render a given fra...
u32 renderer_config_flags
Definition: renderer_types.h:200
renderer_winding
The winding order of vertices, used to determine what is the front-face of a triangle.
Definition: renderer_types.h:211
@ RENDERER_WINDING_CLOCKWISE
Counter-clockwise vertex winding.
Definition: renderer_types.h:215
@ RENDERER_WINDING_COUNTER_CLOCKWISE
Counter-clockwise vertex winding.
Definition: renderer_types.h:213
struct render_view render_view
A render view instance, responsible for the generation of view packets based on internal logic and gi...
renderer_debug_view_mode
Definition: renderer_types.h:22
@ RENDERER_VIEW_MODE_DEFAULT
Definition: renderer_types.h:23
@ RENDERER_VIEW_MODE_LIGHTING
Definition: renderer_types.h:24
@ RENDERER_VIEW_MODE_NORMALS
Definition: renderer_types.h:25
renderer_projection_matrix_type
Definition: renderer_types.h:49
@ RENDERER_PROJECTION_MATRIX_TYPE_ORTHOGRAPHIC
An orthographic matrix that is zero-based on the top left.
Definition: renderer_types.h:52
@ RENDERER_PROJECTION_MATRIX_TYPE_ORTHOGRAPHIC_CENTERED
An orthographic matrix that is centered around width/height instead of zero-based....
Definition: renderer_types.h:54
@ RENDERER_PROJECTION_MATRIX_TYPE_PERSPECTIVE
Definition: renderer_types.h:50
struct skybox_packet_data skybox_packet_data
render_target_attachment_source
Definition: renderer_types.h:34
@ RENDER_TARGET_ATTACHMENT_SOURCE_VIEW
Definition: renderer_types.h:36
@ RENDER_TARGET_ATTACHMENT_SOURCE_DEFAULT
Definition: renderer_types.h:35
render_target_attachment_type
Definition: renderer_types.h:28
@ RENDER_TARGET_ATTACHMENT_TYPE_STENCIL
Definition: renderer_types.h:31
@ RENDER_TARGET_ATTACHMENT_TYPE_DEPTH
Definition: renderer_types.h:30
@ RENDER_TARGET_ATTACHMENT_TYPE_COLOUR
Definition: renderer_types.h:29
This file contains the types for common resources the engine uses.
struct texture texture
Represents a texture.
shader_stage
Shader stages available in the system.
Definition: resource_types.h:368
struct shader shader
Represents a shader on the frontend.
Represents a camera that can be used for a variety of things, especially rendering....
Definition: camera.h:21
Engine-level current frame-specific data.
Definition: frame_data.h:16
A data structure to be used alongside an allocator for dynamic memory allocation. Tracks free ranges ...
Definition: freelist.h:20
Definition: renderer_types.h:15
b8 winding_inverted
Definition: renderer_types.h:19
u32 unique_id
Definition: renderer_types.h:18
mat4 model
Definition: renderer_types.h:16
geometry * geometry
Definition: renderer_types.h:17
Represents actual geometry in the world. Typically (but not always, depending on use) paired with a m...
Definition: resource_types.h:311
The data structure for a linear allocator.
Definition: linear_allocator.h:25
Definition: renderer_types.h:986
mesh ** meshes
Definition: renderer_types.h:988
u32 mesh_count
Definition: renderer_types.h:987
Definition: resource_types.h:354
Definition: renderer_types.h:999
struct ui_text ** texts
Definition: renderer_types.h:1008
mesh_packet_data ui_mesh_data
Definition: renderer_types.h:1004
u32 text_count
Definition: renderer_types.h:1007
geometry_render_data * world_mesh_data
Definition: renderer_types.h:1001
geometry_render_data * terrain_mesh_data
Definition: renderer_types.h:1003
u32 ui_geometry_count
Definition: renderer_types.h:1005
A structure which is generated by the application and sent once to the renderer to render a given fra...
Definition: renderer_types.h:1018
u16 view_count
Definition: renderer_types.h:1020
render_view_packet * views
Definition: renderer_types.h:1022
Definition: renderer_types.h:57
render_target_attachment_source source
Definition: renderer_types.h:59
render_target_attachment_load_operation load_operation
Definition: renderer_types.h:60
render_target_attachment_type type
Definition: renderer_types.h:58
render_target_attachment_store_operation store_operation
Definition: renderer_types.h:61
b8 present_after
Definition: renderer_types.h:62
Definition: renderer_types.h:70
render_target_attachment_source source
Definition: renderer_types.h:72
render_target_attachment_load_operation load_operation
Definition: renderer_types.h:73
render_target_attachment_type type
Definition: renderer_types.h:71
struct texture * texture
Definition: renderer_types.h:76
render_target_attachment_store_operation store_operation
Definition: renderer_types.h:74
b8 present_after
Definition: renderer_types.h:75
Definition: renderer_types.h:65
u8 attachment_count
Definition: renderer_types.h:66
render_target_attachment_config * attachments
Definition: renderer_types.h:67
Represents a render target, which is used for rendering to a texture or set of textures.
Definition: renderer_types.h:80
u8 attachment_count
The number of attachments.
Definition: renderer_types.h:82
void * internal_framebuffer
The renderer API internal framebuffer object.
Definition: renderer_types.h:86
struct render_target_attachment * attachments
An array of attachments.
Definition: renderer_types.h:84
A packet for and generated by a render view, which contains data about what is to be rendered.
Definition: renderer_types.h:949
const render_view * view
A constant pointer to the view this packet is associated with.
Definition: renderer_types.h:953
vec3 view_position
The current view position, if applicable.
Definition: renderer_types.h:959
const char * custom_shader_name
The name of the custom shader to use, if applicable. Otherwise 0.
Definition: renderer_types.h:981
u32 terrain_geometry_count
The number of terrain geometries to be drawn.
Definition: renderer_types.h:970
geometry_render_data * terrain_geometries
The terrain geometries to be drawn.
Definition: renderer_types.h:972
skybox_packet_data skybox_data
The data for the current skybox.
Definition: renderer_types.h:963
struct terrain ** terrains
Definition: renderer_types.h:979
vec4 ambient_colour
The current scene ambient colour, if applicable.
Definition: renderer_types.h:961
mat4 view_matrix
The current view matrix.
Definition: renderer_types.h:955
void * extended_data
Holds a pointer to freeform data, typically understood both by the object and consuming view.
Definition: renderer_types.h:983
geometry_render_data * debug_geometries
The debug geometries to be drawn.
Definition: renderer_types.h:977
u32 geometry_count
The number of geometries to be drawn.
Definition: renderer_types.h:965
geometry_render_data * geometries
The geometries to be drawn.
Definition: renderer_types.h:967
mat4 projection_matrix
The current projection matrix.
Definition: renderer_types.h:957
struct viewport * vp
A pointer to the viewport to be used.
Definition: renderer_types.h:951
u32 debug_geometry_count
The number of debug geometries to be drawn.
Definition: renderer_types.h:975
A render view instance, responsible for the generation of view packets based on internal logic and gi...
Definition: renderer_types.h:857
b8(* on_packet_build)(const struct render_view *self, struct frame_data *p_frame_data, struct viewport *v, struct camera *c, void *data, struct render_view_packet *out_packet)
Builds a render view packet using the provided view and meshes.
Definition: renderer_types.h:910
const char * custom_shader_name
The name of the custom shader used by this view, if there is one.
Definition: renderer_types.h:871
void(* on_resize)(struct render_view *self, u32 width, u32 height)
A pointer to a function to be called when the owner of this view (such as the window) is resized.
Definition: renderer_types.h:897
void(* on_destroy)(struct render_view *self)
A pointer to a function to be called when this view is destroyed.
Definition: renderer_types.h:887
u16 height
The current height of this view.
Definition: renderer_types.h:863
b8(* attachment_target_regenerate)(struct render_view *self, u32 pass_index, struct render_target_attachment *attachment)
Regenerates the resources for the given attachment at the provided pass index.
Definition: renderer_types.h:938
u16 width
The current width of this view.
Definition: renderer_types.h:861
u8 renderpass_count
The number of renderpasses used by this view.
Definition: renderer_types.h:866
renderpass * passes
An array of renderpasses used by this view.
Definition: renderer_types.h:868
const char * name
The name of the view.
Definition: renderer_types.h:859
b8(* on_registered)(struct render_view *self)
A pointer to a function to be called when this view is registered with the view system.
Definition: renderer_types.h:881
void(* on_packet_destroy)(const struct render_view *self, struct render_view_packet *packet)
Destroys a render view packet.
Definition: renderer_types.h:918
void * internal_data
The internal, view-specific data for this view.
Definition: renderer_types.h:873
b8(* on_render)(const struct render_view *self, const struct render_view_packet *packet, struct frame_data *p_frame_data)
Uses the given view and packet to render the contents therein.
Definition: renderer_types.h:928
Definition: renderer_types.h:172
renderbuffer_type type
The type of buffer, which typically determines its use.
Definition: renderer_types.h:176
freelist buffer_freelist
The buffer freelist, if used.
Definition: renderer_types.h:184
char * name
The name of the buffer, used for debugging purposes.
Definition: renderer_types.h:174
u64 offset
The byte offset used for linear tracking.
Definition: renderer_types.h:190
u64 total_size
The total size of the buffer in bytes.
Definition: renderer_types.h:178
renderbuffer_track_type track_type
indicates the allocation tracking type.
Definition: renderer_types.h:180
void * internal_data
Contains internal data for the renderer-API-specific buffer.
Definition: renderer_types.h:188
void * freelist_block
The freelist memory block, if needed.
Definition: renderer_types.h:186
u64 freelist_memory_requirement
The amount of memory required to store the freelist. 0 if not used.
Definition: renderer_types.h:182
The generic configuration for a renderer backend.
Definition: renderer_types.h:203
renderer_config_flags flags
Various configuration flags for renderer backend setup.
Definition: renderer_types.h:207
const char * application_name
The name of the application.
Definition: renderer_types.h:205
A generic "interface" for the renderer plugin. The renderer backend is what is responsible for making...
Definition: renderer_types.h:225
b8(* shader_bind_instance)(struct renderer_plugin *plugin, struct shader *s, u32 instance_id)
Binds instance resources for use and updating.
Definition: renderer_types.h:549
b8(* renderbuffer_read)(struct renderer_plugin *plugin, renderbuffer *buffer, u64 offset, u64 size, void **out_memory)
Reads memory from the provided buffer at the given range to the output variable.
Definition: renderer_types.h:796
void(* texture_read_pixel)(struct renderer_plugin *plugin, texture *t, u32 x, u32 y, u8 **out_rgba)
Reads a pixel from the provided texture at the given x/y coordinate.
Definition: renderer_types.h:437
b8(* frame_prepare)(struct renderer_plugin *plugin, struct frame_data *p_frame_data)
Performs setup routines required at the start of a frame.
Definition: renderer_types.h:279
void(* texture_map_resources_release)(struct renderer_plugin *plugin, struct texture_map *map)
Releases internal resources for the given texture map.
Definition: renderer_types.h:619
b8(* render_target_create)(struct renderer_plugin *plugin, u8 attachment_count, render_target_attachment *attachments, renderpass *pass, u32 width, u32 height, render_target *out_target)
Creates a new render target using the provided data.
Definition: renderer_types.h:632
b8(* flag_enabled_get)(struct renderer_plugin *plugin, renderer_config_flags flag)
Indicates if the provided renderer flag is enabled. If multiple flags are passed, all must be set for...
Definition: renderer_types.h:707
b8(* renderbuffer_unbind)(struct renderer_plugin *plugin, renderbuffer *buffer)
Unbinds the given buffer.
Definition: renderer_types.h:751
b8(* shader_apply_instance)(struct renderer_plugin *plugin, struct shader *s, b8 needs_update)
Applies data for the currently bound instance.
Definition: renderer_types.h:569
b8(* renderbuffer_resize)(struct renderer_plugin *plugin, renderbuffer *buffer, u64 new_total_size)
Resizes the given buffer to new_total_size. new_total_size must be greater than the current buffer si...
Definition: renderer_types.h:808
void(* texture_create_writeable)(struct renderer_plugin *plugin, texture *t)
Creates a new writeable texture with no data written to it.
Definition: renderer_types.h:389
b8(* renderbuffer_copy_range)(struct renderer_plugin *plugin, renderbuffer *source, u64 source_offset, renderbuffer *dest, u64 dest_offset, u64 size)
Copies data in the specified rage fron the source to the destination buffer.
Definition: renderer_types.h:833
b8(* initialize)(struct renderer_plugin *plugin, const renderer_backend_config *config, u8 *out_window_render_target_count)
Initializes the backend.
Definition: renderer_types.h:251
u8(* window_attachment_count_get)(struct renderer_plugin *plugin)
Returns the number of attachments required for window-based render targets.
Definition: renderer_types.h:690
b8(* is_multithreaded)(struct renderer_plugin *plugin)
Indicates if the renderer is capable of multi-threading.
Definition: renderer_types.h:697
u64 frame_number
The current frame number.
Definition: renderer_types.h:227
b8(* renderpass_end)(struct renderer_plugin *plugin, renderpass *pass)
Ends a renderpass with the given id.
Definition: renderer_types.h:364
void(* shader_destroy)(struct renderer_plugin *plugin, struct shader *shader)
Destroys the given shader and releases any resources held by it.
Definition: renderer_types.h:510
b8(* renderbuffer_draw)(struct renderer_plugin *plugin, renderbuffer *buffer, u64 offset, u32 element_count, b8 bind_only)
Attempts to draw the contents of the provided buffer at the given offset and element count....
Definition: renderer_types.h:846
b8(* begin)(struct renderer_plugin *plugin, struct frame_data *p_frame_data)
Begins a render. There must be at least one of these and a matching end per frame.
Definition: renderer_types.h:287
b8(* shader_instance_resources_acquire)(struct renderer_plugin *plugin, struct shader *s, u32 texture_map_count, texture_map **maps, u32 *out_instance_id)
Acquires internal instance-level resources and provides an instance id.
Definition: renderer_types.h:581
void(* geometry_draw)(struct renderer_plugin *plugin, geometry_render_data *data)
Draws the given geometry. Should only be called inside a renderpass, within a frame.
Definition: renderer_types.h:488
u64 internal_context_size
The size of the plugin-specific renderer context.
Definition: renderer_types.h:237
b8(* shader_initialize)(struct renderer_plugin *plugin, struct shader *shader)
Initializes a configured shader. Will be automatically destroyed if this step fails....
Definition: renderer_types.h:520
void(* geometry_vertex_update)(struct renderer_plugin *plugin, geometry *g, u32 offset, u32 vertex_count, void *vertices)
Updates vertex data in the given geometry with the provided data in the given range.
Definition: renderer_types.h:472
b8(* renderbuffer_internal_create)(struct renderer_plugin *plugin, renderbuffer *buffer)
Creates and assigns the renderer-backend-specific buffer.
Definition: renderer_types.h:725
b8(* renderpass_begin)(struct renderer_plugin *plugin, renderpass *pass, render_target *target)
Begins a renderpass with the given id.
Definition: renderer_types.h:355
void(* scissor_reset)(struct renderer_plugin *plugin)
Resets the scissor to the default, which matches the application window. Must be done within a render...
Definition: renderer_types.h:337
b8(* shader_apply_globals)(struct renderer_plugin *plugin, struct shader *s, b8 needs_update)
Applies global data to the uniform buffer.
Definition: renderer_types.h:559
b8(* shader_bind_globals)(struct renderer_plugin *plugin, struct shader *s)
Binds global resources for use and updating.
Definition: renderer_types.h:539
b8(* shader_create)(struct renderer_plugin *plugin, struct shader *shader, const shader_config *config, renderpass *pass, u8 stage_count, const char **stage_filenames, shader_stage *stages)
Creates internal shader resources using the provided parameters.
Definition: renderer_types.h:502
void(* render_target_destroy)(struct renderer_plugin *plugin, render_target *target, b8 free_internal_memory)
Destroys the provided render target.
Definition: renderer_types.h:641
void(* texture_resize)(struct renderer_plugin *plugin, texture *t, u32 new_width, u32 new_height)
Resizes a texture. There is no check at this level to see if the texture is writeable....
Definition: renderer_types.h:401
b8(* renderbuffer_bind)(struct renderer_plugin *plugin, renderbuffer *buffer, u64 offset)
Binds the given buffer at the provided offset.
Definition: renderer_types.h:743
b8(* geometry_upload)(struct renderer_plugin *plugin, geometry *g, u32 vertex_offset, u32 vertex_size, u32 index_offset, u32 index_size)
Acquires renderer-backend-API-specific internal resources for the given geometry and uploads data to ...
Definition: renderer_types.h:461
void(* winding_set)(struct renderer_plugin *plugin, renderer_winding winding)
Set the renderer to use the given winding direction.
Definition: renderer_types.h:345
void(* texture_create)(struct renderer_plugin *plugin, const u8 *pixels, struct texture *texture)
Creates a renderer-backend-API-specific texture, acquiring internal resources as needed.
Definition: renderer_types.h:373
b8(* present)(struct renderer_plugin *plugin, struct frame_data *p_frame_data)
Performs routines required to draw a frame, such as presentation. Should only be called after a succe...
Definition: renderer_types.h:305
b8(* geometry_create)(struct renderer_plugin *plugin, geometry *g)
Creates renderer-backend-API-specific internal resources for the given geometry using the data provid...
Definition: renderer_types.h:447
b8(* renderbuffer_flush)(struct renderer_plugin *plugin, renderbuffer *buffer, u64 offset, u64 size)
Flushes buffer memory at the given range. Should be done after a write.
Definition: renderer_types.h:784
void(* geometry_destroy)(struct renderer_plugin *plugin, geometry *g)
Destroys the given geometry, releasing internal resources.
Definition: renderer_types.h:480
void(* shutdown)(struct renderer_plugin *plugin)
Shuts the renderer backend down.
Definition: renderer_types.h:258
b8(* renderpass_create)(struct renderer_plugin *plugin, const renderpass_config *config, renderpass *out_renderpass)
Creates a new renderpass.
Definition: renderer_types.h:650
u8(* window_attachment_index_get)(struct renderer_plugin *plugin)
Returns the current window attachment index.
Definition: renderer_types.h:683
void(* texture_read_data)(struct renderer_plugin *plugin, texture *t, u32 offset, u32 size, void **out_memory)
Reads the given data from the provided texture.
Definition: renderer_types.h:426
void * internal_context
The plugin-specific renderer context.
Definition: renderer_types.h:241
b8(* shader_instance_resources_release)(struct renderer_plugin *plugin, struct shader *s, u32 instance_id)
Releases internal instance-level resources for the given instance id.
Definition: renderer_types.h:591
void(* flag_enabled_set)(struct renderer_plugin *plugin, renderer_config_flags flag, b8 enabled)
Sets whether the included flag(s) are enabled or not. If multiple flags are passed,...
Definition: renderer_types.h:716
void(* viewport_set)(struct renderer_plugin *plugin, vec4 rect)
Sets the renderer viewport to the given rectangle. Must be done within a renderpass.
Definition: renderer_types.h:313
void(* texture_destroy)(struct renderer_plugin *plugin, struct texture *texture)
Destroys the given texture, releasing internal resources.
Definition: renderer_types.h:381
void(* texture_write_data)(struct renderer_plugin *plugin, texture *t, u32 offset, u32 size, const u8 *pixels)
Writes the given data to the provided texture. NOTE: At this level, this can either be a writeable or...
Definition: renderer_types.h:415
void(* renderpass_destroy)(struct renderer_plugin *plugin, renderpass *pass)
Destroys the given renderpass.
Definition: renderer_types.h:658
void(* renderbuffer_internal_destroy)(struct renderer_plugin *plugin, renderbuffer *buffer)
Destroys the given buffer.
Definition: renderer_types.h:733
b8(* end)(struct renderer_plugin *plugin, struct frame_data *p_frame_data)
Ends a render.
Definition: renderer_types.h:295
void(* renderbuffer_unmap_memory)(struct renderer_plugin *plugin, renderbuffer *buffer, u64 offset, u64 size)
Unmaps memory from the given buffer in the provided range to a block of memory. This memory should be...
Definition: renderer_types.h:773
void(* resized)(struct renderer_plugin *plugin, u16 width, u16 height)
Handles window resizes.
Definition: renderer_types.h:267
b8(* shader_use)(struct renderer_plugin *plugin, struct shader *shader)
Uses the given shader, activating it for updates to attributes, uniforms and such,...
Definition: renderer_types.h:530
u8 draw_index
The draw index for the current frame. Typically aligns with the number of queue submissions per frame...
Definition: renderer_types.h:233
b8(* texture_map_resources_acquire)(struct renderer_plugin *plugin, struct texture_map *map)
Acquires internal resources for the given texture map.
Definition: renderer_types.h:611
b8(* renderbuffer_load_range)(struct renderer_plugin *plugin, renderbuffer *buffer, u64 offset, u64 size, const void *data)
Loads provided data into the specified rage of the given buffer.
Definition: renderer_types.h:820
b8(* shader_uniform_set)(struct renderer_plugin *plugin, struct shader *frontend_shader, struct shader_uniform *uniform, const void *value)
Sets the uniform of the given shader to the provided value.
Definition: renderer_types.h:602
void(* scissor_set)(struct renderer_plugin *plugin, vec4 rect)
Sets the renderer scissor to the given rectangle. Must be done within a renderpass.
Definition: renderer_types.h:329
void(* viewport_reset)(struct renderer_plugin *plugin)
Resets the viewport to the default, which matches the application window. Must be done within a rende...
Definition: renderer_types.h:321
Definition: renderer_types.h:104
u32 stencil
Definition: renderer_types.h:108
u8 render_target_count
The number of render targets created according to the render target config.
Definition: renderer_types.h:119
u8 clear_flags
The clear flags for this renderpass.
Definition: renderer_types.h:116
render_target_config target
The render target configuration.
Definition: renderer_types.h:121
const char * name
The name of this renderpass.
Definition: renderer_types.h:106
f32 depth
Definition: renderer_types.h:107
vec4 clear_colour
The clear colour used for this renderpass.
Definition: renderer_types.h:113
vec4 render_area
The current render area of the renderpass.
Definition: renderer_types.h:111
Represents a generic renderpass.
Definition: renderer_types.h:127
render_target * targets
An array of render targets used by this renderpass.
Definition: renderer_types.h:143
u8 render_target_count
The number of render targets for this renderpass.
Definition: renderer_types.h:141
char * name
Definition: renderer_types.h:131
u8 clear_flags
The clear flags for this renderpass.
Definition: renderer_types.h:139
void * internal_data
Internal renderpass data.
Definition: renderer_types.h:146
vec4 clear_colour
The clear colour used for this renderpass.
Definition: renderer_types.h:136
u16 id
The id of the renderpass.
Definition: renderer_types.h:129
vec4 render_area
The current render area of the renderpass.
Definition: renderer_types.h:134
Configuration for a shader. Typically created and destroyed by the shader resource loader,...
Definition: resource_types.h:454
Represents a shader on the frontend.
Definition: shader_system.h:91
Definition: renderer_types.h:941
struct skybox * sb
Definition: renderer_types.h:942
A structure which maps a texture, use and other properties.
Definition: resource_types.h:208
Represents a texture.
Definition: resource_types.h:165
Definition: renderer_types.h:992
struct ui_text ** texts
Definition: renderer_types.h:996
mesh_packet_data mesh_data
Definition: renderer_types.h:993
u32 text_count
Definition: renderer_types.h:995
a 4x4 matrix, typically used to represent object transformations.
Definition: math_types.h:147
A 3-element vector.
Definition: math_types.h:49
A 4-element vector.
Definition: math_types.h:89