View Full Version : Rotating mapped sphere
Hello! Why can't I rotate a simple mapped sphere? I load the bmp image, use bindtexture and rotate it, but the texture remains in the same place,why?
with all others objects it isn't a problem,but with the sphere it seems to have something wrong,please help me, thanks!
12-11-2003, 05:25 AM
How are you generating your texture coordinates? It sounds like maybe you are using the glTexGen features...
Yes, I'm using glTexGen and GL_SPHERE_MAP,
the texture stays fixed, why?
Instead, with GL_OBJECT_LINEAR, it moves but the sphere is not textured correctly.
12-11-2003, 08:55 AM
Just generate your own texture coordinates when you generate the vertices defining your sphere. Google for texture coordinates for sphere and you will find the equation you need to use. Remember also, that textures are flat, and you need a special filter to generate a texture which will look okay on a sphere.
Sphere mapping is actually used to simulate simple environmental reflections, ie the object reflects the environment, which is defined by the map.
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.