fixed terrain rendering - visualized normals
[demo] / src / opengl / texture-gl.cc
index 2fbd05e..157d0bb 100644 (file)
@@ -60,4 +60,10 @@ void TextureGL::bind()
 {
        unsigned int target = is_cubemap() ? GL_TEXTURE_CUBE_MAP : GL_TEXTURE_2D;
        glBindTexture(target, tex);
+}
+
+void TextureGL::unbind()
+{
+       unsigned int target = is_cubemap() ? GL_TEXTURE_CUBE_MAP : GL_TEXTURE_2D;
+       glBindTexture(target, 0);
 }
\ No newline at end of file