-
Notifications
You must be signed in to change notification settings - Fork 511
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Eliminated some redudant code by adding to PlatformHelpers.h and adding DDS.h
- Loading branch information
walbourn_cp
authored and
walbourn_cp
committed
Oct 2, 2012
1 parent
84a2ce3
commit 1e2e54b
Showing
8 changed files
with
1,084 additions
and
172 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
//-------------------------------------------------------------------------------------- | ||
// File: ScreenGrab.h | ||
// | ||
// Function for capturing a 2D texture and saving it to a file (aka a 'screenshot' | ||
// when used on a Direct3D 11 Render Target). | ||
// | ||
// 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. | ||
// | ||
// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF | ||
// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO | ||
// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A | ||
// PARTICULAR PURPOSE. | ||
// | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// | ||
// http://go.microsoft.com/fwlink/?LinkId=248926 | ||
// http://go.microsoft.com/fwlink/?LinkId=248929 | ||
//-------------------------------------------------------------------------------------- | ||
|
||
#ifdef _MSC_VER | ||
#pragma once | ||
#endif | ||
|
||
#include <d3d11.h> | ||
|
||
#pragma warning(push) | ||
#pragma warning(disable : 4005) | ||
#include <stdint.h> | ||
#pragma warning(pop) | ||
|
||
namespace DirectX | ||
{ | ||
HRESULT SaveDDSTextureToFile( _In_ ID3D11DeviceContext* pContext, | ||
_In_ ID3D11Resource* pSource, | ||
_In_z_ LPCWSTR fileName ); | ||
|
||
HRESULT SaveWICTextureToFile( _In_ ID3D11DeviceContext* pContext, | ||
_In_ ID3D11Resource* pSource, | ||
_In_ REFGUID guidContainerFormat, | ||
_In_z_ LPCWSTR fileName, | ||
_In_opt_ const GUID* targetFormat = nullptr ); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.