mirror of
https://github.com/microsoft/DirectXTex.git
synced 2026-02-09 22:26:13 +01:00
Direct3D 9 versions of texture loaders (#176)
This commit is contained in:
42
ScreenGrab/ScreenGrab9.h
Normal file
42
ScreenGrab/ScreenGrab9.h
Normal file
@@ -0,0 +1,42 @@
|
||||
//--------------------------------------------------------------------------------------
|
||||
// File: ScreenGrab9.h
|
||||
//
|
||||
// Function for saving 2D surface to a file (aka a 'screenshot'
|
||||
// when used on a Direct3D 9's GetFrontBufferData).
|
||||
//
|
||||
// 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.
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
//
|
||||
// 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>
|
||||
|
||||
#include <OCIdl.h>
|
||||
#include <functional>
|
||||
|
||||
|
||||
namespace DirectX
|
||||
{
|
||||
HRESULT __cdecl SaveDDSTextureToFile(
|
||||
_In_ LPDIRECT3DSURFACE9 pSource,
|
||||
_In_z_ const wchar_t* fileName) noexcept;
|
||||
|
||||
HRESULT __cdecl SaveWICTextureToFile(
|
||||
_In_ LPDIRECT3DSURFACE9 pSource,
|
||||
_In_ REFGUID guidContainerFormat,
|
||||
_In_z_ const wchar_t* fileName,
|
||||
_In_opt_ const GUID* targetFormat = nullptr,
|
||||
_In_opt_ std::function<void __cdecl(IPropertyBag2*)> setCustomProps = nullptr) noexcept;
|
||||
}
|
||||
Reference in New Issue
Block a user