--- 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);
+}
--- 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;