+ glBindBuffer( GL_ARRAY_BUFFER, mesh->vbo );
+ glBufferData( GL_ARRAY_BUFFER, ctx->vertex_count*stride,
+ ctx->arrvertices, GL_STATIC_DRAW );
+
+ glBindVertexArray( mesh->vao );
+ glBindBuffer( GL_ELEMENT_ARRAY_BUFFER, mesh->ebo );
+ glBufferData( GL_ELEMENT_ARRAY_BUFFER, ctx->indice_count*sizeof(u32),
+ ctx->arrindices, GL_STATIC_DRAW );
+
+ /* 0: coordinates */
+ glVertexAttribPointer( 0, 3, GL_FLOAT, GL_FALSE, stride, (void*)0 );
+ glEnableVertexAttribArray( 0 );
+
+ /* 1: normal */
+ glVertexAttribPointer( 1, 4, GL_BYTE, GL_TRUE,
+ stride, (void *)offsetof(scene_vert, norm) );
+ glEnableVertexAttribArray( 1 );
+
+ /* 2: uv */
+ glVertexAttribPointer( 2, 2, GL_FLOAT, GL_FALSE,
+ stride, (void *)offsetof(scene_vert, uv) );
+ glEnableVertexAttribArray( 2 );
+
+ VG_CHECK_GL_ERR();
+
+ mesh->indice_count = ctx->indice_count;
+ mesh->loaded = 1;
+
+ vg_info( "Scene upload ( XYZ_f32 UV_f32 XYZW_i8 )[ u32 ]\n" );
+ vg_info( " indices:%u\n", ctx->indice_count );
+ vg_info( " verts:%u\n", ctx->vertex_count );