Browse Source

engine: move PARM_SKY_SPHERE handling out of engine to renderer, after all renderers might or might not support sky spheres

pull/2/head
Alibek Omarov 11 months ago
parent
commit
d971055927
  1. 2
      engine/client/cl_render.c
  2. 2
      ref/gl/gl_context.c
  3. 2
      ref/soft/r_context.c

2
engine/client/cl_render.c

@ -142,8 +142,6 @@ intptr_t CL_RenderGetParm( const int parm, const int arg, const qboolean checkRe
return 1; return 1;
#endif #endif
return 0; return 0;
case PARM_SKY_SPHERE:
return FBitSet( world.flags, FWORLD_SKYSPHERE ) && !FBitSet( world.flags, FWORLD_CUSTOM_SKYBOX );
case PARAM_GAMEPAUSED: case PARAM_GAMEPAUSED:
return cl.paused; return cl.paused;
case PARM_CLIENT_INGAME: case PARM_CLIENT_INGAME:

2
ref/gl/gl_context.c

@ -236,7 +236,7 @@ static int GL_RefGetParm( int parm, int arg )
case PARM_STENCIL_ACTIVE: case PARM_STENCIL_ACTIVE:
return glState.stencilEnabled; return glState.stencilEnabled;
case PARM_SKY_SPHERE: case PARM_SKY_SPHERE:
return ENGINE_GET_PARM_( parm, arg ) && !tr.fCustomSkybox; return FBitSet( tr.world->flags, FWORLD_SKYSPHERE ) && !FBitSet( tr.world->flags, FWORLD_CUSTOM_SKYBOX );
default: default:
return ENGINE_GET_PARM_( parm, arg ); return ENGINE_GET_PARM_( parm, arg );
} }

2
ref/soft/r_context.c

@ -171,7 +171,7 @@ static int GL_RefGetParm( int parm, int arg )
case PARM_STENCIL_ACTIVE: case PARM_STENCIL_ACTIVE:
return 0; //glState.stencilEnabled; return 0; //glState.stencilEnabled;
case PARM_SKY_SPHERE: case PARM_SKY_SPHERE:
return ENGINE_GET_PARM_( parm, arg ) && !tr.fCustomSkybox; return 0; // ref_soft doesn't support sky sphere
default: default:
return ENGINE_GET_PARM_( parm, arg ); return ENGINE_GET_PARM_( parm, arg );
} }

Loading…
Cancel
Save