Reimplement monitor capture

- Implement windows monitor capture (code is so much cleaner than in
   OBS1).  Will implement duplication capture later

 - Add GDI texture support to d3d11 graphics library

 - Fix precision issue with sleep timing, you have to call
   timeBeginPeriod otherwise windows sleep will be totally erratic.
This commit is contained in:
jp9000
2014-03-05 10:43:14 -07:00
parent 3415960d02
commit 4f7ab552df
23 changed files with 892 additions and 11 deletions

View File

@@ -73,6 +73,9 @@ void gs_texture_2d::InitTexture(const void **data)
if (isRenderTarget || isGDICompatible)
td.BindFlags |= D3D11_BIND_RENDER_TARGET;
if (isGDICompatible)
td.MiscFlags |= D3D11_RESOURCE_MISC_GDI_COMPATIBLE;
if (data)
InitSRD(srd, data);
@@ -80,6 +83,13 @@ void gs_texture_2d::InitTexture(const void **data)
texture.Assign());
if (FAILED(hr))
throw HRError("Failed to create 2D texture", hr);
if (isGDICompatible) {
hr = texture->QueryInterface(__uuidof(IDXGISurface1),
(void**)gdiSurface.Assign());
if (FAILED(hr))
throw HRError("Failed to create GDI surface", hr);
}
}
void gs_texture_2d::InitResourceView()