简体   繁体   中英

Open in mode fullscreen with harfang's RenderInit()

I'm trying to open a screen in fullscreen mode. My understanding is that RenderInit should be passed a specific flag:.

RenderInit(width: int, height: int, reset_flags: ResetFlags)

...but ResetFlags (an emum?) doesn't seem to mention anything regarding the fullscreen mode: https://dev.harfang3d.com/api/3.2.3/cpython/constants/#resetflags

(I'm working on Windows in DirectX, with the Python API btw)

It's not a question of ResetFlags . What you are looking for is a WindowVisibility flag:) This code usually works for me:

win = hg.NewWindow("My Fullscreen Window", 1920, 1080, 32, hg.WV_Fullscreen)
hg.RenderInit(win)
hg.RenderReset(res_x, res_y, hg.RF_MSAA4X | hg.RF_MaxAnisotropy)

Besides, WV_Undecorated works well if you don't want to change the user's screen resolution, or WV_FullscreenMonitor1 (.., 2, 3) if you need to adress a specific screen in a multiple monitors configuration.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM