what you mean by render in 320x240 and expand to 640x480 ?
for example, in freebasic (see the Horizon code), I made 2 versions : one in 320, and another in 640. all vars are only *2.
In C, by default, all vars are in lores and I only change a Zoom variable. all vars are *Zoom. If you select 640, zoom=2 else zoom=1.
have you an example of rendering in 320 and expand to 640 ?
It's only in fullscreen, I think ?