It all depends on how you setup your projection/modelview matrix, if you use orthographic projection you can map the world coordinates (almost) anyway you want, have a look at the FAQ on this website it explains most of the details of how to do it.

Your example does not include how you setup the projection/modelview matrix so it is impossible to answer why you get the coordinates you say.

So wx and wy is 0 ?, if you have not modified the modelview matrix, that might be the problem, the “camera” is at 0,0,0 and you try to project the point at 0,0,0, this is also outside the near clipping plane, so if you try to move the “camera” away from the origin a little it might work better, use glTranslate(0,0,z)

As you are using perspective mode you always have to be careful with the Z value, you do get a perfect 320,240 match at the origin until you move the “camera”, then it will no longer work.