Vulkan2D
2D renderer written in C using Vulkan and SDL2
Loading...
Searching...
No Matches
Structs.h
Go to the documentation of this file.
1
4#pragma once
5#include <vulkan/vulkan.h>
6#include <stdbool.h>
7
8#ifdef __cplusplus
9extern "C" {
10#endif
11
13#define VK2D_MAX_CAMERAS 10
14
15// For opaque pointer types
16#define VK2D_OPAQUE_POINTER(type) typedef struct type##_t *type;
17
18// For user-modifiable and user-visible structures
19#define VK2D_USER_STRUCT(type) typedef struct type type;
20
29
45
53typedef enum {
54 VK2D_MSAA_1X = VK_SAMPLE_COUNT_1_BIT,
55 VK2D_MSAA_2X = VK_SAMPLE_COUNT_2_BIT,
56 VK2D_MSAA_4X = VK_SAMPLE_COUNT_4_BIT,
57 VK2D_MSAA_8X = VK_SAMPLE_COUNT_8_BIT,
58 VK2D_MSAA_16X = VK_SAMPLE_COUNT_16_BIT,
59 VK2D_MSAA_32X = VK_SAMPLE_COUNT_32_BIT,
60} VK2DMSAA;
61
69typedef enum {
70 VK2D_SCREEN_MODE_IMMEDIATE = VK_PRESENT_MODE_IMMEDIATE_KHR,
71 VK2D_SCREEN_MODE_VSYNC = VK_PRESENT_MODE_FIFO_KHR,
72 VK2D_SCREEN_MODE_TRIPLE_BUFFER = VK_PRESENT_MODE_MAILBOX_KHR
74
76typedef enum {
77 VK2D_FILTER_TYPE_LINEAR = VK_FILTER_LINEAR,
78 VK2D_FILTER_TYPE_NEAREST = VK_FILTER_NEAREST
80
82typedef enum {
83 VK2D_SHADER_STAGE_FRAGMENT = VK_SHADER_STAGE_FRAGMENT_BIT,
84 VK2D_SHADER_STAGE_VERTEX = VK_SHADER_STAGE_VERTEX_BIT
86
95
103
113
120
136
146
153
172
173// VK2D pointers
174VK2D_OPAQUE_POINTER(VK2DRenderer)
175VK2D_OPAQUE_POINTER(VK2DImage)
176VK2D_OPAQUE_POINTER(VK2DLogicalDevice)
177VK2D_OPAQUE_POINTER(VK2DPhysicalDevice)
178VK2D_OPAQUE_POINTER(VK2DBuffer)
179VK2D_OPAQUE_POINTER(VK2DPipeline)
180VK2D_OPAQUE_POINTER(VK2DTexture)
181VK2D_OPAQUE_POINTER(VK2DDescCon)
182VK2D_OPAQUE_POINTER(VK2DPolygon)
183VK2D_OPAQUE_POINTER(VK2DShader)
184VK2D_OPAQUE_POINTER(VK2DModel)
185VK2D_OPAQUE_POINTER(VK2DDescriptorBuffer)
186VK2D_OPAQUE_POINTER(VK2DShadowEnvironment)
187
188
189typedef float vec2[2];
190
192typedef float vec3[3];
193
195typedef float vec4[4];
196
198typedef float mat4[16];
199
201typedef int32_t VK2DShadowObject;
202
204typedef int32_t VK2DCameraIndex;
205
211
217
222
232
239
247
256
259 const char *applicationName;
260 const char *engineName;
262 uint32_t engineVersion;
263 uint32_t apiVersion;
264};
265
271 const char *errorFile;
272 uint32_t maxTextures;
273
278 uint64_t vramPageSize;
279
280};
281
289
293 float x;
294 float y;
295 float w;
296 float h;
297 float zoom;
298 float rot;
299 float xOnScreen;
300 float yOnScreen;
301 float wOnScreen;
302 float hOnScreen;
303
305 struct {
309 float fov;
310 } Perspective;
311};
312
329
338
349
354
357 uint32_t drawCount;
358};
359
367
372 union {
373 struct {
374 const char *filename;
375 const char *fragmentFilename;
376 };
377 struct {
378 int size;
379 void *data;
382 };
384
385 union {
386 struct {
389 struct {
390 VK2DTexture *tex;
393
394 union {
395 VK2DShader *shader;
396 VK2DModel *model;
397 VK2DTexture *texture;
399};
400
401
408typedef void (*VK2DLoggerLogFn)(void *context, VK2DLogSeverity severity, const char *message);
409
412typedef void (*VK2DLoggerDestroyFn)(void *context);
413
416typedef VK2DLogSeverity (*VK2DLoggerSeverityFn)(void *context);
417
435
436VK2D_USER_STRUCT(VK2DVertexColour)
437VK2D_USER_STRUCT(VK2DVertex3D)
438VK2D_USER_STRUCT(VK2DUniformBufferObject)
439VK2D_USER_STRUCT(VK2DPushBuffer)
440VK2D_USER_STRUCT(VK2D3DPushBuffer)
441VK2D_USER_STRUCT(VK2DShadowsPushBuffer)
442VK2D_USER_STRUCT(VK2DShaderPushBuffer)
443VK2D_USER_STRUCT(VK2DConfiguration)
444VK2D_USER_STRUCT(VK2DStartupOptions)
445VK2D_USER_STRUCT(VK2DRendererConfig)
446VK2D_USER_STRUCT(VK2DCameraSpec)
447VK2D_USER_STRUCT(VK2DRendererLimits)
448VK2D_USER_STRUCT(VK2DDrawInstance)
449VK2D_USER_STRUCT(VK2DDrawCommand)
450VK2D_USER_STRUCT(VK2DAssetLoad)
451VK2D_USER_STRUCT(VK2DShadowObjectInfo)
452VK2D_USER_STRUCT(VK2DInstancedPushBuffer)
453VK2D_USER_STRUCT(VK2DComputePushBuffer)
454VK2D_USER_STRUCT(VK2DLogger)
455
456#ifdef __cplusplus
457}
458#endif
VK2DAssetType
Types of assets.
Definition Structs.h:138
@ VK2D_ASSET_TYPE_MODEL_MEMORY
Load a model from a binary blob.
Definition Structs.h:142
@ VK2D_ASSET_TYPE_TEXTURE_MEMORY
Load a texture from a binary blob.
Definition Structs.h:140
@ VK2D_ASSET_TYPE_MODEL_FILE
Load a model from a filename.
Definition Structs.h:141
@ VK2D_ASSET_TYPE_SHADER_MEMORY
Load a shader from a binary blob.
Definition Structs.h:144
@ VK2D_ASSET_TYPE_TEXTURE_FILE
Load a texture from a filename.
Definition Structs.h:139
@ VK2D_ASSET_TYPE_SHADER_FILE
Load a shader from a filename.
Definition Structs.h:143
VK2DVertexType
Describes what kind of vertices are in use.
Definition Structs.h:22
@ VK2D_VERTEX_TYPE_SHAPE
Vertex meant for the shapes pipelines.
Definition Structs.h:24
@ VK2D_VERTEX_TYPE_OTHER
Unspecified vertex type.
Definition Structs.h:26
@ VK2D_VERTEX_TYPE_MAX
Maximum number of vertex types.
Definition Structs.h:27
@ VK2D_VERTEX_TYPE_TEXTURE
Vertex meant for the texture pipeline.
Definition Structs.h:23
@ VK2D_VERTEX_TYPE_MODEL
Vertex meant for models.
Definition Structs.h:25
VK2DFilterType
Specifies how textures will be filtered at higher and lower resolutions.
Definition Structs.h:76
@ VK2D_FILTER_TYPE_NEAREST
Nearest neighbor filter, good for pixel art.
Definition Structs.h:78
@ VK2D_FILTER_TYPE_LINEAR
Linear interpolation, good for most things.
Definition Structs.h:77
#define VK2D_MAX_CAMERAS
Maximum number of cameras that can exist, enabled or disabled, at once - this is here instead of cons...
Definition Structs.h:13
VK2DCameraState
The state a camera is in.
Definition Structs.h:88
@ VK2D_CAMERA_STATE_MAX
Total number of camera states.
Definition Structs.h:93
@ VK2D_CAMERA_STATE_DELETED
Camera is "deleted" and all data is invalid.
Definition Structs.h:91
@ VK2D_CAMERA_STATE_DISABLED
Camera is not being rendered or updated.
Definition Structs.h:90
@ VK2D_CAMERA_STATE_NORMAL
Camera is being rendered/updated as normal.
Definition Structs.h:89
@ VK2D_CAMERA_STATE_RESET
Camera is being reset by the renderer.
Definition Structs.h:92
float vec2[2]
2D vector of floats
Definition Structs.h:189
int32_t VK2DCameraIndex
Type used for referencing cameras.
Definition Structs.h:204
VK2DBlendMode
Blend modes that can be used to render if VK2D_GENERATE_BLEND_MODES is enabled.
Definition Structs.h:38
@ VK2D_BLEND_MODE_MAX
Total number of blend modes (used for looping)
Definition Structs.h:43
@ VK2D_BLEND_MODE_ADD
Additive blending.
Definition Structs.h:41
@ VK2D_BLEND_MODE_NONE
No blending, new colour is law.
Definition Structs.h:40
@ VK2D_BLEND_MODE_BLEND
Default blend mode, good for almost everything.
Definition Structs.h:39
@ VK2D_BLEND_MODE_SUBTRACT
Subtraction blending, new colour is subtracted from current colour.
Definition Structs.h:42
int32_t VK2DShadowObject
Type used for referencing shadow objects.
Definition Structs.h:201
VK2DMSAA
Multisampling detail.
Definition Structs.h:53
@ VK2D_MSAA_4X
4 samples per pixel
Definition Structs.h:56
@ VK2D_MSAA_1X
1 sample per pixel
Definition Structs.h:54
@ VK2D_MSAA_8X
8 samples per pixel
Definition Structs.h:57
@ VK2D_MSAA_2X
2 samples per pixel
Definition Structs.h:55
@ VK2D_MSAA_16X
16 samples per pixel
Definition Structs.h:58
@ VK2D_MSAA_32X
32 samples per pixel
Definition Structs.h:59
void(* VK2DLoggerDestroyFn)(void *context)
Callback function for destroying the logger.
Definition Structs.h:412
float vec3[3]
3D vector of floats
Definition Structs.h:192
VK2DLogSeverity(* VK2DLoggerSeverityFn)(void *context)
Retrieves the log severity from the user context.
Definition Structs.h:416
VK2DResult
Return codes through the renderer.
Definition Structs.h:115
@ VK2D_SUCCESS
Everything worked.
Definition Structs.h:116
@ VK2D_RESET_SWAPCHAIN
The swapchain (renderer) was just reset (likely due to window resize or something similar)
Definition Structs.h:117
@ VK2D_ERROR
Error occurred.
Definition Structs.h:118
float mat4[16]
4x4 matrix of floats
Definition Structs.h:198
VK2DLogSeverity
Definition Structs.h:154
@ VK2D_LOG_SEVERITY_WARN
Warning.
Definition Structs.h:160
@ VK2D_LOG_SEVERITY_FATAL
Fatal error, system is in an invalid, unrecoverable state.
Definition Structs.h:166
@ VK2D_LOG_SEVERITY_DEBUG
Debug message.
Definition Structs.h:156
@ VK2D_LOG_SEVERITY_UNKNOWN
Unknown severity level.
Definition Structs.h:170
@ VK2D_LOG_SEVERITY_INFO
Standard log message.
Definition Structs.h:158
@ VK2D_LOG_SEVERITY_ERROR
Error, recoverable.
Definition Structs.h:162
VK2DPipelineType
Types of graphics pipelines.
Definition Structs.h:105
@ VK2D_PIPELINE_TYPE_DEFAULT
Default 2D pipelines.
Definition Structs.h:106
@ VK2D_PIPELINE_TYPE_3D
3D pipelines
Definition Structs.h:107
@ VK2D_PIPELINE_TYPE_MAX
Max number of pipeline types.
Definition Structs.h:111
@ VK2D_PIPELINE_TYPE_USER_SHADER
Pipeline for user shaders.
Definition Structs.h:110
@ VK2D_PIPELINE_TYPE_SHADOWS
Pipeline for shadows.
Definition Structs.h:109
@ VK2D_PIPELINE_TYPE_INSTANCING
Pipelines for instancing.
Definition Structs.h:108
VK2DAssetState
State an asset may be in.
Definition Structs.h:148
@ VK2D_ASSET_TYPE_ASSET
Normal asset awaiting load.
Definition Structs.h:149
@ VK2D_ASSET_TYPE_NONE
This slot is empty.
Definition Structs.h:151
@ VK2D_ASSET_TYPE_PENDING
Asset is pending a queue family transfer.
Definition Structs.h:150
VK2DScreenMode
How to present images.
Definition Structs.h:69
@ VK2D_SCREEN_MODE_VSYNC
Slower but prevents screen tearing.
Definition Structs.h:71
@ VK2D_SCREEN_MODE_TRIPLE_BUFFER
Optimal for gaming but a bit slower than immediate (machines may not support this)
Definition Structs.h:72
@ VK2D_SCREEN_MODE_IMMEDIATE
Quickest mode, just plop to screen but may have screen tearing.
Definition Structs.h:70
void(* VK2DLoggerLogFn)(void *context, VK2DLogSeverity severity, const char *message)
Callback function for logging.
Definition Structs.h:408
VK2DStatus
Status codes for logging/error reporting.
Definition Structs.h:122
@ VK2D_STATUS_SDL_ERROR
General SDL-catch all, not fatal.
Definition Structs.h:132
@ VK2D_STATUS_BEYOND_LIMIT
User requested a setting that was beyond host limits, not fatal.
Definition Structs.h:133
@ VK2D_STATUS_RENDERER_NOT_INITIALIZED
Renderer has not been initialized.
Definition Structs.h:131
@ VK2D_STATUS_BAD_ASSET
User tried to pass a NULL asset to a VK2D method, not fatal.
Definition Structs.h:134
@ VK2D_STATUS_VULKAN_ERROR
Some sort of specific vulkan error.
Definition Structs.h:128
@ VK2D_STATUS_OUT_OF_VRAM
Out of gpu memory.
Definition Structs.h:130
@ VK2D_STATUS_TOO_MANY_CAMERAS
No camera slots left to use, not fatal.
Definition Structs.h:126
@ VK2D_STATUS_NONE
Nothing important to report.
Definition Structs.h:123
@ VK2D_STATUS_FILE_NOT_FOUND
File was not found for something like an image load, not fatal.
Definition Structs.h:124
@ VK2D_STATUS_OUT_OF_RAM
Out of host memory.
Definition Structs.h:129
@ VK2D_STATUS_BAD_FORMAT
Bad file format.
Definition Structs.h:125
@ VK2D_STATUS_DEVICE_LOST
General Vulkan catch-all for when something goes wrong.
Definition Structs.h:127
VK2DCameraType
Type of camera.
Definition Structs.h:97
@ VK2D_CAMERA_TYPE_ORTHOGRAPHIC
Orthographic camera for 3D rendering.
Definition Structs.h:99
@ VK2D_CAMERA_TYPE_MAX
Maximum number of camera types.
Definition Structs.h:101
@ VK2D_CAMERA_TYPE_DEFAULT
Default camera used for 2D games in VK2D.
Definition Structs.h:98
@ VK2D_CAMERA_TYPE_PERSPECTIVE
Perspective camera for 3D rendering.
Definition Structs.h:100
float vec4[4]
4D vector of floats
Definition Structs.h:195
VK2DShaderStage
A bitwise-able enum representing different shader stages.
Definition Structs.h:82
@ VK2D_SHADER_STAGE_VERTEX
Vertex shader.
Definition Structs.h:84
@ VK2D_SHADER_STAGE_FRAGMENT
Fragment (pixel) shader.
Definition Structs.h:83
Push buffer used for 3D models.
Definition Structs.h:241
uint32_t cameraIndex
Index of the camera.
Definition Structs.h:245
mat4 model
Model matrix.
Definition Structs.h:242
uint32_t textureIndex
Index of the texture.
Definition Structs.h:244
vec4 colourMod
Color modifier.
Definition Structs.h:243
Information needed to queue an asset loading off-thread.
Definition Structs.h:369
union VK2DAssetLoad::@1 Load
Information needed to create the asset.
void * fragmentData
Fragment shader's data.
Definition Structs.h:381
union VK2DAssetLoad::@2 Data
Asset-specific information.
const char * fragmentFilename
Fragment shader filename.
Definition Structs.h:375
union VK2DAssetLoad::@3 Output
How the user will receive the loaded asset.
void * data
Data to pull from or data for the vertex shader.
Definition Structs.h:379
struct VK2DAssetLoad::@2::@9 Model
Information needed if this is a model.
int uniformBufferSize
Uniform buffer size of this shader.
Definition Structs.h:387
int size
Data size or data size of the vertex shader.
Definition Structs.h:378
struct VK2DAssetLoad::@2::@8 Shader
Information needed if this is a texture.
VK2DTexture * tex
Texture to use for this model (pointer so the model's texture may be in the same list)
Definition Structs.h:390
VK2DModel * model
Pointer to where the output object will be placed.
Definition Structs.h:396
VK2DAssetType type
Type of asset this is.
Definition Structs.h:370
VK2DAssetState state
State this asset is in.
Definition Structs.h:371
VK2DTexture * texture
Pointer to where the output object will be placed.
Definition Structs.h:397
const char * filename
Filename to pull from or filename of the vertex shader.
Definition Structs.h:374
VK2DShader * shader
Pointer to where the output object will be placed.
Definition Structs.h:395
int fragmentSize
Fragment shader's size.
Definition Structs.h:380
Camera information.
Definition Structs.h:291
float hOnScreen
Height of the camera in the window.
Definition Structs.h:302
vec3 up
Which direction is up for the 3D camera.
Definition Structs.h:308
float xOnScreen
x position in the window
Definition Structs.h:299
float yOnScreen
y position in the window
Definition Structs.h:300
float y
Y position of the camera (top left coordinates) (only used in default camera type)
Definition Structs.h:294
float zoom
Zoom percentage (Relative to the virtual width and height, not actual)
Definition Structs.h:297
VK2DCameraType type
What type of camera this is.
Definition Structs.h:292
float rot
Rotation of the camera.
Definition Structs.h:298
float wOnScreen
Width of the camera in the window.
Definition Structs.h:301
float w
Virtual width of the screen.
Definition Structs.h:295
float h
Virtual height of the screen.
Definition Structs.h:296
vec3 centre
Where the 3D camera is looking.
Definition Structs.h:307
vec3 eyes
Where the 3D camera is.
Definition Structs.h:306
float x
X position of the camera (top left coordinates) (only used in default camera type)
Definition Structs.h:293
float fov
Field of view of the camera.
Definition Structs.h:309
Push buffer for the sprite batch compute shader.
Definition Structs.h:356
uint32_t drawCount
Number of draws being processed in this compute pass.
Definition Structs.h:357
User configurable settings.
Definition Structs.h:258
uint32_t engineVersion
Version of this engine.
Definition Structs.h:262
uint32_t apiVersion
Version of vulkan.
Definition Structs.h:263
const char * engineName
Name of this engine.
Definition Structs.h:260
const char * applicationName
Name of this program.
Definition Structs.h:259
uint32_t applicationVersion
Version of the program.
Definition Structs.h:261
Represents a user's draw command which will later be processed into an instance.
Definition Structs.h:340
vec4 colour
Colour mod of this draw.
Definition Structs.h:342
uint32_t textureIndex
Texture index for this draw (use vk2dTextureGetID)
Definition Structs.h:347
vec2 pos
X/Y in game world for this instance.
Definition Structs.h:343
vec4 texturePos
x in tex, y in tex, w in tex, and h in tex
Definition Structs.h:341
float rotation
Rotation of the draw centered around the origin.
Definition Structs.h:346
vec2 origin
X/Y Origin of this draw.
Definition Structs.h:344
vec2 scale
X/Y Scale of this draw.
Definition Structs.h:345
Represents the data you need for each element in an instanced draw.
Definition Structs.h:331
vec4 colour
Colour mod of this draw.
Definition Structs.h:333
vec4 texturePos
x in tex, y in tex, w in tex, and h in tex
Definition Structs.h:332
mat4 model
Model for this instance, generally shouldn't contain translations.
Definition Structs.h:336
uint32_t textureIndex
Which texture this instance is using.
Definition Structs.h:334
vec3 padding
Padding.
Definition Structs.h:335
A push buffer for an instanced draw.
Definition Structs.h:351
uint32_t cameraIndex
Index of the camera for this draw.
Definition Structs.h:352
Contains logging callbacks and context.
Definition Structs.h:420
VK2DLoggerDestroyFn destroy
Callback called on destruction of logger.
Definition Structs.h:426
void * context
User supplied context, passed to log() when called.
Definition Structs.h:433
VK2DLoggerLogFn log
Callback to log the message.
Definition Structs.h:423
VK2DLoggerSeverityFn severityFn
Callback to get minimum severity of logger.
Definition Structs.h:430
Buffer passed per-model via push constants.
Definition Structs.h:234
int32_t cameraIndex
Index of the camera.
Definition Structs.h:237
vec4 colourMod
Current colour modifier.
Definition Structs.h:236
mat4 model
Model matrix.
Definition Structs.h:235
User configurable settings.
Definition Structs.h:284
VK2DMSAA msaa
Current MSAA.
Definition Structs.h:285
VK2DFilterType filterMode
How to filter textures – Not change-able after renderer creation.
Definition Structs.h:287
VK2DScreenMode screenMode
Current screen mode.
Definition Structs.h:286
Renderer limitations for the host.
Definition Structs.h:317
uint64_t maxGeometryVertices
Maximum vertices that can be used in one vk2dRendererDrawGeometryCall, if you use more vertices than ...
Definition Structs.h:325
bool supportsMultiThreadLoading
Whether or not the host supports loading assets in another thread, if attempt to load assets in anoth...
Definition Structs.h:326
uint64_t maxInstancedDraws
Maximum amount of instances you may draw at once, if you request to draw more instances than this it ...
Definition Structs.h:323
bool supportsTripleBuffering
Whether or not the host supports triple buffering, if you request triple buffering and this is false,...
Definition Structs.h:319
bool supportsWireframe
Doesn't really mean anything 💀
Definition Structs.h:321
VK2DMSAA maxMSAA
Maximum MSAA the host supports, if you request an msaa higher than this value, this value will be use...
Definition Structs.h:318
bool supportsImmediate
Whether or not the host supports immediate mode, if you request immediate mode and this is false,...
Definition Structs.h:320
float maxLineWidth
Maximum line width supported on the platform, if you specify a line width greater than this value,...
Definition Structs.h:322
bool supportsVRAMUsage
Whether or not the host supports accurate VRAM usage, if this is false VMA will provide a less accura...
Definition Structs.h:327
uint64_t maxShaderBufferSize
Maximum size of a shader's uniform buffer in bytes, if you attempt to create a shader with a uniform ...
Definition Structs.h:324
Push buffer for user shaders.
Definition Structs.h:224
vec4 colour
Colour mod of the renderer when called.
Definition Structs.h:229
int32_t cameraIndex
Index of the camera in use.
Definition Structs.h:225
mat4 model
Model matrix.
Definition Structs.h:230
vec4 texturePos
UV coordinates (unnormalized)
Definition Structs.h:228
vec2 _padding
For vec4 alignment.
Definition Structs.h:227
uint32_t textureIndex
Index of the texture that was passed to the shader.
Definition Structs.h:226
Info for the shadow environment to keep track of.
Definition Structs.h:361
int vertexCount
Number of vertices for this model.
Definition Structs.h:364
int startingVertex
Vertex in the master VBO to start from for this object.
Definition Structs.h:363
bool enabled
Whether or not this object is enabled.
Definition Structs.h:362
mat4 model
Model for this shadow object.
Definition Structs.h:365
Push buffer used for hardware-accelerated shadows.
Definition Structs.h:249
vec4 colour
Colour of this shadow render.
Definition Structs.h:253
vec2 _alignment
Simply for memory alignment.
Definition Structs.h:252
uint32_t cameraIndex
Index of the camera.
Definition Structs.h:254
vec2 lightSource
Light source position.
Definition Structs.h:251
mat4 model
Model matrix for this shadow object.
Definition Structs.h:250
Startup options that dictate some basic VK2D stuff.
Definition Structs.h:267
uint32_t maxTextures
Max number of textures active at once.
Definition Structs.h:272
bool stdoutLogging
Print VK2D information to stdout.
Definition Structs.h:269
bool enableDebug
Enables Vulkan compatibility layers.
Definition Structs.h:268
bool quitOnError
Crash the program when an error occurs.
Definition Structs.h:270
uint64_t vramPageSize
Definition Structs.h:278
const char * errorFile
The file to output errors to, or NULL to disable file output.
Definition Structs.h:271
The VP buffer.
Definition Structs.h:219
mat4 viewproj[VK2D_MAX_CAMERAS]
View and projection matrix multiplied together.
Definition Structs.h:220
Vertex data for 3D models.
Definition Structs.h:213
vec3 pos
Position of the vertex.
Definition Structs.h:214
vec2 uv
UV coordinates for this vertex.
Definition Structs.h:215
Vertex data for rendering shapes.
Definition Structs.h:207
vec4 colour
Colour of this vertex.
Definition Structs.h:209
vec3 pos
Position of this vertex.
Definition Structs.h:208