MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / DoRadiosityRun

Function DoRadiosityRun

editor/rad_init.cpp:73–101  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

71int Shoot_from_patch = 1;
72
73int DoRadiosityRun(int method, rad_surface *light_surfaces, int count) {
74 float start_time;
75
76 mprintf(0, "Calculating radiosity on %d faces.\n", count);
77
78 rad_Surfaces = light_surfaces;
79 rad_NumSurfaces = count;
80
81 Shoot_method = method;
82
83 start_time = timer_GetTime();
84
85 InitRadiosityRun();
86
87 // Setup our window
88 CLightingStatus dlg;
89
90 dlg.Create(IDD_LIGHTINGSTATUS);
91
92 CalculateRadiosity();
93
94 dlg.DestroyWindow();
95 CloseRadiosityRun();
96
97 // Print time taken
98 mprintf(0, "\nLighting took %.4f seconds.\n", timer_GetTime() - start_time);
99
100 return 1;
101}
102
103// Sets up our radiosity run
104void InitRadiosityRun() {

Callers 3

DoRadiosityForRoomsFunction · 0.85
DoRadiosityForTerrainFunction · 0.85

Calls 5

InitRadiosityRunFunction · 0.85
CalculateRadiosityFunction · 0.85
CloseRadiosityRunFunction · 0.85
CreateMethod · 0.45
DestroyWindowMethod · 0.45

Tested by

no test coverage detected