fix the set input buffer functionality for rendering class
close #241