예제 #1
0
//-----------------------------------------------------------------------------
// Purpose: 
//-----------------------------------------------------------------------------
void R_Init (void)
{	
	extern byte *hunk_base;

	extern void InitMathlib( void );

	InitMathlib();

	UpdateMaterialSystemConfig();
}
예제 #2
0
void CRender::DrawSceneBegin( void )
{
	UpdateStudioRenderConfig();
	UpdateMaterialSystemConfig();
	if( MaterialConfigLightingChanged() || UpdateLightmapColorScale() )
	{
		ClearMaterialConfigLightingChanged();
		Con_Printf( "Redownloading all lightmaps\n" );
		float overbright = 1.0f;
		if (g_pMaterialSystemHardwareConfig->SupportsOverbright())
		{
			overbright = mat_overbright.GetFloat();
		}
		BuildGammaTable( 2.2f, 2.2f, 0.0f, overbright );
		R_RedownloadAllLightmaps( vec3_origin );
		materialSystemInterface->FlushLightmaps();
		StaticPropMgr()->RecomputeStaticLighting();
	}
}
예제 #3
0
//-----------------------------------------------------------------------------
// Purpose: 
// Output : Returns true on success, false on failure.
//-----------------------------------------------------------------------------
bool CEngine::Load( bool dedicated, const char *rootdir )
{
	bool success = false;

	// Activate engine
	// NOTE: We must bypass the 'next state' block here for initialization to work properly.
	m_nDLLState = m_nNextDLLState = InEditMode() ? DLL_PAUSED : DLL_ACTIVE;

	if ( Sys_InitGame( 
		g_AppSystemFactory,
		rootdir, 
		game->GetMainWindowAddress(), 
		dedicated ) )
	{
		success = true;

		UpdateMaterialSystemConfig();
	}

	return success;
}