Kore
Loading...
Searching...
No Matches
compute.h File Reference

Provides support for running compute-shaders. More...

#include <kinc/global.h>
#include <kinc/backend/graphics5/compute.h>
#include <kinc/graphics5/constantlocation.h>
#include <kinc/graphics5/textureunit.h>

Go to the source code of this file.

Data Structures

struct  kinc_g5_compute_shader

Typedefs

typedef struct kinc_g5_compute_shader kinc_g5_compute_shader

Functions

KINC_FUNC void kinc_g5_compute_shader_init (kinc_g5_compute_shader *shader, void *source, int length)
 Initialize a compute-shader from system-specific shader-data.
KINC_FUNC void kinc_g5_compute_shader_destroy (kinc_g5_compute_shader *shader)
 Desotry a shader-object.
KINC_FUNC kinc_g5_constant_location_t kinc_g5_compute_shader_get_constant_location (kinc_g5_compute_shader *shader, const char *name)
 Finds the location of a constant/uniform inside of a shader.
KINC_FUNC kinc_g5_texture_unit_t kinc_g5_compute_shader_get_texture_unit (kinc_g5_compute_shader *shader, const char *name)
 Finds a texture-unit inside of a shader.

Detailed Description

Provides support for running compute-shaders.

Function Documentation

◆ kinc_g5_compute_shader_destroy()

KINC_FUNC void kinc_g5_compute_shader_destroy ( kinc_g5_compute_shader * shader)

Desotry a shader-object.

Parameters
shaderThe shader-object to destroy

◆ kinc_g5_compute_shader_get_constant_location()

KINC_FUNC kinc_g5_constant_location_t kinc_g5_compute_shader_get_constant_location ( kinc_g5_compute_shader * shader,
const char * name )

Finds the location of a constant/uniform inside of a shader.

Parameters
shaderThe shader to look into
nameThe constant/uniform-name to look for
Returns
The found constant-location

◆ kinc_g5_compute_shader_get_texture_unit()

KINC_FUNC kinc_g5_texture_unit_t kinc_g5_compute_shader_get_texture_unit ( kinc_g5_compute_shader * shader,
const char * name )

Finds a texture-unit inside of a shader.

Parameters
shaderThe shader to look into
nameThe texture-name to look for
Returns
The found texture-unit

◆ kinc_g5_compute_shader_init()

KINC_FUNC void kinc_g5_compute_shader_init ( kinc_g5_compute_shader * shader,
void * source,
int length )

Initialize a compute-shader from system-specific shader-data.

Parameters
shaderThe shader-object to initialize
sourceA pointer to system-specific shader-data
lengthLength of the shader-data in bytes