1 /** @file api_material.h Public API for materials.
2  * @ingroup resource
3  *
4  * @author Copyright &copy; 2013-2017 Jaakko Keränen <jaakko.keranen@iki.fi>
5  * @author Copyright &copy; 2013 Daniel Swanson <danij@dengine.net>
6  *
7  * @par License
8  * GPL: http://www.gnu.org/licenses/gpl.html
9  *
10  * <small>This program is free software; you can redistribute it and/or modify
11  * it under the terms of the GNU General Public License as published by the
12  * Free Software Foundation; either version 2 of the License, or (at your
13  * option) any later version. This program is distributed in the hope that it
14  * will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
15  * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
16  * Public License for more details. You should have received a copy of the GNU
17  * General Public License along with this program; if not, see:
18  * http://www.gnu.org/licenses</small>
19  */
20 
21 #ifndef DOOMSDAY_API_MATERIAL_H
22 #define DOOMSDAY_API_MATERIAL_H
23 
24 #include "api_base.h"
25 #include "api_uri.h"
26 #include "api_map.h"
27 
28 /**
29  * @defgroup material Materials
30  * @ingroup resource
31  */
32 ///@{
33 
DENG_API_TYPEDEF(Material)34 DENG_API_TYPEDEF(Material)
35 {
36     de_api_t api;
37 
38     world_Material *(*ForTextureUri)(Uri const *textureUri);
39     Uri *(*ComposeUri)(materialid_t materialId);
40     materialid_t (*ResolveUri)(Uri const *uri);
41     materialid_t (*ResolveUriCString)(char const *path);
42 
43 }
44 DENG_API_T(Material);
45 
46 #ifndef DENG_NO_API_MACROS_MATERIALS
47 #define DD_MaterialForTextureUri    _api_Material.ForTextureUri
48 #define Materials_ComposeUri        _api_Material.ComposeUri
49 #define Materials_ResolveUri        _api_Material.ResolveUri
50 #define Materials_ResolveUriCString _api_Material.ResolveUriCString
51 #endif
52 
53 #ifdef __DOOMSDAY__
54 DENG_USING_API(Material);
55 #endif
56 
57 ///@}
58 
59 #endif // DOOMSDAY_API_MATERIAL_H
60