<div dir="ltr">Hi guys,<div><br></div><div>here some snippet:</div><div><br></div><div><div>osgViewer::CompositeViewer::Windows wins;</div><div>viewer->getWindows(wins);</div><div><br></div><div>osgViewer::GraphicsHandleWin32 *hdl = dynamic_cast<osgViewer::GraphicsHandleWin32*>(<a href="http://wins.at">wins.at</a>(0));</div><div>hdl->getWGLContext();</div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Nov 13, 2017 at 1:45 PM, Christian Buchner <span dir="ltr"><<a href="mailto:christian.buchner@gmail.com" target="_blank">christian.buchner@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><br></div>Is this the function you're looking for?<br><div><div><br>osgViewer::<wbr>GraphicsHandleWin32::<a class="m_3604039270490451423el" href="http://trac.openscenegraph.org/documentation/OpenSceneGraphReferenceDocs/a00355.html#abbf6db2b0a8d14f825dd43435862a941" target="_blank">getWGLCon<wbr>text</a>() <br><br></div><div>I am having some trouble (despite the powers of Google) to find any OSG example code using getWGLContext()<span class="HOEnZb"><font color="#888888"><br></font></span></div><span class="HOEnZb"><font color="#888888"><div><br></div><div>Christian</div><div><br></div></font></span></div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">2017-11-10 14:33 GMT+01:00 Poojan Prabhu <span dir="ltr"><<a href="mailto:poojanpromin@gmail.com" target="_blank">poojanpromin@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
We are using shared context, but have custom drawables that use Vertex Array Objects. This causes a problem in the case of multiple windows (where each is a separate gl context).<br>
<br>
We can manage/create vaos depending on the gl context id that we are currently rendering with.<br>
<br>
But, we can't use context id as reported by render info, because that represents the shared context id and not the HGLRC<br>
<br>
Prefer to avoid wglGetCurrentContext in each draw call obviously. And we _do_ want to use shared contexts.<br>
<br>
How can we work around this so that we have access to the HGLRC or an id representing it?<br>
<br>
Thank you!<br>
<br>
Cheers,<br>
Poojan<br>
<br>
------------------<br>
Read this topic online here:<br>
<a href="http://forum.openscenegraph.org/viewtopic.php?p=72358#72358" rel="noreferrer" target="_blank">http://forum.openscenegraph.or<wbr>g/viewtopic.php?p=72358#72358</a><br>
<br>
<br>
<br>
<br>
<br>
______________________________<wbr>_________________<br>
osg-users mailing list<br>
<a href="mailto:osg-users@lists.openscenegraph.org" target="_blank">osg-users@lists.openscenegraph<wbr>.org</a><br>
<a href="http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org" rel="noreferrer" target="_blank">http://lists.openscenegraph.or<wbr>g/listinfo.cgi/osg-users-opens<wbr>cenegraph.org</a><br>
</blockquote></div><br></div>
</div></div><br>______________________________<wbr>_________________<br>
osg-users mailing list<br>
<a href="mailto:osg-users@lists.openscenegraph.org">osg-users@lists.<wbr>openscenegraph.org</a><br>
<a href="http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org" rel="noreferrer" target="_blank">http://lists.openscenegraph.<wbr>org/listinfo.cgi/osg-users-<wbr>openscenegraph.org</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">trajce nikolov nick<br></div>
</div>