|
Kore
|
Provides support for managing buffers of constant-data for shaders. More...
#include <kinc/global.h>#include <kinc/backend/graphics5/constantbuffer.h>#include <kinc/math/matrix.h>#include <kinc/math/vector.h>Go to the source code of this file.
Data Structures | |
| struct | kinc_g5_constant_buffer |
Typedefs | |
| typedef struct kinc_g5_constant_buffer | kinc_g5_constant_buffer_t |
Functions | |
| KINC_FUNC void | kinc_g5_constant_buffer_init (kinc_g5_constant_buffer_t *buffer, int size) |
| Initializes a constant-buffer. | |
| KINC_FUNC void | kinc_g5_constant_buffer_destroy (kinc_g5_constant_buffer_t *buffer) |
| Destroys a buffer. | |
| KINC_FUNC void | kinc_g5_constant_buffer_lock_all (kinc_g5_constant_buffer_t *buffer) |
| Locks all of a constant-buffer to modify its contents. | |
| KINC_FUNC void | kinc_g5_constant_buffer_lock (kinc_g5_constant_buffer_t *buffer, int start, int count) |
| Locks part of a constant-buffer to modify its contents. | |
| KINC_FUNC void | kinc_g5_constant_buffer_unlock (kinc_g5_constant_buffer_t *buffer) |
| Unlocks a constant-buffer so the changed contents can be used. | |
| KINC_FUNC int | kinc_g5_constant_buffer_size (kinc_g5_constant_buffer_t *buffer) |
| Figures out the size of the constant-data in the buffer. | |
| KINC_FUNC void | kinc_g5_constant_buffer_set_bool (kinc_g5_constant_buffer_t *buffer, int offset, bool value) |
| Assigns a bool at an offset in a constant-buffer. | |
| KINC_FUNC void | kinc_g5_constant_buffer_set_int (kinc_g5_constant_buffer_t *buffer, int offset, int value) |
| Assigns an integer at an offset in a constant-buffer. | |
| KINC_FUNC void | kinc_g5_constant_buffer_set_int2 (kinc_g5_constant_buffer_t *buffer, int offset, int value1, int value2) |
| Assigns two integers at an offset in a constant-buffer. | |
| KINC_FUNC void | kinc_g5_constant_buffer_set_int3 (kinc_g5_constant_buffer_t *buffer, int offset, int value1, int value2, int value3) |
| Assigns three integers at an offset in a constant-buffer. | |
| KINC_FUNC void | kinc_g5_constant_buffer_set_int4 (kinc_g5_constant_buffer_t *buffer, int offset, int value1, int value2, int value3, int value4) |
| Assigns four integers at an offset in a constant-buffer. | |
| KINC_FUNC void | kinc_g5_constant_buffer_set_ints (kinc_g5_constant_buffer_t *buffer, int offset, int *values, int count) |
| Assigns a bunch of integers at an offset in a constant-buffer. | |
| KINC_FUNC void | kinc_g5_constant_buffer_set_float (kinc_g5_constant_buffer_t *buffer, int offset, float value) |
| Assigns a float at an offset in a constant-buffer. | |
| KINC_FUNC void | kinc_g5_constant_buffer_set_float2 (kinc_g5_constant_buffer_t *buffer, int offset, float value1, float value2) |
| Assigns two floats at an offset in a constant-buffer. | |
| KINC_FUNC void | kinc_g5_constant_buffer_set_float3 (kinc_g5_constant_buffer_t *buffer, int offset, float value1, float value2, float value3) |
| Assigns three floats at an offset in a constant-buffer. | |
| KINC_FUNC void | kinc_g5_constant_buffer_set_float4 (kinc_g5_constant_buffer_t *buffer, int offset, float value1, float value2, float value3, float value4) |
| Assigns four floats at an offset in a constant-buffer. | |
| KINC_FUNC void | kinc_g5_constant_buffer_set_floats (kinc_g5_constant_buffer_t *buffer, int offset, float *values, int count) |
| Assigns a bunch of floats at an offset in a constant-buffer. | |
| KINC_FUNC void | kinc_g5_constant_buffer_set_matrix3 (kinc_g5_constant_buffer_t *buffer, int offset, kinc_matrix3x3_t *value) |
| Assigns a 3x3-matrix at an offset in a constant-buffer. | |
| KINC_FUNC void | kinc_g5_constant_buffer_set_matrix4 (kinc_g5_constant_buffer_t *buffer, int offset, kinc_matrix4x4_t *value) |
| Assigns a 4x4-matrix at an offset in a constant-buffer. | |
Variables | |
| KINC_FUNC bool | kinc_g5_transposeMat3 |
| KINC_FUNC bool | kinc_g5_transposeMat4 |
Provides support for managing buffers of constant-data for shaders.
| KINC_FUNC void kinc_g5_constant_buffer_destroy | ( | kinc_g5_constant_buffer_t * | buffer | ) |
Destroys a buffer.
| buffer | The buffer to destroy |
| KINC_FUNC void kinc_g5_constant_buffer_init | ( | kinc_g5_constant_buffer_t * | buffer, |
| int | size ) |
Initializes a constant-buffer.
| buffer | The buffer to initialize |
| size | The size of the constant-data in the buffer in bytes |
| KINC_FUNC void kinc_g5_constant_buffer_lock | ( | kinc_g5_constant_buffer_t * | buffer, |
| int | start, | ||
| int | count ) |
Locks part of a constant-buffer to modify its contents.
| buffer | The buffer to lock |
| start | The offset of where to start the lock in bytes |
| count | The number of bytes to lock |
| KINC_FUNC void kinc_g5_constant_buffer_lock_all | ( | kinc_g5_constant_buffer_t * | buffer | ) |
Locks all of a constant-buffer to modify its contents.
| buffer | The buffer to lock |
| KINC_FUNC void kinc_g5_constant_buffer_set_bool | ( | kinc_g5_constant_buffer_t * | buffer, |
| int | offset, | ||
| bool | value ) |
Assigns a bool at an offset in a constant-buffer.
| offset | The offset at which to write the data |
| value | The value to write into the buffer |
| KINC_FUNC void kinc_g5_constant_buffer_set_float | ( | kinc_g5_constant_buffer_t * | buffer, |
| int | offset, | ||
| float | value ) |
Assigns a float at an offset in a constant-buffer.
| offset | The offset at which to write the data |
| value | The value to write into the buffer |
| KINC_FUNC void kinc_g5_constant_buffer_set_float2 | ( | kinc_g5_constant_buffer_t * | buffer, |
| int | offset, | ||
| float | value1, | ||
| float | value2 ) |
Assigns two floats at an offset in a constant-buffer.
| offset | The offset at which to write the data |
| value1 | The first value to write into the buffer |
| value2 | The second value to write into the buffer |
| KINC_FUNC void kinc_g5_constant_buffer_set_float3 | ( | kinc_g5_constant_buffer_t * | buffer, |
| int | offset, | ||
| float | value1, | ||
| float | value2, | ||
| float | value3 ) |
Assigns three floats at an offset in a constant-buffer.
| offset | The offset at which to write the data |
| value1 | The first value to write into the buffer |
| value2 | The second value to write into the buffer |
| value3 | The third value to write into the buffer/param> |
| KINC_FUNC void kinc_g5_constant_buffer_set_float4 | ( | kinc_g5_constant_buffer_t * | buffer, |
| int | offset, | ||
| float | value1, | ||
| float | value2, | ||
| float | value3, | ||
| float | value4 ) |
Assigns four floats at an offset in a constant-buffer.
| offset | The offset at which to write the data | ||
| value1 | The first value to write into the buffer | ||
| value2 | The second value to write into the buffer | ||
| value3 | The third value to write into the buffer/param>
|
| KINC_FUNC void kinc_g5_constant_buffer_set_floats | ( | kinc_g5_constant_buffer_t * | buffer, |
| int | offset, | ||
| float * | values, | ||
| int | count ) |
Assigns a bunch of floats at an offset in a constant-buffer.
| location | The location of the constant/uniform to assign the values to |
| value | The values to write into the buffer |
| value | The number of values to write into the buffer |
| KINC_FUNC void kinc_g5_constant_buffer_set_int | ( | kinc_g5_constant_buffer_t * | buffer, |
| int | offset, | ||
| int | value ) |
Assigns an integer at an offset in a constant-buffer.
| offset | The offset at which to write the data |
| value | The value to assign to the constant/uniform |
| KINC_FUNC void kinc_g5_constant_buffer_set_int2 | ( | kinc_g5_constant_buffer_t * | buffer, |
| int | offset, | ||
| int | value1, | ||
| int | value2 ) |
Assigns two integers at an offset in a constant-buffer.
| offset | The offset at which to write the data |
| value1 | The first value to write into the buffer |
| value2 | The second value to write into the buffer |
| KINC_FUNC void kinc_g5_constant_buffer_set_int3 | ( | kinc_g5_constant_buffer_t * | buffer, |
| int | offset, | ||
| int | value1, | ||
| int | value2, | ||
| int | value3 ) |
Assigns three integers at an offset in a constant-buffer.
| offset | The offset at which to write the data |
| value1 | The first value to write into the buffer |
| value2 | The second value to write into the buffer |
| value3 | The third value to write into the buffer/param> |
| KINC_FUNC void kinc_g5_constant_buffer_set_int4 | ( | kinc_g5_constant_buffer_t * | buffer, |
| int | offset, | ||
| int | value1, | ||
| int | value2, | ||
| int | value3, | ||
| int | value4 ) |
Assigns four integers at an offset in a constant-buffer.
| offset | The offset at which to write the data | ||
| value1 | The first value to write into the buffer | ||
| value2 | The second value to write into the buffer | ||
| value3 | The third value to write into the buffer/param>
|
| KINC_FUNC void kinc_g5_constant_buffer_set_ints | ( | kinc_g5_constant_buffer_t * | buffer, |
| int | offset, | ||
| int * | values, | ||
| int | count ) |
Assigns a bunch of integers at an offset in a constant-buffer.
| location | The location of the constant/uniform to assign the values to |
| value | The values to write into the buffer |
| value | The number of values to write into the buffer |
| KINC_FUNC void kinc_g5_constant_buffer_set_matrix3 | ( | kinc_g5_constant_buffer_t * | buffer, |
| int | offset, | ||
| kinc_matrix3x3_t * | value ) |
Assigns a 3x3-matrix at an offset in a constant-buffer.
| offset | The offset at which to write the data |
| value | The value to write into the buffer |
| KINC_FUNC void kinc_g5_constant_buffer_set_matrix4 | ( | kinc_g5_constant_buffer_t * | buffer, |
| int | offset, | ||
| kinc_matrix4x4_t * | value ) |
Assigns a 4x4-matrix at an offset in a constant-buffer.
| offset | The offset at which to write the data |
| value | The value to write into the buffer |
| KINC_FUNC int kinc_g5_constant_buffer_size | ( | kinc_g5_constant_buffer_t * | buffer | ) |
Figures out the size of the constant-data in the buffer.
| buffer | The buffer to figure out the size for |
| KINC_FUNC void kinc_g5_constant_buffer_unlock | ( | kinc_g5_constant_buffer_t * | buffer | ) |
Unlocks a constant-buffer so the changed contents can be used.
| buffer | The buffer to unlock |