


HBITMAP hbDesktop = CreateCompatibleBitmap( hdc, width, height) Int width = GetSystemMetrics(SM_CXVIRTUALSCREEN) Int height = GetSystemMetrics(SM_CYVIRTUALSCREEN) get the height and width of the screen HDC hDest = CreateCompatibleDC(hdc) // create a device context to use yourself This is still a decent way to go even with the performance advisory on that site, you can get to 30fps easily I would think.įrom this comment (I have no experience doing this, I'm just referencing someone who does): HDC hdc = GetDC(NULL) // get the desktop device context Hr = Device->GetRenderTargetData(pRenderTarget, pDestTarget) ĮDIT: I can see that this is listed under your first edit link as "the GDI way". copy the render target to the destination surface. Hr = Device->CreateOffscreenPlainSurface(DisplayMde.Width, hr = pDirect3D->GetAdapterDisplayMode(D3DADAPTER_DEFAULT,&d3ddisplaymode) HRESULT hr = Device->GetRenderTarget(0, &pRenderTarget) I can't recall where I found this, but it has been modified, thanks to whoever! void dump_buffer() This is what I use to collect single frames, but if you modify this and keep the two targets open all the time then you could "stream" it to disk using a static counter for the file name. From what I understand, this is faster than reading from the front buffer, because you are reading from system RAM, rather than video RAM. It hooks the underlying graphics API to read from the back buffer. Could someone give me an in-depth explanation on how it works, and why it is faster? I may also need guidance on implementing something like that, but I'm sure there is existing documentation anyway.Īlso, I now know how FRAPS records the screen. Could anyone fill in the missing blanks for me?Įdit: I read that screencasting programs such as Camtasia use their own capture driver. It mentions in the Conclusion that disabling hardware acceleration could drastically improve the performance of the capture application.
#Change screen capture format widows 8 windows#
It has introduced me to the Windows Media API way of doing it and the DirectX way of doing it. Knowledge isn't bad, after all.Įdit: I came across this article: Various methods for capturing the screen. The screencasting program will be for recording game footage, although, if this does narrow down the options, I'm still open for any other suggestions that fall out of this scope. The only method I'm aware of is to use GDI, but I'm curious whether there are other ways to go about this, and, if there are, which incurs the least overhead? Speed is a priority.
#Change screen capture format widows 8 how to#
I want to write a screencasting program for the Windows platform, but am unsure of how to capture the screen.
