From 0c1f789ab79e7c1d083e5572e09fa1b29f7e2b70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Mon, 19 Mar 2012 16:54:20 +0100 Subject: [PATCH] Functions changing OpenGL internal state shouldn't be constant. --- src/AbstractTexture.h | 2 +- src/Buffer.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/AbstractTexture.h b/src/AbstractTexture.h index 85f1e4c61..5f194c53a 100644 --- a/src/AbstractTexture.h +++ b/src/AbstractTexture.h @@ -157,7 +157,7 @@ class MAGNUM_EXPORT AbstractTexture { inline GLint layer() const { return _layer; } /** @brief Bind texture for usage / rendering */ - inline void bind() const { + inline void bind() { glActiveTexture(GL_TEXTURE0 + _layer); glBindTexture(target, texture); } diff --git a/src/Buffer.h b/src/Buffer.h index 5fa34f995..4932a6a50 100644 --- a/src/Buffer.h +++ b/src/Buffer.h @@ -154,13 +154,13 @@ class Buffer { * * Binds buffer with default target. */ - inline void bind() const { bind(_defaultTarget); } + inline void bind() { bind(_defaultTarget); } /** * @brief Bind buffer * @param target %Target */ - inline void bind(Target target) const { + inline void bind(Target target) { glBindBuffer(static_cast(target), buffer); }