Vulkan2D
2D renderer written in C using Vulkan and SDL2
Model.h
Go to the documentation of this file.
1 #pragma once
5 
6 #ifdef __cplusplus
7 extern "C" {
8 #endif
9 
10 #include "VK2D/Structs.h"
11 
20 VK2DModel vk2dModelCreate(const VK2DVertex3D *vertices, uint32_t vertexCount, const uint16_t *indices, uint32_t indexCount, VK2DTexture tex);
21 
28 VK2DModel vk2dModelFrom(const void *objFile, uint32_t objFileSize, VK2DTexture texture);
29 
35 VK2DModel vk2dModelLoad(const char *objFile, VK2DTexture texture);
36 
39 void vk2dModelFree(VK2DModel model);
40 
41 #ifdef __cplusplus
42 }
43 #endif
void vk2dModelFree(VK2DModel model)
The texture stored in the model is not destroyed.
VK2DModel vk2dModelCreate(const VK2DVertex3D *vertices, uint32_t vertexCount, const uint16_t *indices, uint32_t indexCount, VK2DTexture tex)
Creates a model from a set of vertices.
VK2DModel vk2dModelFrom(const void *objFile, uint32_t objFileSize, VK2DTexture texture)
Loads a .obj model from a binary buffer.
VK2DModel vk2dModelLoad(const char *objFile, VK2DTexture texture)
Loads a model from a .obj file.
Forward declares struct typedefs.
Vertex data for 3D models.
Definition: Structs.h:194