Kore
Loading...
Searching...
No Matches
vertexbuffer.h
Go to the documentation of this file.
1#pragma once
2
3#include <kinc/global.h>
4
5#include "vertexstructure.h"
6
7#include <kinc/backend/graphics5/vertexbuffer.h>
8
12
13#ifdef __cplusplus
14extern "C" {
15#endif
16
17typedef struct kinc_g5_vertex_buffer {
18 VertexBuffer5Impl impl;
19} kinc_g5_vertex_buffer_t;
20
29KINC_FUNC void kinc_g5_vertex_buffer_init(kinc_g5_vertex_buffer_t *buffer, int count, kinc_g5_vertex_structure_t *structure, bool gpu_memory,
30 int instance_data_step_rate);
31
36KINC_FUNC void kinc_g5_vertex_buffer_destroy(kinc_g5_vertex_buffer_t *buffer);
37
43KINC_FUNC float *kinc_g5_vertex_buffer_lock_all(kinc_g5_vertex_buffer_t *buffer);
44
52KINC_FUNC float *kinc_g5_vertex_buffer_lock(kinc_g5_vertex_buffer_t *buffer, int start, int count);
53
58KINC_FUNC void kinc_g5_vertex_buffer_unlock_all(kinc_g5_vertex_buffer_t *buffer);
59
65KINC_FUNC void kinc_g5_vertex_buffer_unlock(kinc_g5_vertex_buffer_t *buffer, int count);
66
72KINC_FUNC int kinc_g5_vertex_buffer_count(kinc_g5_vertex_buffer_t *buffer);
73
79KINC_FUNC int kinc_g5_vertex_buffer_stride(kinc_g5_vertex_buffer_t *buffer);
80
81int kinc_g5_internal_vertex_buffer_set(kinc_g5_vertex_buffer_t *buffer, int offset);
82
83#ifdef __cplusplus
84}
85#endif
Provides basic functionality that's used all over the place. There's usually no need to manually incl...
KINC_FUNC void kinc_g5_vertex_buffer_unlock(kinc_g5_vertex_buffer_t *buffer, int count)
Unlocks part of a vertex-buffer so the changed contents can be used.
KINC_FUNC void kinc_g5_vertex_buffer_init(kinc_g5_vertex_buffer_t *buffer, int count, kinc_g5_vertex_structure_t *structure, bool gpu_memory, int instance_data_step_rate)
Allocate and initialize a vertex-buffer.
KINC_FUNC float * kinc_g5_vertex_buffer_lock(kinc_g5_vertex_buffer_t *buffer, int start, int count)
Locks part of a vertex-buffer to modify its contents.
KINC_FUNC int kinc_g5_vertex_buffer_count(kinc_g5_vertex_buffer_t *buffer)
Returns the number of vertices in a buffer.
KINC_FUNC float * kinc_g5_vertex_buffer_lock_all(kinc_g5_vertex_buffer_t *buffer)
Locks all of a vertex-buffer to modify its contents.
KINC_FUNC void kinc_g5_vertex_buffer_unlock_all(kinc_g5_vertex_buffer_t *buffer)
Unlock all of a vertex-buffer so the changed contents can be used.
KINC_FUNC void kinc_g5_vertex_buffer_destroy(kinc_g5_vertex_buffer_t *buffer)
Destroys a vertex-buffer.
KINC_FUNC int kinc_g5_vertex_buffer_stride(kinc_g5_vertex_buffer_t *buffer)
Returns the stride aka the size of one vertex of the buffer in bytes.
Provides types for setting up the structure of vertices in a vertex-buffer.
Definition vertexbuffer.h:17