Reply To: Add Some Shapes onAR Sandbox

Home Forums AR Sandbox Forum Add Some Shapes onAR Sandbox Reply To: Add Some Shapes onAR Sandbox


I’m pretty sure that I have seen somebody use the DEM feature to create a topography and then display an aerial map on top of it. I think it was static though.

I’ve never used WebGL (so I’m not sure about how much they are similar) and I’ve not tried adding images but that sounds like the way to do it. You will need a vertex and fragment shader and use a texture as input to the fragment shader. Create a flat polygon and draw it with the texture as input to the shader (you can use glBegin or glDrawElements for example).

As for documentation on OpenGL I’d look up a couple of tutorials instead (here are a couple that I go back to when I need them: and There is documentation online ( but at least to me it isn’t very clear to learn from. Also I’d recommend referring back to the code in the Sandbox. You can have a look at DepthImageRenderer::renderSurfaceTemplate() for how the final texture with all the color-mapping topography and water is drawn or at WaterTable2::runSimulationStep() for how the texture containing the water amount is calculated.

Finally, with regards to moving the image around I don’t know if you can use the inbuilt openGL functions or you will have to use the Vrui functions. You can find Vrui documentation here:

I don’t know if this would be a roundabout way of doing it but you can create a movement Vrui Tool with arrow keys etc. defined as input handlers and use the callback event function to handle the object behavior, then link the tool with the Sandbox (I’d look back at GlobalWaterTool class for how Vrui Tools are handled).

I hope some of it helps 🙂 I’m in no way an expert on any of it but that’s how I’ve been figuring out how to do various bits and pieces with the Sandbox.

Out of curiosity what is it that you are doing with the Sandbox? 🙂

Comments are closed.