/* TODO Maybe make this less hardcoded */
mdl_submesh sm_geo_std_oob, sm_geo_std, sm_geo_vb,
sm_foliage_main, sm_foliage_alphatest,
- sm_graffiti;
+ sm_graffiti, sm_subworld;
glmesh skybox, skydome;
mdl_submesh dome_upper, dome_lower;
mat_surf_oob = 0,
mat_vertex_blend = 0,
mat_alphatest = 0,
- mat_graffiti = 0;
+ mat_graffiti = 0,
+ mat_subworld = 0;
for( int i=1; i<mworld->material_count; i++ )
{
mat_alphatest = i;
else if( !strcmp( "graffitibox", mat_name ))
mat_graffiti = i;
+ else if( !strcmp( "subworld", mat_name ))
+ mat_subworld = i;
}
m4x3f midentity;
add_all_if_material( midentity, &world.geo, mworld, mat_surf );
scene_copy_slice( &world.geo, &world.sm_geo_std );
+ if( mat_subworld )
+ add_all_if_material( midentity, &world.geo, mworld, mat_subworld );
+ scene_copy_slice( &world.geo, &world.sm_subworld );
+
if( mat_vertex_blend )
add_all_if_material( midentity, &world.geo, mworld, mat_vertex_blend );
scene_copy_slice( &world.geo, &world.sm_geo_vb );
scene_bind( &world.geo );
mdl_draw_submesh( &world.sm_geo_std_oob );
mdl_draw_submesh( &world.sm_geo_std );
+ mdl_draw_submesh( &world.sm_subworld );
/* TODO: Dont draw in reflection */
glDisable(GL_CULL_FACE);