Original Post
I want to draw a sky with a cloud texture tiled a few time, to do that I tried multiplying the texture coords like this: But the texture didn't tile, it just smeared out? What did I do wrong? Thanks.
void CreateSkyReflection(float x, float y, float z, float width, float height, float length)
{
glEnable(GL_TEXTURE_2D);
glEnable(GL_BLEND);
//glDisable(GL_DEPTH_TEST);
float tex=2;
x = x - width / 2;
y = y - height / 2;
z = z - length / 2;
glBindTexture(GL_TEXTURE_2D, g_Texture[BOTTOM_ID]);
//glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP);
//glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP);
// Start drawing the side as a QUAD
glBegin(GL_QUADS);
// Assign the texture coordinates and vertices for the BOTTOM Side
glTexCoord2f(tex, 0.0f); glVertex3f(x, y, z);
glTexCoord2f(tex, tex); glVertex3f(x, y, z + length);
glTexCoord2f(0.0f, tex); glVertex3f(x + width, y, z + length);
glTexCoord2f(0.0f, 0.0f); glVertex3f(x + width, y, z);
glEnd();
//glEnable(GL_DEPTH_TEST);
glDisable(GL_BLEND);
}