import Metal

public class SingleTextureQuadRenderable: QuadRenderable {
    public var inputTexture: MTLTexture?

    override public var configureAction: ConfigureAction {
        guard let inputTexture = inputTexture else { return super.configureAction }
        return { encoder in
            encoder?.setFragmentTexture(inputTexture, index: 0)
        }
    }
}

public class ConfiguredSingleTextureQuadRenderable
<T: QuadRenderConfiguration>: ConfiguredQuadRenderable<T> {
    public var inputTexture: MTLTexture?

    override public var configureAction: ConfigureAction {
        guard let inputTexture = inputTexture else { return super.configureAction }
        return { encoder in
            encoder?.setFragmentTexture(inputTexture, index: 0)
        }
    }
}
