Call app.resize unconditionally on window creation in main.
Use gl_FragCoord to determine fragment position in viewport rather than vertex attributes.