X-Git-Url: https://harrygodden.com/git/?a=blobdiff_plain;f=scene.h;h=74c4ea61a10476c4af5de918d2a07c066621521a;hb=8f83be5a31728cd6bf95020e729367cc44308763;hp=cd1a8ea10689b5eb0c9303209b43dfa0b2c35ff3;hpb=a1056ed8198f0f5be0e0f341da8bd49aa6c47198;p=carveJwlIkooP6JGAAIwe30JlM.git diff --git a/scene.h b/scene.h index cd1a8ea..74c4ea6 100644 --- 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 );