2 * Copyright 2022 Piotr Caban
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 extern HRESULT
load_file(const WCHAR
*path
, void **data
, DWORD
*size
) DECLSPEC_HIDDEN
;
20 extern HRESULT
load_resourceA(HMODULE module
, const char *resource
,
21 void **data
, DWORD
*size
) DECLSPEC_HIDDEN
;
22 extern HRESULT
load_resourceW(HMODULE module
, const WCHAR
*resource
,
23 void **data
, DWORD
*size
) DECLSPEC_HIDDEN
;
25 extern HRESULT
get_image_info(const void *data
, SIZE_T size
, D3DX10_IMAGE_INFO
*img_info
) DECLSPEC_HIDDEN
;
27 extern void init_load_info(const D3DX10_IMAGE_LOAD_INFO
*load_info
,
28 D3DX10_IMAGE_LOAD_INFO
*out
) DECLSPEC_HIDDEN
;
29 /* Returns array of D3D10_SUBRESOURCE_DATA structures followed by textures data. */
30 extern HRESULT
load_texture_data(const void *data
, SIZE_T size
, D3DX10_IMAGE_LOAD_INFO
*load_info
,
31 D3D10_SUBRESOURCE_DATA
**resource_data
) DECLSPEC_HIDDEN
;
32 extern HRESULT
create_d3d_texture(ID3D10Device
*device
, D3DX10_IMAGE_LOAD_INFO
*load_info
,
33 D3D10_SUBRESOURCE_DATA
*resource_data
, ID3D10Resource
**texture
) DECLSPEC_HIDDEN
;