You may use the z-buffer with a two-pass algorithm.
The first time you make the triangles solid, but do not write on the color buffer (glColorMask()), only on z-buffer. Then the second time you render in wireframe.
> I would like to be able to render the polygons that are visible in wireframe
> the problem being that you can see through anything rendered
that's the idea of wireframe. ¿why do you want wireframe then?
> As I am using a height map, I used glCullFace(GL_BACK)
unrelated. glCullFace() will simply kill polygons that may never be seen, as they don't face the eye. It is not a consequence of using a height map.
> and so hides the other side of mountains.
¿mountains? (my mistake, sorry)
> but the problem is that I am using a raspberry pi 3, so it runs rather slowly
making the processor speed increase from 900 MHz on the Pi 2 to up to 1.2GHz on the Pi 3. |
you know, that seems to be quite fast, comparable to a Pentium III. It seems weird that you have so awful performance, given that you don't even have lighting computation.