Added buffer resizing (from ImgGui OpenGL3 sample).