Kore
Loading...
Searching...
No Matches
compute.h
Go to the documentation of this file.
1#pragma once
2
3#include <kinc/global.h>
4
5#include <kinc/backend/graphics4/compute.h>
6#ifdef KINC_OPENGL
7#include <kinc/backend/graphics4/ShaderStorageBufferImpl.h>
9#endif
11
15
16#ifdef __cplusplus
17extern "C" {
18#endif
19
20struct kinc_g4_texture;
22
23typedef struct kinc_g4_compute_shader {
24 kinc_g4_compute_shader_impl impl;
26
33KINC_FUNC void kinc_g4_compute_shader_init(kinc_g4_compute_shader *shader, void *source, int length);
34
40
47KINC_FUNC kinc_g4_constant_location_t kinc_g4_compute_shader_get_constant_location(kinc_g4_compute_shader *shader, const char *name);
48
55KINC_FUNC kinc_g4_texture_unit_t kinc_g4_compute_shader_get_texture_unit(kinc_g4_compute_shader *shader, const char *name);
56
57#ifdef KINC_OPENGL
58typedef struct kinc_shader_storage_buffer {
59 kinc_compute_shader_storage_buffer_impl_t impl;
60} kinc_shader_storage_buffer_t;
61
62KINC_FUNC void kinc_shader_storage_buffer_init(kinc_shader_storage_buffer_t *buffer, int count, kinc_g4_vertex_data_t type);
63KINC_FUNC void kinc_shader_storage_buffer_destroy(kinc_shader_storage_buffer_t *buffer);
64KINC_FUNC int *kinc_shader_storage_buffer_lock(kinc_shader_storage_buffer_t *buffer);
65KINC_FUNC void kinc_shader_storage_buffer_unlock(kinc_shader_storage_buffer_t *buffer);
66KINC_FUNC int kinc_shader_storage_buffer_count(kinc_shader_storage_buffer_t *buffer);
67KINC_FUNC void kinc_shader_storage_buffer_internal_set(kinc_shader_storage_buffer_t *buffer);
68#endif
69
70#ifdef __cplusplus
71}
72#endif
Provides basic functionality that's used all over the place. There's usually no need to manually incl...
KINC_FUNC kinc_g4_constant_location_t kinc_g4_compute_shader_get_constant_location(kinc_g4_compute_shader *shader, const char *name)
Finds the location of a constant/uniform inside of a shader.
KINC_FUNC kinc_g4_texture_unit_t kinc_g4_compute_shader_get_texture_unit(kinc_g4_compute_shader *shader, const char *name)
Finds a texture-unit inside of a shader.
KINC_FUNC void kinc_g4_compute_shader_destroy(kinc_g4_compute_shader *shader)
Destroy a shader-object.
KINC_FUNC void kinc_g4_compute_shader_init(kinc_g4_compute_shader *shader, void *source, int length)
Initialize a compute-shader from system-specific shader-data.
Contains the base G4-functionality.
Provides functions for setting up and using vertex-buffers.
Definition compute.h:23
Definition rendertarget.h:30
Definition texture.h:18