hellox
09-10-2002, 02:39 AM
hi, iam trying to do this:
glTexGeni(GL_S,GL_TEXTURE_GEN_MODE,GL_OBJECT_LINEA R);
glTexGeni(GL_T,GL_TEXTURE_GEN_MODE,GL_OBJECT_LINEA R);
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_WRAP_S,GL _CLAMP_TO_EDGE);
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_WRAP_T,GL _CLAMP_TO_EDGE);
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTE R,GL_NEAREST);
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTE R,GL_NEAREST);
glTexEnvf(GL_TEXTURE_ENV,GL_TEXTURE_ENV_MODE,GL_RE PLACE);
glBindTexture(GL_TEXTURE_2D,NAMEtext);
glEnable(GL_TEXTURE_GEN_S);
glEnable(GL_TEXTURE_GEN_T);
glEnable(GL_TEXTURE_2D);
but i have a problem, the texture is for a Sphere made with glutSolidSphere altered with Scale along the Z_axis, and i get it done, but the texture is not disperserd into the z_axis. It does not get the aspect i want, am i giving some bad arguments or is it supposed to happen?
thanks u've been great =)
glTexGeni(GL_S,GL_TEXTURE_GEN_MODE,GL_OBJECT_LINEA R);
glTexGeni(GL_T,GL_TEXTURE_GEN_MODE,GL_OBJECT_LINEA R);
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_WRAP_S,GL _CLAMP_TO_EDGE);
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_WRAP_T,GL _CLAMP_TO_EDGE);
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTE R,GL_NEAREST);
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTE R,GL_NEAREST);
glTexEnvf(GL_TEXTURE_ENV,GL_TEXTURE_ENV_MODE,GL_RE PLACE);
glBindTexture(GL_TEXTURE_2D,NAMEtext);
glEnable(GL_TEXTURE_GEN_S);
glEnable(GL_TEXTURE_GEN_T);
glEnable(GL_TEXTURE_2D);
but i have a problem, the texture is for a Sphere made with glutSolidSphere altered with Scale along the Z_axis, and i get it done, but the texture is not disperserd into the z_axis. It does not get the aspect i want, am i giving some bad arguments or is it supposed to happen?
thanks u've been great =)