10#include <kinc/backend/graphics5/commandlist.h>
22#define KINC_G5_CLEAR_COLOR 1
23#define KINC_G5_CLEAR_DEPTH 2
24#define KINC_G5_CLEAR_STENCIL 4
46 CommandList5Impl impl;
47} kinc_g5_command_list_t;
84 float depth,
int stencil);
140KINC_FUNC
void kinc_g5_command_list_draw_indexed_vertices_instanced(kinc_g5_command_list_t *list,
int instanceCount);
141KINC_FUNC
void kinc_g5_command_list_draw_indexed_vertices_instanced_from_to(kinc_g5_command_list_t *list,
int instanceCount,
int start,
int count);
325 kinc_g5_render_target_t *target);
327KINC_FUNC
void kinc_g5_command_list_set_render_target_face(kinc_g5_command_list_t *list, kinc_g5_render_target_t *texture,
int face);
329KINC_FUNC
void kinc_g5_command_list_set_sampler(kinc_g5_command_list_t *list, kinc_g5_texture_unit_t unit, kinc_g5_sampler_t *sampler);
332KINC_FUNC
bool kinc_g5_command_list_init_occlusion_query(kinc_g5_command_list_t *list,
unsigned *occlusionQuery);
333KINC_FUNC
void kinc_g5_command_list_delete_occlusion_query(kinc_g5_command_list_t *list,
unsigned occlusionQuery);
334KINC_FUNC
void kinc_g5_command_list_render_occlusion_query(kinc_g5_command_list_t *list,
unsigned occlusionQuery,
int triangles);
335KINC_FUNC
bool kinc_g5_command_list_are_query_results_available(kinc_g5_command_list_t *list,
unsigned occlusionQuery);
336KINC_FUNC
void kinc_g5_command_list_get_query_result(kinc_g5_command_list_t *list,
unsigned occlusionQuery,
unsigned *pixelCount);
KINC_FUNC void kinc_g5_command_list_render_target_to_texture_barrier(kinc_g5_command_list_t *list, struct kinc_g5_render_target *renderTarget)
Writes a command that prepares a render-target to be used for sampling/reading like a texture.
KINC_FUNC void kinc_g5_command_list_set_fragment_constant_buffer(kinc_g5_command_list_t *list, struct kinc_g5_constant_buffer *buffer, int offset, size_t size)
Writes a command that sets a constant-buffer for the fragment-shader-stage.
KINC_FUNC void kinc_g5_command_list_execute(kinc_g5_command_list_t *list)
Kicks off execution of the commands which have been recorded in the command-list. kinc_g5_command_lis...
KINC_FUNC void kinc_g5_command_list_set_vertex_buffers(kinc_g5_command_list_t *list, struct kinc_g5_vertex_buffer **buffers, int *offsets, int count)
Writes a command which sets vertex-buffers for the next draw-call.
KINC_FUNC void kinc_g5_command_list_set_texture_from_render_target(kinc_g5_command_list_t *list, kinc_g5_texture_unit_t unit, kinc_g5_render_target_t *target)
Uses the color-component of a render-target as a texture.
KINC_FUNC void kinc_g5_command_list_destroy(kinc_g5_command_list_t *list)
Destroys a command-list.
KINC_FUNC void kinc_g5_command_list_init(kinc_g5_command_list_t *list)
Initializes a command-list.
KINC_FUNC void kinc_g5_command_list_set_render_targets(kinc_g5_command_list_t *list, struct kinc_g5_render_target **targets, int count)
Writes a command that sets the render-targets to draw into in following draw-calls.
KINC_FUNC void kinc_g5_command_list_upload_texture(kinc_g5_command_list_t *list, struct kinc_g5_texture *texture)
Writes a command to upload a texture that's in main-memory to gpu-memory. Does nothing on unified-mem...
KINC_FUNC void kinc_g5_command_list_set_index_buffer(kinc_g5_command_list_t *list, struct kinc_g5_index_buffer *buffer)
Writes a command to set an index-buffer to be used for the next draw-command.
KINC_FUNC void kinc_g5_command_list_disable_scissor(kinc_g5_command_list_t *list)
Writes a command to disable the scissor-rect.
KINC_FUNC void kinc_g5_command_list_draw_indexed_vertices(kinc_g5_command_list_t *list)
Writes a command that draws the entire content of the currently set index-buffer and vertex-buffer....
KINC_FUNC void kinc_g5_command_list_set_blend_constant(kinc_g5_command_list_t *list, float r, float g, float b, float a)
Sets the blend constant used for KINC_G5_BLEND_CONSTANT or KINC_G5_INV_BLEND_CONSTANT.
KINC_FUNC void kinc_g5_command_list_clear(kinc_g5_command_list_t *list, struct kinc_g5_render_target *render_target, unsigned flags, unsigned color, float depth, int stencil)
Records a command to clear the color, depth and/or stencil-components of a render-target.
KINC_FUNC void kinc_g5_command_list_set_vertex_constant_buffer(kinc_g5_command_list_t *list, struct kinc_g5_constant_buffer *buffer, int offset, size_t size)
Writes a command that sets a constant-buffer for the vertex-shader-stage.
KINC_FUNC void kinc_g5_command_list_set_texture_from_render_target_depth(kinc_g5_command_list_t *list, kinc_g5_texture_unit_t unit, kinc_g5_render_target_t *target)
Uses the depth-component of a render-target as a texture.
KINC_FUNC void kinc_g5_command_list_draw_indexed_vertices_from_to(kinc_g5_command_list_t *list, int start, int count)
Writes a command that draws a part of the content of the currently set index-buffer and vertex-buffer...
KINC_FUNC void kinc_g5_command_list_set_image_texture(kinc_g5_command_list_t *list, kinc_g5_texture_unit_t unit, kinc_g5_texture_t *texture)
Assigns a texture to a texture-unit for direct access via GLSL's texelFetch (as opposed to GLSL's tex...
KINC_FUNC void kinc_g5_command_list_wait_for_execution_to_finish(kinc_g5_command_list_t *list)
Waits for execution of the command_list to finish. Make sure the command-list is executing before you...
KINC_FUNC void kinc_g5_command_list_scissor(kinc_g5_command_list_t *list, int x, int y, int width, int height)
Writes a command that enables and defines the scissor-rect. When the scissor-rect is enabled,...
KINC_FUNC void kinc_g5_command_list_end(kinc_g5_command_list_t *list)
Ends recording commands for the list. Has to be called after kinc_g5_command_list_begin and before ki...
KINC_FUNC void kinc_g5_command_list_set_texture(kinc_g5_command_list_t *list, kinc_g5_texture_unit_t unit, kinc_g5_texture_t *texture)
Assigns a texture to a texture-unit for sampled access via GLSL's texture.
KINC_FUNC void kinc_g5_command_list_set_compute_constant_buffer(kinc_g5_command_list_t *list, struct kinc_g5_constant_buffer *buffer, int offset, size_t size)
Writes a command that sets a constant-buffer for the compute-shader-stage.
KINC_FUNC void kinc_g5_command_list_texture_to_render_target_barrier(kinc_g5_command_list_t *list, struct kinc_g5_render_target *renderTarget)
Writes a command that prepares a render-target to be rendered to.
KINC_FUNC void kinc_g5_command_list_get_render_target_pixels(kinc_g5_command_list_t *list, struct kinc_g5_render_target *render_target, uint8_t *data)
Writes a command that copies the contents of a render-target into a cpu-side buffer....
KINC_FUNC void kinc_g5_command_list_draw_indexed_vertices_from_to_from(kinc_g5_command_list_t *list, int start, int count, int vertex_offset)
Writes a command that draws a part of the content of the currently set index-buffer and vertex-buffer...
KINC_FUNC void kinc_g5_command_list_begin(kinc_g5_command_list_t *list)
Starts recording commands in a command-list.
KINC_FUNC void kinc_g5_command_list_set_compute_shader(kinc_g5_command_list_t *list, struct kinc_g5_compute_shader *shader)
Writes a command to set the compute shader for the next compute-call.
KINC_FUNC void kinc_g5_command_list_upload_vertex_buffer(kinc_g5_command_list_t *list, struct kinc_g5_vertex_buffer *buffer)
Writes a command to upload a vertex-buffer that's in main-memory to gpu-memory. Does nothing on unifi...
KINC_FUNC void kinc_g5_command_list_set_pipeline(kinc_g5_command_list_t *list, struct kinc_g5_pipeline *pipeline)
Writes a command to set the pipeline for the next draw-call. The pipeline defines most rendering-stat...
KINC_FUNC void kinc_g5_command_list_viewport(kinc_g5_command_list_t *list, int x, int y, int width, int height)
Writes a command that sets the viewport which defines the portion of the framebuffer or render-target...
KINC_FUNC void kinc_g5_command_list_render_target_to_framebuffer_barrier(kinc_g5_command_list_t *list, struct kinc_g5_render_target *renderTarget)
Records a command that prepares a render-target to be used as the current framebuffer.
KINC_FUNC void kinc_g5_command_list_compute(kinc_g5_command_list_t *list, int x, int y, int z)
Records a command that fires off a compute-run on x * y * z elements.
KINC_FUNC void kinc_g5_command_list_upload_index_buffer(kinc_g5_command_list_t *list, struct kinc_g5_index_buffer *buffer)
Writes a command to upload an index-buffer that's in main-memory to gpu-memory. Does nothing on unifi...
KINC_FUNC void kinc_g5_command_list_framebuffer_to_render_target_barrier(kinc_g5_command_list_t *list, struct kinc_g5_render_target *renderTarget)
Records a command that prepares a render-target for regular render-target-usage after being used as t...
Provides basic functionality that's used all over the place. There's usually no need to manually incl...
Provides functions for handling render-targets.
Provides functions for handling textures.
Provides a texture-unit-struct which is used for setting textures in a shader.
Provides functions for sampler objects.
Definition commandlist.h:45
Definition constantbuffer.h:18
Definition indexbuffer.h:17
Definition rendertarget.h:28
Definition vertexbuffer.h:17