Provides functions for creating and destroying shaders.
More...
#include <kinc/global.h>
#include <kinc/backend/graphics5/shader.h>
#include <stddef.h>
Go to the source code of this file.
|
|
typedef enum kinc_g5_shader_type | kinc_g5_shader_type_t |
|
typedef struct kinc_g5_shader | kinc_g5_shader_t |
|
| enum | kinc_g5_shader_type {
KINC_G5_SHADER_TYPE_FRAGMENT
, KINC_G5_SHADER_TYPE_VERTEX
, KINC_G5_SHADER_TYPE_COMPUTE
, KINC_G5_SHADER_TYPE_GEOMETRY
,
KINC_G5_SHADER_TYPE_TESSELLATION_CONTROL
, KINC_G5_SHADER_TYPE_TESSELLATION_EVALUATION
, KINC_G5_SHADER_TYPE_COUNT
} |
|
| KINC_FUNC void | kinc_g5_shader_init (kinc_g5_shader_t *shader, const void *source, size_t length, kinc_g5_shader_type_t type) |
| | Initializes a shader based on system-specific shader-data. The system-specific shader-data is usually created per system by the krafix-shader-compiler which is automatically called by kincmake.
|
| KINC_FUNC void | kinc_g5_shader_destroy (kinc_g5_shader_t *shader) |
| | Destroys a shader.
|
Provides functions for creating and destroying shaders.
◆ kinc_g5_shader_destroy()
| KINC_FUNC void kinc_g5_shader_destroy |
( |
kinc_g5_shader_t * | shader | ) |
|
Destroys a shader.
- Parameters
-
| shader | The shader to destroy |
◆ kinc_g5_shader_init()
| KINC_FUNC void kinc_g5_shader_init |
( |
kinc_g5_shader_t * | shader, |
|
|
const void * | source, |
|
|
size_t | length, |
|
|
kinc_g5_shader_type_t | type ) |
Initializes a shader based on system-specific shader-data. The system-specific shader-data is usually created per system by the krafix-shader-compiler which is automatically called by kincmake.
- Parameters
-
| shader | The shader to initialize |
| data | The system-specific shader-data |
| length | The length of the system-specific shader-data in bytes |
| type | The type of the shader |