Original Post
Hey Iam entering the Gamedev contest, Ive been having some problems with my textures repeating, I know this is possible for I have done it before, I have 1 HUGE quad that represents the sea and instead of it stretching the Water texture to its boundaries I want it to repeat it so it looks alot nice But my code Doesnt repeat it at all!. It just stretches it can anyone tell me what I should be doing/am doing wrong? This is my code ------------------------------------------------- unsigned int BMPTexture_Repeat(char *filename) { unsigned int Texture; unsigned char *bmpImg; BITMAPINFOHEADER bmpInfoHeader; bmpImg = LoadBitmapFile(filename, &bmpInfoHeader); glGenTextures(1, &Texture); glBindTexture(GL_TEXTURE_2D, Texture); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT); GL_UNSIGNED_BYTE, bmpImg); gluBuild2DMipmaps(GL_TEXTURE_2D, GL_RGB, bmpInfoHeader.biWidth, bmpInfoHeader.biHeight, GL_RGB, GL_UNSIGNED_BYTE, bmpImg); return Texture; } ---------------------- Thank you and hope to hear from anyone who knows how to fix this soon