5#include <kinc/backend/graphics5/pipeline.h>
26 KINC_G5_BLEND_SOURCE_ALPHA,
27 KINC_G5_BLEND_DEST_ALPHA,
28 KINC_G5_BLEND_INV_SOURCE_ALPHA,
29 KINC_G5_BLEND_INV_DEST_ALPHA,
30 KINC_G5_BLEND_SOURCE_COLOR,
31 KINC_G5_BLEND_DEST_COLOR,
32 KINC_G5_BLEND_INV_SOURCE_COLOR,
33 KINC_G5_BLEND_INV_DEST_COLOR,
34 KINC_G5_BLEND_CONSTANT,
35 KINC_G5_BLEND_INV_CONSTANT
36} kinc_g5_blending_factor_t;
41 KINC_G5_BLENDOP_SUBTRACT,
42 KINC_G5_BLENDOP_REVERSE_SUBTRACT,
45} kinc_g5_blending_operation_t;
47typedef enum kinc_g5_cull_mode { KINC_G5_CULL_MODE_CLOCKWISE, KINC_G5_CULL_MODE_COUNTERCLOCKWISE, KINC_G5_CULL_MODE_NEVER } kinc_g5_cull_mode_t;
49typedef enum kinc_g5_compare_mode {
50 KINC_G5_COMPARE_MODE_ALWAYS,
51 KINC_G5_COMPARE_MODE_NEVER,
52 KINC_G5_COMPARE_MODE_EQUAL,
53 KINC_G5_COMPARE_MODE_NOT_EQUAL,
54 KINC_G5_COMPARE_MODE_LESS,
55 KINC_G5_COMPARE_MODE_LESS_EQUAL,
56 KINC_G5_COMPARE_MODE_GREATER,
57 KINC_G5_COMPARE_MODE_GREATER_EQUAL
58} kinc_g5_compare_mode_t;
60typedef enum kinc_g5_stencil_action {
61 KINC_G5_STENCIL_ACTION_KEEP,
62 KINC_G5_STENCIL_ACTION_ZERO,
63 KINC_G5_STENCIL_ACTION_REPLACE,
64 KINC_G5_STENCIL_ACTION_INCREMENT,
65 KINC_G5_STENCIL_ACTION_INCREMENT_WRAP,
66 KINC_G5_STENCIL_ACTION_DECREMENT,
67 KINC_G5_STENCIL_ACTION_DECREMENT_WRAP,
68 KINC_G5_STENCIL_ACTION_INVERT
69} kinc_g5_stencil_action_t;
72 kinc_g5_vertex_structure_t *inputLayout[16];
79 kinc_g5_cull_mode_t cullMode;
82 kinc_g5_compare_mode_t depthMode;
84 kinc_g5_compare_mode_t stencilMode;
85 kinc_g5_stencil_action_t stencilBothPass;
86 kinc_g5_stencil_action_t stencilDepthFail;
87 kinc_g5_stencil_action_t stencilFail;
88 int stencilReferenceValue;
93 kinc_g5_blending_factor_t blend_source;
94 kinc_g5_blending_factor_t blend_destination;
95 kinc_g5_blending_operation_t blend_operation;
96 kinc_g5_blending_factor_t alpha_blend_source;
97 kinc_g5_blending_factor_t alpha_blend_destination;
98 kinc_g5_blending_operation_t alpha_blend_operation;
100 bool colorWriteMaskRed[8];
101 bool colorWriteMaskGreen[8];
102 bool colorWriteMaskBlue[8];
103 bool colorWriteMaskAlpha[8];
105 int colorAttachmentCount;
106 kinc_g5_render_target_format_t colorAttachment[8];
108 int depthAttachmentBits;
109 int stencilAttachmentBits;
111 bool conservativeRasterization;
113 PipelineState5Impl impl;
122void kinc_g5_internal_pipeline_init(kinc_g5_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.
Contains the base G5-functionality.
KINC_FUNC kinc_g5_constant_location_t kinc_g5_pipeline_get_constant_location(kinc_g5_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 void kinc_g5_pipeline_init(kinc_g5_pipeline_t *pipeline)
Initializes a pipeline.
KINC_FUNC void kinc_g5_pipeline_destroy(kinc_g5_pipeline_t *pipeline)
Destroys a pipeline.
KINC_FUNC kinc_g5_texture_unit_t kinc_g5_pipeline_get_texture_unit(kinc_g5_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_g5_pipeline_compile(kinc_g5_pipeline_t *pipeline)
Compiles a pipeline. After a pipeline has been compiled it is finalized. It cannot be compiled again ...
Provides types for setting up the structure of vertices in a vertex-buffer.