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

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.

Data Structures

struct  kinc_g5_shader

Typedefs

typedef enum kinc_g5_shader_type kinc_g5_shader_type_t
typedef struct kinc_g5_shader kinc_g5_shader_t

Enumerations

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
}

Functions

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.

Detailed Description

Provides functions for creating and destroying shaders.

Function Documentation

◆ kinc_g5_shader_destroy()

KINC_FUNC void kinc_g5_shader_destroy ( kinc_g5_shader_t * shader)

Destroys a shader.

Parameters
shaderThe 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
shaderThe shader to initialize
dataThe system-specific shader-data
lengthThe length of the system-specific shader-data in bytes
typeThe type of the shader