Windows support

This commit is contained in:
Gabrieal Jimmy
2026-10-02 16:04:30 -05:00
parent 34fa21139f
commit d31689cf86
14 changed files with 242 additions and 57 deletions

View File

@@ -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_) {