jp9000 a5872955f4 win-capture: Add graphics-hook library
This library is a completely refactored and rewritten version of the
original graphics hook.  The code is more clean, readable, and has a
variety of new features, such as scaling and forcing memory capture.

Currently, only D3D9, 10, and 11 are implemented.  (This commit may be
updated on this branch)
2014-12-09 14:21:07 -08:00

34 lines
679 B
C++

#pragma once
static const char vertex_shader_string[] =
"struct VertData \
{ \
float4 pos : SV_Position; \
float2 texCoord : TexCoord0; \
}; \
VertData main(VertData input) \
{ \
VertData output; \
output.pos = input.pos; \
output.texCoord = input.texCoord; \
return output; \
}";
static const char pixel_shader_string[] =
"uniform Texture2D diffuseTexture; \
SamplerState textureSampler \
{ \
AddressU = Clamp; \
AddressV = Clamp; \
Filter = Linear; \
}; \
struct VertData \
{ \
float4 pos : SV_Position; \
float2 texCoord : TexCoord0; \
}; \
float4 main(VertData input) : SV_Target \
{ \
return diffuseTexture.Sample(textureSampler, input.texCoord); \
}";