Useful when interacting with raw GL code.
@ -60,6 +60,8 @@ See also:
@webgl_extension{WEBGL,multi_draw_instanced_base_vertex_base_instance}
extensions, however there's no Emscripten entrypoints for those yet which
means these can'be implemented right now.
- Added a @ref GL::AbstractTexture::target() getter to simplify interaction
with raw GL code
@subsubsection changelog-latest-new-math Math library
@ -332,6 +332,12 @@ class MAGNUM_GL_EXPORT AbstractTexture: public AbstractObject {
/** @brief OpenGL texture ID */
GLuint id() const { return _id; }
/**
* @brief OpenGL texture target
* @m_since_latest
*/
GLenum target() const { return _target; }
* @brief Release OpenGL object
*
@ -96,6 +96,7 @@ void AbstractTextureGLTest::construct() {
MAGNUM_VERIFY_NO_GL_ERROR();
CORRADE_VERIFY(texture.id() > 0);
CORRADE_COMPARE(texture.target(), GL_TEXTURE_2D);
}