fullscreen mode and windowed mode

在这里插入图片描述

本文汇总介绍关于exclusive fullscreen(真全屏)和windowed mode(窗口模式包括无边框)方面的信息。
在这里插入图片描述
直接上图,这里对比下大的不同,真全屏的话相对来说两个巨大优势:

  • 直接把backbuffer显示到桌面,已经是最少的copy了
  • 这个也带了一些额外的设置要求:device创建中的size,format,refreshrate都是需要是从adapter中enumerate出来的一种
  • 显存独占,这个对于显存量比较小的游戏来说特别的重要,实际游戏运行中,会出现driver在调度显存的情况,这种往往以paging的方式出现一个卡顿,也是高帧数游戏中非常头疼的情况
  • 劣势:切出fullscreen时候有一定的切换时间,这让频繁切屏的玩家会很难受,这种情况下无边框的窗口模式更好一些,但这点在新版的win10 update里面已经进一步提升,到了很低的限度了。
    所以在cpu和gpu方面都有很大优势。

在windowed mode下,在win10 的dxgi中已经有了不少的优化,甚至在一些情况下满足可以做到使用direct flip达到和exclusive fullscreen一样的效率(这也是中间一度取消exclusive fullscreen)

一些细节

  • 游戏窗口在exclusive fullscreen下会自动的变成topmost的,无论是否设置

reference:
https://blogs.msdn.microsoft.com/directx/2018/04/09/dxgi-flip-model/
https://docs.microsoft.com/en-us/windows/desktop/direct3darticles/direct3d-9ex-improvements

185.5 ../engine/common/host.c:1214:3: error: 'section' attribute only applies to functions, global variables, Objective-C methods, and Objective-C properties 185.5 /emsdk/upstream/emscripten/cache/sysroot/include/emscripten/em_js.h:71:39: note: expanded from macro 'EM_JS' 185.5 71 | #define EM_JS(ret, name, params, ...) _EM_JS(ret, name, name, params, #__VA_ARGS__) 185.5 | ^ 185.5 /emsdk/upstream/emscripten/cache/sysroot/include/emscripten/em_js.h:67:18: note: expanded from macro '_EM_JS' 185.5 67 | __attribute__((section("em_js"), aligned(1))) char __em_js__##js_name[] = \ 185.5 | ^ 185.5 ../engine/common/host.c:1214:15: error: mixing declarations and code is incompatible with standards before C99 [-Werror,-Wdeclaration-after-statement] 185.5 1214 | EM_JS(void, WebRTC, (void), { 185.5 | ^ 185.5 ../engine/common/host.c:1461:27: warning: comparison of floating-point type 'float' with enumeration type 'enum dev_level_e' [-Wenum-float-conversion] 185.5 1461 | if( host_developer.value >= DEV_EXTENDED ) 185.5 | ~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~ 185.5 6 warnings and 2 errors generated. 185.5 185.6 ../engine/common/imagelib/img_dds.c:55:13: warning: variable 'bitmask' set but not used [-Wunused-but-set-variable] 185.6 55 | uint bits, bitmask; 185.6 | ^ 185.6 ../engine/common/imagelib/img_dds.c:237:6: warning: unused variable 'w' [-Wunused-variable] 185.6 237 | int w = image.width; 185.6 | ^ 185.6 ../engine/common/imagelib/img_dds.c:238:6: warning: unused variable 'h' [-Wunused-variable] 185.6 238 | int h = image.height; 185.6 | ^ 185.6 ../engine/common/imagelib/img_dds.c:239:6: warning: unused variable 'd' [-Wunused-variable] 185.6 239 | int d = image.depth; 185.6 | ^ 185.6 4 warnings generated. 185.6 185.6 ../engine/platform/sdl2/host_sdl2.c:245:28: warning: comparison of floating-point type 'float' with enumeration type 'enum window_mode_e' [-Wenum-float-conversion] 185.6 245 | if( vid_fullscreen.value == WINDOW_MODE_FULLSCREEN ) 185.6 | ~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~ 185.6 ../engine/platform/sdl2/host_sdl2.c:397:30: warning: comparison of floating-point type 'float' with enumeration type 'enum window_mode_e' [-Wenum-float-conversion] 185.6 397 | if ( vid_fullscreen.value == WINDOW_MODE_WINDOWED ) 185.6 | ~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~ 185.6 ../engine/platform/sdl2/host_sdl2.c:410:29: warning: comparison of floating-point type 'float' with enumeration type 'enum window_mode_e' [-Wenum-float-conversion] 185.6 410 | if( vid_fullscreen.value == WINDOW_MODE_FULLSCREEN ) 185.6 | ~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~ 185.6 ../engine/platform/sdl2/host_sdl2.c:421:29: warning: comparison of floating-point type 'float' with enumeration type 'enum window_mode_e' [-Wenum-float-conversion] 185.6 421 | if( vid_fullscreen.value == WINDOW_MODE_WINDOWED ) 185.6 | ~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~ 185.6 4 warnings generated. 185.6 185.9 Waf: Leaving directory `/xash3d-fwgs/build' 185.9 Build failed
最新发布
11-12
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值