Automatic Texturcoord generation

Sorry for asking such a lame question again…

I have a problem with automatic texture generation. It basicly works as expected.
But I´d like to map only a fraction of a texture on the whole object. From 0 -> 0.7 instead of 0->1

Is there any way to limit S or T ( or R or Q) in i.e. 0.7 instead of using the full texture 1.

I played arround with :


GLfloat Splane[] = { 0.7, 0.f, 0.f, 0.f };
glTexGenfv(GL_S, GL_OBJECT_PLANE, Splane );

but it seems to be the wrong way.

I know that I can set Texcoords manualy by i.e. glTexCoord2f( 0, 0 ); but this does not work with Quadrics …
maybe use matrix multiplication on the texture matrix ?

thx a lot

Yes using texture matrix is one of the few solutions I know to your problem. The other one would be to use shaders.

a little glScale(1.0/0.7) on the texture matrix should do it.

thanx a lot for your help,
i´ll try it out.

Dear ZBuffer,

Do you mean say,

glMatrixMode( GL_TEXTURE );

/* Code for Texture coordinates */

Thanks in advance

Bangalore - 1

to iris_raj : yes.