Orthographic environment mapping

Is spherical environment mapping supposed to work well with orthographic projection? With a perspective camera all works fine, but when I change to an orthographic camera, the mapping is all messed up. Any tips?
Thanks in advance

I tried to adjust my cameras and now the environment looks fine.
Now there’s a new problem: when I switch the scene to orthographic mode, the object (i.e. teapot) is strangely clipped.
The functions that set the perspective and orthographic mode are the following:

void perspective() {
glMatrixMode(GL_PROJECTION);
glLoadIdentity();

gluLookAt(0, 0, 0, 0, 0, -100, 0, 1, 0);
glFrustum(-1, 1, -1, 1, 0, 10);

glMatrixMode(GL_MODELVIEW);

}

void orthographic(){
glMatrixMode(GL_PROJECTION);
glLoadIdentity();

gluLookAt(0, 0, 0, 0, 0, -100, 0, 1, 0);
glOrtho(-1, 1, -1, 1, 0, 10);

glMatrixMode(GL_MODELVIEW);

}

They both use the same view-volume values, so they should both work ok.
Perspective mode works fine, while orthographic mode clips the teapot very oddly! What am I doin’ wrong?

you can’t set a near plane to 0 for frustum mode.

your matrix use is not very common. you should put all your perspective operations in the projection matrix and all the viewing operations in the modelview matrix.

glFrustum/glOrtho -> GL_PROJECTION
gluLookAt/glTranslate/glrotate -> GL_MODELVIEW

that avoids doing many errors (like the one you’ve made).
your matrix operations are in reverse order.

you should have:

void perspective() {
glMatrixMode(GL_PROJECTION);
glLoadIdentity();

glFrustum(-1, 1, -1, 1, 0.1, 10);

glMatrixMode(GL_MODELVIEW);
}

void orthographic(){
glMatrixMode(GL_PROJECTION);
glLoadIdentity();

glOrtho(-1, 1, -1, 1, 0, 10);

glMatrixMode(GL_MODELVIEW);
}

void render() {
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glLoadIdentity();

gluLookAt(0, 0, 0, 0, 0, -100, 0, 1, 0);

// render the teapot at the right place
}

Thanks a lot, that solved my problem!

Bye