having changed from gluPerspective to glFrustum, to stop my image distorting, the very pretty texture i had as the sky has disappeared, and now i’m just left with the background colour, which pretty much ruins the image.
Did you convert the parameters from gluPErspective to glFrustum properly? How did you do, and what parameters are you passing to glFrustum?
If nothing more than the backround shows up, you have certainly passing some strange parameters.
By the way, what do you mean by distorted images? gluPerspective uses glFrustum to build the projection matrix, so there aren’t any differences, apart form the arguments you pass.
As far as i know the parameters are correct. Originally the image was square, but i wanted to make it rectangular (roughly monitor shaped). the problem was that when i made the viewport rectangular, the image just stretched sideways.
i tried altering the aspect, and the field of view to no avail, so when someone suggested glFrustum, i tried that.
i pass the left, right, top and bottom parameters to glFrustum, as well as the near and far limits. the image now looks correct, the object in the centre of the screen appears correctly, and the ground terrain (which is textured) also appears correct
To me, it seems like the aspect ratio is constant, not depending on any variable holding the size of the viewport.
And I strogly suggest you lower the near to far ratio a bit. The bigger the ratio far/near, the less percise is the depthbuffer. If you need your far plane at 100000, I suggest you move the near plane up to about 10, if not even 100.