scene_bind( &world.foliage );
scene_draw( &world.foliage );
glEnable(GL_CULL_FACE);
+
+ vg_line_boxf( world.geo.bbx, 0xff00ffff );
}
static void ray_world_get_tri( ray_hit *hit, v3f tri[3] )
scene_init( &world.geo );
model *mworld = vg_asset_read( "models/mp_dev.mdl" );
- scene_add_model( &world.geo, mworld, submodel_get( mworld, "mp_dev" ),
- (v3f){0.0f,0.0f,0.0f}, 0.0f, 1.0f );
+ for( int i=0; i<mworld->layer_count; i++ )
+ {
+ submodel *sm = model_get_submodel( mworld, i );
+ if( !strcmp( sm->material, "surf" ) )
+ scene_add_model( &world.geo, mworld, sm, sm->pivot, 0.0f, 1.0f );
+
+ }
scene_copy_slice( &world.geo, &world.sm_road );
- scene_add_model( &world.geo, mworld, submodel_get( mworld, "terrain" ),
- (v3f){0.0f,0.0f,0.0f}, 0.0f, 1.0f );
+ for( int i=0; i<mworld->layer_count; i++ )
+ {
+ submodel *sm = model_get_submodel( mworld, i );
+ if( !strcmp( sm->material, "terrain" ) )
+ scene_add_model( &world.geo, mworld, sm, sm->pivot, 0.0f, 1.0f );
+ }
+
scene_copy_slice( &world.geo, &world.sm_terrain );
+ /*
+ * TODO: Parametric marker import
+ */
v3_copy( model_marker_get( mworld, "mp_dev_tutorial" )->co, world.tutorial );
}
#endif
- /* WATER DEV */
+ /* WATER DEV
+ * again, TODO: parametric import (material)
+ */
{
glmesh surf;
submodel *sm = submodel_get(mworld,"mp_dev_water");