View Full Version : GL_SPHERE_MAP

05-19-2011, 01:55 AM

Dear all,
Here is an GL_SPHERE_MAP question. I am doing two different viewport displaying but I got a problem on texture map (SPHERE_MAP). I drew a block and texture it with the figure above and I got a different result while both of the views were using GL_SPHERE_MAP as shown in the second figure below. Can anyone tell why would it behaved like this?

05-19-2011, 06:07 AM
Let's look at how GL_SPHERE_MAP works.

The modelview effects it. And the normals of your vertices effect it. Perhaps you should use a smoothed texture map instead of yellow/green-blue

05-19-2011, 10:15 AM
There's not enough detail in your question.

Was this a different graphics card, a different type of projection, a different texture format.

What are the key differences between the rendering to each viewport?

05-19-2011, 07:10 PM
Thanks bro,
It was discovered accidentally when I used a shape feature texture to do texture mapping. You should be right in the sense that my shader does not turned into GL_SMOOTH. But I enabled this code when I turned on the lights.
So the reason is still not clear.

05-19-2011, 07:14 PM
Thanks dorbie,

I programed an application which it can provide two standalone windows with their own viewport. Other than the viewport belongs to different windows, the projection(ORTHO), texture format(WithMipmap) and the lighting(Default) were the same.

05-19-2011, 09:07 PM
Oh dear, I found out the reason.
Itz so simple not related to anything of the setting.
Arhahahaha, based on the logic of sphere map, you can find the answer from the images at the thread Texture non-smoothing (http://www.opengl.org/discussion_boards/ubbthreads.php?ubb=showflat&Number=297555#Post2975 55) .
Anyway, if anyone wants the answer, message me.