Provides functions for creating and using pipelines which configure the GPU for rendering.
More...
#include <kinc/global.h>
#include <kinc/backend/graphics5/pipeline.h>
#include <kinc/graphics5/vertexstructure.h>
#include "constantlocation.h"
#include "graphics.h"
Go to the source code of this file.
|
|
typedef enum kinc_g5_cull_mode | kinc_g5_cull_mode_t |
|
typedef enum kinc_g5_compare_mode | kinc_g5_compare_mode_t |
|
typedef enum kinc_g5_stencil_action | kinc_g5_stencil_action_t |
|
typedef struct kinc_g5_pipeline | kinc_g5_pipeline_t |
|
| enum | kinc_g5_blending_factor_t {
KINC_G5_BLEND_ONE
, KINC_G5_BLEND_ZERO
, KINC_G5_BLEND_SOURCE_ALPHA
, KINC_G5_BLEND_DEST_ALPHA
,
KINC_G5_BLEND_INV_SOURCE_ALPHA
, KINC_G5_BLEND_INV_DEST_ALPHA
, KINC_G5_BLEND_SOURCE_COLOR
, KINC_G5_BLEND_DEST_COLOR
,
KINC_G5_BLEND_INV_SOURCE_COLOR
, KINC_G5_BLEND_INV_DEST_COLOR
, KINC_G5_BLEND_CONSTANT
, KINC_G5_BLEND_INV_CONSTANT
} |
| enum | kinc_g5_blending_operation_t {
KINC_G5_BLENDOP_ADD
, KINC_G5_BLENDOP_SUBTRACT
, KINC_G5_BLENDOP_REVERSE_SUBTRACT
, KINC_G5_BLENDOP_MIN
,
KINC_G5_BLENDOP_MAX
} |
| enum | kinc_g5_cull_mode { KINC_G5_CULL_MODE_CLOCKWISE
, KINC_G5_CULL_MODE_COUNTERCLOCKWISE
, KINC_G5_CULL_MODE_NEVER
} |
| enum | kinc_g5_compare_mode {
KINC_G5_COMPARE_MODE_ALWAYS
, KINC_G5_COMPARE_MODE_NEVER
, KINC_G5_COMPARE_MODE_EQUAL
, KINC_G5_COMPARE_MODE_NOT_EQUAL
,
KINC_G5_COMPARE_MODE_LESS
, KINC_G5_COMPARE_MODE_LESS_EQUAL
, KINC_G5_COMPARE_MODE_GREATER
, KINC_G5_COMPARE_MODE_GREATER_EQUAL
} |
| enum | kinc_g5_stencil_action {
KINC_G5_STENCIL_ACTION_KEEP
, KINC_G5_STENCIL_ACTION_ZERO
, KINC_G5_STENCIL_ACTION_REPLACE
, KINC_G5_STENCIL_ACTION_INCREMENT
,
KINC_G5_STENCIL_ACTION_INCREMENT_WRAP
, KINC_G5_STENCIL_ACTION_DECREMENT
, KINC_G5_STENCIL_ACTION_DECREMENT_WRAP
, KINC_G5_STENCIL_ACTION_INVERT
} |
|
| KINC_FUNC void | kinc_g5_pipeline_init (kinc_g5_pipeline_t *pipeline) |
| | Initializes a pipeline.
|
|
void | kinc_g5_internal_pipeline_init (kinc_g5_pipeline_t *pipeline) |
| KINC_FUNC void | kinc_g5_pipeline_destroy (kinc_g5_pipeline_t *pipeline) |
| | Destroys a pipeline.
|
| 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 and further changes to the pipeline are ignored.
|
| 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 constant/uniform.
|
| 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.
|
Provides functions for creating and using pipelines which configure the GPU for rendering.
◆ kinc_g5_pipeline_compile()
| 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 and further changes to the pipeline are ignored.
- Parameters
-
| pipeline | The pipeline to compile |
◆ kinc_g5_pipeline_destroy()
| KINC_FUNC void kinc_g5_pipeline_destroy |
( |
kinc_g5_pipeline_t * | pipeline | ) |
|
Destroys a pipeline.
- Parameters
-
| pipeline | The pipeline to destroy |
◆ kinc_g5_pipeline_get_constant_location()
| 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 constant/uniform.
- Parameters
-
| pipeline | The pipeline to search in |
| name | The name of the constant/uniform to find |
- Returns
- The constant-location of the constant/uniform
◆ kinc_g5_pipeline_get_texture_unit()
| 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.
- Parameters
-
| pipeline | The pipeline to search in |
| name | The name of the texture-declaration to search for |
- Returns
- The texture-unit of the texture-declaration
◆ kinc_g5_pipeline_init()
| KINC_FUNC void kinc_g5_pipeline_init |
( |
kinc_g5_pipeline_t * | pipeline | ) |
|
Initializes a pipeline.
- Parameters
-
| state | The pipeline to initialize |