9#include <kinc/backend/graphics4/pipeline.h>
25 KINC_G4_BLEND_SOURCE_ALPHA,
26 KINC_G4_BLEND_DEST_ALPHA,
27 KINC_G4_BLEND_INV_SOURCE_ALPHA,
28 KINC_G4_BLEND_INV_DEST_ALPHA,
29 KINC_G4_BLEND_SOURCE_COLOR,
30 KINC_G4_BLEND_DEST_COLOR,
31 KINC_G4_BLEND_INV_SOURCE_COLOR,
32 KINC_G4_BLEND_INV_DEST_COLOR,
33 KINC_G4_BLEND_CONSTANT,
34 KINC_G4_BLEND_INV_CONSTANT
35} kinc_g4_blending_factor_t;
39 KINC_G4_BLENDOP_SUBTRACT,
40 KINC_G4_BLENDOP_REVERSE_SUBTRACT,
43} kinc_g4_blending_operation_t;
46 KINC_G4_COMPARE_ALWAYS,
47 KINC_G4_COMPARE_NEVER,
48 KINC_G4_COMPARE_EQUAL,
49 KINC_G4_COMPARE_NOT_EQUAL,
51 KINC_G4_COMPARE_LESS_EQUAL,
52 KINC_G4_COMPARE_GREATER,
53 KINC_G4_COMPARE_GREATER_EQUAL
54} kinc_g4_compare_mode_t;
56typedef enum { KINC_G4_CULL_CLOCKWISE, KINC_G4_CULL_COUNTER_CLOCKWISE, KINC_G4_CULL_NOTHING } kinc_g4_cull_mode_t;
61 KINC_G4_STENCIL_REPLACE,
62 KINC_G4_STENCIL_INCREMENT,
63 KINC_G4_STENCIL_INCREMENT_WRAP,
64 KINC_G4_STENCIL_DECREMENT,
65 KINC_G4_STENCIL_DECREMENT_WRAP,
66 KINC_G4_STENCIL_INVERT
67} kinc_g4_stencil_action_t;
77 kinc_g4_cull_mode_t cull_mode;
80 kinc_g4_compare_mode_t depth_mode;
82 kinc_g4_compare_mode_t stencil_front_mode;
83 kinc_g4_stencil_action_t stencil_front_both_pass;
84 kinc_g4_stencil_action_t stencil_front_depth_fail;
85 kinc_g4_stencil_action_t stencil_front_fail;
87 kinc_g4_compare_mode_t stencil_back_mode;
88 kinc_g4_stencil_action_t stencil_back_both_pass;
89 kinc_g4_stencil_action_t stencil_back_depth_fail;
90 kinc_g4_stencil_action_t stencil_back_fail;
92 int stencil_reference_value;
93 int stencil_read_mask;
94 int stencil_write_mask;
97 kinc_g4_blending_factor_t blend_source;
98 kinc_g4_blending_factor_t blend_destination;
99 kinc_g4_blending_operation_t blend_operation;
100 kinc_g4_blending_factor_t alpha_blend_source;
101 kinc_g4_blending_factor_t alpha_blend_destination;
102 kinc_g4_blending_operation_t alpha_blend_operation;
104 bool color_write_mask_red[8];
105 bool color_write_mask_green[8];
106 bool color_write_mask_blue[8];
107 bool color_write_mask_alpha[8];
109 int color_attachment_count;
110 kinc_g4_render_target_format_t color_attachment[8];
112 int depth_attachment_bits;
113 int stencil_attachment_bits;
115 bool conservative_rasterization;
117 kinc_g4_pipeline_impl_t impl;
154void kinc_g4_internal_set_pipeline(kinc_g4_pipeline_t *pipeline);
155void kinc_g4_internal_pipeline_set_defaults(kinc_g4_pipeline_t *pipeline);
Provides basic functionality that's used all over the place. There's usually no need to manually incl...
Provides the constant_location-struct which is used for setting constants/uniforms in a shader.
KINC_FUNC void kinc_g4_pipeline_compile(kinc_g4_pipeline_t *pipeline)
Compiles a pipeline. After a pipeline has been compiled it is finalized. It cannot be compiled again ...
KINC_FUNC void kinc_g4_pipeline_destroy(kinc_g4_pipeline_t *pipeline)
Destroys a pipeline.
KINC_FUNC kinc_g4_constant_location_t kinc_g4_pipeline_get_constant_location(kinc_g4_pipeline_t *pipeline, const char *name)
Searches for a constant/uniform and returns a constant-location which can be used to change the const...
KINC_FUNC kinc_g4_texture_unit_t kinc_g4_pipeline_get_texture_unit(kinc_g4_pipeline_t *pipeline, const char *name)
Searches for a texture-declaration and returns a texture-unit which can be used to assign a texture.
KINC_FUNC void kinc_g4_pipeline_init(kinc_g4_pipeline_t *pipeline)
Initializes a pipeline.
Provides functions for handling render-targets.
Provides a texture-unit-struct which is used for setting textures in a shader.
Definition vertexstructure.h:133