blob: 78cf43347e7dd4e1c5fcced3616dd8253ac08fb3 [file] [log] [blame]
José Fonsecac8695f72013-03-06 12:12:04 +00001/**************************************************************************
2 *
3 * Copyright 2013 VMware, Inc.
4 * All Rights Reserved.
5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a copy
7 * of this software and associated documentation files (the "Software"), to deal
8 * in the Software without restriction, including without limitation the rights
9 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 * copies of the Software, and to permit persons to whom the Software is
11 * furnished to do so, subject to the following conditions:
12 *
13 * The above copyright notice and this permission notice shall be included in
14 * all copies or substantial portions of the Software.
15 *
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 * THE SOFTWARE.
23 *
24 **************************************************************************/
25
Jose Fonseca9653f952015-05-19 16:32:43 +010026#pragma once
José Fonsecac8695f72013-03-06 12:12:04 +000027
28
29#include <windows.h>
30
31#include "compat.h"
32
33#include <dxgi.h>
34
35
José Fonseca283551a2013-07-03 15:48:30 +010036#ifndef ARRAYSIZE
37#define ARRAYSIZE(_x) (sizeof(_x)/sizeof((_x)[0]))
38#endif
39
40
José Fonsecabbb9eb32013-04-16 19:38:00 +010041namespace image {
42 class Image;
43}
44
45
José Fonsecac8695f72013-03-06 12:12:04 +000046namespace d3dstate {
47
48
49HRESULT
50ConvertFormat(DXGI_FORMAT SrcFormat,
51 void *SrcData,
52 UINT SrcPitch,
53 DXGI_FORMAT DstFormat,
54 void *DstData,
55 UINT DstPitch,
56 UINT Width, UINT Height);
57
José Fonsecabbb9eb32013-04-16 19:38:00 +010058image::Image *
59ConvertImage(DXGI_FORMAT SrcFormat,
60 void *SrcData,
61 UINT SrcPitch,
62 UINT Width, UINT Height);
63
José Fonsecac8695f72013-03-06 12:12:04 +000064
José Fonseca29d4bda2014-02-28 17:50:24 +000065image::Image *
66getRenderTargetImage(IDXGISwapChain *pSwapChain);
67
Zack Rusin86bd4992015-03-03 21:50:43 -050068std::string
69getDXGIFormatName(DXGI_FORMAT format);
70
José Fonseca29d4bda2014-02-28 17:50:24 +000071
José Fonsecac8695f72013-03-06 12:12:04 +000072} /* namespace d3dstate */
73
74