use an abrasive automotive rubbing compound like 3M swirl remover or Meguiars step 2 and polish the glass as you would paint. Bugs and dirt slide right off and it lasts longer than rain-x.
I haven't personally tried this but I've heard if you rub a cut potato on your windshield, you get the same effect as rain-x...