Reflection using frame buffer

water reflection just using scaling glScalef(1, 1, -1) is being blocked by terrain under water.
So i think it would be better if reflection is first stored in framebuffer.
but how can i project the rendered texture on the water

If you wanted to do things the first way that you tried you might temporarily disable depth testing. If the reflection is drawn after the terrain that was hiding it, it should now still be visible. You could also try glScalef(1, 1, -0.7), instead, this might keep the reflection above the underwater terrain as well.

If you want to render to an FBO, then you’d draw the reflection to an FBO. Once that’s done, the FBO texture should behave like any other texture. Apply it to the water as a texture just like you normally would.