make color-fractory somewhat work on web #2

Merged
lisyarus merged 8 commits from yulya3102/psemek:web-runtime into master 2026-07-03 19:32:11 +00:00
2 changed files with 6 additions and 0 deletions
Showing only changes of commit 2e94515c05 - Show all commits

View file

@ -153,6 +153,7 @@ namespace psemek::gfx
return size_;
}
#ifndef __EMSCRIPTEN__
template <typename T>
std::shared_ptr<T[]> map(GLbitfield access)
{
@ -167,6 +168,7 @@ namespace psemek::gfx
mapped_ = p;
return p;
}
#endif
private:
GLuint id_ = 0;

View file

@ -215,6 +215,7 @@ namespace psemek::gfx
};
#endif
#ifndef PSEMEK_GLES
struct buffer_texture
{
buffer_texture();
@ -248,6 +249,7 @@ namespace psemek::gfx
explicit buffer_texture(std::nullptr_t);
};
#endif
namespace detail
{
@ -543,6 +545,7 @@ namespace psemek::gfx
}
#endif
#ifndef PSEMEK_GLES
inline buffer_texture::buffer_texture()
{
gl::GenTextures(1, &id_);
@ -609,6 +612,7 @@ namespace psemek::gfx
inline buffer_texture::buffer_texture(std::nullptr_t)
: id_(0)
{}
#endif
template <std::size_t D>
std::size_t mipmap_count(math::vector<std::size_t, D> const & size)