code: function(shader, sampler_name, dimension_name) {
          if (this.unit === null)
              throw "Trying to use texture not set to a texture unit.";
          var gl = this.gl;
          gl.useProgram(shader);
          // Set the texture buffer to use
          gl.uniform1i(gl.getUniformLocation(shader, sampler_name), this.unit);
          // Set the image dimensions
          gl.uniform2f(
              gl.getUniformLocation(shader, dimension_name),
              this.width,
              this.height
          );
      }
docs: given a shader and pair of uniform names, sets the sampler and dimensions to be used by this texture