<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">Wanted to let you know I had some success with this following code.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black">   
</span><span style="font-size:9.5pt;font-family:Consolas;color:green">// Feature Options (references the geometry)</span><span style="font-size:9.5pt;font-family:Consolas;color:black"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black">    _featureOptions.geometry()
</span><span style="font-size:9.5pt;font-family:Consolas;color:teal">=</span><span style="font-size:9.5pt;font-family:Consolas;color:black"> _polygon;<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black"><o:p> </o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black">   
</span><span style="font-size:9.5pt;font-family:Consolas;color:green">// Model Options (references the feature options and style)</span><span style="font-size:9.5pt;font-family:Consolas;color:black"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black">    _geomOptions.featureOptions()
</span><span style="font-size:9.5pt;font-family:Consolas;color:teal">=</span><span style="font-size:9.5pt;font-family:Consolas;color:black"> _featureOptions;<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black">    _geomOptions.merge(_featureOptions);<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black"><o:p> </o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black">    osgEarth::</span><span style="font-size:9.5pt;font-family:Consolas;color:#2B91AF">Layer</span><span style="font-size:9.5pt;font-family:Consolas;color:black">*
 l = _map</span><span style="font-size:9.5pt;font-family:Consolas;color:teal">-></span><span style="font-size:9.5pt;font-family:Consolas;color:black">getLayerByName(</span><span style="font-size:9.5pt;font-family:Consolas;color:#A31515">"newlayer"</span><span style="font-size:9.5pt;font-family:Consolas;color:black">
</span><span style="font-size:9.5pt;font-family:Consolas;color:teal">+</span><span style="font-size:9.5pt;font-family:Consolas;color:black"> std::to_string(_newlayertimemin));<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black">    osgEarth::</span><span style="font-size:9.5pt;font-family:Consolas;color:#2B91AF">ModelLayer</span><span style="font-size:9.5pt;font-family:Consolas;color:black">*
 ml = </span><span style="font-size:9.5pt;font-family:Consolas;color:blue">dynamic_cast</span><span style="font-size:9.5pt;font-family:Consolas;color:black"><osgEarth::</span><span style="font-size:9.5pt;font-family:Consolas;color:#2B91AF">ModelLayer</span><span style="font-size:9.5pt;font-family:Consolas;color:black">*>(l);<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black">    osgEarth::Features::</span><span style="font-size:9.5pt;font-family:Consolas;color:#2B91AF">FeatureModelSource</span><span style="font-size:9.5pt;font-family:Consolas;color:black">*
 ms = (osgEarth::Features::</span><span style="font-size:9.5pt;font-family:Consolas;color:#2B91AF">FeatureModelSource</span><span style="font-size:9.5pt;font-family:Consolas;color:black">*)ml->getModelSource();<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.5pt;font-family:Consolas;color:black">    ms->getFeatureSource()->dirty();<o:p></o:p></span></p>
<p class="MsoNormal"><a name="_MailEndCompose"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></a></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">When I was doing this before I was using ms->dirty(); which never caused the redraw but found that someone in one of the forms was using a doing it one call deeper
 on the ModelSource insteadof the FeatureModelSource and this fixed my update issue within my system thread.  My changes to the geometry _polygon are now working and seems to work really nicely.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">Ofc if this is not the optimal way to handle this please let me know. Or if my shader idea for doing animations is not optimal please feel free to suggest ways
 to make it better.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">Thanks.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"> osg-users [mailto:osg-users-bounces@lists.openscenegraph.org]
<b>On Behalf Of </b>Chris Hanson<br>
<b>Sent:</b> Wednesday, September 25, 2019 12:08 AM<br>
<b>To:</b> OpenSceneGraph Users <osg-users@lists.openscenegraph.org><br>
<b>Subject:</b> Re: [osg-users] questions about developing drivers for osg/osgEarth<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">I'd like to help you a bit more, but I've been really slammed with another osgEarth client this week. If you're patient, I can probably help you more in a few days.<o:p></o:p></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal">On Mon, Sep 23, 2019 at 2:03 PM <a href="mailto:speterson@idealaero.com">
speterson@idealaero.com</a> <<a href="mailto:speterson@idealaero.com">speterson@idealaero.com</a>> wrote:<o:p></o:p></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">Got shaders to work on geometry’s now just took me getting totally frustrated and taking a walk it
 seems </span><span style="font-size:11.0pt;font-family:Wingdings;color:#1F497D">J</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:9.5pt;font-family:Consolas;color:black">osgEarth::</span><span style="font-size:9.5pt;font-family:Consolas;color:#2B91AF">ModelLayerOptions</span><span style="font-size:9.5pt;font-family:Consolas;color:black">
 layerOptions(</span><span style="font-size:9.5pt;font-family:Consolas;color:#A31515">"test polygon"</span><span style="font-size:9.5pt;font-family:Consolas;color:black">, geomOptions);</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:9.5pt;font-family:Consolas;color:black">osgEarth::</span><span style="font-size:9.5pt;font-family:Consolas;color:#2B91AF">ModelLayer</span><span style="font-size:9.5pt;font-family:Consolas;color:black">*
 test = </span><span style="font-size:9.5pt;font-family:Consolas;color:blue">new</span><span style="font-size:9.5pt;font-family:Consolas;color:black"> osgEarth::</span><span style="font-size:9.5pt;font-family:Consolas;color:#2B91AF">ModelLayer</span><span style="font-size:9.5pt;font-family:Consolas;color:black">(layerOptions);</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:9.5pt;font-family:Consolas;color:black">osg::</span><span style="font-size:9.5pt;font-family:Consolas;color:#2B91AF">StateSet</span><span style="font-size:9.5pt;font-family:Consolas;color:black">*
 tss = test->getOrCreateStateSet();</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:9.5pt;font-family:Consolas;color:#2B91AF">VirtualProgram</span><span style="font-size:9.5pt;font-family:Consolas;color:black">* vp =
</span><span style="font-size:9.5pt;font-family:Consolas;color:#2B91AF">VirtualProgram</span><span style="font-size:9.5pt;font-family:Consolas;color:black">::getOrCreate(tss);</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:9.5pt;font-family:Consolas;color:black">vp->setName(</span><span style="font-size:9.5pt;font-family:Consolas;color:#A31515">"imageLayer"</span><span style="font-size:9.5pt;font-family:Consolas;color:black">);</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:9.5pt;font-family:Consolas;color:#2B91AF">myshaders</span><span style="font-size:9.5pt;font-family:Consolas;color:black"> shaders;</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:9.5pt;font-family:Consolas;color:black">shaders.load(vp, shaders.myimagecc_Vertex);</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:9.5pt;font-family:Consolas;color:black">shaders.load(vp, shaders.myimagecc_Fragment);</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:9.5pt;font-family:Consolas;color:black">_map</span><span style="font-size:9.5pt;font-family:Consolas;color:teal">-></span><span style="font-size:9.5pt;font-family:Consolas;color:black">addLayer(test);</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><a name="m_-4211621678533894134__MailEndCompose"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">Was the code to get it working had to apply it to
 the ModelLayer not the geometry and add some hooks into my shaders to keep the transparent parts the same.</span></a><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">Now to figure out how to get the data to change for the shaders to act on.</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"> osg-users [mailto:<a href="mailto:osg-users-bounces@lists.openscenegraph.org" target="_blank">osg-users-bounces@lists.openscenegraph.org</a>]
<b>On Behalf Of </b>Chris Hanson<br>
<b>Sent:</b> Thursday, September 19, 2019 10:29 AM<br>
<b>To:</b> OpenSceneGraph Users <<a href="mailto:osg-users@lists.openscenegraph.org" target="_blank">osg-users@lists.openscenegraph.org</a>><br>
<b>Subject:</b> Re: [osg-users] questions about developing drivers for osg/osgEarth</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Ok. That helps a lot. Thanks.<o:p></o:p></p>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">So, I theorize that you are loading a 2d vector field as a data layer, that represents the 2D wind velocity vector at every data grid point covering the area, and then you use some
 kind of shader to display that as a colorfield and displays the moving flow lines? And then you update the 2d vector map periodically to represent the current data?<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">If that's the case, it sounds like you're just needing to load a conventional two-channel 2D image and do all the display work in shaders. That doesn't sound like how you're doing
 it though?<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">There's nothing at all that is file-specific about osgEarth, its drivers or its data sources. Many of the drivers talk to network-based data sources without accessing local files,
 so those shouldn't be an issue.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Glenn can probably comment better on how to best make a driver that updates itself periodically or on cue, but you ought to be able to just poll every 30 seconds or so and see if
 a data is available and refresh it somehow.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
</div>
</div>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:6.0pt;font-family:"Tahoma",sans-serif;color:#1F497D;text-transform:uppercase">The information contained in this email and any attachments is intended only
 for the personal and confidential use of the intended recipients. This email message may be or may contain privileged and confidential communications. If the reader of this e-mail is not an intended recipient, you are hereby notified that you have received
 this communication in error and that any retention, review, use, dissemination, distribution or copying of this communication or the information contained herein is strictly prohibited. If you have received this communication in error, please notify the sender
 immediately and delete the original message and all attachments from your system. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused, directly or indirectly, by any
 virus transmitted in this email. This communication may also contain data subject to U.S. export laws. If so, that data subject to the International Traffic in Arms Regulation (ITAR) cannot be disseminated, distributed or copied to foreign nationals, residing
 in the U.S. or abroad, absent the express prior approval of the U.S. Department of State. If you have received this communication in error, please notify the sender by reply e-mail and destroy the e-mail message and any physical copies made of the communication.
 Thank you.</span><o:p></o:p></p>
</div>
</div>
<p class="MsoNormal">_______________________________________________<br>
osg-users mailing list<br>
<a href="mailto:osg-users@lists.openscenegraph.org" target="_blank">osg-users@lists.openscenegraph.org</a><br>
<a href="http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org" target="_blank">http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org</a><o:p></o:p></p>
</blockquote>
</div>
<p class="MsoNormal"><br clear="all">
<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<p class="MsoNormal">-- <o:p></o:p></p>
<div>
<div>
<div>
<div>
<div>
<p class="MsoNormal" align="center" style="text-align:center">Chris 'Xenon' Hanson, omo sanza lettere.
<a href="mailto:Xenon@AlphaPixel.com">Xenon@AlphaPixel.com</a> <a href="http://www.alphapixel.com/" target="_blank">
http://www.alphapixel.com/</a><o:p></o:p></p>
<p class="MsoNormal" align="center" style="text-align:center">Training • Consulting • Contracting<o:p></o:p></p>
<p class="MsoNormal" align="center" style="text-align:center">3D • Scene Graphs (Open Scene Graph/OSG) • OpenGL 2 • OpenGL 3 • OpenGL 4 • GLSL • OpenGL ES 1 • OpenGL ES 2 • OpenCL<o:p></o:p></p>
<p class="MsoNormal" align="center" style="text-align:center"><span style="font-size:9.5pt">Legal/IP • Forensics • </span>Imaging <span style="font-size:9.5pt">• UAVs • GIS • GPS • osgEarth • Terrain • Telemetry • Cryptography • LIDAR • Embedded • Mobile •
 iPhone/iPad/iOS • Android</span><o:p></o:p></p>
<p class="MsoNormal" align="center" style="text-align:center"><a href="https://twitter.com/alphapixel" target="_blank">@alphapixel</a>
<a href="http://facebook.com/alphapixel" target="_blank">facebook.com/alphapixel</a> (775) 623-PIXL [7495]<o:p></o:p></p>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>