i want to make a very simple water effect without blending yet,
so i have a 2D square with a water texture mapped on it.
i have tried to move glTexCoord2f parameters
(at first i just want to animate the Y coordinates)
i want the wather to move from the top of my quad from the bottom and to make a circular movement (i’m not sure it’s a very clear explaination…)
here’s what i am tried :
if (g_keys->keyDown [VK_F5] == TRUE) // Is F1 Being Pressed?
the circular effets seem to be good but the texture is not looking good, like if it was extensed.
if you can help me with this, tanks by advance.
use the texture matrix
glMatrixMode(GL_TEXTURE_MATRIX); - i think this is the one
(its something like this ive got the code
at home and will check it tonight).
you can also rotate the texture using this
Hope it helps
tanks for help,i havn’t tried your code yet, but the idea of rotating a texture easily sounds good !
yesterday, i have take again a look at my code, i have put // behind my reset code (that was supposed to reset the UV coords to their starting value when they have reached the end value (4 in my example because 4 tiles)
and it works fine, but now i dont understand why,
i just increment the coords from 0 to ???, and from 4 to ???, it never ends, why didn’t the texture don’t move away from the poly, all works well and i don’t understand why, maybe if i let the programm run a while it will crash ? i havn’t tried.
Can you explain why ?
how about if you try to include the sphere environment mapping inside the code just to make the water texture looks more real.
use texture generation modes.
ok, tanks for suggest this .
yet i just want the texture to move, after i will work on appearence