gfx_draping
This is a library for helping you draw polygons on a terrain. It uses a screen-space algorithm based on the depth and stencil buffers, and performance is affected only by the complexity of the polygons you're drawing not the terrain it's drawn on.
This library is a Rust implementation the algorithm described by Schneider & Klein (2007).
For an example of what this crate can do, run the example:
# You'll want to zoom out to see anything. Do that by holding down CTRL and
# dragging down with your mouse. Then pan around with shift+drag.
Can I use this library?
You can, as long the following things are true:
- You are using
gfx
to do your graphics.- For now, only OpenGL is supported. But this is not a for any deep reason; it's just that the relevent shaders haven't been written. If you would like to use another backend, PRs will kindly be accepted. :smile:
- You use the Z-Axis for your "up" in world-space -- that is, mountains go in the positive Z direction, and valleys go in the negative Z direction.
How do I use this library?
Roughly speaking, it looks like this:
extern crate gfx_draping;