Disable parts of gfx library on web
This commit is contained in:
parent
bd70f197ab
commit
2e94515c05
2 changed files with 6 additions and 0 deletions
|
|
@ -153,6 +153,7 @@ namespace psemek::gfx
|
||||||
return size_;
|
return size_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef __EMSCRIPTEN__
|
||||||
template <typename T>
|
template <typename T>
|
||||||
std::shared_ptr<T[]> map(GLbitfield access)
|
std::shared_ptr<T[]> map(GLbitfield access)
|
||||||
{
|
{
|
||||||
|
|
@ -167,6 +168,7 @@ namespace psemek::gfx
|
||||||
mapped_ = p;
|
mapped_ = p;
|
||||||
return p;
|
return p;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
private:
|
private:
|
||||||
GLuint id_ = 0;
|
GLuint id_ = 0;
|
||||||
|
|
|
||||||
|
|
@ -215,6 +215,7 @@ namespace psemek::gfx
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef PSEMEK_GLES
|
||||||
struct buffer_texture
|
struct buffer_texture
|
||||||
{
|
{
|
||||||
buffer_texture();
|
buffer_texture();
|
||||||
|
|
@ -248,6 +249,7 @@ namespace psemek::gfx
|
||||||
|
|
||||||
explicit buffer_texture(std::nullptr_t);
|
explicit buffer_texture(std::nullptr_t);
|
||||||
};
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace detail
|
namespace detail
|
||||||
{
|
{
|
||||||
|
|
@ -543,6 +545,7 @@ namespace psemek::gfx
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef PSEMEK_GLES
|
||||||
inline buffer_texture::buffer_texture()
|
inline buffer_texture::buffer_texture()
|
||||||
{
|
{
|
||||||
gl::GenTextures(1, &id_);
|
gl::GenTextures(1, &id_);
|
||||||
|
|
@ -609,6 +612,7 @@ namespace psemek::gfx
|
||||||
inline buffer_texture::buffer_texture(std::nullptr_t)
|
inline buffer_texture::buffer_texture(std::nullptr_t)
|
||||||
: id_(0)
|
: id_(0)
|
||||||
{}
|
{}
|
||||||
|
#endif
|
||||||
|
|
||||||
template <std::size_t D>
|
template <std::size_t D>
|
||||||
std::size_t mipmap_count(math::vector<std::size_t, D> const & size)
|
std::size_t mipmap_count(math::vector<std::size_t, D> const & size)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue