|
From: Curtis L. O. <cur...@fl...> - 2006-01-20 14:30:21
|
I am posting this on behalf of John Wojnaroski who can read this list, but is having trouble with sourceforge bouncing his posts for some reason: John writes: Researching how to map a texture to a sphere to build an ADI.. Think I have most of it worked out except the final step glEnable(GL_TEXTURE_GEN_S); // Enable Texture Coord Generation For S ( NEW ) glEnable(GL_TEXTURE_GEN_T); // Enable Texture Coord Generation For T ( NEW ) glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_DECAL); glBindTexture(GL_TEXTURE_2D, num_adi); glTexGenf(GL_S, GL_TEXTURE_GEN_MODE, GL_SPHERE_MAP); glTexGenf(GL_T, GL_TEXTURE_GEN_MODE, GL_SPHERE_MAP); sets up the texture and generates the coordinates, then you use gluSphere to build the sphere. and then I'm stuck trying to understand how to map the texture onto the vertices of the sphere. Or does that happen by "magic" ATM all I'm seeing is a wire frame... something is missing or misconfigured or mis -something Any references, hints, examples would be appreciated... Thanks JW |