Rise
The Vieneo Province
Toggle main menu visibility
Loading...
Searching...
No Matches
ScreenGrab.h
Go to the documentation of this file.
1
//--------------------------------------------------------------------------------------
2
// File: ScreenGrab.h
3
//
4
// Function for capturing a 2D texture and saving it to a file (aka a 'screenshot'
5
// when used on a Direct3D Render Target).
6
//
7
// Note these functions are useful as a light-weight runtime screen grabber. For
8
// full-featured texture capture, DDS writer, and texture processing pipeline,
9
// see the 'Texconv' sample and the 'DirectXTex' library.
10
//
11
// Copyright (c) Microsoft Corporation.
12
// Licensed under the MIT License.
13
//
14
// http://go.microsoft.com/fwlink/?LinkId=248926
15
// https://go.microsoft.com/fwlink/?LinkId=248929
16
//--------------------------------------------------------------------------------------
17
18
#pragma once
19
20
#if defined(_XBOX_ONE) && defined(_TITLE)
21
#include <d3d11_x.h>
22
#else
23
#include <d3d11_1.h>
24
#endif
25
26
#include <functional>
27
28
#if defined(NTDDI_WIN10_FE) || defined(__MINGW32__)
29
#include <ocidl.h>
30
#else
31
#include <OCIdl.h>
32
#endif
33
34
#ifdef _MSC_VER
35
#pragma comment(lib, "uuid.lib")
36
#endif
37
38
#ifndef DIRECTX_TOOLKIT_API
39
#ifdef DIRECTX_TOOLKIT_EXPORT
40
#ifdef __GNUC__
41
#define DIRECTX_TOOLKIT_API __attribute__((dllexport))
42
#else
43
#define DIRECTX_TOOLKIT_API __declspec(dllexport)
44
#endif
45
#elif defined(DIRECTX_TOOLKIT_IMPORT)
46
#ifdef __GNUC__
47
#define DIRECTX_TOOLKIT_API __attribute__((dllimport))
48
#else
49
#define DIRECTX_TOOLKIT_API __declspec(dllimport)
50
#endif
51
#else
52
#define DIRECTX_TOOLKIT_API
53
#endif
54
#endif
55
56
namespace
DirectX
57
{
58
DIRECTX_TOOLKIT_API
59
HRESULT
__cdecl
60
SaveDDSTextureToFile
(_In_ ID3D11DeviceContext* pContext, _In_ ID3D11Resource* pSource, _In_z_
const
wchar_t
* fileName)
noexcept
;
61
62
DIRECTX_TOOLKIT_API
63
HRESULT
__cdecl
SaveWICTextureToFile
(_In_ ID3D11DeviceContext* pContext,
64
_In_ ID3D11Resource* pSource,
65
_In_ REFGUID guidContainerFormat,
66
_In_z_
const
wchar_t
* fileName,
67
_In_opt_
const
GUID* targetFormat =
nullptr
,
68
_In_ std::function<
void
__cdecl
(IPropertyBag2*)> setCustomProps =
nullptr
,
69
_In_
bool
forceSRGB =
false
);
70
}
// namespace DirectX
HRESULT
HRESULT(WINAPI *CUniBuffer::_ScriptApplyDigitSubstitution)(const SCRIPT_DIGITSUBSTITUTE *
DIRECTX_TOOLKIT_API
#define DIRECTX_TOOLKIT_API
Definition
DDSTextureLoader.h:42
DirectX
Definition
DDS.h:24
DirectX::SaveWICTextureToFile
DIRECTX_TOOLKIT_API HRESULT __cdecl SaveWICTextureToFile(_In_ ID3D11DeviceContext *pContext, _In_ ID3D11Resource *pSource, _In_ REFGUID guidContainerFormat, _In_z_ const wchar_t *fileName, _In_opt_ const GUID *targetFormat=nullptr, _In_ std::function< void __cdecl(IPropertyBag2 *)> setCustomProps=nullptr, _In_ bool forceSRGB=false)
DirectX::SaveDDSTextureToFile
DIRECTX_TOOLKIT_API HRESULT __cdecl SaveDDSTextureToFile(_In_ ID3D11DeviceContext *pContext, _In_ ID3D11Resource *pSource, _In_z_ const wchar_t *fileName) noexcept
__cdecl
#define __cdecl
Definition
steam_api_common.h:68
ThirdParty
DirectXTK
ScreenGrab.h
Generated on
for Rise by
1.18.0