From f33fcc7ba0253eb51948ad2a2cd222d69ccb25db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Sun, 6 May 2012 23:09:30 +0200 Subject: [PATCH] Internal format of Renderbuffer and BufferedTexture is GLenum, not GLint. Weird incompatibility with textures, where it is GLint. --- src/Renderbuffer.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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: