obs-studio/plugins/win-capture/graphics-hook
jp9000 2591f24594 win-capture: Add game capture fix for darkest dungeon
Darkest dungeon uses an unusual technique for drawing its frames: a
fixed 1920x1080 frame buffer used in place of the backbuffer, which is
then stretched to fit the size of the screen (whether the screen is
bigger or smaller than the actual texture).

The custom frame would cause glReadBuffer to initially fail with an
error.  When this happens, their custom frame buffer is in use, so all
that needs to be done is simply reset the capture and force the current
output size to 1920x1080 while that custom frame is in use.

They presumably did this in order to ensure the game looks the same at
any resolution.  Instead of having to use power-of-two sprites and
mipmaps for every single game sprite and stretch/skew each of them
(which would risk the final output "not looking quite right" at
different resolutions), they simply use non-pow-2 sprites with no
mipmaps and render them all on to one texture of a fixed size and then
stretch that final output texture.  That ensures that the actual
composite of the game still looks the same at any resolution, while
reducing texture memory by not requiring each sprite to use a
power-of-two texture and mipmaps.
2016-01-26 11:49:28 -08:00
..
CMakeLists.txt win-capture: Implement D3D8 game capture support 2015-02-09 05:02:48 -08:00
d3d1x_shaders.hpp win-capture: Add graphics-hook library 2014-12-09 14:21:07 -08:00
d3d8-capture.cpp win-capture: Fall back to creating d3d contexts if offsets bad 2015-11-20 14:07:14 -08:00
d3d9-capture.cpp win-capture: Fall back to creating d3d contexts if offsets bad 2015-11-20 14:07:14 -08:00
d3d9-patches.hpp win-capture: Add new game capture patches 2015-11-14 14:25:17 -08:00
d3d10-capture.cpp win-capture: deal with a 32bit handle cast errors 2015-02-09 03:41:54 -08:00
d3d11-capture.cpp win-capture: deal with a 32bit handle cast errors 2015-02-09 03:41:54 -08:00
dxgi-capture.cpp win-capture: Add hook exception for Just Cause 3 2015-12-03 17:19:35 -08:00
dxgi-helpers.hpp win-capture: Fix enum switch warnings 2015-02-09 03:49:46 -08:00
gl-capture.c win-capture: Add game capture fix for darkest dungeon 2016-01-26 11:49:28 -08:00
gl-decs.h win-capture: Add game capture fix for darkest dungeon 2016-01-26 11:49:28 -08:00
graphics-hook.c win-capture: Fall back to creating d3d contexts if offsets bad 2015-11-20 14:07:14 -08:00
graphics-hook.h win-capture: Fall back to creating d3d contexts if offsets bad 2015-11-20 14:07:14 -08:00