Комментарии
тема: Doom
Sys_SetPhysicalWorkMemory( 192 << 20, 1024 << 20 ); //Min = 201,326,592 Max = 1,073,741,824 Sys_CreateConsole();
// Since the engine is multi-threaded mutexes are initialized here: One mutex per "critical" (concurrent execution) section of code.
for (int i = 0; i < MAX_CRITICAL_SECTIONS; i++ ) {
InitializeCriticalSection( &win32.criticalSections[i] );
}
common->Init( 0, NULL, lpCmdLine ); // Assess how much VRAM is available (not done via OpenGL but OS call)
Sys_StartAsyncThread(){ // The next look runs is a separate thread.
while ( 1 ){
usleep( 16666 ); // Run at 60Hz
common->Async(); // Do the job
Sys_TriggerEvent( TRIGGER_EVENT_ONE ); // Unlock other thread waiting for inputs
pthread_testcancel(); // Check if we have been cancelled by the main thread (on shutdown).
}
}
Sys_ShowConsole
while( 1 ){
Win_Frame(); // Show or hide the console
common->Frame(){
session->Frame() // Game logic
{
for (int i = 0 ; i < gameTicsToRun ; i++ )
RunGameTic(){
game->RunFrame( &cmd ); // From this point execution jumps in the GameX86.dll address space.
for( ent = activeEntities.Next(); ent != NULL; ent = ent->activeNode.Next() )
ent->GetPhysics()->UpdateTime( time ); // let entities think
}
}
session->UpdateScreen( false ); // normal, in-sequence screen update
{
renderSystem->BeginFrame
idGame::Draw // Renderer front-end. Doesn't actually communicate with the GPU !!
renderSystem->EndFrame
R_IssueRenderCommands // Renderer back-end. Issue GPU optimized commands to the GPU.
}
}
}
}
Показаны записи с 1 по 1 из 1
О t1337
Вступил
Онлайн
Времена
4
Сыгранные игры
Игры, за которыми следят