Hello.
I have two basic questions about the Automatic texture generation.
sPlane :Array[1…4] Of TGLFloat = ( 1.0, 0.0, 0.0, 0.0 );
tPlane :Array[1…4] Of TGLFloat = ( 0.0, 1.0, 0.0, 0.0 );
{Set the way of the texture is appplicated on pixels}
glPixelStorei( GL_UNPACK_ALIGNMENT, 1 );
glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR );
glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR );
glTexGeni( GL_S, GL_TEXTURE_GEN_MODE, GL_OBJECT_LINEAR );
glTexGeni( GL_T, GL_TEXTURE_GEN_MODE, GL_OBJECT_LINEAR );
{Set the plane of what ???
And how it can effect the texture application ?}
glTexGenfv( GL_S, GL_OBJECT_PLANE, @sPlane );
glTexGenfv( GL_T, GL_OBJECT_PLANE, @tPlane );
{Activate the Automatic texture generation}
glEnable( GL_TEXTURE_GEN_S );
glEnable( GL_TEXTURE_GEN_T );
First, I need help to understand how work the planes coord…
Secondly, when I use the Automatic texture generation I got two principal problems :
The texture is applicated but with a too very small scale.
With a Sphere, I obtain some badly textured one some meridians lines.
With a cube, I obtain the left and right face side badly textured, But I've notice that when I change the planes array,
I obtain differents texture application on the right and left side, maybe it's the solution to my problem but how can I correct this ???
About the scale problem, the only way that I’ve found is to rescale the Texture Matrix.
But It’s is normal or something wrong ?
A BIG Thank to help me fastest possible…
Martin
PS :Excuse my poor english…