diff --git a/src/Renderbuffer.h b/src/Renderbuffer.h index e39934c07..5a18fb621 100644 --- a/src/Renderbuffer.h +++ b/src/Renderbuffer.h @@ -91,14 +91,14 @@ class Renderbuffer { InternalFormat(Components components, ComponentType type); /** @copydoc AbstractTexture::InternalFormat::InternalFormat(AbstractTexture::Format) */ - inline constexpr InternalFormat(Format format): internalFormat(static_cast(format)) {} + inline constexpr InternalFormat(Format format): internalFormat(static_cast(format)) {} /** @brief OpenGL internal format ID */ /* doxygen: @copydoc AbstractTexture::InternalFormat::operator GLint() doesn't work */ - inline constexpr operator GLint() const { return internalFormat; } + inline constexpr operator GLenum() const { return internalFormat; } private: - GLint internalFormat; + GLenum internalFormat; }; /*@}*/ @@ -136,7 +136,7 @@ class Renderbuffer { */ inline void setStorage(InternalFormat internalFormat, const Math::Vector2& size) { bind(); - glRenderbufferStorage(GL_RENDERBUFFER, static_cast(internalFormat), size.x(), size.y()); + glRenderbufferStorage(GL_RENDERBUFFER, internalFormat, size.x(), size.y()); } private: