2011-12-17 09:00:41 +00:00
|
|
|
|
|
|
|
#ifndef DARKROOM_DEF_LOAD_TEXTURE_IDENTIFIER
|
|
|
|
# error should define DARKROOM_DEF_LOAD_TEXTURE_IDENTIFIER.
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef DARKROOM_DEF_LOAD_TEXTURE_FILE
|
|
|
|
# error should define DARKROOM_DEF_LOAD_TEXTURE_FILE.
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#define DARKROOM_LOAD_IDENTIFIER_DETAIL_CAT(id, suffix) DARKROOM_LOAD_IDENTIFIER_DETAIL_CAT_I(id, suffix)
|
|
|
|
#define DARKROOM_LOAD_IDENTIFIER_DETAIL_CAT_I(id, suffix) DARKROOM_LOAD_IDENTIFIER_DETAIL_CAT_II(id ## suffix)
|
|
|
|
#define DARKROOM_LOAD_IDENTIFIER_DETAIL_CAT_II(res) res
|
|
|
|
|
|
|
|
#define DARKROOM_LOAD_DETAIL_IDENTIFIER(id) DARKROOM_LOAD_IDENTIFIER_DETAIL_CAT( \
|
|
|
|
DARKROOM_LOAD_IDENTIFIER_DETAIL_CAT(DARKROOM_DEF_LOAD_TEXTURE_IDENTIFIER, id), \
|
|
|
|
_darkroom_load_texture_detail \
|
|
|
|
)
|
|
|
|
|
2012-11-08 16:09:49 +00:00
|
|
|
#define DARKROOM_LOAD_IDENTIFIER DARKROOM_DEF_LOAD_TEXTURE_IDENTIFIER
|
|
|
|
#ifdef DARKROOM_DEF_LOAD_INFO_IDENTIFIER
|
|
|
|
# define DARKROOM_LOAD_INFO_IDENTIFIER DARKROOM_DEF_LOAD_INFO_IDENTIFIER
|
|
|
|
#else
|
|
|
|
# define DARKROOM_LOAD_INFO_IDENTIFIER DARKROOM_LOAD_DETAIL_IDENTIFIER(info)
|
|
|
|
#endif
|
|
|
|
|
2011-12-17 09:00:41 +00:00
|
|
|
SPROUT_STATIC_CONSTEXPR sprout::darkroom::textures::version_type DARKROOM_LOAD_DETAIL_IDENTIFIER(version) =
|
|
|
|
# define DARKROOM_LOADING_TEXTURE_VERSION
|
|
|
|
# include DARKROOM_DEF_LOAD_TEXTURE_FILE
|
|
|
|
# undef DARKROOM_LOADING_TEXTURE_VERSION
|
|
|
|
;
|
2012-08-13 01:56:48 +00:00
|
|
|
|
|
|
|
static_assert(DARKROOM_LOAD_DETAIL_IDENTIFIER(version) <= 0, "Unsupported darkroom tex version");
|
|
|
|
|
2012-11-08 16:09:49 +00:00
|
|
|
SPROUT_STATIC_CONSTEXPR sprout::darkroom::textures::info_type DARKROOM_LOAD_INFO_IDENTIFIER = {
|
2011-12-17 09:00:41 +00:00
|
|
|
# define DARKROOM_LOADING_TEXTURE_INFO
|
|
|
|
# include DARKROOM_DEF_LOAD_TEXTURE_FILE
|
|
|
|
# undef DARKROOM_LOADING_TEXTURE_INFO
|
|
|
|
};
|
|
|
|
|
|
|
|
SPROUT_STATIC_CONSTEXPR sprout::darkroom::textures::image_type<
|
2012-11-08 16:09:49 +00:00
|
|
|
DARKROOM_LOAD_INFO_IDENTIFIER.width,
|
|
|
|
DARKROOM_LOAD_INFO_IDENTIFIER.height
|
2011-12-17 09:00:41 +00:00
|
|
|
> DARKROOM_LOAD_IDENTIFIER(
|
2012-11-08 16:09:49 +00:00
|
|
|
DARKROOM_LOAD_INFO_IDENTIFIER,
|
2011-12-17 09:00:41 +00:00
|
|
|
# define DARKROOM_LOADING_TEXTURE_PIXEL
|
|
|
|
# include DARKROOM_DEF_LOAD_TEXTURE_FILE
|
|
|
|
# undef DARKROOM_LOADING_TEXTURE_PIXEL
|
|
|
|
);
|
|
|
|
|
|
|
|
#undef DARKROOM_LOAD_IDENTIFIER
|
2012-11-08 16:09:49 +00:00
|
|
|
#undef DARKROOM_LOAD_INFO_IDENTIFIER
|
|
|
|
|
2011-12-17 09:00:41 +00:00
|
|
|
#undef DARKROOM_LOAD_DETAIL_IDENTIFIER
|
|
|
|
|
|
|
|
#undef DARKROOM_LOAD_IDENTIFIER_DETAIL_CAT
|
|
|
|
#undef DARKROOM_LOAD_IDENTIFIER_DETAIL_CAT_I
|
|
|
|
#undef DARKROOM_LOAD_IDENTIFIER_DETAIL_CAT_II
|
|
|
|
|
|
|
|
#undef DARKROOM_DEF_LOAD_TEXTURE_IDENTIFIER
|
|
|
|
#undef DARKROOM_DEF_LOAD_TEXTURE_FILE
|
2012-11-08 16:09:49 +00:00
|
|
|
#ifdef DARKROOM_DEF_LOAD_INFO_IDENTIFIER
|
|
|
|
# undef DARKROOM_DEF_LOAD_INFO_IDENTIFIER
|
|
|
|
#endif
|