Kore
Loading...
Searching...
No Matches
shader.h
Go to the documentation of this file.
1#pragma once
2
3#include <kinc/global.h>
4
5#include <kinc/backend/graphics4/shader.h>
6
10
11#ifdef __cplusplus
12extern "C" {
13#endif
14
15typedef enum kinc_g4_shader_type {
16 KINC_G4_SHADER_TYPE_FRAGMENT,
17 KINC_G4_SHADER_TYPE_VERTEX,
18 KINC_G4_SHADER_TYPE_COMPUTE,
19 KINC_G4_SHADER_TYPE_GEOMETRY,
20 KINC_G4_SHADER_TYPE_TESSELLATION_CONTROL,
21 KINC_G4_SHADER_TYPE_TESSELLATION_EVALUATION,
22
23 KINC_G4_SHADER_TYPE_COUNT
24} kinc_g4_shader_type_t;
25
26typedef struct kinc_g4_shader {
27 kinc_g4_shader_impl_t impl;
28} kinc_g4_shader_t;
29
38KINC_FUNC void kinc_g4_shader_init(kinc_g4_shader_t *shader, const void *data, size_t length, kinc_g4_shader_type_t type);
39
48KINC_FUNC int kinc_g4_shader_init_from_source(kinc_g4_shader_t *shader, const char *source, kinc_g4_shader_type_t type);
49
54KINC_FUNC void kinc_g4_shader_destroy(kinc_g4_shader_t *shader);
55
56#ifdef __cplusplus
57}
58#endif
Provides basic functionality that's used all over the place. There's usually no need to manually incl...
KINC_FUNC void kinc_g4_shader_destroy(kinc_g4_shader_t *shader)
Destroys a shader.
KINC_FUNC void kinc_g4_shader_init(kinc_g4_shader_t *shader, const void *data, size_t length, kinc_g4_shader_type_t type)
Initializes a shader based on system-specific shader-data. The system-specific shader-data is usually...
KINC_FUNC int kinc_g4_shader_init_from_source(kinc_g4_shader_t *shader, const char *source, kinc_g4_shader_type_t type)
Initializes a shader from GLSL-source-code. This only works on some platforms and only if KRAFIX_LIBR...
Definition shader.h:26