add Texture::bind() method v_0
authorFrantišek Kučera <franta-hg@frantovo.cz>
Thu, 28 Dec 2023 15:01:13 +0100
branchv_0
changeset 29 69903e30b00d
parent 28 4cbd9c0beb4c
child 30 e15d04d98fca
add Texture::bind() method
Texture.cpp
Texture.h
--- 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;