Kore
Loading...
Searching...
No Matches
indexbuffer.h
Go to the documentation of this file.
1#pragma once
2
3#include <kinc/global.h>
4
5#include <kinc/backend/graphics5/indexbuffer.h>
6
10
11#ifdef __cplusplus
12extern "C" {
13#endif
14
15typedef enum kinc_g5_index_buffer_format { KINC_G5_INDEX_BUFFER_FORMAT_32BIT, KINC_G5_INDEX_BUFFER_FORMAT_16BIT } kinc_g5_index_buffer_format_t;
16
17typedef struct kinc_g5_index_buffer {
18 IndexBuffer5Impl impl;
19} kinc_g5_index_buffer_t;
20
27KINC_FUNC void kinc_g5_index_buffer_init(kinc_g5_index_buffer_t *buffer, int count, kinc_g5_index_buffer_format_t format, bool gpu_memory);
28
33KINC_FUNC void kinc_g5_index_buffer_destroy(kinc_g5_index_buffer_t *buffer);
34
40KINC_FUNC void *kinc_g5_index_buffer_lock_all(kinc_g5_index_buffer_t *buffer);
41
49KINC_FUNC void *kinc_g5_index_buffer_lock(kinc_g5_index_buffer_t *buffer, int start, int count);
50
55KINC_FUNC void kinc_g5_index_buffer_unlock_all(kinc_g5_index_buffer_t *buffer);
56
62KINC_FUNC void kinc_g5_index_buffer_unlock(kinc_g5_index_buffer_t *buffer, int count);
63
69KINC_FUNC int kinc_g5_index_buffer_count(kinc_g5_index_buffer_t *buffer);
70
71#ifdef __cplusplus
72}
73#endif
Provides basic functionality that's used all over the place. There's usually no need to manually incl...
KINC_FUNC void * kinc_g5_index_buffer_lock_all(kinc_g5_index_buffer_t *buffer)
Locks an index-buffer so its contents can be modified.
KINC_FUNC void kinc_g5_index_buffer_init(kinc_g5_index_buffer_t *buffer, int count, kinc_g5_index_buffer_format_t format, bool gpu_memory)
Initializes an index-buffer.
KINC_FUNC void kinc_g5_index_buffer_unlock_all(kinc_g5_index_buffer_t *buffer)
Unlocks an index-buffer after locking it so the changed buffer-contents can be used.
KINC_FUNC void kinc_g5_index_buffer_destroy(kinc_g5_index_buffer_t *buffer)
Destroys an index-buffer.
KINC_FUNC int kinc_g5_index_buffer_count(kinc_g5_index_buffer_t *buffer)
Returns the number of indices in the buffer.
KINC_FUNC void kinc_g5_index_buffer_unlock(kinc_g5_index_buffer_t *buffer, int count)
Unlocks part of an index-buffer after locking so the changed buffer-contents can be used.
KINC_FUNC void * kinc_g5_index_buffer_lock(kinc_g5_index_buffer_t *buffer, int start, int count)
Locks part of a vertex-buffer to modify its contents.
Definition indexbuffer.h:17