# HG changeset patch # User František Kučera # Date 1703772073 -3600 # Node ID 69903e30b00d973a28153c1fcd1e889cbe366f7d # Parent 4cbd9c0beb4ca56100ab722ea3c8b64ee21b2e0a add Texture::bind() method diff -r 4cbd9c0beb4c -r 69903e30b00d Texture.cpp --- a/Texture.cpp Tue Dec 26 23:46:45 2023 +0100 +++ b/Texture.cpp Thu Dec 28 15:01:13 2023 +0100 @@ -94,3 +94,7 @@ glGenerateMipmap(GLT2D); checkError(&std::cerr); } + +void Texture::bind() { + glBindTexture(GL_TEXTURE_2D, impl->id); +} diff -r 4cbd9c0beb4c -r 69903e30b00d Texture.h --- a/Texture.h Tue Dec 26 23:46:45 2023 +0100 +++ b/Texture.h Thu Dec 28 15:01:13 2023 +0100 @@ -41,6 +41,7 @@ GLfloat getScale() const; void setScale(GLfloat scale); void update(int width, int height, const Buffer& img); + void bind(); private: class Impl; Impl* impl;