#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 \ ) #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 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 ; static_assert(DARKROOM_LOAD_DETAIL_IDENTIFIER(version) <= 0, "Unsupported darkroom tex version"); SPROUT_STATIC_CONSTEXPR sprout::darkroom::textures::info_type DARKROOM_LOAD_INFO_IDENTIFIER = { # define DARKROOM_LOADING_TEXTURE_INFO # include DARKROOM_DEF_LOAD_TEXTURE_FILE # undef DARKROOM_LOADING_TEXTURE_INFO }; SPROUT_STATIC_CONSTEXPR sprout::darkroom::textures::image_type< DARKROOM_LOAD_INFO_IDENTIFIER.width, DARKROOM_LOAD_INFO_IDENTIFIER.height > DARKROOM_LOAD_IDENTIFIER( DARKROOM_LOAD_INFO_IDENTIFIER, # define DARKROOM_LOADING_TEXTURE_PIXEL # include DARKROOM_DEF_LOAD_TEXTURE_FILE # undef DARKROOM_LOADING_TEXTURE_PIXEL ); #undef DARKROOM_LOAD_IDENTIFIER #undef DARKROOM_LOAD_INFO_IDENTIFIER #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 #ifdef DARKROOM_DEF_LOAD_INFO_IDENTIFIER # undef DARKROOM_DEF_LOAD_INFO_IDENTIFIER #endif