couple fix
[vg.git] / src / vg / vg_lines.h
index c0da5b308dd3d313da4b6bb4eeb8912bbb873d35..672a59e84d663b76fa407310d7ca0bc57e27c2e8 100644 (file)
@@ -48,7 +48,8 @@ static struct vg_shader _shader_lines =
 
 struct
 {
-   u32 draw;
+   u32 draw,
+       allow_input;
        
    struct vg_lines_vert
    {
@@ -117,6 +118,7 @@ VG_STATIC void vg_lines_init(void)
    }
 
    vg_release_thread_sync();
+   vg_lines.allow_input = 1;
 }
 
 VG_STATIC void vg_lines_drawall( float* projection )
@@ -146,6 +148,9 @@ VG_STATIC void vg_lines_drawall( float* projection )
 
 VG_STATIC void vg_line2( line_co from, line_co to, u32 fc, u32 tc )
 {
+   if( !vg_lines.allow_input )
+      return;
+
    u32 size = 2 * sizeof(struct vg_lines_vert);
        struct vg_lines_vert *v = vg_linear_alloc( vg_lines.vertex_buffer, size );