X-Git-Url: https://harrygodden.com/git/?a=blobdiff_plain;f=gate.h;h=a370d81dde091a61c7c0f34235a158af48df33ef;hb=d8b8c566831e15ef061a66409e1219f44a82097a;hp=7088c7dc5c236dc03223e5b3948904a6011278d0;hpb=dfee9022b3513fddec36f7ea70867ee5961a44da;p=carveJwlIkooP6JGAAIwe30JlM.git diff --git a/gate.h b/gate.h index 7088c7d..a370d81 100644 --- a/gate.h +++ b/gate.h @@ -62,8 +62,8 @@ static void gate_init(void) { 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 ); } @@ -162,7 +162,7 @@ static void render_gate( teleport_gate *gate, m4x3f camera ) } render_world( projection, cam_new ); - + if( grender.high_qual ) { /* @@ -202,6 +202,14 @@ static void render_gate( teleport_gate *gate, m4x3f camera ) } 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 );