right hand yellow
[carveJwlIkooP6JGAAIwe30JlM.git] / scene.h
diff --git a/scene.h b/scene.h
index cd1a8ea10689b5eb0c9303209b43dfa0b2c35ff3..74c4ea61a10476c4af5de918d2a07c066621521a 100644 (file)
--- a/scene.h
+++ b/scene.h
@@ -184,7 +184,7 @@ VG_STATIC scene *scene_fix( void *lin_alloc, scene *pscene )
        indice_count  = pscene->indice_count,
        vertex_length = vertex_count * sizeof(scene_vert),
        index_length  = indice_count * sizeof(u32),
-       tot_size      = sizeof(scene) + vertex_length + index_length;
+       tot_size      = vg_align8(sizeof(scene) + vertex_length + index_length);
 
    /* copy down index data */
    void *dst_indices = pscene->arrvertices + vertex_count;
@@ -247,7 +247,7 @@ VG_STATIC void scene_upload( scene *pscene, glmesh *mesh )
    glEnableVertexAttribArray( 0 );
 
    /* 1: normal */
-   glVertexAttribPointer( 1, 3, GL_BYTE, GL_TRUE,
+   glVertexAttribPointer( 1, 4, GL_BYTE, GL_TRUE,
          stride, (void *)offsetof(scene_vert, norm) );
    glEnableVertexAttribArray( 1 );