};
void Light_Construct( LightType lightType ){
-#if !defined( DISABLE_DOOM3_LIGHTING )
g_lightType = lightType;
if ( g_lightType == LIGHTTYPE_DOOM3 ) {
LightShader::m_defaultShader = "lights/defaultPointLight";
}
RenderLightRadiiFill::m_state = GlobalShaderCache().capture( "$Q3MAP2_LIGHT_SPHERE" );
RenderLightCenter::m_state = GlobalShaderCache().capture( "$BIGPOINT" );
-#endif // !DISABLE_DOOM3_LIGHTING
}
void Light_Destroy(){
-#if !defined( DISABLE_DOOM3_LIGHTING )
GlobalShaderCache().release( "$Q3MAP2_LIGHT_SPHERE" );
GlobalShaderCache().release( "$BIGPOINT" );
-#endif // !DISABLE_DOOM3_LIGHTING
}
scene::Node& New_Light( EntityClass* eclass ){
void CamWnd_registerShortcuts(){
toggle_add_accelerator( "ToggleCubicClip" );
-#if !defined( DISABLE_DOOM3_LIGHTING )
if ( g_pGameDescription->mGameType == "doom3" ) {
command_connect_accelerator( "TogglePreview" );
}
-#endif // !DISABLE_DOOM3_LIGHTING
command_connect_accelerator( "FOVInc" );
command_connect_accelerator( "FOVDec" );
}
}
-#if !defined( DISABLE_DOOM3_LIGHTING )
void CamWnd_TogglePreview( void ){
// gametype must be doom3 for this function to work
// if the gametype is not doom3 something is wrong with the
// switch between textured and lighting mode
CamWnd_SetMode( ( CamWnd_GetMode() == cd_lighting ) ? cd_texture : cd_lighting );
}
-#endif // !DISABLE_DOOM3_LIGHTING
CameraModel* g_camera_model = 0;
make_property<Camera_FarClip>()
);
-#if !defined( DISABLE_DOOM3_LIGHTING )
if ( g_pGameDescription->mGameType == "doom3" ) {
const char* render_mode[] = { "Wireframe", "Flatshade", "Textured", "Lighting" };
);
}
else
-#endif // !DISABLE_DOOM3_LIGHTING
{
const char* render_mode[] = { "Wireframe", "Flatshade", "Textured" };
GlobalCommands_insert( "LookThroughSelected", makeCallbackF(GlobalCamera_LookThroughSelected) );
GlobalCommands_insert( "LookThroughCamera", makeCallbackF(GlobalCamera_LookThroughCamera) );
-#if !defined( DISABLE_DOOM3_LIGHTING )
if ( g_pGameDescription->mGameType == "doom3" ) {
GlobalCommands_insert( "TogglePreview", makeCallbackF(CamWnd_TogglePreview), Accelerator( GDK_KEY_F3 ) );
}
-#endif // !DISABLE_DOOM3_LIGHTING
GlobalCommands_insert( "FOVInc", makeCallbackF(FOV_increase), Accelerator( GDK_KEY_KP_Multiply, (GdkModifierType)GDK_SHIFT_MASK ) );
GlobalCommands_insert( "FOVDec", makeCallbackF(FOV_decrease), Accelerator( GDK_KEY_KP_Divide, (GdkModifierType)GDK_SHIFT_MASK ) );
GlobalTexturesCache().attach( *g_ShaderCache );
GlobalShaderSystem().attach( *g_ShaderCache );
-#if !defined( DISABLE_DOOM3_LIGHTING )
if ( g_pGameDescription->mGameType == "doom3" ) {
g_defaultPointLight = g_ShaderCache->capture( "lights/defaultPointLight" );
//Shader* overbright =
}
#endif
}
-#endif // !DISABLE_DOOM3_LIGHTING
}
void ShaderCache_Destroy(){
-#if !defined( DISABLE_DOOM3_LIGHTING )
if ( g_pGameDescription->mGameType == "doom3" ) {
g_ShaderCache->release( "lights/defaultPointLight" );
g_ShaderCache->release( "$OVERBRIGHT" );
}
#endif
}
-#endif // !DISABLE_DOOM3_LIGHTING
GlobalShaderSystem().detach( *g_ShaderCache );
GlobalTexturesCache().detach( *g_ShaderCache );