-
Texture tiling
How do I go about tiling the texture? For instance, making a texture which is say 64x64, and rather than stretching it over a very large area, simply repeat it over the area numerous times.
-
Super Moderator
OpenGL Lord
Re: Texture tiling
Say you want to tile it 6 times horizontally and 4 vertically :
texcoord 0,0 -> texcoord 6,4 (instead of 1,1)
check the glTexParameter for GL_TEXTURE_WRAP_S/T is still GL_REPEAT (the default).
-
Re: Texture tiling
wow. Was hoping it'd be that simple. I'll give it a go, thanks
-
Re: Texture tiling
Getting a bit confused again. If I'm assigning it to a polygon, how can I specify that many coordinates. Can't I only assign one to each vertex?
-
Super Moderator
OpenGL Lord
Re: Texture tiling
huh what ?
To be more precise, imagine for a square, each of the 4 vertex will get one of these :
texcoord 0,0
texcoord 6,0
texcoord 6,4
texcoord 0,4
-
Re: Texture tiling
awesome! Got it working. Thanks very much
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules