<div dir="ltr"><div>Hi David,</div><div><br></div><div>Are you replying to a digest post from the user mailing list, or using googlegroups?  Each of your replies has a whole bunch of content that has nothing to do with your reply.  It's kinda hard to follow when  you have to wade through the irrelevant stuff so I'd like to get to the bottom of this and fix it in future.</div><div><br></div><div>On the need for issues with setCompileOnNextDraw() and the OpenGL error 'invalid enumerant' warnings, it all suggest to me that there is something amiss with your scene graph, some OpenGL state you are setting in the scene graph is resulting in OpenGL detecting an error and reporting it as an "invalid enumerant'.  Unfortunately OpenGL doesn't provide great error report support, the errors you get don't tell you exactly what previous API call provoked it, the only thing you can do is increase how often you do a glGetError() to get the warnings.   The glGetError() call is no cheap so the OSG by default only checks it once per frame, so any of the OpenGL calls in the frame could cause the warning you get.<br></div><div><br></div><div>To get the OSG to do finer grained checking you can set the OSG_GL_ERROR_CHECKING env to ON and it'll check after each State::applyAttribute(..) call.  This doesn't pinpoint precisely what the problem is but should help you home in a bit better.<br></div><div><br></div><div>A third party GL debugger tool could also be helpful in this work.</div><div><br></div><div>Once you have resolved the error then there is chance you'll see better performance from your application.<br></div><div><br></div><div>--</div><div><br></div><div>As an aside, Vulkan is far better than OpenGL for error reporting, while it doesn't by default do checking, you can use the debug layer and api reporting layer to get far richer checking and info from these layers, once your app is running cleanly you then can not bother adding these layers so you never pay the cost at runtime in a deployed application, which is best of both worlds :-)<br></div><div><br></div><div>Robert.<br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, 5 Dec 2019 at 15:27, Heitbrink, David A <<a href="mailto:david-heitbrink@uiowa.edu">david-heitbrink@uiowa.edu</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">I am only doing setCompileOnNextDraw, after the load of my main scene. If I do not do it, then I get a lot more severe hangs.......however after some further test I ran into some complications. I have a user set option to use this or not. I found if the scene is larger than what can fit on the GPU, I am better off not doing this.<br>
<br>
I am currently running nodes with 3-4 projectors per node, 2 video cards per node. Each projector runs has its own process. What I found from running a profiler is glGet*, caused periodic hangs, this included:  <br>
<br>
glGetInteger64v(GL_TIMESTAMP, &timestamp); <br>
<br>
I setup a condition around where said line is used so it is not being run unless stats are enabled. So it turns out when I run without stats enabled, I get a lot fewer hangs.......but it makes it harder to quantify without stats. I am doing ground based simulation, so I have pretty high optical flow rates so dropped frames are really noticeable. I don't really see this on my development machine, or not to the same degree. My deployment machines are older and are running multiple processes. So...problem solved.....maybe? <br>
<br>
I am still getting 100's of :<br>
Warning: detected OpenGL error 'invalid enumerant' at after stateset.compileGLObjects in GLObjectsVisitor::apply(osg::StateSet& stateset)<br>
<br>
After setCompileOnNextDraw, and I am still concerned about these messages. I have not tracked down exactly what objects being compiled at the time are......or if it's every object for that matter. <br>
<br>
I was also looking at the shared state manager, I am using OSG 3.6.3. Is there anything in particular I should do to use this?<br>
<br>
-----Original Message-----<br>
From: osg-users <<a href="mailto:osg-users-bounces@lists.openscenegraph.org" target="_blank">osg-users-bounces@lists.openscenegraph.org</a>> On Behalf Of <a href="mailto:osg-users-request@lists.openscenegraph.org" target="_blank">osg-users-request@lists.openscenegraph.org</a><br>
Sent: Wednesday, December 4, 2019 3:05 PM<br>
To: <a href="mailto:osg-users@lists.openscenegraph.org" target="_blank">osg-users@lists.openscenegraph.org</a><br>
Subject: osg-users Digest, Vol 150, Issue 2<br>
<br>
Send osg-users mailing list submissions to<br>
        <a href="mailto:osg-users@lists.openscenegraph.org" target="_blank">osg-users@lists.openscenegraph.org</a><br>
<br>
To subscribe or unsubscribe via the World Wide Web, visit<br>
        <a href="http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org" rel="noreferrer" target="_blank">http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org</a><br>
<br>
or, via email, send a message with subject or body 'help' to<br>
        <a href="mailto:osg-users-request@lists.openscenegraph.org" target="_blank">osg-users-request@lists.openscenegraph.org</a><br>
<br>
You can reach the person managing the list at<br>
        <a href="mailto:osg-users-owner@lists.openscenegraph.org" target="_blank">osg-users-owner@lists.openscenegraph.org</a><br>
<br>
When replying, please edit your Subject line so it is more specific than "Re: Contents of osg-users digest..."<br>
<br>
<br>
Today's Topics:<br>
<br>
   1. Issue with setCompileOnNextDraw (Heitbrink, David A)<br>
   2. Re: Issue with setCompileOnNextDraw (Robert Osfield)<br>
<br>
<br>
----------------------------------------------------------------------<br>
<br>
Message: 1<br>
Date: Wed, 4 Dec 2019 14:49:54 +0000<br>
From: "Heitbrink, David A" <<a href="mailto:david-heitbrink@uiowa.edu" target="_blank">david-heitbrink@uiowa.edu</a>><br>
To: "<a href="mailto:osg-users@lists.openscenegraph.org" target="_blank">osg-users@lists.openscenegraph.org</a>"<br>
        <<a href="mailto:osg-users@lists.openscenegraph.org" target="_blank">osg-users@lists.openscenegraph.org</a>><br>
Subject: [osg-users] Issue with setCompileOnNextDraw<br>
Message-ID:<br>
        <<a href="mailto:BN7PR04MB4067C359D54EECA7C8099976FA5D0@BN7PR04MB4067.namprd04.prod.outlook.com" target="_blank">BN7PR04MB4067C359D54EECA7C8099976FA5D0@BN7PR04MB4067.namprd04.prod.outlook.com</a>><br>
<br>
Content-Type: text/plain; charset="us-ascii"<br>
<br>
I am doing a setCompileOnNextDraw on each render for each camera , (I typically only have 1) loading my scene. <br>
<br>
After doing thing I am getting a large number of error messages:<br>
<br>
Warning: detected OpenGL error 'invalid enumerant' at after stateset.compileGLObjects in GLObjectsVisitor::apply(osg::StateSet& stateset)<br>
<br>
It also seems that I am getting a large number of hangs. It looks like I have plenty of free memory on the GPU. I am pretty sure this is from loading textures.<br>
<br>
 When should you use setCompileOnNextDraw? Has any else scene this issue before?<br>
<br>
-----Original Message-----<br>
From: osg-users <<a href="mailto:osg-users-bounces@lists.openscenegraph.org" target="_blank">osg-users-bounces@lists.openscenegraph.org</a>> On Behalf Of <a href="mailto:osg-users-request@lists.openscenegraph.org" target="_blank">osg-users-request@lists.openscenegraph.org</a><br>
Sent: Tuesday, December 3, 2019 3:05 PM<br>
To: <a href="mailto:osg-users@lists.openscenegraph.org" target="_blank">osg-users@lists.openscenegraph.org</a><br>
Subject: [External] osg-users Digest, Vol 150, Issue 1<br>
<br>
Send osg-users mailing list submissions to<br>
        <a href="mailto:osg-users@lists.openscenegraph.org" target="_blank">osg-users@lists.openscenegraph.org</a><br>
<br>
To subscribe or unsubscribe via the World Wide Web, visit<br>
        <a href="http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org" rel="noreferrer" target="_blank">http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org</a><br>
<br>
or, via email, send a message with subject or body 'help' to<br>
        <a href="mailto:osg-users-request@lists.openscenegraph.org" target="_blank">osg-users-request@lists.openscenegraph.org</a><br>
<br>
You can reach the person managing the list at<br>
        <a href="mailto:osg-users-owner@lists.openscenegraph.org" target="_blank">osg-users-owner@lists.openscenegraph.org</a><br>
<br>
When replying, please edit your Subject line so it is more specific than "Re: Contents of osg-users digest..."<br>
<br>
<br>
Today's Topics:<br>
<br>
   1. OpenSceneGraph Forum moved to googlegroups (Robert Osfield)<br>
<br>
<br>
----------------------------------------------------------------------<br>
<br>
Message: 1<br>
Date: Tue, 3 Dec 2019 10:35:27 +0000<br>
From: Robert Osfield <<a href="mailto:robert.osfield@gmail.com" target="_blank">robert.osfield@gmail.com</a>><br>
To: OpenSceneGraph Users <<a href="mailto:osg-users@lists.openscenegraph.org" target="_blank">osg-users@lists.openscenegraph.org</a>><br>
Subject: [osg-users] OpenSceneGraph Forum moved to googlegroups<br>
Message-ID:<br>
        <<a href="mailto:CAFN7Y%2BWxrAucovcgy%2BaiX9WHGbGN5fBkVsjiFN8YRcZOtpS4vg@mail.gmail.com" target="_blank">CAFN7Y+WxrAucovcgy+aiX9WHGbGN5fBkVsjiFN8YRcZOtpS4vg@mail.gmail.com</a>><br>
Content-Type: text/plain; charset="utf-8"<br>
<br>
Hi All,<br>
<br>
Our old forum was generously created by a member of our community, but a number of years ago the creator/manager of the forum moved on work in an area unrelated to the OpenSceneGraph so the forum no longer had a maintainer, finally the old server that was hosting has gone too.<br>
<br>
Previous discussions in the community didn't come up with a replacement, and as I don't have any expertise in this direction myself I have adopted the osg-users mailing list mirror on googlegroups as the forum, so now when you go to forum.openscenegraph you'll be redirected to:<br>
<br>
  <a href="https://groups.google.com/forum/#!forum/osg-users" rel="noreferrer" target="_blank">https://groups.google.com/forum/#!forum/osg-users</a><br>
<br>
The googlegroup doesn't have a record of the membership to the old forum, and I don't have a record either, so to use the new googlegroup forum you'll need to register with it.<br>
<br>
Alternatively, you can use the original osg-users mailing list, and posts will be crossed posted automatically.<br>
<br>
Cheers,<br>
Robert.<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20191203/dbc35821/attachment-0001.html" rel="noreferrer" target="_blank">http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20191203/dbc35821/attachment-0001.html</a>><br>
<br>
------------------------------<br>
<br>
Subject: Digest Footer<br>
<br>
_______________________________________________<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" rel="noreferrer" target="_blank">http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org</a><br>
<br>
<br>
------------------------------<br>
<br>
End of osg-users Digest, Vol 150, Issue 1<br>
*****************************************<br>
<br>
<br>
------------------------------<br>
<br>
Message: 2<br>
Date: Wed, 4 Dec 2019 15:16:45 +0000<br>
From: Robert Osfield <<a href="mailto:robert.osfield@gmail.com" target="_blank">robert.osfield@gmail.com</a>><br>
To: OpenSceneGraph Users <<a href="mailto:osg-users@lists.openscenegraph.org" target="_blank">osg-users@lists.openscenegraph.org</a>><br>
Subject: Re: [osg-users] Issue with setCompileOnNextDraw<br>
Message-ID:<br>
        <CAFN7Y+UYJLZOcUBk=<a href="mailto:xfgdeQfcp8SLoa3BKxK78_O4bTG0my_4g@mail.gmail.com" target="_blank">xfgdeQfcp8SLoa3BKxK78_O4bTG0my_4g@mail.gmail.com</a>><br>
Content-Type: text/plain; charset="utf-8"<br>
<br>
Hi David,<br>
<br>
On Wed, 4 Dec 2019 at 14:50, Heitbrink, David A <<a href="mailto:david-heitbrink@uiowa.edu" target="_blank">david-heitbrink@uiowa.edu</a>><br>
wrote:<br>
<br>
> I am doing a setCompileOnNextDraw on each render for each camera , (I <br>
> typically only have 1) loading my scene.<br>
><br>
<br>
CompileOnNextDraw is a feature that is meant to be used sparingly such as on start up when you are first pre compiling all new GL objects to prevent incremental compiles from breaking frame later in the app run.<br>
<br>
First thing you should do is remove that call and see what happens.<br>
<br>
Do you have an idea why this line was added?<br>
<br>
Robert.<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20191204/baab7aac/attachment-0001.html" rel="noreferrer" target="_blank">http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20191204/baab7aac/attachment-0001.html</a>><br>
<br>
------------------------------<br>
<br>
Subject: Digest Footer<br>
<br>
_______________________________________________<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" rel="noreferrer" target="_blank">http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org</a><br>
<br>
<br>
------------------------------<br>
<br>
End of osg-users Digest, Vol 150, Issue 2<br>
*****************************************<br>
_______________________________________________<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" rel="noreferrer" target="_blank">http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org</a><br>
</blockquote></div>