added rendersystem

more robust error checks
fixed few warnings on resize window