Windows support
This commit is contained in:
@@ -2,10 +2,21 @@
|
||||
|
||||
#include <algorithm>
|
||||
#include <cmath>
|
||||
#include <filesystem>
|
||||
#include <vector>
|
||||
|
||||
namespace bs {
|
||||
|
||||
const std::string& engineAssetDir() {
|
||||
static const std::string dir = [] {
|
||||
std::filesystem::path packaged = executableDir() / "engine";
|
||||
std::error_code ec;
|
||||
if (std::filesystem::exists(packaged / "shaders" / "common.glsl", ec)) return packaged.string();
|
||||
return std::string(HD2D_ENGINE_ASSET_DIR);
|
||||
}();
|
||||
return dir;
|
||||
}
|
||||
|
||||
void UiTexture::upload(const hd2d::Image& img) {
|
||||
if (id_ && size_ != glm::ivec2(img.width, img.height)) reset();
|
||||
if (!id_) {
|
||||
|
||||
Reference in New Issue
Block a user