views:

86

answers:

1

Hey guys, I know you can do texture tiling in OpenGL by setting the texture coordinates to something like 2.0 but is there a way I can do texture tiling with OpenGL texture matrix?

+1  A: 

Sure

Your input UVs are multiplied by the texture matrix to give the actual UVs.

If you input (1,1,0,0) and want (2,2,0,0), such a matrix could be

2 0 0 0
0 2 0 0
0 0 1 0
0 0 0 1

Of course, this is just an example, but your question is quite generic.

Calvin1602
Ok so would a glScale do the trick?
Justin Meiners
Yep I just tried it out that did it.
Justin Meiners