fix vertex shader and add input event queue