Vulkan2D
2D renderer written in C using Vulkan and SDL2
Polygon.h
Go to the documentation of this file.
1 #pragma once
5 #include "VK2D/Structs.h"
6 
7 #ifdef __cplusplus
8 extern "C" {
9 #endif
10 
17 VK2DPolygon vk2dPolygonShapeCreateRaw(VK2DVertexColour *vertexData, uint32_t vertexCount);
18 
26 VK2DPolygon vk2dPolygonCreate(vec2 *vertices, uint32_t vertexCount);
27 
34 VK2DPolygon vk2dPolygonCreateOutline(vec2 *vertices, uint32_t vertexCount);
35 
38 void vk2dPolygonFree(VK2DPolygon polygon);
39 
40 #ifdef __cplusplus
41 }
42 #endif
VK2DPolygon vk2dPolygonCreateOutline(vec2 *vertices, uint32_t vertexCount)
Creates a polygon made to be rendered as an outline (does not triangulate input)
void vk2dPolygonFree(VK2DPolygon polygon)
Frees a polygon from memory.
VK2DPolygon vk2dPolygonCreate(vec2 *vertices, uint32_t vertexCount)
Creates a polygon with specified vertices for drawing (use vk2dRendererSetColourMod to change colours...
VK2DPolygon vk2dPolygonShapeCreateRaw(VK2DVertexColour *vertexData, uint32_t vertexCount)
Creates a polygon for the shapes pipeline (should be triangulated)
Forward declares struct typedefs.
float vec2[2]
2D vector of floats
Definition: Structs.h:170
Vertex data for rendering shapes.
Definition: Structs.h:188