kiba-engine
texture.h
1 #pragma once
2 
3 #include <kiba/defines.h>
4 #include <kiba/gpu/types.h>
5 
6 // TODO pass backend_devices by pointer by default
7 
8 KB_API b8 gpu_texture_create(gpu_texture *texture, gpu_device device, struct gpu_texture_descriptor desc);
9 KB_API void gpu_texture_destroy(gpu_texture texture);
10 KB_LOCAL void gpu_texture_destroy_internal(gpu_texture texture);
11 
12 KB_API b8 gpu_texture_view_create(gpu_texture_view *view, gpu_texture texture, struct gpu_texture_view_descriptor desc);
13 KB_API void gpu_texture_view_destroy(gpu_texture_view view);
14 KB_LOCAL void gpu_texture_view_destroy_internal(gpu_texture_view view);
15 
16 KB_LOCAL b8 gpu_backend_texture_create(struct gpu_backend_texture *texture,
17  struct gpu_backend_device device,
18  struct gpu_texture_descriptor desc);
19 KB_LOCAL void gpu_backend_texture_destroy(struct gpu_backend_texture *texture, struct gpu_backend_device device);
20 
21 KB_LOCAL b8 gpu_backend_texture_view_create(struct gpu_backend_texture_view *view,
22  struct gpu_backend_device device,
23  struct gpu_backend_texture texture,
24  struct gpu_texture_view_descriptor desc);
25 KB_LOCAL void gpu_backend_texture_view_destroy(struct gpu_backend_texture_view *view, struct gpu_backend_device device);
Global typedefs and macros.