build system revision
[vg.git] / vg_lines.h
1 /* Copyright (C) 2021-2024 Harry Godden (hgn) - All Rights Reserved */
2
3 #pragma once
4 #include "vg_platform.h"
5
6 typedef v3f line_co;
7
8 #define VG__RED 0xff0000ff
9 #define VG__GREEN 0xff00ff00
10 #define VG__BLUE 0xffff0000
11 #define VG__WHITE 0xffffffff
12 #define VG__BLACK 0xff000000
13 #define VG__CLEAR 0x00ffffff
14 #define VG__PINK 0xffff00ff
15 #define VG__YELOW 0xff00ffff
16 #define VG__CYAN 0xffffff00
17 #define VG__NONE 0x00000000
18
19 struct vg_lines
20 {
21 u32 enabled,
22 render;
23
24 struct vg_lines_vert{
25 v3f co;
26 u32 colour;
27 }
28 *vertex_buffer;
29
30 GLuint vao, vbo;
31 }
32 extern vg_lines;
33
34 void vg_line_capsule( m4x3f m, float radius, float h, u32 colour );
35 void vg_line_sphere( m4x3f m, float radius, u32 colour );
36 void vg_line_point( v3f pt, float size, u32 colour );
37 void vg_line_boxf_transformed( m4x3f m, boxf box, u32 colour );
38 void vg_line_boxf( boxf box, u32 colour );
39 void vg_line_mesh( v3f verts[], u32 indices[][2], u32 indice_count,u32 colour );
40 void vg_line_box_verts( boxf box, v3f verts[8] );
41 void vg_line_cross(v3f pos,u32 colour, float scale);
42 void vg_line_arrow( line_co co, line_co dir, float size, u32 colour );
43 void vg_line( line_co from, line_co to, u32 colour );
44 void vg_line2( line_co from, line_co to, u32 fc, u32 tc );
45 void vg_lines_drawall( void );
46 void vg_lines_init(void);