JRGlide
09-06-2011, 10:09 AM
I have a program that allows the user to build scenes and there is an option to display grid lines on the scene. Currently I just draw straight lines using GL_LINES. The problem is that the lines are hidden by the hills and float above the valleys. I would like the lines to follow the contour of the terrain.
I've come up with a brut force method which is to do my own rendering of the background model at fixed intervals and generate a point map along the grid lines. I could then create a series of GL_LINES based on these points. I already have the rendering code so this wouldn't be a big deal.
However, I was wondering if there is a more direct and efficient way in OpenGL to do this.
Thank you.
I've come up with a brut force method which is to do my own rendering of the background model at fixed intervals and generate a point map along the grid lines. I could then create a series of GL_LINES based on these points. I already have the rendering code so this wouldn't be a big deal.
However, I was wondering if there is a more direct and efficient way in OpenGL to do this.
Thank you.