Drawing paths on a 3d terrain

Hi guys,

I’m working on a piece of software to draw 3d terrain, like this (disclaimer: that image is not mine, I grabbed it from google images).

Now, on the terrain, I need to draw some paths. I’m contemplating between two approaches:

  1. Draw the terrain and above it the path (as ofLines). The problems I foresee with this approach is related to z ordering. I cannot turn off the depth sorting, since some of the path is hidden by the terrain. And if I keep it on, the path may be hidden since it’s being painted at the same depth as the terrain. Am I getting this right?

  2. Modify the terrain textures. Paint the path on them, and them construct a terrain from the modified textures. This sounds like the better approach to me. No depth sorting issues, but I’m worried from the performance of modifying the textures. If I do it with ofTexture, will it be done directly on the GPU memory?

Any advice would be appreciated,