twn_lines.c: introduction with proper impl
This commit is contained in:
@ -69,9 +69,12 @@ typedef struct SpritePrimitive {
|
||||
bool repeat;
|
||||
} SpritePrimitive;
|
||||
|
||||
/* batched in place */
|
||||
typedef struct LinePrimitive {
|
||||
Vec2 start;
|
||||
Vec2 finish;
|
||||
struct LineVertex {
|
||||
Vec3 position;
|
||||
Color color;
|
||||
} *vertices;
|
||||
float thickness;
|
||||
Color color;
|
||||
} LinePrimitive;
|
||||
@ -97,7 +100,7 @@ typedef struct TextPrimitive {
|
||||
|
||||
typedef enum Primitive2DType {
|
||||
PRIMITIVE_2D_SPRITE,
|
||||
PRIMITIVE_2D_LINE,
|
||||
PRIMITIVE_2D_LINES,
|
||||
PRIMITIVE_2D_RECT,
|
||||
PRIMITIVE_2D_CIRCLE,
|
||||
PRIMITIVE_2D_TEXT,
|
||||
@ -319,7 +322,7 @@ IndexBuffer get_circle_element_buffer(void);
|
||||
|
||||
void render_circle(const CirclePrimitive *circle);
|
||||
|
||||
void render_line(const LinePrimitive *line);
|
||||
void render_lines(LinePrimitive *line);
|
||||
|
||||
void render_rectangle(const RectPrimitive *rectangle);
|
||||
|
||||
|
Reference in New Issue
Block a user