Search code examples
qtopenglpyqtpyopengl

How to render superimposed planar objects in OpenGL?


I am trying to render geographical data obtained at different time with different sensors. Currently, I manage (through OpenGL and QOpenGL widget) to render a single image (i.e. all vertices have a z=0 coordinates). However, I am wondering how to add new "images" (still with different vertices and texture) which can overlap (in the same plane z=0) the others.


Solution

  • Sample from each texture in your fragment shader doing whatever composing you need, such as additive, though for geospatial data its probably more complex than that.

    If using a library that does all that, then simply disable depth testing, and render each layer, adjusting transparency function between passes.