<div dir="ltr">Hi Sandro,<br><div class="gmail_extra"><br><div class="gmail_quote">On 21 August 2017 at 13:21, Sandro Mani <span dir="ltr"><<a href="mailto:manisandro@gmail.com" target="_blank">manisandro@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 text="#000000" bgcolor="#FFFFFF"><span class=""></span>A less invasive alternative could be to introduce a new singleton
called OpenGLSettings or similar which contains just the three
settings glContextVersion, glContextFlags, glContextProfileMask.<br></div></blockquote><div><br></div><div>I don't see how this is different, if you are setting setting a default that users might not realize is now being set differently, it's just the same issue expressed in a slightly different way.<br><br>--<br><br></div><div>Currently when the osgViewer::Viewer is constructed and run() is called without the viewer explictly setting up the graphics context it's fallback to using the setUpViewAcrossAllScreens() and within this implementation when it sets up the Traits it passes the DisplaySetting assigned to the Viewer or DisplaySetting::instance() will be used if none is assigned. This fallback is functionally the same as you are after and this already will be working.<br><br></div><div>For places where the windows are being explicitly set up then they will be creating a Traits themselves and at this point I'm happy for them to need to explicitly specify the settings or pass in the DisplaySettings they want to use as defaults.<br><br>--<br><br></div><div>The only area that I think we might need to tighten up is with the defaults if the user explicitly builds the OSG against GL3 without any compatibility with GL1/GL2, here it would make sense for the GraphicsContext::Traits::glVersion to be set to 3.0 rather than 1.0 that it defaults to right now. One could push this into DisplaySettings's defaults and then force GraphicsContext::Traits to fallback to this by default, but personally I'm not happy with this in case it brings in other defaults that aren't intended.<br><br><br></div><div>Robert<br></div><div> <br></div><div><br><br></div><div><br> </div></div><br></div></div>