1 (* Copyright (C) Doom 2D: Forever Developers
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, version 3 of the License ONLY.
6 *
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
11 *
12 * You should have received a copy of the GNU General Public License
13 * along with this program. If not, see <http://www.gnu.org/licenses/>.
14 *)
15 {$INCLUDE ../../shared/a_modes.inc}
18 interface
26 implementation
28 uses
29 {$INCLUDE ../../nogl/noGLuses.inc}
34 ;
36 var
40 begin
42 begin
43 {$IFDEF NOGL_INIT}
44 nogl_Init;
46 begin
50 {$ELSE}
52 begin
56 {$ENDIF}
58 end
62 begin
64 begin
65 {$IFDEF NOGL_INIT}
66 nogl_Quit;
67 {$ENDIF}
69 end
73 begin
76 LoadGL;
77 r_Window_Initialize;
78 r_Console_Init;
79 r_PlayerModel_Initialize;
83 begin
84 FreeGL;
85 r_PlayerModel_Finalize;
86 e_ReleaseEngine
90 begin
91 LoadGL;
97 begin
98 // store real window size in gWinSize, downscale resolution now
102 begin
112 e_InitGL
116 begin
117 if sys_SetDisplayMode(Max(1, gRC_Width), Max(1, gRC_Height), Max(1, gBPP), gRC_FullScreen, gRC_Maximized) then
119 else