View Full Version : Tiled textures?
03-05-2003, 02:32 AM
How do i do it?? I have been told that you can do this when you are initially binding them, but i cant figure out how?
03-05-2003, 04:08 AM
When I tile a texture, I use the glTexCoord2i() function to change how often the texture is repeated.
unsigned int repeats = 2;
glVertex3f( 1.0f,-1.0f, 0.0f);
glVertex3f( 1.0f, 1.0f, 0.0f);
glVertex3f(-1.0f, 1.0f, 0.0f);
03-06-2003, 12:08 AM
What Antiox said is true for rendering. When you first create your texture object, you want to use glTexParameter to set up the way that OGL handles your texture coordinates:
I think that OGL defaults to GL_REPEAT, but it's not a bad idea to use these lines of code anyway, just for safety's sake.
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.