MCPcopy Create free account
hub / github.com/TheRealMJP/DeferredTexturing / SwapChain

Method SwapChain

SampleFramework12/v1.00/Graphics/SwapChain.cpp:22–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

20{
21
22SwapChain::SwapChain()
23{
24 refreshRate.Numerator = 60;
25 refreshRate.Denominator = 1;
26
27 // Try to figure out if we should default to 1280x720 or 1920x1080
28 POINT point;
29 point.x = 0;
30 point.y = 0;
31 HMONITOR monitor = MonitorFromPoint(point, MONITOR_DEFAULTTOPRIMARY);
32 if(monitor != 0)
33 {
34 MONITORINFOEX info;
35 ZeroMemory(&info, sizeof(info));
36 info.cbSize = sizeof(MONITORINFOEX);
37 if(GetMonitorInfo(monitor, &info) != 0)
38 {
39 int32 monitorWidth = info.rcWork.right - info.rcWork.left;
40 int32 monitorHeight = info.rcWork.bottom - info.rcWork.top;
41 if(monitorWidth > 1920 && monitorHeight > 1080)
42 {
43 width = 1920;
44 height = 1080;
45 }
46 }
47 }
48}
49
50SwapChain::~SwapChain()
51{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected