1
0
mirror of https://github.com/microsoft/DirectXTex synced 2024-09-19 15:19:56 +00:00
DirectXTex/ScreenGrab/ScreenGrab9.h

48 lines
1.4 KiB
C
Raw Permalink Normal View History

2016-08-22 18:26:36 +00:00
//--------------------------------------------------------------------------------------
// File: ScreenGrab9.h
2016-08-22 18:26:36 +00:00
//
// Function for saving 2D surface to a file (aka a 'screenshot'
// when used on a Direct3D 9's GetFrontBufferData).
2016-08-22 18:26:36 +00:00
//
// Note these functions are useful as a light-weight runtime screen grabber. For
// full-featured texture capture, DDS writer, and texture processing pipeline,
// see the 'Texconv' sample and the 'DirectXTex' library.
//
2021-02-27 06:59:42 +00:00
// Copyright (c) Microsoft Corporation.
2018-02-24 06:24:46 +00:00
// Licensed under the MIT License.
2016-08-22 18:26:36 +00:00
//
// http://go.microsoft.com/fwlink/?LinkId=248926
// http://go.microsoft.com/fwlink/?LinkId=248929
//--------------------------------------------------------------------------------------
#pragma once
#ifndef DIRECT3D_VERSION
#define DIRECT3D_VERSION 0x900
#endif
#include <d3d9.h>
2016-08-22 18:26:36 +00:00
#if defined(NTDDI_WIN10_FE) || defined(__MINGW32__)
#include <ocidl.h>
#else
#include <OCIdl.h>
#endif
2016-08-22 18:26:36 +00:00
#include <functional>
namespace DirectX
{
HRESULT __cdecl SaveDDSTextureToFile(
_In_ LPDIRECT3DSURFACE9 pSource,
_In_z_ const wchar_t* fileName) noexcept;
2016-08-22 18:26:36 +00:00
HRESULT __cdecl SaveWICTextureToFile(
_In_ LPDIRECT3DSURFACE9 pSource,
_In_ REFGUID guidContainerFormat,
_In_z_ const wchar_t* fileName,
_In_opt_ const GUID* targetFormat = nullptr,
2024-08-15 17:13:49 +00:00
_In_ std::function<void __cdecl(IPropertyBag2*)> setCustomProps = nullptr);
}