summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 28a8176)
raw | patch | inline | side by side (parent: 28a8176)
author | DeaDDooMER <deaddoomer@deadsoftware.ru> | |
Fri, 8 Sep 2023 11:29:02 +0000 (14:29 +0300) | ||
committer | DeaDDooMER <deaddoomer@deadsoftware.ru> | |
Fri, 8 Sep 2023 11:29:02 +0000 (14:29 +0300) |
src/editor/f_main.pas | patch | blob | history |
diff --git a/src/editor/f_main.pas b/src/editor/f_main.pas
index 58b6210233a22db2cce454729f3e84538e6c5190..dfb9b75ef200377d2fbf27e5e7d780ac63f3acff 100644 (file)
--- a/src/editor/f_main.pas
+++ b/src/editor/f_main.pas
e_TextureFontPrintEx(X, Y, Text, FontID, 0, 0, 0, 1.0);
end;
+procedure InitGraphics;
+begin
+ // FIXME: this is a shitty hack
+ if not gDataLoaded then
+ begin
+ e_WriteLog('Init OpenGL', MSG_NOTIFY);
+ e_InitGL();
+ e_WriteLog('Loading data', MSG_NOTIFY);
+ LoadStdFont('STDTXT', 'STDFONT', gEditorFont);
+ e_WriteLog('Loading more data', MSG_NOTIFY);
+ LoadData();
+ e_WriteLog('Loading even more data', MSG_NOTIFY);
+ gDataLoaded := True;
+ MainForm.FormResize(nil);
+ end;
+end;
+
procedure TMainForm.Draw();
var
x, y: Integer;
Width := 0;
Height := 0;
+ InitGraphics();
+
e_BeginRender();
e_Clear(GL_COLOR_BUFFER_BIT,
procedure TMainForm.OnIdle(Sender: TObject; var Done: Boolean);
var f: AnsiString;
begin
- // FIXME: this is a shitty hack
- if not gDataLoaded then
- begin
- e_WriteLog('Init OpenGL', MSG_NOTIFY);
- e_InitGL();
- e_WriteLog('Loading data', MSG_NOTIFY);
- LoadStdFont('STDTXT', 'STDFONT', gEditorFont);
- e_WriteLog('Loading more data', MSG_NOTIFY);
- LoadData();
- e_WriteLog('Loading even more data', MSG_NOTIFY);
- gDataLoaded := True;
- MainForm.FormResize(nil);
- end;
- Draw();
if StartMap <> '' then
begin
f := StartMap;