support maths for constraints
[vg.git] / vg_ui.h
diff --git a/vg_ui.h b/vg_ui.h
index 8e73da5a1ab5a208432ba27e359a9b77f6653da2..ba428b009b385132e1f5bbf3c6253b09e5b2ddf5 100644 (file)
--- a/vg_ui.h
+++ b/vg_ui.h
@@ -180,6 +180,7 @@ VG_STATIC void _vg_ui_init(void)
 
    vg_uictx.max_indices = 20000;
    vg_uictx.max_verts = 30000;
+   vg_uictx.colours = &ui_default_colours;
        
        /* Generate the buffer we are gonna be drawing to */
    glGenVertexArrays( 1, &vg_uictx.vao );
@@ -227,7 +228,7 @@ VG_STATIC void _vg_ui_init(void)
 
        /* Alloc RAM default context */
    u32 vert_size = vg_uictx.max_verts*sizeof(struct ui_vert),
-       inds_size = vg_uictx.max_indices*sizeof(u16);
+       inds_size = vg_align8( vg_uictx.max_indices*sizeof(u16) );
    
    vg_uictx.vertex_buffer = vg_linear_alloc( vg_mem.rtmemory, vert_size );
    vg_uictx.indice_buffer = vg_linear_alloc( vg_mem.rtmemory, inds_size );