0

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)

  • 1
    Hi! I'm genuinely interested in knowing what made you think the `ResetFlags` parameter would help you to switch to fullscreen (this could be an issue in the documentation, maybe it can be improved) – Astrofra Sep 19 '22 at 09:20
  • @Astrofra I found this information in the BGFX documentation : https://bkaradzic.github.io/bgfx/bgfx.html#_CPPv4N4bgfx5resetE8uint32_t8uint32_t8uint32_tN13TextureFormat4EnumE –  Sep 19 '22 at 09:46
  • 1
    AH! That's what I was afraid of... May I kindly point out that `BGFX_RESET_FULLSCREEN` says _Not supported yet_ :) – Astrofra Sep 19 '22 at 09:52

1 Answers1

1

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.

Erk
  • 26
  • 3