import harfang as hg hg.LoadPlugins() plus = hg.GetPlus() plus.RenderInit(400, 300) while not plus.IsAppEnded(): plus.Flip() plus.EndFrame() plus.RenderUninit()
import harfang as hg import helper_2d from harfang_shortcut import * import os, sys import navier_stokes if getattr(sys, 'frozen', False): # frozen exe_path = os.path.dirname(sys.executable) dir_ = sys._MEIPASS hg.LoadPlugins(dir_) else: # unfrozen exe_path = dir_ = os.path.dirname(os.path.realpath(__file__)) hg.LoadPlugins() hg.SetLogIsDetailed(True) hg.SetLogLevel(hg.LogAll) plus = hg.GetPlus() #plus.CreateWorkers() # mount the system file driver hg.MountFileDriver(hg.StdFileDriver()) hg.MountFileDriver(hg.StdFileDriver(dir_)) hg.MountFileDriver(hg.StdFileDriver(os.path.join(dir_, "assets")), "@assets") plus.RenderInit(1600, 900, 4, hg.Windowed) plus.SetBlend2D(hg.BlendAlpha) plus.SetBlend3D(hg.BlendAlpha)