diff --git a/include/bimg/bimg.h b/include/bimg/bimg.h index b25fb89..7f9cc24 100644 --- a/include/bimg/bimg.h +++ b/include/bimg/bimg.h @@ -9,6 +9,8 @@ #include // uint32_t #include // NULL +#define BIMG_API_VERSION 1 + namespace bx { struct AllocatorI; diff --git a/tools/bin/darwin/.gitignore b/tools/bin/darwin/.gitignore new file mode 100644 index 0000000..5e4debc --- /dev/null +++ b/tools/bin/darwin/.gitignore @@ -0,0 +1 @@ +* diff --git a/tools/bin/linux/.gitignore b/tools/bin/linux/.gitignore new file mode 100644 index 0000000..5e4debc --- /dev/null +++ b/tools/bin/linux/.gitignore @@ -0,0 +1 @@ +* diff --git a/tools/bin/windows/.gitignore b/tools/bin/windows/.gitignore new file mode 100644 index 0000000..5e4debc --- /dev/null +++ b/tools/bin/windows/.gitignore @@ -0,0 +1 @@ +* diff --git a/tools/texturec/texturec.cpp b/tools/texturec/texturec.cpp index 7c5f679..ddec55f 100644 --- a/tools/texturec/texturec.cpp +++ b/tools/texturec/texturec.cpp @@ -384,6 +384,14 @@ bimg::ImageContainer* convert(bx::AllocatorI* _allocator, const void* _inputData return output; } +#define BIMG_TEXTUREC_VERSION_MAJOR 1 +#define BIMG_TEXTUREC_VERSION_MINOR 0 + +#define BIMG_TEXTUREC_VERSION_STR \ + BX_STRINGIZE(BIMG_TEXTUREC_VERSION_MAJOR) \ + "." BX_STRINGIZE(BIMG_TEXTUREC_VERSION_MINOR) \ + "." BX_STRINGIZE(BIMG_API_VERSION) + void help(const char* _error = NULL) { if (NULL != _error) @@ -392,7 +400,7 @@ void help(const char* _error = NULL) } fprintf(stderr - , "texturec, bgfx texture compiler tool\n" + , "texturec, bgfx texture compiler tool, version " BIMG_TEXTUREC_VERSION_STR "\n" "Copyright 2011-2017 Branimir Karadzic. All rights reserved.\n" "License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause\n\n" ); @@ -430,6 +438,12 @@ int main(int _argc, const char* _argv[]) { bx::CommandLine cmdLine(_argc, _argv); + if (cmdLine.hasArg('v', "version") ) + { + fprintf(stderr, "texturec, bgfx texture compiler tool, version " BIMG_TEXTUREC_VERSION_STR "\n"); + return EXIT_SUCCESS; + } + if (cmdLine.hasArg('h', "help") ) { help();