16 Oct 2015

This commit is contained in:
g-cont 2015-10-16 00:00:00 +03:00 committed by Alibek Omarov
parent a4177669ae
commit fa6c196a72
8 changed files with 20 additions and 23 deletions

View File

@ -1,3 +1,8 @@
build 3153
Render: RenderAPI update. New parm PARM_REBUILD_GAMMA to differentiate from map restart or change level when called from GL_BuildLightmaps
GameUI: increased slots for savedgames\multiplayer maps up to 900
build 3145
Engine: add support for studiomodels with fixed texcoords multiplier (a studiomodel format extension)

View File

@ -63,6 +63,7 @@ GNU General Public License for more details.
#define PARM_CACHEFRAME 28
#define PARM_MAX_IMAGE_UNITS 29
#define PARM_CLIENT_ACTIVE 30
#define PARM_REBUILD_GAMMA 31 // if true lightmaps rebuilding for gamma change
enum
{

View File

@ -569,6 +569,7 @@ typedef struct
int depth_bits;
int stencil_bits;
qboolean softwareGammaUpdate;
qboolean deviceSupportsGamma;
int prev_mode;
} glconfig_t;

View File

@ -785,24 +785,8 @@ static void R_SetupFrame( void )
{
vec3_t viewOrg, viewAng;
if( RP_NORMALPASS() && cl.thirdperson )
{
vec3_t cam_ofs, vpn;
clgame.dllFuncs.CL_CameraOffset( cam_ofs );
viewAng[PITCH] = cam_ofs[PITCH];
viewAng[YAW] = cam_ofs[YAW];
viewAng[ROLL] = 0;
AngleVectors( viewAng, vpn, NULL, NULL );
VectorMA( RI.refdef.vieworg, -cam_ofs[ROLL], vpn, viewOrg );
}
else
{
VectorCopy( RI.refdef.vieworg, viewOrg );
VectorCopy( RI.refdef.viewangles, viewAng );
}
VectorCopy( RI.refdef.vieworg, viewOrg );
VectorCopy( RI.refdef.viewangles, viewAng );
// build the transformation matrix for the given view angles
VectorCopy( viewOrg, RI.vieworg );
@ -1245,6 +1229,8 @@ R_BeginFrame
*/
void R_BeginFrame( qboolean clearScene )
{
glConfig.softwareGammaUpdate = false; // in case of possible fails
if(( gl_clear->integer || gl_overview->integer ) && clearScene && cls.state != ca_cinematic )
{
pglClear( GL_COLOR_BUFFER_BIT );
@ -1261,8 +1247,10 @@ void R_BeginFrame( qboolean clearScene )
}
else
{
glConfig.softwareGammaUpdate = true;
BuildGammaTable( vid_gamma->value, vid_texgamma->value );
GL_RebuildLightmaps();
glConfig.softwareGammaUpdate = false;
}
}
@ -1273,7 +1261,7 @@ void R_BeginFrame( qboolean clearScene )
// texturemode stuff
// update texture parameters
if( gl_texturemode->modified || gl_texture_anisotropy->modified || gl_texture_lodbias ->modified )
if( gl_texturemode->modified || gl_texture_anisotropy->modified || gl_texture_lodbias->modified )
R_SetTextureParameters();
// swapinterval stuff
@ -1473,6 +1461,8 @@ static int GL_RenderGetParm( int parm, int arg )
return GL_MaxTextureUnits();
case PARM_CLIENT_ACTIVE:
return (cls.state == ca_active);
case PARM_REBUILD_GAMMA:
return glConfig.softwareGammaUpdate;
}
return 0;
}

View File

@ -48,6 +48,6 @@ int Q_buildnum( void )
return b;
#else
return 3145;
return 3153;
#endif
}

View File

@ -804,7 +804,7 @@ void Delta_Init( void )
Delta_AddField( "movevars_t", "bounce", DT_FLOAT|DT_SIGNED, 16, 8.0f, 1.0f );
Delta_AddField( "movevars_t", "stepsize", DT_FLOAT|DT_SIGNED, 16, 16.0f, 1.0f );
Delta_AddField( "movevars_t", "maxvelocity", DT_FLOAT|DT_SIGNED, 16, 8.0f, 1.0f );
Delta_AddField( "movevars_t", "zmax", DT_FLOAT|DT_SIGNED, 16, 1.0f, 1.0f ); // no fractional part
Delta_AddField( "movevars_t", "zmax", DT_FLOAT|DT_SIGNED, 18, 1.0f, 1.0f ); // no fractional part
Delta_AddField( "movevars_t", "waveHeight", DT_FLOAT|DT_SIGNED, 16, 16.0f, 8.0f );
Delta_AddField( "movevars_t", "skyName", DT_STRING, 1, 1.0f, 1.0f );
Delta_AddField( "movevars_t", "footsteps", DT_INTEGER, 1, 1.0f, 1.0f );

View File

@ -208,7 +208,7 @@ void SV_UpdateMovevars( qboolean initialize )
// check range
if( sv_zmax->value < 256.0f ) Cvar_SetFloat( "sv_zmax", 256.0f );
if( sv_zmax->value > 32767.0f ) Cvar_SetFloat( "sv_zmax", 32767.0f );
if( sv_zmax->value > 131070.0f ) Cvar_SetFloat( "sv_zmax", 131070.0f );
svgame.movevars.gravity = sv_gravity->value;
svgame.movevars.stopspeed = sv_stopspeed->value;

View File

@ -73,7 +73,7 @@ GNU General Public License for more details.
#define UI_MAX_FIELD_LINE 256
#define UI_OUTLINE_WIDTH uiStatic.outlineWidth // outline thickness
#define UI_MAXGAMES 100 // slots for savegame/demos
#define UI_MAXGAMES 900 // slots for savegame/demos
#define UI_MAX_SERVERS 32
#define UI_MAX_BGMAPS 32