Support retrieving texture target from texture class

This commit is contained in:
Nikita Lisitsa 2020-12-12 23:44:42 +03:00
parent 9606c0feb7
commit 65bab34304

View file

@ -25,6 +25,8 @@ namespace psemek::gfx
static basic_texture null();
static constexpr GLenum target = Target;
GLuint id() const { return id_; }
explicit operator bool() const { return id() != 0; }
@ -106,6 +108,8 @@ namespace psemek::gfx
return basic_texture<2, gl::TEXTURE_CUBE_MAP>::null();
}
static constexpr GLenum target = gl::TEXTURE_CUBE_MAP;
static GLenum face_to_gl(int f);
void load(int f, GLint internal_format, geom::vector<std::size_t, 2> const & size, GLenum format, GLenum type, const void * data);