{
fb_init( &grender.fb );
- model *mgate = vg_asset_read( "models/rs_gate.mdl" );
- model_unpack( mgate, &grender.mdl );
+ mdl_header *mgate = mdl_load( "models/rs_gate.mdl" );
+ mdl_unpack_glmesh( mgate, &grender.mdl );
free( mgate );
}
fb_resize( &grender.fb );
}
-static void render_gate( teleport_gate *gate, m4x3f camera )
+static int render_gate( teleport_gate *gate, m4x3f camera )
{
v3f viewpos, viewdir, gatedir;
v3_copy( camera[3], viewpos );
v3f v0;
v3_sub( viewpos, gate->co[0], v0 );
if( v3_dot(v0, gatedir) >= 0.0f )
- return;
+ return 0;
if( v3_dist( viewpos, gate->co[0] ) > 100.0f )
- return;
+ return 0;
v3f a,b,c,d;
}
render_world( projection, cam_new );
-
+
if( grender.high_qual )
{
/*
}
else
{
+ glDisable( GL_STENCIL_TEST );
+
+ render_water_texture( cam_new );
+ fb_use( NULL );
+ glEnable( GL_STENCIL_TEST );
+
+ render_water_surface( projection, cam_new );
+
glStencilMask( 0xFF );
glStencilFunc( GL_ALWAYS, 1, 0xFF );
glDisable( GL_STENCIL_TEST );
}
+
+ return 1;
}
static int gate_intersect( teleport_gate *gate, v3f pos, v3f last )