[Fluxus] sphere mapping

gabor papp gabor.lists at mndl.hu
Wed Jul 22 01:50:34 PDT 2009


> That's actually a cubemap - which is a hardware thing (internally it's
> glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_TEXTURE_CUBE_MAP)) and
> six textures.
i think generating the texture coordinates could be done from hardware 
for the cubemap as well.

glTexGeni(GL_S, GL_TEXTURE_GEN_MODE, GL_NORMAL_MAP);
glTexGeni(GL_T, GL_TEXTURE_GEN_MODE, GL_NORMAL_MAP);
glTexGeni(GL_R, GL_TEXTURE_GEN_MODE, GL_NORMAL_MAP);
glEnable(GL_TEXTURE_GEN_S);
glEnable(GL_TEXTURE_GEN_T);
glEnable(GL_TEXTURE_GEN_R);

which should generate the cube map texture coordinates if 
GL_TEXTURE_CUBE_MAP is enabled.

> Spherical mapping is good to have too, particularly for the blobbies...
i added it from the polyprimitives, blobbies, ribbons. any other 
primitives i should have thought about?

best,
gabor




More information about the Fluxus mailing list