mirror of
https://github.com/YGGverse/xash3d-fwgs.git
synced 2025-02-03 18:54:49 +00:00
ref: gl: connect ripply water to others parts of renderer (init, reset, animation and rendering)
This commit is contained in:
parent
d6dfb83be7
commit
a6af32dafd
@ -342,6 +342,8 @@ void R_SetTextureParameters( void )
|
|||||||
// change all the existing mipmapped texture objects
|
// change all the existing mipmapped texture objects
|
||||||
for( i = 0; i < gl_numTextures; i++ )
|
for( i = 0; i < gl_numTextures; i++ )
|
||||||
GL_UpdateTextureParams( i );
|
GL_UpdateTextureParams( i );
|
||||||
|
|
||||||
|
R_UpdateRippleTexParams();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -2317,6 +2319,7 @@ void R_InitImages( void )
|
|||||||
// validate cvars
|
// validate cvars
|
||||||
R_SetTextureParameters();
|
R_SetTextureParameters();
|
||||||
GL_CreateInternalTextures();
|
GL_CreateInternalTextures();
|
||||||
|
R_InitRipples();
|
||||||
|
|
||||||
gEngfuncs.Cmd_AddCommand( "texturelist", R_TextureList_f, "display loaded textures list" );
|
gEngfuncs.Cmd_AddCommand( "texturelist", R_TextureList_f, "display loaded textures list" );
|
||||||
}
|
}
|
||||||
|
@ -969,6 +969,8 @@ void R_RenderScene( void )
|
|||||||
|
|
||||||
R_MarkLeaves();
|
R_MarkLeaves();
|
||||||
R_DrawFog ();
|
R_DrawFog ();
|
||||||
|
if( RI.drawWorld )
|
||||||
|
R_AnimateRipples();
|
||||||
|
|
||||||
R_CheckGLFog();
|
R_CheckGLFog();
|
||||||
R_DrawWorld();
|
R_DrawWorld();
|
||||||
|
@ -150,6 +150,7 @@ void R_NewMap( void )
|
|||||||
|
|
||||||
GL_BuildLightmaps ();
|
GL_BuildLightmaps ();
|
||||||
R_GenerateVBO();
|
R_GenerateVBO();
|
||||||
|
R_ResetRipples();
|
||||||
|
|
||||||
if( gEngfuncs.drawFuncs->R_NewMap != NULL )
|
if( gEngfuncs.drawFuncs->R_NewMap != NULL )
|
||||||
gEngfuncs.drawFuncs->R_NewMap();
|
gEngfuncs.drawFuncs->R_NewMap();
|
||||||
|
@ -204,7 +204,7 @@ void GL_SetupFogColorForSurfaces( void )
|
|||||||
vec3_t fogColor;
|
vec3_t fogColor;
|
||||||
float factor, div;
|
float factor, div;
|
||||||
|
|
||||||
if( !glState.isFogEnabled)
|
if( !glState.isFogEnabled )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if( RI.currententity && RI.currententity->curstate.rendermode == kRenderTransTexture )
|
if( RI.currententity && RI.currententity->curstate.rendermode == kRenderTransTexture )
|
||||||
@ -1135,14 +1135,15 @@ void R_RenderBrushPoly( msurface_t *fa, int cull_type )
|
|||||||
|
|
||||||
t = R_TextureAnimation( fa );
|
t = R_TextureAnimation( fa );
|
||||||
|
|
||||||
GL_Bind( XASH_TEXTURE0, t->gl_texturenum );
|
|
||||||
|
|
||||||
if( FBitSet( fa->flags, SURF_DRAWTURB ))
|
if( FBitSet( fa->flags, SURF_DRAWTURB ))
|
||||||
{
|
{
|
||||||
|
R_UploadRipples( t );
|
||||||
|
|
||||||
// warp texture, no lightmaps
|
// warp texture, no lightmaps
|
||||||
EmitWaterPolys( fa, (cull_type == CULL_BACKSIDE));
|
EmitWaterPolys( fa, (cull_type == CULL_BACKSIDE));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
else GL_Bind( XASH_TEXTURE0, t->gl_texturenum );
|
||||||
|
|
||||||
if( t->fb_texturenum )
|
if( t->fb_texturenum )
|
||||||
{
|
{
|
||||||
@ -1411,7 +1412,7 @@ void R_DrawWaterSurfaces( void )
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
// set modulate mode explicitly
|
// set modulate mode explicitly
|
||||||
GL_Bind( XASH_TEXTURE0, t->gl_texturenum );
|
R_UploadRipples( t );
|
||||||
|
|
||||||
for( ; s; s = s->texturechain )
|
for( ; s; s = s->texturechain )
|
||||||
EmitWaterPolys( s, false );
|
EmitWaterPolys( s, false );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user