bad char
[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 #include "vg_engine.h"
6
7 typedef v3f line_co;
8
9 #define VG__RED 0xff0000ff
10 #define VG__GREEN 0xff00ff00
11 #define VG__BLUE 0xffff0000
12 #define VG__WHITE 0xffffffff
13 #define VG__BLACK 0xff000000
14 #define VG__CLEAR 0x00ffffff
15 #define VG__PINK 0xffff00ff
16 #define VG__YELOW 0xff00ffff
17 #define VG__CYAN 0xffffff00
18 #define VG__NONE 0x00000000
19
20 struct vg_lines
21 {
22 u32 enabled,
23 render;
24
25 struct vg_lines_vert{
26 v3f co;
27 u32 colour;
28 }
29 *vertex_buffer;
30
31 GLuint vao, vbo;
32 }
33 extern vg_lines;
34
35 void vg_line_capsule( m4x3f m, float radius, float h, u32 colour );
36 void vg_line_sphere( m4x3f m, float radius, u32 colour );
37 void vg_line_point( v3f pt, float size, u32 colour );
38 void vg_line_boxf_transformed( m4x3f m, boxf box, u32 colour );
39 void vg_line_boxf( boxf box, u32 colour );
40 void vg_line_mesh( v3f verts[], u32 indices[][2], u32 indice_count,u32 colour );
41 void vg_line_box_verts( boxf box, v3f verts[8] );
42 void vg_line_cross(v3f pos,u32 colour, float scale);
43 void vg_line_arrow( line_co co, line_co dir, float size, u32 colour );
44 void vg_line( line_co from, line_co to, u32 colour );
45 void vg_line2( line_co from, line_co to, u32 fc, u32 tc );
46 void vg_lines_drawall( void );
47 void vg_lines_init(void);