2 * Copyright 2016 Alistair Leslie-Hughes
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 #ifndef __D3DX10TEX_H__
20 #define __D3DX10TEX_H__
22 typedef enum D3DX10_FILTER_FLAG
24 D3DX10_FILTER_NONE
= 0x00000001,
25 D3DX10_FILTER_POINT
= 0x00000002,
26 D3DX10_FILTER_LINEAR
= 0x00000003,
27 D3DX10_FILTER_TRIANGLE
= 0x00000004,
28 D3DX10_FILTER_BOX
= 0x00000005,
30 D3DX10_FILTER_MIRROR_U
= 0x00010000,
31 D3DX10_FILTER_MIRROR_V
= 0x00020000,
32 D3DX10_FILTER_MIRROR_W
= 0x00040000,
33 D3DX10_FILTER_MIRROR
= 0x00070000,
35 D3DX10_FILTER_DITHER
= 0x00080000,
36 D3DX10_FILTER_DITHER_DIFFUSION
= 0x00100000,
38 D3DX10_FILTER_SRGB_IN
= 0x00200000,
39 D3DX10_FILTER_SRGB_OUT
= 0x00400000,
40 D3DX10_FILTER_SRGB
= 0x00600000,
43 typedef enum D3DX10_IMAGE_FILE_FORMAT
52 D3DX10_IFF_FORCE_DWORD
= 0x7fffffff
53 } D3DX10_IMAGE_FILE_FORMAT
;
55 typedef struct D3DX10_IMAGE_INFO
64 D3D10_RESOURCE_DIMENSION ResourceDimension
;
65 D3DX10_IMAGE_FILE_FORMAT ImageFileFormat
;
68 typedef struct D3DX10_IMAGE_LOAD_INFO
82 D3DX10_IMAGE_INFO
*pSrcInfo
;
85 D3DX10_IMAGE_LOAD_INFO()
87 Width
= D3DX10_DEFAULT
;
88 Height
= D3DX10_DEFAULT
;
89 Depth
= D3DX10_DEFAULT
;
90 FirstMipLevel
= D3DX10_DEFAULT
;
91 MipLevels
= D3DX10_DEFAULT
;
92 Usage
= (D3D10_USAGE
)D3DX10_DEFAULT
;
93 BindFlags
= D3DX10_DEFAULT
;
94 CpuAccessFlags
= D3DX10_DEFAULT
;
95 MiscFlags
= D3DX10_DEFAULT
;
96 Format
= DXGI_FORMAT_FROM_FILE
;
97 Filter
= D3DX10_DEFAULT
;
98 MipFilter
= D3DX10_DEFAULT
;
102 } D3DX10_IMAGE_LOAD_INFO
;
108 HRESULT WINAPI
D3DX10CreateTextureFromMemory(ID3D10Device
*device
, const void *src_data
, SIZE_T src_data_size
,
109 D3DX10_IMAGE_LOAD_INFO
*loadinfo
, ID3DX10ThreadPump
*pump
, ID3D10Resource
**texture
, HRESULT
*hresult
);
111 HRESULT WINAPI
D3DX10FilterTexture(ID3D10Resource
*texture
, UINT src_level
, UINT filter
);
113 HRESULT WINAPI
D3DX10GetImageInfoFromMemory(const void *src_data
, SIZE_T src_data_size
, ID3DX10ThreadPump
*pump
,
114 D3DX10_IMAGE_INFO
*img_info
, HRESULT
*hresult
);