<div dir="ltr"><div dir="ltr"><div>Hi Eric</div><div><br></div></div><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Mar 3, 2021 at 3:48 PM Eric Younkin - NOAA Federal <<a href="mailto:eric.g.younkin@noaa.gov">eric.g.younkin@noaa.gov</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Looking for some advice.  We have a need to use OpenGL to draw the symbology associated with some vector data.  All of our code uses OpenGL 1.x.  I was thinking we could use the QOpenGLWidget and the QgsPluginLayer to add our OpenGL rendered symbology to a QgsMapCanvas as a new layer.  </div><div><br></div><div>Is this possible?  Is there an example anyone knows of that is kind of similar to this idea?  Or is there a better way to approach this problem?</div></div></blockquote><div><br></div>Could you please provide some more details regarding the symbology you would like to get rendered? A screenshot would help a lot...</div><div class="gmail_quote"><br></div><div class="gmail_quote">If you plan to use mesh-based weather data, maybe what you are trying to do is already possible with the mesh layer in QGIS out of the box (e.g. display of arrows, streamlines, trace animation), or there is only small amount of extra work do be done in QGIS core to achieve that.<br></div><div class="gmail_quote"><br></div><div class="gmail_quote">As for OpenGL approach (it looks like you already have some existing code you would like to adapt to QGIS)... are you looking just at 2D rendering or 3D rendering as well? I know some time ago for QGIS 2.x Vincent Mora has created a plugin layer that used OpenGL to render to offscreen image and then draw it in map canvas [1] which involved some hacks. With QOpenGLWidget approach I would be quite cautious as it may not work well, or have some strange issues on different platforms. For example, I _think_ the QOpenGLWidget can't be semi-transparent (but I may be wrong), so mixing its content with the rest of the map could be quite tricky...</div><div class="gmail_quote"><br></div><div class="gmail_quote">Regards</div><div class="gmail_quote">Martin</div><div class="gmail_quote"><br></div><div class="gmail_quote">[1] <a href="https://github.com/Oslandia/meshlayer">https://github.com/Oslandia/meshlayer</a></div></div>