Browse Source

Functions changing OpenGL internal state shouldn't be constant.

pull/279/head
Vladimír Vondruš 14 years ago
parent
commit
0c1f789ab7
  1. 2
      src/AbstractTexture.h
  2. 4
      src/Buffer.h

2
src/AbstractTexture.h

@ -157,7 +157,7 @@ class MAGNUM_EXPORT AbstractTexture {
inline GLint layer() const { return _layer; } inline GLint layer() const { return _layer; }
/** @brief Bind texture for usage / rendering */ /** @brief Bind texture for usage / rendering */
inline void bind() const { inline void bind() {
glActiveTexture(GL_TEXTURE0 + _layer); glActiveTexture(GL_TEXTURE0 + _layer);
glBindTexture(target, texture); glBindTexture(target, texture);
} }

4
src/Buffer.h

@ -154,13 +154,13 @@ class Buffer {
* *
* Binds buffer with default target. * Binds buffer with default target.
*/ */
inline void bind() const { bind(_defaultTarget); } inline void bind() { bind(_defaultTarget); }
/** /**
* @brief Bind buffer * @brief Bind buffer
* @param target %Target * @param target %Target
*/ */
inline void bind(Target target) const { inline void bind(Target target) {
glBindBuffer(static_cast<GLenum>(target), buffer); glBindBuffer(static_cast<GLenum>(target), buffer);
} }

Loading…
Cancel
Save