Re: [osg-users] Signal 11 after calling setPostDrawCallback(NULL)

2023-03-06 Thread Alberto Luaces
I would first begin by using inspection tools as valgrind or the
gcc/clang sanitizers, because this looks like a thread synchronization
problem.

"Broi, Franco" writes:

> Hi,
>
> I have an application that takes a snapshot of the scene using 
> setPostDrawCallback(capture), which gets the image and
> writes it to a file but on completion setting setPostDrawCallback(NULL) 
> crashes on the next expose.
>
> #4  0x7f681bf08520 in  () at 
> /lib/x86_64-linux-gnu/libc.so.6
> #5  0x7f681db87260 in osgUtil::RenderStage::draw(osg::RenderInfo&, 
> osgUtil::RenderLeaf*&) () at /usr/local/lib/libosgUtil.so.161
> #6  0x7f681db92f2c in osgUtil::SceneView::draw() () at 
> /usr/local/lib/libosgUtil.so.161
> #7  0x7f681d69b6b6 in osgViewer::Renderer::cull_draw() () at 
> /usr/local/lib/libosgViewer.so.161
> #8  0x7f681edaa479 in osg::GraphicsContext::runOperations() () at 
> /usr/local/lib/libosg.so.161
> #9  0x7f681d6d5bfd in osgViewer::ViewerBase::renderingTraversals() () at 
> /usr/local/lib/libosgViewer.so.161
> #10 0x7f6835a03b37 in OSGGTKDrawingArea::_expose_event(_GtkGLArea*, 
> _GdkGLContext*) (this=0x5575767c6450, area=0x557576c4c2e0, 
> context=0x557576c50580) at osggtkdrawingarea.cpp:83
>
> Even if I do nothing in the capture callback it still crashes.
>
> I've looked through the OSG examples but nothing sets the postdraw or 
> finaldraw callbacks to NULL, both produce the same
> crash.
>
> This code has remained unchanged for 10 years but wasn't being used so the 
> crash only came to light recently.
>
> I'm using OSG I built from source but I also tried it with 
> libopenscenegraph161/jammy on Ubuntu and it still crashes -
> but strangely doesn't render an image but that's a problem for another day.
>
> ldd ./qd3d/nyb/.libs/nyb-2108.1.1 | grep osg
>   libosg.so.161 => /usr/local/lib/libosg.so.161 (0x7faab920)
>   libosgDB.so.161 => /usr/local/lib/libosgDB.so.161 (0x7faab8e0)
>   libosgGA.so.161 => /usr/local/lib/libosgGA.so.161 (0x7faab8a0)
>   libosgText.so.161 => /usr/local/lib/libosgText.so.161 
> (0x7faab860)
>   libosgUtil.so.161 => /usr/local/lib/libosgUtil.so.161 
> (0x7faab800)
>   libosgViewer.so.161 => /usr/local/lib/libosgViewer.so.161 
> (0x7faab7c0)
>
> Any ideas?
>
> Cheers,
>

-- 
Alberto

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Signal 11 after calling setPostDrawCallback(NULL)

2023-03-05 Thread Broi, Franco
Hi,

I have an application that takes a snapshot of the scene using 
setPostDrawCallback(capture), which gets the image and writes it to a file but 
on completion setting setPostDrawCallback(NULL) crashes on the next expose.


#4  0x7f681bf08520 in  () at 
/lib/x86_64-linux-gnu/libc.so.6

#5  0x7f681db87260 in osgUtil::RenderStage::draw(osg::RenderInfo&, 
osgUtil::RenderLeaf*&) () at /usr/local/lib/libosgUtil.so.161

#6  0x7f681db92f2c in osgUtil::SceneView::draw() () at 
/usr/local/lib/libosgUtil.so.161

#7  0x7f681d69b6b6 in osgViewer::Renderer::cull_draw() () at 
/usr/local/lib/libosgViewer.so.161

#8  0x7f681edaa479 in osg::GraphicsContext::runOperations() () at 
/usr/local/lib/libosg.so.161

#9  0x7f681d6d5bfd in osgViewer::ViewerBase::renderingTraversals() () at 
/usr/local/lib/libosgViewer.so.161

#10 0x7f6835a03b37 in OSGGTKDrawingArea::_expose_event(_GtkGLArea*, 
_GdkGLContext*) (this=0x5575767c6450, area=0x557576c4c2e0, 
context=0x557576c50580) at osggtkdrawingarea.cpp:83


Even if I do nothing in the capture callback it still crashes.

I've looked through the OSG examples but nothing sets the postdraw or finaldraw 
callbacks to NULL, both produce the same crash.

This code has remained unchanged for 10 years but wasn't being used so the 
crash only came to light recently.

I'm using OSG I built from source but I also tried it with 
libopenscenegraph161/jammy on Ubuntu and it still crashes - but strangely 
doesn't render an image but that's a problem for another day.


ldd ./qd3d/nyb/.libs/nyb-2108.1.1 | grep osg

libosg.so.161 => /usr/local/lib/libosg.so.161 (0x7faab920)

libosgDB.so.161 => /usr/local/lib/libosgDB.so.161 (0x7faab8e0)

libosgGA.so.161 => /usr/local/lib/libosgGA.so.161 (0x7faab8a0)

libosgText.so.161 => /usr/local/lib/libosgText.so.161 
(0x7faab860)

libosgUtil.so.161 => /usr/local/lib/libosgUtil.so.161 
(0x7faab800)

libosgViewer.so.161 => /usr/local/lib/libosgViewer.so.161 
(0x7faab7c0)

Any ideas?

Cheers,

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] OpenSceneGraph and Wayland

2022-09-27 Thread Paul-Tcl3D

Dear OSG community,

has anybody extended OSG to use Wayland instead of X11 as GraphicsWindow?

Thanks for any hints or links.

Best regards,

Paul Obermeier
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] How to install libraries into lib64 instead of lib?

2021-09-30 Thread Eric Sokolowsky
Thank you. I will try this. But as you say, I don't know why it's doing
this already.


On Thu, Sep 30, 2021 at 10:15 AM Alberto Luaces  wrote:

> It's the parameter LIB_POSTFIX, so you could call
>
> cmake -DLIB_POSTFIX=64
>
> although it is the default, I wonder why it's not the case for you.
>
> Eric Sokolowsky writes:
>
> > I'm building OpenSceneGraph 3.6.5 for Fedora 34. The cmake build
> > system installs libraries into lib though I want it to install them
> > into lib64 (this is under the base installation
> > directory). I'm not familiar enough with cmake to fix this, though I
> > have poked around in the cmake files to try to do this. Can anyone
> > give me some pointers or help? 64-bit libraries
> > should go in lib64 for Linux, generally.
> >
>
> --
> Alberto
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] How to install libraries into lib64 instead of lib?

2021-09-30 Thread Alberto Luaces
It's the parameter LIB_POSTFIX, so you could call

cmake -DLIB_POSTFIX=64

although it is the default, I wonder why it's not the case for you.

Eric Sokolowsky writes:

> I'm building OpenSceneGraph 3.6.5 for Fedora 34. The cmake build
> system installs libraries into lib though I want it to install them
> into lib64 (this is under the base installation
> directory). I'm not familiar enough with cmake to fix this, though I
> have poked around in the cmake files to try to do this. Can anyone
> give me some pointers or help? 64-bit libraries
> should go in lib64 for Linux, generally.
>

-- 
Alberto

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] How to install libraries into lib64 instead of lib?

2021-09-30 Thread Eric Sokolowsky
I'm building OpenSceneGraph 3.6.5 for Fedora 34. The cmake build system
installs libraries into lib though I want it to install them into lib64
(this is under the base installation directory). I'm not familiar enough
with cmake to fix this, though I have poked around in the cmake files to
try to do this. Can anyone give me some pointers or help? 64-bit libraries
should go in lib64 for Linux, generally.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Calling setUseVertexAttributeAliasing(true) after a viewer is being "run" causes a crasch

2021-04-07 Thread Robert Osfield
Hi Andres,

You've posted to the mailman list, which I'm about to close, could you
subscribe/post to the osg-users googlegroup.  I'll answer the question
there.

Cheers,
Robert.

On Wed, 7 Apr 2021 at 13:33, Anders Backman  wrote:

> Hi all.
> Just noticed that it is not possible to toggle the
> setUseVertexAttributeAliasing after a viewer has been realized and
> frame/run has been called and any text is involved in the scene. The
> attached code is a modified osgViewer. If 's' (statistics) is shown after
> the call to  setUseVertexAttributeAliasing, I get a callstack, meaning it
> is not possible to toggle this feature while an application is being run.
> Is that intentional?
>
> I am running OSG 3.6.4 on Windows 10
>
> >
> osg160-osg.dll!osg::VertexArrayState::applyDisablingOfVertexAttributes(osg::State
> & state) Line 294 C++
>
> osg160-osg.dll!osg::Geometry::drawVertexArraysImplementation(osg::RenderInfo
> & renderInfo) Line 989 C++
>   osg160-osg.dll!osg::Geometry::drawImplementation(osg::RenderInfo &
> renderInfo) Line 899 C++
>   osg160-osg.dll!osg::Drawable::drawInner(osg::RenderInfo & renderInfo)
> Line 277 C++
>   osg160-osg.dll!osg::Drawable::draw(osg::RenderInfo & renderInfo) Line
> 619 C++
>   osg160-osgUtil.dll!osgUtil::RenderLeaf::render(osg::RenderInfo &
> renderInfo, osgUtil::RenderLeaf * previous) Line 84 C++
>
> osg160-osgUtil.dll!osgUtil::RenderBin::drawImplementation(osg::RenderInfo &
> renderInfo, osgUtil::RenderLeaf * & previous) Line 488 C++
>
> osg160-osgUtil.dll!osgUtil::RenderStage::drawImplementation(osg::RenderInfo
> & renderInfo, osgUtil::RenderLeaf * & previous) Line 1408 C++
>   osg160-osgUtil.dll!osgUtil::RenderBin::draw(osg::RenderInfo &
> renderInfo, osgUtil::RenderLeaf * & previous) Line 432 C++
>   osg160-osgUtil.dll!osgUtil::RenderStage::drawInner(osg::RenderInfo &
> renderInfo, osgUtil::RenderLeaf * & previous, bool & doCopyTexture) Line
> 934 C++
>
>
>
> --
> __
> Anders Backman, HPC2N
> 90187 Umeå University, Sweden
> and...@cs.umu.se http://www.hpc2n.umu.se
> Cell: +46-70-392 64 67
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Calling setUseVertexAttributeAliasing(true) after a viewer is being "run" causes a crasch

2021-04-07 Thread Anders Backman
Hi all.
Just noticed that it is not possible to toggle the
setUseVertexAttributeAliasing after a viewer has been realized and
frame/run has been called and any text is involved in the scene. The
attached code is a modified osgViewer. If 's' (statistics) is shown after
the call to  setUseVertexAttributeAliasing, I get a callstack, meaning it
is not possible to toggle this feature while an application is being run.
Is that intentional?

I am running OSG 3.6.4 on Windows 10

>
osg160-osg.dll!osg::VertexArrayState::applyDisablingOfVertexAttributes(osg::State
& state) Line 294 C++

osg160-osg.dll!osg::Geometry::drawVertexArraysImplementation(osg::RenderInfo
& renderInfo) Line 989 C++
  osg160-osg.dll!osg::Geometry::drawImplementation(osg::RenderInfo &
renderInfo) Line 899 C++
  osg160-osg.dll!osg::Drawable::drawInner(osg::RenderInfo & renderInfo)
Line 277 C++
  osg160-osg.dll!osg::Drawable::draw(osg::RenderInfo & renderInfo) Line 619
C++
  osg160-osgUtil.dll!osgUtil::RenderLeaf::render(osg::RenderInfo &
renderInfo, osgUtil::RenderLeaf * previous) Line 84 C++
  osg160-osgUtil.dll!osgUtil::RenderBin::drawImplementation(osg::RenderInfo
& renderInfo, osgUtil::RenderLeaf * & previous) Line 488 C++

osg160-osgUtil.dll!osgUtil::RenderStage::drawImplementation(osg::RenderInfo
& renderInfo, osgUtil::RenderLeaf * & previous) Line 1408 C++
  osg160-osgUtil.dll!osgUtil::RenderBin::draw(osg::RenderInfo & renderInfo,
osgUtil::RenderLeaf * & previous) Line 432 C++
  osg160-osgUtil.dll!osgUtil::RenderStage::drawInner(osg::RenderInfo &
renderInfo, osgUtil::RenderLeaf * & previous, bool & doCopyTexture) Line
934 C++



-- 
__
Anders Backman, HPC2N
90187 Umeå University, Sweden
and...@cs.umu.se http://www.hpc2n.umu.se
Cell: +46-70-392 64 67
/* OpenSceneGraph example, osgshape.
*
*  Permission is hereby granted, free of charge, to any person obtaining a copy
*  of this software and associated documentation files (the "Software"), to deal
*  in the Software without restriction, including without limitation the rights
*  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
*  copies of the Software, and to permit persons to whom the Software is
*  furnished to do so, subject to the following conditions:
*
*  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
*  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
*  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
*  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
*  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
*  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
*  THE SOFTWARE.
*/

#include 
#include 
#include 
#include 
#include 

#include 
#include 
#include 
#include 

#include 
#include 

#include 

// for the grid data..

osg::Geode* createShapes(osg::ArgumentParser& arguments)
{
  osg::Geode* geode = new osg::Geode();

  float radius = 0.8f;
  float height = 1.0f;

  osg::TessellationHints* hints = new osg::TessellationHints;
  hints->setDetailRatio(0.5f);

  geode->addDrawable(new osg::ShapeDrawable(new osg::Sphere(osg::Vec3(0.0f, 
0.0f, 0.0f), radius), hints));
  geode->addDrawable(new osg::ShapeDrawable(new osg::Box(osg::Vec3(2.0f, 0.0f, 
0.0f), 2 * radius), hints));
  geode->addDrawable(new osg::ShapeDrawable(new osg::Cone(osg::Vec3(4.0f, 0.0f, 
0.0f), radius, height), hints));
  geode->addDrawable(new osg::ShapeDrawable(new osg::Cylinder(osg::Vec3(6.0f, 
0.0f, 0.0f), radius, height), hints));
  geode->addDrawable(new osg::ShapeDrawable(new osg::Capsule(osg::Vec3(8.0f, 
0.0f, 0.0f), radius, height), hints));



  return geode;
}

int main(int argc, char** argv)
{
  osg::ArgumentParser arguments(, argv);

  // construct the viewer.
  osgViewer::Viewer viewer(arguments);

  // add model to viewer.
  viewer.setSceneData(createShapes(arguments));

  // add the state manipulator
  viewer.addEventHandler(new 
osgGA::StateSetManipulator(viewer.getCamera()->getOrCreateStateSet()));
  viewer.addEventHandler(new osgViewer::StatsHandler);

  viewer.setCameraManipulator(new osgGA::TrackballManipulator());

  viewer.realize();
  int i = 0;
  while (!viewer.done()) {
i++;
if (i == 2000)
{
  osgViewer::Viewer::Windows windows;
  viewer.getWindows(windows);

  for (osgViewer::Viewer::Windows::iterator itr = windows.begin(); itr != 
windows.end(); ++itr)
  {
osg::State* s = (*itr)->getState();
s->setUseModelViewAndProjectionUniforms(true);
s->setUseVertexAttributeAliasing(true);
  }

}
viewer.frame();
  }

}
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Closing of osg-users@lists.openscenegraph.org, please subscribe to osg-users googlegroup

2021-04-06 Thread Robert Osfield
On Tue, 6 Apr 2021 at 15:16, Robert Osfield 
wrote:

> Unfortunately all it's not yet perfect, a few subscriptions are failing
> when I attempt to confirm the pending request with the googlegroup server
> reporting that it can't confirm the address.  This seems to be happening
> for a range of addresses, initially it looked random but now I've had two
> separate subscription attempts from the same domain fail right after each
> other with the same error so it's starting to look like some domains aren't
> playing nice with the googlegroup server for some reason.
>

I just followed up directly with one of the subscription requests and they
did reply to the confirmation email, and checking the same address - it's
in the membership list.  This suggests the googlegroup error that I got on
clicking to agree to subscription may not be a sign of complete failure.

I don't know what this means, hopefully it'll become clearer.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Closing of osg-users@lists.openscenegraph.org, please subscribe to osg-users googlegroup

2021-04-06 Thread Robert Osfield
Hi All,

It looks like the subscribe by email approach is working well for
non-Google users which is great news.

Unfortunately all it's not yet perfect, a few subscriptions are failing
when I attempt to confirm the pending request with the googlegroup server
reporting that it can't confirm the address.  This seems to be happening
for a range of addresses, initially it looked random but now I've had two
separate subscription attempts from the same domain fail right after each
other with the same error so it's starting to look like some domains aren't
playing nice with the googlegroup server for some reason.

Three of the addresses were US gov domains - could that be a connection?

If your subscription has failed then please email me directly on
robert.osfield at gmail.com.  I am hoping that I'll be able to just
subscribe to you directly.  Knowing a pattern of which types of domain fail
could also help with figuring out a solution.

Cheers,
Robert.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Closing of osg-users@lists.openscenegraph.org, please subscribe to osg-users googlegroup

2021-04-06 Thread Werner Modenbach
Hi Robert,

many thanks for this research. Works perfect :-)
I'm subscribed now on osg and vsg lists.

- Werner -

Am 06.04.2021 um 15:21 schrieb Robert Osfield:
> On Tue, 6 Apr 2021 at 13:39, Rizzen  > wrote:
>
> The message is correct in how I joined this email subscription group 
> without using a Gmail address.
>
>
> Thanks for the confirmation.
>  
>
> Is there an email subscription group for VSG?
>
>
> There's been a vsg-users google group for a couple of years, but no 
> instructions for how to subscribe without a google account.  Now I've got the 
> confirmation that it works I've
> added the same instructions to vsg-users:
>
>     https://groups.google.com/g/vsg-users 
> 
>
> Seems like a perfect opportunity for folks to test that I updated the links 
> correctly :-)
>
> -- 
> You received this message because you are subscribed to the Google Groups 
> "OpenSceneGraph Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to osg-users+unsubscr...@googlegroups.com 
> .
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/osg-users/CAFN7Y%2BUb40DmjOda8F7DUOGAL0fsFG7-UYSD_k2t3fe8E%3D5Wcw%40mail.gmail.com
> .
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Closing of osg-users@lists.openscenegraph.org, please subscribe to osg-users googlegroup

2021-04-06 Thread Robert Osfield
On Tue, 6 Apr 2021 at 13:39, Rizzen  wrote:

> The message is correct in how I joined this email subscription group
> without using a Gmail address.
>

Thanks for the confirmation.


> Is there an email subscription group for VSG?
>

There's been a vsg-users google group for a couple of years, but no
instructions for how to subscribe without a google account.  Now I've got
the confirmation that it works I've added the same instructions to
vsg-users:

https://groups.google.com/g/vsg-users

Seems like a perfect opportunity for folks to test that I updated the links
correctly :-)

-- 
You received this message because you are subscribed to the Google Groups 
"OpenSceneGraph Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to osg-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/osg-users/CAFN7Y%2BUb40DmjOda8F7DUOGAL0fsFG7-UYSD_k2t3fe8E%3D5Wcw%40mail.gmail.com.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Closing of osg-users@lists.openscenegraph.org, please subscribe to osg-users googlegroup

2021-04-06 Thread Rizzen

Good day Robert,

The message is correct in how I joined this email subscription group 
without using a Gmail address.


Is there an email subscription group for VSG?

Rizzen

On 06/04/2021 13:31, Robert Osfield wrote:

Hi All,

I have feedback that the email subscription route is working for non 
google account users, so I have updated the introduction message for 
the osg-users googlegroup.  Could folks review what I've written and 
let me know if it's clear, links look correct etc.


Thanks,
Robert

-- New welcome message:

Welcome to the OpenSceneGraph user/developer group, a place for 
discussion about use of and development of the OpenSceneGraph 
, the open source, C++, OpenGL cross 
platform scene graph.


To  join the list with a non google account send an empty email to: 
osg-users+subscr...@googlegroups.com, 
. When you receive a 
confirmation email reply to it with another empty email rather than 
clicking confirm - this avoid any google account you have being used.*

*
--
You received this message because you are subscribed to the Google 
Groups "OpenSceneGraph Users" group.
To unsubscribe from this group and stop receiving emails from it, send 
an email to osg-users+unsubscr...@googlegroups.com 
.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/osg-users/CAFN7Y%2BUOaGedNZVaE3JfZxh1JE1%2BwDa3BcDhSmFY9F2XoTFO9A%40mail.gmail.com 
.



--
You received this message because you are subscribed to the Google Groups 
"OpenSceneGraph Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to osg-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/osg-users/c17a177a-5321-3ecf-cbcc-f462ec8b2fec%40darkstar.co.za.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Closing of osg-users@lists.openscenegraph.org, please subscribe to osg-users googlegroup

2021-04-06 Thread Robert Osfield
Hi All,

I have feedback that the email subscription route is working for non google
account users, so I have updated the introduction message for the osg-users
googlegroup.  Could folks review what I've written and let me know if it's
clear, links look correct etc.

Thanks,
Robert

-- New welcome message:

Welcome to the OpenSceneGraph user/developer group, a place for discussion
about use of and development of the OpenSceneGraph
, the open source, C++, OpenGL cross
platform scene graph.

To  join the list with a non google account send an empty email to:
osg-users+subscr...@googlegroups.com,. When you receive a confirmation
email reply to it with another empty email rather than clicking confirm -
this avoid any google account you have being used.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Building OSG on Ubuntu 20.04 with GLCORE profile

2021-04-05 Thread Scott

Hi Steve,

Here's the configuration that I've been using...

OPENGL_PROFILE=GLCORE
OSG_GL_CONTEXT_VERSION=4.6
OpenGL_GL_PREFERENCE=GLVND

With a clean CMAKE config, it will set the defaults... (purge all the 
OSG_xxx items if they already have values assigned)


OPENGL_HEADER1=#include 
OSG_GL1_AVAILABLE=OFF
OSG_GL2_AVAILABLE=OFF
OSG_GL3_AVAILABLE=ON
OSG_GL_DISPLAYLISTS_AVAILABLE=OFF
OSG_GL_FIXED_FUNCTION_AVAILABLE=OFF
etc...

Scott


On 4/5/21 12:20 PM, Hardy Family wrote:
The GtkGLArea widget in GTK3.24 requires GLCORE profile, so the 
standard Ubuntu/Debian openscenegraph package will not work as it is 
compiled with GL2 profile.  Unfortunately, my application uses Gtk so 
I am now forced to get it working.  So I loaded the source package 
(openscenegraph 3.6.4) and tried to build it.


First, with default configuration, except added
SET(OpenGL_GL_PREFERENCE "GLVND")
to stop the warning about having multiple library choices. This uses 
GL2 profile, and after building, osgviewer works fine.


Next, selected OPENGL_PROFILE "GLCORE" and also turned off all 
"available" except OSG_GL3_AVAILABLE.  Make clean then make again, and 
now osgviewer only shows an empty scene for the same test file.


Is there something else I have to do in the build?  (I'm not yet even 
to the point of testing with Gtk).


Interestingly, on the Raspberry Pi 4, which also runs Gtk3.24, my code 
is working fine with the standard distribution package, so I know it 
can be done.  On the Pi, OSG is version 3.2.3.


I don't mind a custom solution for this.  Normally we don't want to 
stray too far from standard distro, but our application is a machine 
controller so we supply and maintain the PC as well.


Regards,
Steve

--
You received this message because you are subscribed to the Google 
Groups "OpenSceneGraph Users" group.
To unsubscribe from this group and stop receiving emails from it, send 
an email to osg-users+unsubscr...@googlegroups.com 
.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/osg-users/9bb6453e-a9f5-461c-8b4e-a1eb23dc99a0n%40googlegroups.com 
.


___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Building OSG on Ubuntu 20.04 with GLCORE profile

2021-04-05 Thread Broi, Franco

I'm using OSG on Linux Mint and CentOS with Gtk. From my notes all I did was:

CMakeLists.txt

461c461
< SET(OPENGL_PROFILE "GL3" CACHE STRING "OpenGL Profile to use, choose from 
GL1, GL2, GL3, GLES1, GLES2, GLES3")
---
> SET(OPENGL_PROFILE "GL2" CACHE STRING "OpenGL Profile to use, choose from 
> GL1, GL2, GL3, GLES1, GLES2, GLES3")


On Mon, 2021-04-05 at 10:20 -0700, Hardy Family wrote:
The GtkGLArea widget in GTK3.24 requires GLCORE profile, so the standard 
Ubuntu/Debian openscenegraph package will not work as it is compiled with GL2 
profile.  Unfortunately, my application uses Gtk so I am now forced to get it 
working.  So I loaded the source package (openscenegraph 3.6.4) and tried to 
build it.

First, with default configuration, except added
SET(OpenGL_GL_PREFERENCE "GLVND")
to stop the warning about having multiple library choices.  This uses GL2 
profile, and after building, osgviewer works fine.

Next, selected OPENGL_PROFILE "GLCORE" and also turned off all "available" 
except OSG_GL3_AVAILABLE.  Make clean then make again, and now osgviewer only 
shows an empty scene for the same test file.

Is there something else I have to do in the build?  (I'm not yet even to the 
point of testing with Gtk).

Interestingly, on the Raspberry Pi 4, which also runs Gtk3.24, my code is 
working fine with the standard distribution package, so I know it can be done.  
On the Pi, OSG is version 3.2.3.

I don't mind a custom solution for this.  Normally we don't want to stray too 
far from standard distro, but our application is a machine controller so we 
supply and maintain the PC as well.

Regards,
Steve


___

osg-users mailing list



osg-users@lists.openscenegraph.org




http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Closing of osg-users@lists.openscenegraph.org, please subscribe to osg-users googlegroup

2021-04-05 Thread Robert Osfield
Hi All,

I've approved a number of new subscription to the osg-users google group
today, most went through OK, but two requests failed when I clicked to
approach, groups.google reported the error message:

"1 request couldn't be approved
We're unable to send a notification to this person about the action you've
performed"

I don't know what the actual cause was - could be something as simple as an
invalid address being used. Unfortunately the entries disappeared with no
record for me to follow up on the addresses, so if your attempt has failed
let me know and provide details about what method you used for subscription.

Conversely, if you have successfully subscribed today with a non google
account let us know what method you use so that others can follow this same
approach.

Cheers,
Robert.

-- 
You received this message because you are subscribed to the Google Groups 
"OpenSceneGraph Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to osg-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/osg-users/CAFN7Y%2BWhnyizSos_EXrxU8ruTwWNEd65ZS69tubxuMcExXtivw%40mail.gmail.com.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

-- 
You received this message because you are subscribed to the Google Groups 
"OpenSceneGraph Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to osg-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/osg-users/CAFN7Y%2BWhnyizSos_EXrxU8ruTwWNEd65ZS69tubxuMcExXtivw%40mail.gmail.com.


[osg-users] Building OSG on Ubuntu 20.04 with GLCORE profile

2021-04-05 Thread Hardy Family
The GtkGLArea widget in GTK3.24 requires GLCORE profile, so the standard 
Ubuntu/Debian openscenegraph package will not work as it is compiled with 
GL2 profile.  Unfortunately, my application uses Gtk so I am now forced to 
get it working.  So I loaded the source package (openscenegraph 3.6.4) and 
tried to build it.

First, with default configuration, except added 
SET(OpenGL_GL_PREFERENCE "GLVND")
to stop the warning about having multiple library choices.  This uses GL2 
profile, and after building, osgviewer works fine.

Next, selected OPENGL_PROFILE "GLCORE" and also turned off all "available" 
except OSG_GL3_AVAILABLE.  Make clean then make again, and now osgviewer 
only shows an empty scene for the same test file.

Is there something else I have to do in the build?  (I'm not yet even to 
the point of testing with Gtk).

Interestingly, on the Raspberry Pi 4, which also runs Gtk3.24, my code is 
working fine with the standard distribution package, so I know it can be 
done.  On the Pi, OSG is version 3.2.3.

I don't mind a custom solution for this.  Normally we don't want to stray 
too far from standard distro, but our application is a machine controller 
so we supply and maintain the PC as well.

Regards,
Steve

-- 
You received this message because you are subscribed to the Google Groups 
"OpenSceneGraph Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to osg-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/osg-users/9bb6453e-a9f5-461c-8b4e-a1eb23dc99a0n%40googlegroups.com.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Closing of osg-users@lists.openscenegraph.org, please subscribe to osg-users googlegroup

2021-04-05 Thread Robert Osfield
This might be of use:

https://webapps.stackexchange.com/questions/13508/how-can-i-subscribe-to-a-google-mailing-list-with-a-non-google-e-mail-address/15593#15593

Looks like you may be able to send a email to
*osg-users+subscr...@googlegroups.com
* from the email account you want
to subscribe, then reply to the confirmation with a blank email, but don't
click on the confirmation link.

Failing that I can manually subscribe you.

-- 
You received this message because you are subscribed to the Google Groups 
"OpenSceneGraph Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to osg-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/osg-users/CAFN7Y%2BWPpBkviFQPnouibCNnz9sjcKcu7WCzoJpJ2cZOeaa%2BPQ%40mail.gmail.com.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

-- 
You received this message because you are subscribed to the Google Groups 
"OpenSceneGraph Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to osg-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/osg-users/CAFN7Y%2BWPpBkviFQPnouibCNnz9sjcKcu7WCzoJpJ2cZOeaa%2BPQ%40mail.gmail.com.


Re: [osg-users] Closing of osg-users@lists.openscenegraph.org, please subscribe to osg-users googlegroup

2021-04-05 Thread Robert Osfield
Hi Wener,

On Mon, 5 Apr 2021 at 11:30, Werner Modenbach <
werner.modenb...@modenbach-ac.de> wrote:

> I followed your suggestion by replacing "myid" by my mail address, which
> isn't registered for a Google account.
>

The link I provided earlier wasn't consistent, I copied and modified one I
found on the web and it looks like the actual link address didn't update
correctly.  I think this should be the correct link:

   http://groups.google.com/group/osg-users/boxsubscribe?email=myid


> There was no error message and I was forwarded to the Login page.
> But logging in with the mail address failed with the message: "Your Google
> account could not be found" (translated myself)
>
> So I'll wait if just the login fails and I get messages from the list or
> if everything failed.
>

There is chance it was the wrong url.


>
> Will keep you informed.
>

I haven't seen your email address on the new subscriptions list - I just
OK'd 4 new join requests, 3 were for gmail addresses, one from a non gmail
address so it should be possible.

I am sure joining a google group without gmail used to be more straight
forward so it does look like google have been trying to hide/exclude all
the obvious ways.

I will keep hunting for a good solution.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Closing of osg-users@lists.openscenegraph.org, please subscribe to osg-users googlegroup

2021-04-05 Thread Robert Osfield

There appears to be a perception that you can only join the osg-users group 
using a Google account.  This isn't correct, plenty of folk have already 
joined using non google email addresses.  

I did a search online about subscribing and came across the suggestion of 
using a url in the form:

http://groups.google.com/group/osg-users/boxsubscribe?email=myid

If you still are struggling to subscribe then I can manually add your email 
address.  Just email me directly and I can add you.

The trick of banning everyone from joining the old osg-users looks to have 
stopped the flood of dubious subscription requests so for now the immediate 
issue of me being overwhelmed with support work is over, but it's just a 
short term hack as it bans everyone, including genuine requests.

On Sunday, 4 April 2021 at 19:43:28 UTC+1 Robert Osfield wrote:

>
>
> On Sun, 4 Apr 2021 at 19:38, merspieler  wrote:
>
>> I have to sign in? Then I'm out of luck..
>
>
> I asked what you could see on screen - whether you saw a join or sign in 
> button.
>
> You don't need to sign in to use the googlegroup - you can simply use it 
> as a mailing list.
>
>  Also please remember, this is free support, I'm trying to help you and 
> others, for free, in my own free time.
>

-- 
You received this message because you are subscribed to the Google Groups 
"OpenSceneGraph Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to osg-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/osg-users/6e0617b5-e097-4a0a-86f6-ace8a071cf11n%40googlegroups.com.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Closing of osg-users@lists.openscenegraph.org, please subscribe to osg-users googlegroup

2021-04-05 Thread Werner Modenbach
Hi Robert,

I followed your suggestion by replacing "myid" by my mail address, which isn't 
registered for a Google account.
There was no error message and I was forwarded to the Login page.
But logging in with the mail address failed with the message: "Your Google 
account could not be found" (translated myself)

So I'll wait if just the login fails and I get messages from the list or if 
everything failed.

Will keep you informed.

- Werner -

Am 05.04.2021 um 12:19 schrieb Robert Osfield:
> There appears to be a perception that you can only join the osg-users group 
> using a Google account.  This isn't correct, plenty of folk have already 
> joined using non google email
> addresses. 
>
> I did a search online about subscribing and came across the suggestion of 
> using a url in the form:
>
>     http://groups.google.com/group/osg-users/boxsubscribe?email=myid 
> 
>
> If you still are struggling to subscribe then I can manually add your email 
> address.  Just email me directly and I can add you.
>
> The trick of banning everyone from joining the old osg-users looks to have 
> stopped the flood of dubious subscription requests so for now the immediate 
> issue of me being
> overwhelmed with support work is over, but it's just a short term hack as it 
> bans everyone, including genuine requests.
>
> Cheers,
> Robert.
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Closing of osg-users@lists.openscenegraph.org, please subscribe to osg-users googlegroup

2021-04-05 Thread Robert Osfield
There appears to be a perception that you can only join the osg-users group
using a Google account.  This isn't correct, plenty of folk have already
joined using non google email addresses.

I did a search online about subscribing and came across the suggestion of
using a url in the form:

http://groups.google.com/group/osg-users/boxsubscribe?email=myid


If you still are struggling to subscribe then I can manually add your email
address.  Just email me directly and I can add you.

The trick of banning everyone from joining the old osg-users looks to have
stopped the flood of dubious subscription requests so for now the immediate
issue of me being overwhelmed with support work is over, but it's just a
short term hack as it bans everyone, including genuine requests.

Cheers,
Robert.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Closing of osg-users@lists.openscenegraph.org, please subscribe to osg-users googlegroup

2021-04-04 Thread Robert Osfield
On Sun, 4 Apr 2021 at 19:38, merspieler  wrote:

> I have to sign in? Then I'm out of luck..


I asked what you could see on screen - whether you saw a join or sign in
button.

You don't need to sign in to use the googlegroup - you can simply use it as
a mailing list.

 Also please remember, this is free support, I'm trying to help you and
others, for free, in my own free time.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Closing of osg-users@lists.openscenegraph.org, please subscribe to osg-users googlegroup

2021-04-04 Thread Robert Osfield
I have come across a trick to ban all addresses except ones for a specified
domain, I've applied this, and will see if that fixes the deluge of
subscription requests.  This will however reject all new subscription
attempts.  At best it might provide a short term breather to give folks
more time to get subscribed to the osg-users google group.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Closing of osg-users@lists.openscenegraph.org, please subscribe to osg-users googlegroup

2021-04-04 Thread merspieler
On Sun, Apr 04, 2021 at 05:09:29PM +0100, Robert Osfield wrote:
> On Sun, 4 Apr 2021 at 15:13, merspieler  wrote:
> 
> > Following the link [1] I don't see a subscribe button.
> >
> 
> Do you not see any "Join group" or "Sign in" option?

I have to sign in? Then I'm out of luck...
I can't create an account either cause it asks
for a phone number which I don't have.

(and even if I'd have one, I certainly wouldn't want
to give that to one of the G-MAFIA cause...
https://twitter.com/UnderTheBreach/status/1378314424239460352
)


signature.asc
Description: PGP signature
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Closing of osg-users@lists.openscenegraph.org, please subscribe to osg-users googlegroup

2021-04-04 Thread Robert Osfield
On Sun, 4 Apr 2021 at 15:13, merspieler  wrote:

> Following the link [1] I don't see a subscribe button.
>

Do you not see any "Join group" or "Sign in" option?

Could you check other groups to see if there is anything different.

As far as I can see all the options for new subscriptions are enabled.
Others have successfully subscribed this afternoon.

Cheers,
Robert.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Closing of osg-users@lists.openscenegraph.org, please subscribe to osg-users googlegroup

2021-04-04 Thread merspieler
On Sun, Apr 04, 2021 at 01:27:30PM +0100, Robert Osfield wrote:
> On Sun, 4 Apr 2021 at 13:08, merspieler  wrote:
> 
> > What about those who can't use the google mailing list?
> >
> 
> I'm sorry I can't support folks for free on a platform that is requiring so
> much of time to keep free of spam/misuse. I've supported this osg-users
> mailing list for free for 20 years, unfortunately it's now become
> impractical to continue support.  I wouldn't be taking this step if it
> hasn't become a serious issue at my end.

I totally understand the issue you're facing.

> As for can't use a google group, could you explain what issues you have
> with subscribing and using the google group?  Perhaps others can help
> suggest a way to use it.

Following the link [1] I don't see a subscribe button.

[1] https://groups.google.com/g/osg-users


signature.asc
Description: PGP signature
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Closing of osg-users@lists.openscenegraph.org, please subscribe to osg-users googlegroup

2021-04-04 Thread Robert Osfield
Hi Werner,

I am aware that google groups is far from ideal, falling back to at all is
really a sign of how poorly the developer world is served on the support
front.  Hopefully, one day there will be robust and easy to use/support
alternatively for forum/mailing list support so we can migrate over.

In the case of the google group, it isn't limited to gmail addresses/google
account you can subscribe with any email address you want.  Most of the
existing osg-users google group subscribed email addresses have nothing to
do with gmail.

Cheers,
Robert.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Closing of osg-users@lists.openscenegraph.org, please subscribe to osg-users googlegroup

2021-04-04 Thread Werner Modenbach
Hi Robert,

you have my full understanding. It's a pity with bots, spam, hate etc. in the 
Internet.
On the other hand, it is almost impossible to escape the data octopus Google.
I refrain from using Google Mail, Office, Calendar, Addressbook and others.
 If you use it, you have to agree in taking your privacy into public.
By using Android it's not possible to uninstall useless Google apps and you 
have to allow
access to your addresses, calendars, messages and a lot more. You cannot get 
updates
without having a Google account.
I cannot even create a new fantasy account for the mailing lists because under 
the hood
they are all merged and form an overall knowledge about my personality. :-(

But sure, it's convenient - no question.

It is also clear you cannot fight against this Internet spam on your own lists. 
So sad ...

But the osg list was always an extremely valuable resource for my development 
and
the vsg list will be the same for me in future. So I have no choice.

- Werner -

Am 04.04.2021 um 14:27 schrieb Robert Osfield:
> On Sun, 4 Apr 2021 at 13:08, merspieler  wrote:
>
> What about those who can't use the google mailing list?
>
>
> I'm sorry I can't support folks for free on a platform that is requiring so 
> much of time to keep free of spam/misuse. I've supported this osg-users 
> mailing list for free for 20
> years, unfortunately it's now become impractical to continue support.  I 
> wouldn't be taking this step if it hasn't become a serious issue at my end.
>
> As for can't use a google group, could you explain what issues you have with 
> subscribing and using the google group?  Perhaps others can help suggest a 
> way to use it.
>
> Cheers,
> Robert.
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Closing of osg-users@lists.openscenegraph.org, please subscribe to osg-users googlegroup

2021-04-04 Thread Robert Osfield
On Sun, 4 Apr 2021 at 13:08, merspieler  wrote:

> What about those who can't use the google mailing list?
>

I'm sorry I can't support folks for free on a platform that is requiring so
much of time to keep free of spam/misuse. I've supported this osg-users
mailing list for free for 20 years, unfortunately it's now become
impractical to continue support.  I wouldn't be taking this step if it
hasn't become a serious issue at my end.

As for can't use a google group, could you explain what issues you have
with subscribing and using the google group?  Perhaps others can help
suggest a way to use it.

Cheers,
Robert.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Closing of osg-users@lists.openscenegraph.org, please subscribe to osg-users googlegroup

2021-04-04 Thread merspieler
What about those who can't use the google mailing list?

On Sun, Apr 04, 2021 at 12:40:16PM +0100, Robert Osfield wrote:
> Hi All,
> 
> I have managed the osg-users mailing list for two decades with little
> issues along the way, it mostly has just looked after itself.  Alas today
> is the last day as it's become an attack vector for bots to an extent that
> it's swamping my support work.  I'll be deleting the list later today, for
> those that wish to continue with support please subscribe to the osg-users
> google group:
> 
> https://groups.google.com/g/osg-users
> 
> This has become necessary as this year the osg-users and osg-submissions
> lists have been under increasing target for nefarious bots that have been
> attempting to subscribe a broad range of email addresses.   It's now become
> a deluge - I'm getting notifications of new attempts as I type this
> message, and unfortunately there isn't any means I can find for mailman to
> thwart this type of broad attack, so it's requiring an ever increasing
> amount of manual work from me to clear the backlog of requests.
> 
> There's also no way for me to know whether an address is a genuine
> subscription so unfortunately there may be rejection that has happened
> because the subscriptions are swamped by dozens of fake ones, many which
> are plausible addresses.
> 
> I'm a C++/OpenGL/Vulkan programmer playing wack a mole with bots trying to
> abuse the community just isn't a good use of my time nor helpful for the
> osg-users community.  The osg-users google group doesn't look to be
> affected by this attack vector so it'll be a far better place for us to
> discuss OSG topics without the overhead of admin that the old mailman lists
> now involve.
> 
> I have already deleted the osg-submissions list as it's no longer active -
> github.com PR's have taken over for quite a while now.
> 
> I will leave the osg-uses mailing list up for the test of today.  Then
> delete it later today or tomorrow morning.
> 
> Thanks for your patience,
> Robert.

> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org



signature.asc
Description: PGP signature
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Closing of osg-users@lists.openscenegraph.org, please subscribe to osg-users googlegroup

2021-04-04 Thread Robert Osfield
Hi All,

I have managed the osg-users mailing list for two decades with little
issues along the way, it mostly has just looked after itself.  Alas today
is the last day as it's become an attack vector for bots to an extent that
it's swamping my support work.  I'll be deleting the list later today, for
those that wish to continue with support please subscribe to the osg-users
google group:

https://groups.google.com/g/osg-users

This has become necessary as this year the osg-users and osg-submissions
lists have been under increasing target for nefarious bots that have been
attempting to subscribe a broad range of email addresses.   It's now become
a deluge - I'm getting notifications of new attempts as I type this
message, and unfortunately there isn't any means I can find for mailman to
thwart this type of broad attack, so it's requiring an ever increasing
amount of manual work from me to clear the backlog of requests.

There's also no way for me to know whether an address is a genuine
subscription so unfortunately there may be rejection that has happened
because the subscriptions are swamped by dozens of fake ones, many which
are plausible addresses.

I'm a C++/OpenGL/Vulkan programmer playing wack a mole with bots trying to
abuse the community just isn't a good use of my time nor helpful for the
osg-users community.  The osg-users google group doesn't look to be
affected by this attack vector so it'll be a far better place for us to
discuss OSG topics without the overhead of admin that the old mailman lists
now involve.

I have already deleted the osg-submissions list as it's no longer active -
github.com PR's have taken over for quite a while now.

I will leave the osg-uses mailing list up for the test of today.  Then
delete it later today or tomorrow morning.

Thanks for your patience,
Robert.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Placing OSG graphics in an FLTK Fl_Gl_Window

2021-04-02 Thread Robert Kiser
My apologies in advance if what I am asking for is either preposterous or 
un-achievable.

I was wanting to use the FLTK forms package as a frontend for for a 
visualization of a finite element (FEA) model using osg as the rendering 
agent.

As a start, I was able to get the provided example code: osgviewerFLTK 
compiled, linked and running and it did well.  (Did this on Windows 10 
using Visual Studio 2019)  But, as per design, it creates its own window.

What I was hoping to do was create a simple FLTK form and place an 
Fl_Gl_Window on it and then have osg place the rendering in that window (or 
some similar FLTK widget).  That way, using buttons, menus, etc. I could 
control the rendering to my liking.

I have already done something similar using a VB.Net form with a C++ DLL 
backend, but was wanting to transition to an all C++ solution and how to do 
it with FLTK presently escapes me.

I was hoping that one of the members here had already plowed that ground 
and could post a bare-bones example of how they did it.

Your help would be most appreciated.

Thanks,

Bob Kiser


-- 
You received this message because you are subscribed to the Google Groups 
"OpenSceneGraph Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to osg-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/osg-users/c6ddad69-a74a-42ab-9965-176122065195n%40googlegroups.com.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Depth and Color buffer attachemnts do not play along together

2021-03-30 Thread Trajce Nikolov NICK
Actually it worked after rethinking it. Thanks Glenn

On Tue, Mar 30, 2021, 17:10 Trajce Nikolov NICK <
trajce.nikolov.n...@gmail.com> wrote:

> Thanks Glenn. How this will work with setting the render target
> implementation to the main view camera? I am trying to avoid multiple
> cameras and I am not sure this is doable
>
> On Tue, Mar 30, 2021, 15:07 Glenn Waldron  wrote:
>
>> Nick,
>> Pretty sure you can only attach one texture to a FRAME_BUFFER render
>> target. And in that case, it is just copying the framebuffer to your
>> texture after rendering it. Consider using a FRAME_BUFFER_OBJECT instead.
>>
>> On Monday, March 29, 2021 at 10:45:27 PM UTC-4 trajce.ni...@gmail.com
>> wrote:
>>
>>> Nonone on this? Robert?
>>>
>>> Thank you
>>> Nick
>>>
>>> On Sun, Mar 28, 2021 at 5:24 PM Trajce Nikolov NICK <
>>> trajce.ni...@gmail.com> wrote:
>>>
 Attached is the minimal code that reproduce the problem

 Thanks a bunch as always!

 Nick

 On Sun, Mar 28, 2021 at 2:49 PM Trajce Nikolov NICK <
 trajce.ni...@gmail.com> wrote:

> Hi Community,
>
> I am attaching to the main camera DepthBuffer and ColorBuffer as
> Texture2D - attached is the setup. I also have shader to check the depth
> buffer - so it is ok as on the image. And I am displaying it on a quad. 
> The
> depth buffer is still getting me zeros when the colorbuffer is attached,
> otherwise when it is not, then it works as it should.
>
> Any hints?
>
> mOsgExternalDepth = new osg::Texture2D;
> mOsgExternalDepth->setSourceFormat(GL_DEPTH_COMPONENT);
> mOsgExternalDepth->setSourceType(GL_FLOAT);
> mOsgExternalDepth->setInternalFormat(GL_DEPTH_COMPONENT32F);
> mOsgExternalDepth->setTextureWidth(screenWidth);
> mOsgExternalDepth->setTextureHeight(screenHeight);
> mOsgExternalDepth->setResizeNonPowerOfTwoHint(false);\
>
> mOsgExternalColor = new osg::Texture2D;
> mOsgExternalColor->setInternalFormat(GL_RGBA16F_ARB);
> mOsgExternalColor->setSourceFormat(GL_RGBA);
> mOsgExternalColor->setSourceType(GL_FLOAT);
> mOsgExternalColor->setTextureWidth(screenWidth);
> mOsgExternalColor->setTextureHeight(screenHeight);
> mOsgExternalColor->setResizeNonPowerOfTwoHint(false);
>
> mainCamera->attach(osg::Camera::COLOR_BUFFER,
> (osg::Texture*)mOsgExternalColor);
> mainCamera->attach(osg::Camera::DEPTH_BUFFER,
> (osg::Texture*)mOsgExternalDepth);
>
> osg::ref_ptr camera = new osg::Camera;
> camera->setProjectionMatrix(osg::Matrixd::ortho2D(0, screenWidth, 0,
> screenHeight));
> camera->setReferenceFrame(osg::Transform::ABSOLUTE_RF);
> camera->setViewMatrix(osg::Matrixd::identity());
> camera->setClearMask(0);
> camera->setRenderOrder(osg::Camera::POST_RENDER);
> camera->setAllowEventFocus(false);
>
>
> context.getImageGenerator()->getViewer()->getView(0)->getSceneData()->asGroup()->addChild(camera);
>
> osg::ref_ptr quad =
> osg::createTexturedQuadGeometry(osg::Vec3(0, 0, 0),
> osg::Vec3(screenWidth/2, 0, 0), osg::Vec3(0, screenHeight/2, 0));
> quad->getOrCreateStateSet()->setMode(GL_LIGHTING,
> osg::StateAttribute::OFF);
> quad->getOrCreateStateSet()->setTextureAttributeAndModes(0,
> mOsgExternalDepth);
>
> const std::string vertShader = ""\
> "void main() "\
> "{ "\
> " gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex; "\
> " gl_TexCoord[0] = gl_TextureMatrix[0] *gl_MultiTexCoord0;"\
> "}";
>
> const std::string fragShader = ""\
> "uniform sampler2D texture0; "\
> "void main() "\
> "{ "\
> " float d = texture2D( texture0, gl_TexCoord[0].xy ).x; "\
> " gl_FragColor = vec4(d, d, d, 1); "\
> "}";
>
> osg::ref_ptr vert = new osg::Shader(osg::Shader::VERTEX,
> vertShader);
> osg::ref_ptr frag = new
> osg::Shader(osg::Shader::FRAGMENT, fragShader);
>
> osg::ref_ptr program = new osg::Program;
> program->addShader(vert);
> program->addShader(frag);
>
> quad->getOrCreateStateSet()->setAttributeAndModes(program);
> quad->getOrCreateStateSet()->addUniform(new
> osg::Uniform(osg::Uniform::SAMPLER_2D, "texture0", 0));
> osg::ref_ptr quadColor =
> osg::createTexturedQuadGeometry(osg::Vec3(screenWidth / 2, 0, 0),
> osg::Vec3(screenWidth/2 , 0, 0), osg::Vec3(0, screenHeight/2, 0));
> quadColor->getOrCreateStateSet()->setMode(GL_LIGHTING,
> osg::StateAttribute::OFF);
> quadColor->getOrCreateStateSet()->setTextureAttributeAndModes(0,
> mOsgExternalColor);
>
> camera->addChild(quadColor);
> camera->addChild(quad);
>
> --
> trajce nikolov nick
>


 --
 trajce nikolov nick

>>>
>>>
>>> --
>>> trajce nikolov nick
>>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "OpenSceneGraph Users" group.
>> To unsubscribe from this group 

Re: [osg-users] Depth and Color buffer attachemnts do not play along together

2021-03-30 Thread Trajce Nikolov NICK
Thanks Glenn. How this will work with setting the render target
implementation to the main view camera? I am trying to avoid multiple
cameras and I am not sure this is doable

On Tue, Mar 30, 2021, 15:07 Glenn Waldron  wrote:

> Nick,
> Pretty sure you can only attach one texture to a FRAME_BUFFER render
> target. And in that case, it is just copying the framebuffer to your
> texture after rendering it. Consider using a FRAME_BUFFER_OBJECT instead.
>
> On Monday, March 29, 2021 at 10:45:27 PM UTC-4 trajce.ni...@gmail.com
> wrote:
>
>> Nonone on this? Robert?
>>
>> Thank you
>> Nick
>>
>> On Sun, Mar 28, 2021 at 5:24 PM Trajce Nikolov NICK <
>> trajce.ni...@gmail.com> wrote:
>>
>>> Attached is the minimal code that reproduce the problem
>>>
>>> Thanks a bunch as always!
>>>
>>> Nick
>>>
>>> On Sun, Mar 28, 2021 at 2:49 PM Trajce Nikolov NICK <
>>> trajce.ni...@gmail.com> wrote:
>>>
 Hi Community,

 I am attaching to the main camera DepthBuffer and ColorBuffer as
 Texture2D - attached is the setup. I also have shader to check the depth
 buffer - so it is ok as on the image. And I am displaying it on a quad. The
 depth buffer is still getting me zeros when the colorbuffer is attached,
 otherwise when it is not, then it works as it should.

 Any hints?

 mOsgExternalDepth = new osg::Texture2D;
 mOsgExternalDepth->setSourceFormat(GL_DEPTH_COMPONENT);
 mOsgExternalDepth->setSourceType(GL_FLOAT);
 mOsgExternalDepth->setInternalFormat(GL_DEPTH_COMPONENT32F);
 mOsgExternalDepth->setTextureWidth(screenWidth);
 mOsgExternalDepth->setTextureHeight(screenHeight);
 mOsgExternalDepth->setResizeNonPowerOfTwoHint(false);\

 mOsgExternalColor = new osg::Texture2D;
 mOsgExternalColor->setInternalFormat(GL_RGBA16F_ARB);
 mOsgExternalColor->setSourceFormat(GL_RGBA);
 mOsgExternalColor->setSourceType(GL_FLOAT);
 mOsgExternalColor->setTextureWidth(screenWidth);
 mOsgExternalColor->setTextureHeight(screenHeight);
 mOsgExternalColor->setResizeNonPowerOfTwoHint(false);

 mainCamera->attach(osg::Camera::COLOR_BUFFER,
 (osg::Texture*)mOsgExternalColor);
 mainCamera->attach(osg::Camera::DEPTH_BUFFER,
 (osg::Texture*)mOsgExternalDepth);

 osg::ref_ptr camera = new osg::Camera;
 camera->setProjectionMatrix(osg::Matrixd::ortho2D(0, screenWidth, 0,
 screenHeight));
 camera->setReferenceFrame(osg::Transform::ABSOLUTE_RF);
 camera->setViewMatrix(osg::Matrixd::identity());
 camera->setClearMask(0);
 camera->setRenderOrder(osg::Camera::POST_RENDER);
 camera->setAllowEventFocus(false);


 context.getImageGenerator()->getViewer()->getView(0)->getSceneData()->asGroup()->addChild(camera);

 osg::ref_ptr quad =
 osg::createTexturedQuadGeometry(osg::Vec3(0, 0, 0),
 osg::Vec3(screenWidth/2, 0, 0), osg::Vec3(0, screenHeight/2, 0));
 quad->getOrCreateStateSet()->setMode(GL_LIGHTING,
 osg::StateAttribute::OFF);
 quad->getOrCreateStateSet()->setTextureAttributeAndModes(0,
 mOsgExternalDepth);

 const std::string vertShader = ""\
 "void main() "\
 "{ "\
 " gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex; "\
 " gl_TexCoord[0] = gl_TextureMatrix[0] *gl_MultiTexCoord0;"\
 "}";

 const std::string fragShader = ""\
 "uniform sampler2D texture0; "\
 "void main() "\
 "{ "\
 " float d = texture2D( texture0, gl_TexCoord[0].xy ).x; "\
 " gl_FragColor = vec4(d, d, d, 1); "\
 "}";

 osg::ref_ptr vert = new osg::Shader(osg::Shader::VERTEX,
 vertShader);
 osg::ref_ptr frag = new osg::Shader(osg::Shader::FRAGMENT,
 fragShader);

 osg::ref_ptr program = new osg::Program;
 program->addShader(vert);
 program->addShader(frag);

 quad->getOrCreateStateSet()->setAttributeAndModes(program);
 quad->getOrCreateStateSet()->addUniform(new
 osg::Uniform(osg::Uniform::SAMPLER_2D, "texture0", 0));
 osg::ref_ptr quadColor =
 osg::createTexturedQuadGeometry(osg::Vec3(screenWidth / 2, 0, 0),
 osg::Vec3(screenWidth/2 , 0, 0), osg::Vec3(0, screenHeight/2, 0));
 quadColor->getOrCreateStateSet()->setMode(GL_LIGHTING,
 osg::StateAttribute::OFF);
 quadColor->getOrCreateStateSet()->setTextureAttributeAndModes(0,
 mOsgExternalColor);

 camera->addChild(quadColor);
 camera->addChild(quad);

 --
 trajce nikolov nick

>>>
>>>
>>> --
>>> trajce nikolov nick
>>>
>>
>>
>> --
>> trajce nikolov nick
>>
> --
> You received this message because you are subscribed to the Google Groups
> "OpenSceneGraph Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to osg-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/osg-users/64c1877d-50c2-4fad-801d-41cd63529376n%40googlegroups.com
> 

Re: [osg-users] Depth and Color buffer attachemnts do not play along together

2021-03-30 Thread Glenn Waldron
Nick,
Pretty sure you can only attach one texture to a FRAME_BUFFER render 
target. And in that case, it is just copying the framebuffer to your 
texture after rendering it. Consider using a FRAME_BUFFER_OBJECT instead.

On Monday, March 29, 2021 at 10:45:27 PM UTC-4 trajce.ni...@gmail.com wrote:

> Nonone on this? Robert?
>
> Thank you
> Nick
>
> On Sun, Mar 28, 2021 at 5:24 PM Trajce Nikolov NICK <
> trajce.ni...@gmail.com> wrote:
>
>> Attached is the minimal code that reproduce the problem
>>
>> Thanks a bunch as always!
>>
>> Nick
>>
>> On Sun, Mar 28, 2021 at 2:49 PM Trajce Nikolov NICK <
>> trajce.ni...@gmail.com> wrote:
>>
>>> Hi Community,
>>>
>>> I am attaching to the main camera DepthBuffer and ColorBuffer as 
>>> Texture2D - attached is the setup. I also have shader to check the depth 
>>> buffer - so it is ok as on the image. And I am displaying it on a quad. The 
>>> depth buffer is still getting me zeros when the colorbuffer is attached, 
>>> otherwise when it is not, then it works as it should.
>>>
>>> Any hints?
>>>
>>> mOsgExternalDepth = new osg::Texture2D;
>>> mOsgExternalDepth->setSourceFormat(GL_DEPTH_COMPONENT);
>>> mOsgExternalDepth->setSourceType(GL_FLOAT);
>>> mOsgExternalDepth->setInternalFormat(GL_DEPTH_COMPONENT32F);
>>> mOsgExternalDepth->setTextureWidth(screenWidth);
>>> mOsgExternalDepth->setTextureHeight(screenHeight);
>>> mOsgExternalDepth->setResizeNonPowerOfTwoHint(false);\
>>>
>>> mOsgExternalColor = new osg::Texture2D; 
>>> mOsgExternalColor->setInternalFormat(GL_RGBA16F_ARB);
>>> mOsgExternalColor->setSourceFormat(GL_RGBA);
>>> mOsgExternalColor->setSourceType(GL_FLOAT);
>>> mOsgExternalColor->setTextureWidth(screenWidth);
>>> mOsgExternalColor->setTextureHeight(screenHeight);
>>> mOsgExternalColor->setResizeNonPowerOfTwoHint(false);
>>>
>>> mainCamera->attach(osg::Camera::COLOR_BUFFER, 
>>> (osg::Texture*)mOsgExternalColor);
>>> mainCamera->attach(osg::Camera::DEPTH_BUFFER, 
>>> (osg::Texture*)mOsgExternalDepth);
>>>
>>> osg::ref_ptr camera = new osg::Camera;
>>> camera->setProjectionMatrix(osg::Matrixd::ortho2D(0, screenWidth, 0, 
>>> screenHeight));
>>> camera->setReferenceFrame(osg::Transform::ABSOLUTE_RF);
>>> camera->setViewMatrix(osg::Matrixd::identity());
>>> camera->setClearMask(0);
>>> camera->setRenderOrder(osg::Camera::POST_RENDER);
>>> camera->setAllowEventFocus(false);
>>>
>>>
>>> context.getImageGenerator()->getViewer()->getView(0)->getSceneData()->asGroup()->addChild(camera);
>>>  
>>>
>>> osg::ref_ptr quad = 
>>> osg::createTexturedQuadGeometry(osg::Vec3(0, 0, 0), 
>>> osg::Vec3(screenWidth/2, 0, 0), osg::Vec3(0, screenHeight/2, 0));
>>> quad->getOrCreateStateSet()->setMode(GL_LIGHTING, 
>>> osg::StateAttribute::OFF);
>>> quad->getOrCreateStateSet()->setTextureAttributeAndModes(0, 
>>> mOsgExternalDepth);
>>>
>>> const std::string vertShader = ""\
>>> "void main() "\
>>> "{ "\
>>> " gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex; "\
>>> " gl_TexCoord[0] = gl_TextureMatrix[0] *gl_MultiTexCoord0;"\
>>> "}";
>>>
>>> const std::string fragShader = ""\
>>> "uniform sampler2D texture0; "\
>>> "void main() "\
>>> "{ "\
>>> " float d = texture2D( texture0, gl_TexCoord[0].xy ).x; "\
>>> " gl_FragColor = vec4(d, d, d, 1); "\
>>> "}";
>>>
>>> osg::ref_ptr vert = new osg::Shader(osg::Shader::VERTEX, 
>>> vertShader);
>>> osg::ref_ptr frag = new osg::Shader(osg::Shader::FRAGMENT, 
>>> fragShader);
>>>
>>> osg::ref_ptr program = new osg::Program;
>>> program->addShader(vert);
>>> program->addShader(frag);
>>>
>>> quad->getOrCreateStateSet()->setAttributeAndModes(program);
>>> quad->getOrCreateStateSet()->addUniform(new 
>>> osg::Uniform(osg::Uniform::SAMPLER_2D, "texture0", 0));
>>> osg::ref_ptr quadColor = 
>>> osg::createTexturedQuadGeometry(osg::Vec3(screenWidth / 2, 0, 0), 
>>> osg::Vec3(screenWidth/2 , 0, 0), osg::Vec3(0, screenHeight/2, 0));
>>> quadColor->getOrCreateStateSet()->setMode(GL_LIGHTING, 
>>> osg::StateAttribute::OFF);
>>> quadColor->getOrCreateStateSet()->setTextureAttributeAndModes(0, 
>>> mOsgExternalColor);
>>>
>>> camera->addChild(quadColor);
>>> camera->addChild(quad);
>>>
>>> -- 
>>> trajce nikolov nick
>>>
>>
>>
>> -- 
>> trajce nikolov nick
>>
>
>
> -- 
> trajce nikolov nick
>

-- 
You received this message because you are subscribed to the Google Groups 
"OpenSceneGraph Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to osg-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/osg-users/64c1877d-50c2-4fad-801d-41cd63529376n%40googlegroups.com.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Depth and Color buffer attachemnts do not play along together

2021-03-29 Thread Trajce Nikolov NICK
Nonone on this? Robert?

Thank you
Nick

On Sun, Mar 28, 2021 at 5:24 PM Trajce Nikolov NICK <
trajce.nikolov.n...@gmail.com> wrote:

> Attached is the minimal code that reproduce the problem
>
> Thanks a bunch as always!
>
> Nick
>
> On Sun, Mar 28, 2021 at 2:49 PM Trajce Nikolov NICK <
> trajce.nikolov.n...@gmail.com> wrote:
>
>> Hi Community,
>>
>> I am attaching to the main camera DepthBuffer and ColorBuffer as
>> Texture2D - attached is the setup. I also have shader to check the depth
>> buffer - so it is ok as on the image. And I am displaying it on a quad. The
>> depth buffer is still getting me zeros when the colorbuffer is attached,
>> otherwise when it is not, then it works as it should.
>>
>> Any hints?
>>
>> mOsgExternalDepth = new osg::Texture2D;
>> mOsgExternalDepth->setSourceFormat(GL_DEPTH_COMPONENT);
>> mOsgExternalDepth->setSourceType(GL_FLOAT);
>> mOsgExternalDepth->setInternalFormat(GL_DEPTH_COMPONENT32F);
>> mOsgExternalDepth->setTextureWidth(screenWidth);
>> mOsgExternalDepth->setTextureHeight(screenHeight);
>> mOsgExternalDepth->setResizeNonPowerOfTwoHint(false);\
>>
>> mOsgExternalColor = new osg::Texture2D;
>> mOsgExternalColor->setInternalFormat(GL_RGBA16F_ARB);
>> mOsgExternalColor->setSourceFormat(GL_RGBA);
>> mOsgExternalColor->setSourceType(GL_FLOAT);
>> mOsgExternalColor->setTextureWidth(screenWidth);
>> mOsgExternalColor->setTextureHeight(screenHeight);
>> mOsgExternalColor->setResizeNonPowerOfTwoHint(false);
>>
>> mainCamera->attach(osg::Camera::COLOR_BUFFER,
>> (osg::Texture*)mOsgExternalColor);
>> mainCamera->attach(osg::Camera::DEPTH_BUFFER,
>> (osg::Texture*)mOsgExternalDepth);
>>
>> osg::ref_ptr camera = new osg::Camera;
>> camera->setProjectionMatrix(osg::Matrixd::ortho2D(0, screenWidth, 0,
>> screenHeight));
>> camera->setReferenceFrame(osg::Transform::ABSOLUTE_RF);
>> camera->setViewMatrix(osg::Matrixd::identity());
>> camera->setClearMask(0);
>> camera->setRenderOrder(osg::Camera::POST_RENDER);
>> camera->setAllowEventFocus(false);
>>
>>
>> context.getImageGenerator()->getViewer()->getView(0)->getSceneData()->asGroup()->addChild(camera);
>>
>> osg::ref_ptr quad =
>> osg::createTexturedQuadGeometry(osg::Vec3(0, 0, 0),
>> osg::Vec3(screenWidth/2, 0, 0), osg::Vec3(0, screenHeight/2, 0));
>> quad->getOrCreateStateSet()->setMode(GL_LIGHTING,
>> osg::StateAttribute::OFF);
>> quad->getOrCreateStateSet()->setTextureAttributeAndModes(0,
>> mOsgExternalDepth);
>>
>> const std::string vertShader = ""\
>> "void main() "\
>> "{ "\
>> " gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex; "\
>> " gl_TexCoord[0] = gl_TextureMatrix[0] *gl_MultiTexCoord0;"\
>> "}";
>>
>> const std::string fragShader = ""\
>> "uniform sampler2D texture0; "\
>> "void main() "\
>> "{ "\
>> " float d = texture2D( texture0, gl_TexCoord[0].xy ).x; "\
>> " gl_FragColor = vec4(d, d, d, 1); "\
>> "}";
>>
>> osg::ref_ptr vert = new osg::Shader(osg::Shader::VERTEX,
>> vertShader);
>> osg::ref_ptr frag = new osg::Shader(osg::Shader::FRAGMENT,
>> fragShader);
>>
>> osg::ref_ptr program = new osg::Program;
>> program->addShader(vert);
>> program->addShader(frag);
>>
>> quad->getOrCreateStateSet()->setAttributeAndModes(program);
>> quad->getOrCreateStateSet()->addUniform(new
>> osg::Uniform(osg::Uniform::SAMPLER_2D, "texture0", 0));
>> osg::ref_ptr quadColor =
>> osg::createTexturedQuadGeometry(osg::Vec3(screenWidth / 2, 0, 0),
>> osg::Vec3(screenWidth/2 , 0, 0), osg::Vec3(0, screenHeight/2, 0));
>> quadColor->getOrCreateStateSet()->setMode(GL_LIGHTING,
>> osg::StateAttribute::OFF);
>> quadColor->getOrCreateStateSet()->setTextureAttributeAndModes(0,
>> mOsgExternalColor);
>>
>> camera->addChild(quadColor);
>> camera->addChild(quad);
>>
>> --
>> trajce nikolov nick
>>
>
>
> --
> trajce nikolov nick
>


-- 
trajce nikolov nick

-- 
You received this message because you are subscribed to the Google Groups 
"OpenSceneGraph Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to osg-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/osg-users/CAO-%2Bzim8AG_PaxkzoRdKDEvMMtvykWW6aFy0OE6K%3DNP47PHB9A%40mail.gmail.com.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] querying stats

2021-03-29 Thread Werner Modenbach
Hi all!

I try querying stats for each frame. Unfortunately all values stay at 0.0. Any 
Ideas?

here is my code, mainly copied from the StatsHandler:

Initialisation:

#ifdefPROFILE_FRAMES

osgViewer::ViewerBase::Camerascameras;

Viewer::getCameras(cameras);

Viewer::getViewerStats()->collectStats("update",true);

for(osgViewer::ViewerBase::Cameras::iteratoritr=cameras.begin();

itr!=cameras.end();

++itr)

{

if((*itr)->getStats())(*itr)->getStats()->collectStats("rendering",true);

if((*itr)->getStats())(*itr)->getStats()->collectStats("gpu",true);

}

#endif

After each frame the query:

#ifdefPROFILE_FRAMES

osgViewer::ViewerBase::Camerascameras;

Viewer::getCameras(cameras);

intframeNumber=Viewer::getViewerStats()->getLatestFrameNumber();

doubleupdateTime{0.0};

doublerenderingTime{0.0};

doublegpuTime{0.0};

Viewer::getViewerStats()->getAttribute(frameNumber,std::string("update"),updateTime);

for(osgViewer::ViewerBase::Cameras::iteratoritr=cameras.begin();

itr!=cameras.end();

++itr)

{

doubletmp{0.0};

if((*itr)->getStats()){

if((*itr)->getStats()->getAttribute(frameNumber,std::string("rendering"),tmp))

renderingTime+=tmp;

if((*itr)->getStats()->getAttribute(frameNumber,std::string("gpu"),tmp))

gpuTime+=tmp;

}

}

std::cout<<"update:"<___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Depth and Color buffer attachemnts do not play along together

2021-03-28 Thread Trajce Nikolov NICK
Attached is the minimal code that reproduce the problem

Thanks a bunch as always!

Nick

On Sun, Mar 28, 2021 at 2:49 PM Trajce Nikolov NICK <
trajce.nikolov.n...@gmail.com> wrote:

> Hi Community,
>
> I am attaching to the main camera DepthBuffer and ColorBuffer as Texture2D
> - attached is the setup. I also have shader to check the depth buffer - so
> it is ok as on the image. And I am displaying it on a quad. The depth
> buffer is still getting me zeros when the colorbuffer is attached,
> otherwise when it is not, then it works as it should.
>
> Any hints?
>
> mOsgExternalDepth = new osg::Texture2D;
> mOsgExternalDepth->setSourceFormat(GL_DEPTH_COMPONENT);
> mOsgExternalDepth->setSourceType(GL_FLOAT);
> mOsgExternalDepth->setInternalFormat(GL_DEPTH_COMPONENT32F);
> mOsgExternalDepth->setTextureWidth(screenWidth);
> mOsgExternalDepth->setTextureHeight(screenHeight);
> mOsgExternalDepth->setResizeNonPowerOfTwoHint(false);\
>
> mOsgExternalColor = new osg::Texture2D;
> mOsgExternalColor->setInternalFormat(GL_RGBA16F_ARB);
> mOsgExternalColor->setSourceFormat(GL_RGBA);
> mOsgExternalColor->setSourceType(GL_FLOAT);
> mOsgExternalColor->setTextureWidth(screenWidth);
> mOsgExternalColor->setTextureHeight(screenHeight);
> mOsgExternalColor->setResizeNonPowerOfTwoHint(false);
>
> mainCamera->attach(osg::Camera::COLOR_BUFFER,
> (osg::Texture*)mOsgExternalColor);
> mainCamera->attach(osg::Camera::DEPTH_BUFFER,
> (osg::Texture*)mOsgExternalDepth);
>
> osg::ref_ptr camera = new osg::Camera;
> camera->setProjectionMatrix(osg::Matrixd::ortho2D(0, screenWidth, 0,
> screenHeight));
> camera->setReferenceFrame(osg::Transform::ABSOLUTE_RF);
> camera->setViewMatrix(osg::Matrixd::identity());
> camera->setClearMask(0);
> camera->setRenderOrder(osg::Camera::POST_RENDER);
> camera->setAllowEventFocus(false);
>
>
> context.getImageGenerator()->getViewer()->getView(0)->getSceneData()->asGroup()->addChild(camera);
>
> osg::ref_ptr quad =
> osg::createTexturedQuadGeometry(osg::Vec3(0, 0, 0),
> osg::Vec3(screenWidth/2, 0, 0), osg::Vec3(0, screenHeight/2, 0));
> quad->getOrCreateStateSet()->setMode(GL_LIGHTING,
> osg::StateAttribute::OFF);
> quad->getOrCreateStateSet()->setTextureAttributeAndModes(0,
> mOsgExternalDepth);
>
> const std::string vertShader = ""\
> "void main() "\
> "{ "\
> " gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex; "\
> " gl_TexCoord[0] = gl_TextureMatrix[0] *gl_MultiTexCoord0;"\
> "}";
>
> const std::string fragShader = ""\
> "uniform sampler2D texture0; "\
> "void main() "\
> "{ "\
> " float d = texture2D( texture0, gl_TexCoord[0].xy ).x; "\
> " gl_FragColor = vec4(d, d, d, 1); "\
> "}";
>
> osg::ref_ptr vert = new osg::Shader(osg::Shader::VERTEX,
> vertShader);
> osg::ref_ptr frag = new osg::Shader(osg::Shader::FRAGMENT,
> fragShader);
>
> osg::ref_ptr program = new osg::Program;
> program->addShader(vert);
> program->addShader(frag);
>
> quad->getOrCreateStateSet()->setAttributeAndModes(program);
> quad->getOrCreateStateSet()->addUniform(new
> osg::Uniform(osg::Uniform::SAMPLER_2D, "texture0", 0));
> osg::ref_ptr quadColor =
> osg::createTexturedQuadGeometry(osg::Vec3(screenWidth / 2, 0, 0),
> osg::Vec3(screenWidth/2 , 0, 0), osg::Vec3(0, screenHeight/2, 0));
> quadColor->getOrCreateStateSet()->setMode(GL_LIGHTING,
> osg::StateAttribute::OFF);
> quadColor->getOrCreateStateSet()->setTextureAttributeAndModes(0,
> mOsgExternalColor);
>
> camera->addChild(quadColor);
> camera->addChild(quad);
>
> --
> trajce nikolov nick
>


-- 
trajce nikolov nick

-- 
You received this message because you are subscribed to the Google Groups 
"OpenSceneGraph Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to osg-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/osg-users/CAO-%2BzimhqOZ0Yok6hMFWtXR3MsXeVFod7fUnHTc-vXFcg3dgtA%40mail.gmail.com.
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2010 Robert Osfield
 *
 * This application is open source and may be redistributed and/or modified
 * freely and without restriction, both in commercial and non commercial 
applications,
 * as long as this copyright notice is maintained.
 *
 * This application is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*/

#include 
#include 
#include 

#include 
#include 
#include 

#include 
#include 

#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 

#include 

#include 

void createScene(osgViewer::Viewer* viewer)
{
osg::GraphicsContext::WindowingSystemInterface* wsi = 
osg::GraphicsContext::getWindowingSystemInterface();
if (!wsi)
{
osg::notify(osg::NOTICE) << "Error, no WindowingSystemInterface 
available, cannot create windows." << std::endl;
return;
}

unsigned int screenWidth;
unsigned int 

[osg-users] Depth and Color buffer attachemnts do not play along together

2021-03-28 Thread Trajce Nikolov NICK
Hi Community,

I am attaching to the main camera DepthBuffer and ColorBuffer as Texture2D
- attached is the setup. I also have shader to check the depth buffer - so
it is ok as on the image. And I am displaying it on a quad. The depth
buffer is still getting me zeros when the colorbuffer is attached,
otherwise when it is not, then it works as it should.

Any hints?

mOsgExternalDepth = new osg::Texture2D;
mOsgExternalDepth->setSourceFormat(GL_DEPTH_COMPONENT);
mOsgExternalDepth->setSourceType(GL_FLOAT);
mOsgExternalDepth->setInternalFormat(GL_DEPTH_COMPONENT32F);
mOsgExternalDepth->setTextureWidth(screenWidth);
mOsgExternalDepth->setTextureHeight(screenHeight);
mOsgExternalDepth->setResizeNonPowerOfTwoHint(false);\

mOsgExternalColor = new osg::Texture2D;
mOsgExternalColor->setInternalFormat(GL_RGBA16F_ARB);
mOsgExternalColor->setSourceFormat(GL_RGBA);
mOsgExternalColor->setSourceType(GL_FLOAT);
mOsgExternalColor->setTextureWidth(screenWidth);
mOsgExternalColor->setTextureHeight(screenHeight);
mOsgExternalColor->setResizeNonPowerOfTwoHint(false);

mainCamera->attach(osg::Camera::COLOR_BUFFER,
(osg::Texture*)mOsgExternalColor);
mainCamera->attach(osg::Camera::DEPTH_BUFFER,
(osg::Texture*)mOsgExternalDepth);

osg::ref_ptr camera = new osg::Camera;
camera->setProjectionMatrix(osg::Matrixd::ortho2D(0, screenWidth, 0,
screenHeight));
camera->setReferenceFrame(osg::Transform::ABSOLUTE_RF);
camera->setViewMatrix(osg::Matrixd::identity());
camera->setClearMask(0);
camera->setRenderOrder(osg::Camera::POST_RENDER);
camera->setAllowEventFocus(false);

context.getImageGenerator()->getViewer()->getView(0)->getSceneData()->asGroup()->addChild(camera);

osg::ref_ptr quad =
osg::createTexturedQuadGeometry(osg::Vec3(0, 0, 0),
osg::Vec3(screenWidth/2, 0, 0), osg::Vec3(0, screenHeight/2, 0));
quad->getOrCreateStateSet()->setMode(GL_LIGHTING, osg::StateAttribute::OFF);
quad->getOrCreateStateSet()->setTextureAttributeAndModes(0,
mOsgExternalDepth);

const std::string vertShader = ""\
"void main() "\
"{ "\
" gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex; "\
" gl_TexCoord[0] = gl_TextureMatrix[0] *gl_MultiTexCoord0;"\
"}";

const std::string fragShader = ""\
"uniform sampler2D texture0; "\
"void main() "\
"{ "\
" float d = texture2D( texture0, gl_TexCoord[0].xy ).x; "\
" gl_FragColor = vec4(d, d, d, 1); "\
"}";

osg::ref_ptr vert = new osg::Shader(osg::Shader::VERTEX,
vertShader);
osg::ref_ptr frag = new osg::Shader(osg::Shader::FRAGMENT,
fragShader);

osg::ref_ptr program = new osg::Program;
program->addShader(vert);
program->addShader(frag);

quad->getOrCreateStateSet()->setAttributeAndModes(program);
quad->getOrCreateStateSet()->addUniform(new
osg::Uniform(osg::Uniform::SAMPLER_2D, "texture0", 0));
osg::ref_ptr quadColor =
osg::createTexturedQuadGeometry(osg::Vec3(screenWidth / 2, 0, 0),
osg::Vec3(screenWidth/2 , 0, 0), osg::Vec3(0, screenHeight/2, 0));
quadColor->getOrCreateStateSet()->setMode(GL_LIGHTING,
osg::StateAttribute::OFF);
quadColor->getOrCreateStateSet()->setTextureAttributeAndModes(0,
mOsgExternalColor);

camera->addChild(quadColor);
camera->addChild(quad);

-- 
trajce nikolov nick

-- 
You received this message because you are subscribed to the Google Groups 
"OpenSceneGraph Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to osg-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/osg-users/CAO-%2BzinLTwJppWDbAVy1r9ovjOgZgX0gj0ufrdqBMr%3DRwQqPpw%40mail.gmail.com.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] 3D model preparation question

2021-03-26 Thread Jeff White
Thanks for the info. I had already checked the .mtl file and there are no 
textures referenced in this model.  It does everything with materials.  All 
material names in the .obj match what is in the .mtl file as well so I'm 
not sure what the problem is.  The paths all reference the current 
directory so those should be fine.

If anyone knows of a Blender export plugin for .ive or .osgb that might be 
helpful.  I haven't found one yet so I am assuming I will probably have to 
write one myself.

On Friday, March 26, 2021 at 10:58:51 AM UTC-5 trajce.ni...@gmail.com wrote:

> Hi Jeff,
>
> I know this problem as well. Obviously each .obj file has .mtl file with 
> it. It is a text file where materials and textures are defined. You can 
> edit with values you find appropriate . As well check the texture paths
>
> On Thu, Mar 25, 2021 at 8:46 PM Jeff White  wrote:
>
>> A few of my 3D model files (which are in .obj format) look different when 
>> loaded into Blender compared to viewing them in osgviewer.  I can see all 
>> the colors clearly in Blender but in osgviewer the model appears dark.  I 
>> have attached a few pictures here.  I commonly see this with older model 
>> files that have materials specified but no associated textures.
>>
>> I am a developer and not a 3D modeler so I don't have enough Blender 
>> experience to know why it looks different in that software.  Is there 
>> something else I need to do to prepare these models for use in OSG?  I know 
>> that Blender places a light in the scene but I thought that osgviewer had a 
>> small light pointing out of the camera as well.
>>
>> Any help would be appreciated.  Thanks,
>>
>> Jeff
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "OpenSceneGraph Users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to osg-users+...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/osg-users/96f91a17-9cdd-4f03-9d98-7e2defcbcf55n%40googlegroups.com
>>  
>> 
>> .
>>
>
>
> -- 
> trajce nikolov nick
>

-- 
You received this message because you are subscribed to the Google Groups 
"OpenSceneGraph Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to osg-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/osg-users/d8138555-c9e1-482b-96cd-4823178aed01n%40googlegroups.com.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] 3D model preparation question

2021-03-26 Thread Trajce Nikolov NICK
Hi Jeff,

I know this problem as well. Obviously each .obj file has .mtl file with
it. It is a text file where materials and textures are defined. You can
edit with values you find appropriate . As well check the texture paths

On Thu, Mar 25, 2021 at 8:46 PM Jeff White  wrote:

> A few of my 3D model files (which are in .obj format) look different when
> loaded into Blender compared to viewing them in osgviewer.  I can see all
> the colors clearly in Blender but in osgviewer the model appears dark.  I
> have attached a few pictures here.  I commonly see this with older model
> files that have materials specified but no associated textures.
>
> I am a developer and not a 3D modeler so I don't have enough Blender
> experience to know why it looks different in that software.  Is there
> something else I need to do to prepare these models for use in OSG?  I know
> that Blender places a light in the scene but I thought that osgviewer had a
> small light pointing out of the camera as well.
>
> Any help would be appreciated.  Thanks,
>
> Jeff
>
> --
> You received this message because you are subscribed to the Google Groups
> "OpenSceneGraph Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to osg-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/osg-users/96f91a17-9cdd-4f03-9d98-7e2defcbcf55n%40googlegroups.com
> 
> .
>


-- 
trajce nikolov nick

-- 
You received this message because you are subscribed to the Google Groups 
"OpenSceneGraph Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to osg-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/osg-users/CAO-%2BzinaeCFHF%3D2rc_NwZ0fYL9HZTvvYPUMJ4VHkXHMXkJg4_g%40mail.gmail.com.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Graphics system interface version

2021-03-26 Thread Werner Modenbach
Hi all,

I need to analyse my application with NVidia Nsight.
Nsight tells me, it needs D3D11 api minimum but my application uses D3D9.
My computer supports Directx12.
Without being an expert I guess my application might be able to create a D3D12 
api context.

How can I influence this?

Thanks for any ideas.

- Werner -
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Creating an OpenGL debug context

2021-03-25 Thread Voerman, L.
Not exactly what you're asking for, but this is extracted from my code:
Laurens.

#ifdef OPENGL_DEBUG
void APIENTRY DebugCallback(GLenum source, GLenum type, GLuint id, GLenum
severity, GLsizei length, const GLchar * message, const void* userParam) {
printf("0x % X: %s\n", id, message);
}
#endif


class EnableGLDebugCallback : public osg::GraphicsOperation
{
public:
EnableGLDebugCallback() :
GraphicsOperation("EnableGLDebug", true),
_dirty(true) { }
virtual void operator () (osg::GraphicsContext* context) {
if (_dirty) {
#ifdef OPENGL_DEBUG
if (osg::isGLExtensionSupported(contextID, "GL_KHR_debug")) {
//PFNGLDEBUGMESSAGECALLBACKPROC
PFNGLDEBUGMESSAGECALLBACKPROC glDebugMessageCallback =
(PFNGLDEBUGMESSAGECALLBACKPROC)wglGetProcAddress("glDebugMessageCallback");
PFNGLDEBUGMESSAGECONTROLPROC glDebugMessageControl =
(PFNGLDEBUGMESSAGECONTROLPROC)wglGetProcAddress("glDebugMessageControl");
glDebugMessageCallback(DebugCallback, NULL);
glDebugMessageControl(GL_DONT_CARE, GL_DONT_CARE, GL_DONT_CARE, 0, 0,
GL_TRUE);
glEnable(GL_DEBUG_OUTPUT);
//glEnable(GL_DEBUG_OUTPUT_SYNCHRONOUS);
}
#endif
_dirty = false;
}
}
protected:
bool_dirty;
};
};

in main thread:
osg::GraphicsContext *gc =
_viewer->getCamera()->getGraphicsContext();
if (gc) {
gc->add(new EnableGLDebugCallback());
OSGRC_DEBUG("EnableGLDebugCallback installed" << std::endl);
}

On Thu, Mar 25, 2021 at 11:41 AM Werner Modenbach <
werner.modenb...@modenbach-ac.de> wrote:

> Hi all,
>
> does anybody know how to create an opengl debug context via flags in the
> traits?
>
> Thanks
>
> - Werner -
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Creating an OpenGL debug context

2021-03-25 Thread Werner Modenbach
Hi all,

does anybody know how to create an opengl debug context via flags in the traits?

Thanks

- Werner -
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] OpenSceneGraph/osgEarth vs VulkanSceneGraph/vsgpagedlod

2021-03-24 Thread Robert Osfield
Hi Jason,

On Wed, 24 Mar 2021 at 15:22, Jason Beverage 
wrote:

> Very impressive Robert!  As you said, comparing osgEarth to your example
> isn't exactly apples to apples since the implementation under the hood is
> quite different but this is still great.
>

Thanks.  Indeed it's apples to oranges comparison so we shouldn't draw too
many conclusions.  I guess I could rewrite the vsgpagedlod example into an
OSG equivalent so all the settings are the same.  I'd actually be quite a
nice OSG examp[le.  My priority for the OSG is support so I'll have to
leave this to others.


> From what I've seen from your performance reporting, vsg is significantly
> faster than osg in most of your tests.  Do you have a feel for how much of
> that is just Vulkan being faster than OpenGL vs some of the other
> improvements you've made in design decisions of VSG vs OSG?  Are there any
> opportunities for porting some of the structures or concepts from VSG back
> to OSG to get some of the performance benefits you've seen in VSG in OSG?
>

The CPU overhead is much lower in the VSG than the OSG due to architecture
changes in the core Object/Node structure to reduce memory
footprint/bandwidth load and to avoid conditionals, These could be ported
into an OSG lite, but it'd break compatibility with a great many
applications - no BoundingSphere on all nodes, no NodeMask, no Callbacks,
no ancillary data stored in Object/Node.  It would break so many
applications and even the OSG itself it wouldn't be a small task to update
everything.

The differences are fundamental to the VSG delivering on the performance
capability that Vulkan provides, without it you'd only see a small %
improvement here or there if porting the OSG from OpenGL to Vulkan.  I've a
few applications and libraries that cite modest improvements when porting
to Vulkan, and don't recall any that claim 3 x to 10+ x faster than I'm
seeing on OSG vs VSG.  I think this either means the OSG is more of CPU hog
that we've long assumed or the VSG does a better job of not holding Vulkan
back by designing everything from the ground up to not get in the way as
much as possible.  I suspect it's a bit of both.

 Cheers,
Robert.

-- 
You received this message because you are subscribed to the Google Groups 
"OpenSceneGraph Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to osg-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/osg-users/CAFN7Y%2BV7Wt%2BSD2OWQR8wHd-fWGu9F%3DEdpZjm6cE-cQ0rDQDEtg%40mail.gmail.com.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] OpenSceneGraph/osgEarth vs VulkanSceneGraph/vsgpagedlod

2021-03-24 Thread Chris Hanson
>
>
> From what I've seen from your performance reporting, vsg is significantly
> faster than osg in most of your tests.  Do you have a feel for how much of
> that is just Vulkan being faster than OpenGL vs some of the other
> improvements you've made in design decisions of VSG vs OSG?  Are there any
> opportunities for porting some of the structures or concepts from VSG back
> to OSG to get some of the performance benefits you've seen in VSG in OSG?
>

(Not answering for Robert, but you've touched on something I have an
interest in.)

My understanding from Robert is that while Vulkan can be faster than
OpenGL, there are also many opportunities taken to make the scene graph
itself faster  (better code design, removal/optionalizing of features that
degrade performance, improving memory layouts eg. Structures of Arrays
instead of Arrays of Structures, etc).

I've mulled over the idea of taking the OSG and refactoring it to make the
same architectural scene graph changes (and feature removals!) Robert
implemented in VSG and making in effect an OSG that is class-compatible
with VSG but still runs on (modern) OpenGL. I think it's a viable concept,
and would make a nice stepping stone towards porting applications to VSG,
but so far, I haven't convinced any funders to support it.

If there was someone wanting to move a big OSG application to VSG and
needed assistance getting there, it might become a reality, but I can't
fund it out of pocket myself.


>
> Jason
>
> On Tue, Mar 23, 2021 at 4:05 PM Robert Osfield 
> wrote:
>
>> Hi Nathan,
>>
>> On Tue, 23 Mar 2021 at 18:26, Nathan Mielcarek 
>> wrote:
>>
>>> Great news! I look forward to using this in the near future either
>>> through OSG directly or osgEarth.
>>>
>>
>> The VSG is intended as the successor to the OSG and would typically be
>> used instead of the OSG. The VSG is significantly faster than the OSG but
>> is still in development so isn't feature complete and is still a moving
>> target.  For now it's something folks who are happy to work on the bleeding
>> edge in order to get best performance.
>>
>> One could integrate OSG/VSG into a single application using OpenGL/Vulkan
>> extensions to exchange data between them. Thomas Hogarth didn;'t some work
>> on this earlier in the VSG project, this work needs updating and porting to
>> work across all platforms.
>>
>>
>>> Was a bit amused by your comment about the accuracy on "finding your
>>> house". I think it's a great feature, especially considering how that data
>>> can be used by autonomous vehicles eventually.
>>>
>>
>> It's impressive how so much verifiably accurate data is publically
>> available, also a bit unnerving.
>>
>> Cheers,
>> Robert,
>>
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "OpenSceneGraph Users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to osg-users+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/osg-users/CAFN7Y%2BW1ELMrv540_3UE%3D1%3DpuFrO6WtCTrLH0%3DQkT2g46rznCg%40mail.gmail.com
>> 
>> .
>> ___
>> osg-users mailing list
>> osg-users@lists.openscenegraph.org
>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>>
> --
> You received this message because you are subscribed to the Google Groups
> "OpenSceneGraph Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to osg-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/osg-users/CAMcxSMs1R5ojQikTPmQXYcx9xzCf_7ZDQDo2WS5mcqsV8cScBA%40mail.gmail.com
> 
> .
>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] OpenSceneGraph/osgEarth vs VulkanSceneGraph/vsgpagedlod

2021-03-24 Thread Jason Beverage
Very impressive Robert!  As you said, comparing osgEarth to your example
isn't exactly apples to apples since the implementation under the hood is
quite different but this is still great.

>From what I've seen from your performance reporting, vsg is significantly
faster than osg in most of your tests.  Do you have a feel for how much of
that is just Vulkan being faster than OpenGL vs some of the other
improvements you've made in design decisions of VSG vs OSG?  Are there any
opportunities for porting some of the structures or concepts from VSG back
to OSG to get some of the performance benefits you've seen in VSG in OSG?

Jason

On Tue, Mar 23, 2021 at 4:05 PM Robert Osfield 
wrote:

> Hi Nathan,
>
> On Tue, 23 Mar 2021 at 18:26, Nathan Mielcarek 
> wrote:
>
>> Great news! I look forward to using this in the near future either
>> through OSG directly or osgEarth.
>>
>
> The VSG is intended as the successor to the OSG and would typically be
> used instead of the OSG. The VSG is significantly faster than the OSG but
> is still in development so isn't feature complete and is still a moving
> target.  For now it's something folks who are happy to work on the bleeding
> edge in order to get best performance.
>
> One could integrate OSG/VSG into a single application using OpenGL/Vulkan
> extensions to exchange data between them. Thomas Hogarth didn;'t some work
> on this earlier in the VSG project, this work needs updating and porting to
> work across all platforms.
>
>
>> Was a bit amused by your comment about the accuracy on "finding your
>> house". I think it's a great feature, especially considering how that data
>> can be used by autonomous vehicles eventually.
>>
>
> It's impressive how so much verifiably accurate data is publically
> available, also a bit unnerving.
>
> Cheers,
> Robert,
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "OpenSceneGraph Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to osg-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/osg-users/CAFN7Y%2BW1ELMrv540_3UE%3D1%3DpuFrO6WtCTrLH0%3DQkT2g46rznCg%40mail.gmail.com
> 
> .
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Step by step addDrawable and visualize current scene graph

2021-03-23 Thread Paul Jurczak
Thank you, Nathan. It solves my problem.

On Tuesday, March 23, 2021 at 12:14:59 PM UTC-6 nmiel...@gmail.com wrote:

> Paul,
>
> Looking at the OSG Viewer.cpp code, the run() function contains this code:
> if (!getCameraManipulator() && getCamera()->getAllowEventFocus())
> {
> setCameraManipulator(new osgGA::TrackballManipulator());
> }
>
> Therefore, by adding this line before viewer.frame() is called makes the 
> spheres appear as you expected:
> viewer.setCameraManipulator(new osgGA::TrackballManipulator());
>
> -Nathan
>
>
> On Sun, Mar 21, 2021 at 5:31 PM 'Paul Jurczak' via OpenSceneGraph Users <
> osg-...@googlegroups.com> wrote:
>
>> I'm just starting with OSG. I would like this (or similar) code: 
>>
>> int main() {
>>   osgViewer::Viewer viewer;
>>   osg::Geode*   geode = new osg::Geode();
>> 
>>   viewer.setSceneData(geode);
>>   geode->addDrawable(new osg::ShapeDrawable(new 
>> osg::Sphere(osg::Vec3(0, 0, 0), 1)));
>> 
>>   viewer.frame();
>>   this_thread::sleep_for(seconds(2));
>> 
>>   geode->addDrawable(new osg::ShapeDrawable(new 
>> osg::Sphere(osg::Vec3(2, 0, 0), 1)));
>>   
>>   return viewer.run();
>> }
>>
>> to display the first sphere and after 2s the second sphere, but it 
>> displays a blank screen for 2s instead and 2 spheres afterwards. What do I 
>> have to change?
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "OpenSceneGraph Users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to osg-users+...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/osg-users/8d8ad5ea-8080-401c-b1c2-26345345c84en%40googlegroups.com
>>  
>> 
>> .
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"OpenSceneGraph Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to osg-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/osg-users/e5dab9a2-111f-47bc-81a7-e7ef949e3d20n%40googlegroups.com.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] OpenSceneGraph/osgEarth vs VulkanSceneGraph/vsgpagedlod

2021-03-23 Thread Robert Osfield
Hi Nathan,

On Tue, 23 Mar 2021 at 18:26, Nathan Mielcarek  wrote:

> Great news! I look forward to using this in the near future either through
> OSG directly or osgEarth.
>

The VSG is intended as the successor to the OSG and would typically be used
instead of the OSG. The VSG is significantly faster than the OSG but is
still in development so isn't feature complete and is still a moving
target.  For now it's something folks who are happy to work on the bleeding
edge in order to get best performance.

One could integrate OSG/VSG into a single application using OpenGL/Vulkan
extensions to exchange data between them. Thomas Hogarth didn;'t some work
on this earlier in the VSG project, this work needs updating and porting to
work across all platforms.


> Was a bit amused by your comment about the accuracy on "finding your
> house". I think it's a great feature, especially considering how that data
> can be used by autonomous vehicles eventually.
>

It's impressive how so much verifiably accurate data is publically
available, also a bit unnerving.

Cheers,
Robert,

-- 
You received this message because you are subscribed to the Google Groups 
"OpenSceneGraph Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to osg-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/osg-users/CAFN7Y%2BW1ELMrv540_3UE%3D1%3DpuFrO6WtCTrLH0%3DQkT2g46rznCg%40mail.gmail.com.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] OpenSceneGraph now significantly faster on AR/VR/xR/Holographics displays

2021-03-23 Thread Chris Hanson
AlphaPixel Software Development and OpenSceneGraph Professional Services
have released OVR_MultiView2 extension support for OpenSceneGraph to
greatly improve performance of OpenSceneGraph on multi-view applications
(VR/AR, Holographic).

Working together, AlphaPixel and Robert Osfield, project lead of
OpenSceneGraph, have integrated support for the OpenGL extension called
GL_OVR_multiview2 (
https://www.khronos.org/registry/OpenGL/extensions/OVR/OVR_multiview2.txt
). This extension can significantly decrease rendering overhead when
producing 3d content for displays with multiple viewpoints, including
Virtual Reality, Augmented Reality and Holographic systems. AlphaPixel
originally developed this code for a client using the VARJO VR/AR headsets
and then funded Robert and OpenSceneGraph Professional Services to adapt
and integrate the code into mainline OpenSceneGraph to make it available
for all users.

MultiView2 allows an OpenGL program to render a scene once while the GPU
rasterizes it multiple times from slightly different viewpoints, making
production of stereo parallax views substantially faster where the CPU-side
cull and draw operations are expensive. This optimization can reduce the
time penalty of drawing additional related views by up to 90%, which can
nearly double stereo framerate, or make scenes with more than two views
many times faster. This is especially effective on 4-channel displays like
foveated xR headsets such as VARJO (
https://developer.varjo.com/docs/native/foveated-rendering-api ).

Prototype support is also included for plenoptic/holographic/lightfield
displays such as the Leia Inc Lume Pad lightfield Android tablet (
https://www.lume-pad.com/ ), and the architecture is also well-suited for
driving displays such as the Avalon Holographics 29” Holographic Display (
https://www.avalonholographics.com/products ). AlphaPixel is currently
working to produce a demo application including source for the Lume Pad.

These new performance capabilities are available now in the OpenSceneGraph
GitHub repository.

AlphaPixel Software development ( http://alphapixeldev.com/ ), founded in
2004 in Evergreen, Colorado is a consulting and contracting software
developer specializing in 3D, GIS, digital imaging and aerospace for
clients large and small around the world.

OpenSceneGraph Professional Services ( https://www.openscenegraph.com/ ),
founded in 2001 by OpenSceneGraph co-founder and project lead Robert
Osfield, develops and improves the Open Source toolkits OpenSceneGraph and
VulkanSceneGraph.



-- 
[image: Company logo]
Chris Hanson, CTO
xe...@alphapixel.com | (775) 623-7495 <13038700872>
AlphaPixel Software Development | http://alphapixeldev.com | DUNS:
833108637  | CAGE:
6HQZ2
7346 Brook Forest Dr
Evergreen, CO, 80439 USA

Open Scene Graph/OSG • OpenGL • Vulkan • AR/VR/xR • GIS • osgEarth • LIDAR
• Embedded • Mobile • iPhone/iPad/iOS • Android
[image: Twitter icon]   [image: Facebook
icon]   [image: Linkedin icon]


-- 
You received this message because you are subscribed to the Google Groups 
"OpenSceneGraph Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to osg-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/osg-users/CAGoufmYB7dAeVuP4hbYeoNLa7Yk19sYW5CSAX%3DjEkE2HOc1CNA%40mail.gmail.com.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] OpenSceneGraph/osgEarth vs VulkanSceneGraph/vsgpagedlod

2021-03-23 Thread Nathan Mielcarek
Robert,

Great news! I look forward to using this in the near future either through
OSG directly or osgEarth.

Was a bit amused by your comment about the accuracy on "finding your
house". I think it's a great feature, especially considering how that data
can be used by autonomous vehicles eventually.

-Nathan

On Wed, Mar 17, 2021 at 12:36 PM Robert Osfield 
wrote:

> Hi All,
>
> Over the past 2 1/2 years I've been mainly focused on VulkanSceneGraph
> project, this isn't yet at 1.0 but it's come along nicely.  This week I
> wrote an example that illustrates how to use vsg::PagedLOD and
> vsg::ReaderWriter to implement paged database that streams data from online
> tile serves such a OpenStreetMap and ReadyMap.  It's like a very simple and
> crude demo of osgEarth style paging.
>
> To look at the visual differences and performance differences I've
> recorded a camera animation path in osgviewer then run this same path with
> the same OpenStreetMap databasee in osgviewer using osgEarth, and then with
> the same path but using the new vsgpagedlod example.
>
>
> https://github.com/vsg-dev/vsgExamples/tree/PagedLOD/examples/nodes/vsgpagedlod
>
> I've upload the a video of running the two applications, first the OSG
> then VSG, to youtube:
>
> https://www.youtube.com/watch?v=nOQxr09ald4
>
> The average fps for the 2 minutes camera animation path was 878fps for the
> OSG/osgEarth combo and 2698fps for VSG/vsgpagedlod, which is just under 3
> times faster for the Vulkan/VulkanSceneGraph.
>
> As I explain in the video it's not an exact like for like comparison as
> osgEarth is doing blending between LODs, while the VSG/vsgpagedlod is
> selecting a higher level of detail for a given view.
>
> The osgviewer was run with default DrawThreadPerContext threading, while
> vsgpagedlod viewer was running single threaded.  In both cases the
> osgDB::DatabasePager and equivalent vsg::DatabasePager are doing all the
> loading in a set of background threads.
>
> The VSG supports running viewer multi-threaded but is unnecessary in this
> instance as the cull/draw traversal/dispatch are all happening less than
> half a millisecond :-)
>
> --
> You received this message because you are subscribed to the Google Groups
> "OpenSceneGraph Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to osg-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/osg-users/b1adc63f-28b5-49b9-b200-1fcd5624b400n%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"OpenSceneGraph Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to osg-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/osg-users/CAAQ9MSNEoogWPD70%2BT%2BGZuryd1cX8SqRsd-96RB7N%3DJdKaK8AA%40mail.gmail.com.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Step by step addDrawable and visualize current scene graph

2021-03-23 Thread Nathan Mielcarek
Paul,

Looking at the OSG Viewer.cpp code, the run() function contains this code:
if (!getCameraManipulator() && getCamera()->getAllowEventFocus())
{
setCameraManipulator(new osgGA::TrackballManipulator());
}

Therefore, by adding this line before viewer.frame() is called makes the
spheres appear as you expected:
viewer.setCameraManipulator(new osgGA::TrackballManipulator());

-Nathan


On Sun, Mar 21, 2021 at 5:31 PM 'Paul Jurczak' via OpenSceneGraph Users <
osg-us...@googlegroups.com> wrote:

> I'm just starting with OSG. I would like this (or similar) code:
>
> int main() {
>   osgViewer::Viewer viewer;
>   osg::Geode*   geode = new osg::Geode();
>
>   viewer.setSceneData(geode);
>   geode->addDrawable(new osg::ShapeDrawable(new
> osg::Sphere(osg::Vec3(0, 0, 0), 1)));
>
>   viewer.frame();
>   this_thread::sleep_for(seconds(2));
>
>   geode->addDrawable(new osg::ShapeDrawable(new
> osg::Sphere(osg::Vec3(2, 0, 0), 1)));
>
>   return viewer.run();
> }
>
> to display the first sphere and after 2s the second sphere, but it
> displays a blank screen for 2s instead and 2 spheres afterwards. What do I
> have to change?
>
> --
> You received this message because you are subscribed to the Google Groups
> "OpenSceneGraph Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to osg-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/osg-users/8d8ad5ea-8080-401c-b1c2-26345345c84en%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"OpenSceneGraph Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to osg-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/osg-users/CAAQ9MSNdQJ1GSyx7sBYt9dGDM0vT-x1XLof7cQ3toTzRJ5tmvw%40mail.gmail.com.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Step by step addDrawable and visualize current scene graph

2021-03-22 Thread Alberto Luaces
Hi Paul,

I guess you might have to viewer.realize() before the first call to
.frame().  If that is not the case, please inspect inside the .run()
method that does basically the same in just one call.

-- 
Alberto

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Step by step addDrawable and visualize current scene graph

2021-03-21 Thread 'Paul Jurczak' via OpenSceneGraph Users
I'm just starting with OSG. I would like this (or similar) code: 

int main() {
  osgViewer::Viewer viewer;
  osg::Geode*   geode = new osg::Geode();

  viewer.setSceneData(geode);
  geode->addDrawable(new osg::ShapeDrawable(new 
osg::Sphere(osg::Vec3(0, 0, 0), 1)));

  viewer.frame();
  this_thread::sleep_for(seconds(2));

  geode->addDrawable(new osg::ShapeDrawable(new 
osg::Sphere(osg::Vec3(2, 0, 0), 1)));
  
  return viewer.run();
}

to display the first sphere and after 2s the second sphere, but it displays 
a blank screen for 2s instead and 2 spheres afterwards. What do I have to 
change?

-- 
You received this message because you are subscribed to the Google Groups 
"OpenSceneGraph Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to osg-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/osg-users/8d8ad5ea-8080-401c-b1c2-26345345c84en%40googlegroups.com.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] OpenSceneGraph/osgEarth vs VulkanSceneGraph/vsgpagedlod

2021-03-18 Thread shayne.tueller
Impressive Robert.Thanks for sharing.ShayneSent from my Sprint Samsung Galaxy 
Note9.
 Original message From: Robert Osfield 
 Date: 3/17/21  1:36 PM  (GMT-07:00) To: 
OpenSceneGraph Users  Subject: [osg-users] 
OpenSceneGraph/osgEarth vs VulkanSceneGraph/vsgpagedlod Hi All,Over the past 2 
1/2 years I've been mainly focused on VulkanSceneGraph project, this isn't yet 
at 1.0 but it's come along nicely.  This week I wrote an example that 
illustrates how to use vsg::PagedLOD and vsg::ReaderWriter to implement paged 
database that streams data from online tile serves such a OpenStreetMap and 
ReadyMap.  It's like a very simple and crude demo of osgEarth style paging.To 
look at the visual differences and performance differences I've recorded a 
camera animation path in osgviewer then run this same path with the same 
OpenStreetMap databasee in osgviewer using osgEarth, and then with the same 
path but using the new vsgpagedlod example.     
https://github.com/vsg-dev/vsgExamples/tree/PagedLOD/examples/nodes/vsgpagedlodI've
 upload the a video of running the two applications, first the OSG then VSG, to 
youtube:    https://www.youtube.com/watch?v=nOQxr09ald4The average fps for the 
2 minutes camera animation path was 878fps for the OSG/osgEarth combo and 
2698fps for VSG/vsgpagedlod, which is just under 3 times faster for the 
Vulkan/VulkanSceneGraph.As I explain in the video it's not an exact like for 
like comparison as osgEarth is doing blending between LODs, while the 
VSG/vsgpagedlod is selecting a higher level of detail for a given view.The 
osgviewer was run with default DrawThreadPerContext threading, while 
vsgpagedlod viewer was running single threaded.  In both cases the 
osgDB::DatabasePager and equivalent vsg::DatabasePager are doing all the 
loading in a set of background threads.The VSG supports running viewer 
multi-threaded but is unnecessary in this instance as the cull/draw 
traversal/dispatch are all happening less than half a millisecond :-)



-- 
You received this message because you are subscribed to the Google Groups 
"OpenSceneGraph Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to osg-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/osg-users/b1adc63f-28b5-49b9-b200-1fcd5624b400n%40googlegroups.com.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] OpenSceneGraph/osgEarth vs VulkanSceneGraph/vsgpagedlod

2021-03-17 Thread Robert Osfield
Hi All,

Over the past 2 1/2 years I've been mainly focused on VulkanSceneGraph 
project, this isn't yet at 1.0 but it's come along nicely.  This week I 
wrote an example that illustrates how to use vsg::PagedLOD and 
vsg::ReaderWriter to implement paged database that streams data from online 
tile serves such a OpenStreetMap and ReadyMap.  It's like a very simple and 
crude demo of osgEarth style paging.

To look at the visual differences and performance differences I've recorded 
a camera animation path in osgviewer then run this same path with the same 
OpenStreetMap databasee in osgviewer using osgEarth, and then with the same 
path but using the new vsgpagedlod example. 


https://github.com/vsg-dev/vsgExamples/tree/PagedLOD/examples/nodes/vsgpagedlod

I've upload the a video of running the two applications, first the OSG then 
VSG, to youtube:

https://www.youtube.com/watch?v=nOQxr09ald4

The average fps for the 2 minutes camera animation path was 878fps for the 
OSG/osgEarth combo and 2698fps for VSG/vsgpagedlod, which is just under 3 
times faster for the Vulkan/VulkanSceneGraph.

As I explain in the video it's not an exact like for like comparison as 
osgEarth is doing blending between LODs, while the VSG/vsgpagedlod is 
selecting a higher level of detail for a given view.

The osgviewer was run with default DrawThreadPerContext threading, while 
vsgpagedlod viewer was running single threaded.  In both cases the 
osgDB::DatabasePager and equivalent vsg::DatabasePager are doing all the 
loading in a set of background threads.

The VSG supports running viewer multi-threaded but is unnecessary in this 
instance as the cull/draw traversal/dispatch are all happening less than 
half a millisecond :-)

-- 
You received this message because you are subscribed to the Google Groups 
"OpenSceneGraph Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to osg-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/osg-users/b1adc63f-28b5-49b9-b200-1fcd5624b400n%40googlegroups.com.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Please mirro187, work on your communication

2021-03-16 Thread mirr...@gmail.com
Sorry, I don't have Internet in my work environment.Unable to provide 
complete test information

在2021年3月16日星期二 UTC+8 下午5:20:25 写道:

> Do you not wonder yourself, why hardy anyone answers to you?
>
> If you put a bit more work into your messages, then this might change
> quite a bit, because currently they're hard to understand at all.
>
> Most of the time you don't add any context to your problem, e.g. what
> you're trying to achieve from a high level point of view.
>
> Also how you write your messages isn't really reader friendly. Don't
> put your whole question into the subject line and only code into the
> message itself. Put only a very short summary into the subject line
> and then interleave the code example with explaining the problem you have
> with it. Also saying what you would have expected might help.
>
> You can't expect others to put work into solving your problems if you
> put almost no effort into it explaining them.
>
> Greetings,
> Daniel
>

-- 
You received this message because you are subscribed to the Google Groups 
"OpenSceneGraph Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to osg-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/osg-users/39c52c94-9c60-4630-9fe0-5d8c3c185b71n%40googlegroups.com.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] How do you create the osg::Planeof PolytopeIntersector that will give you the right intersection?

2021-03-16 Thread mirr...@gmail.com
win10
// 
osg::Matrixd proj  = osg::Matrixd::identity();
proj.makePerspective(60, frustumAspectWidth/frustumAspectHeight, 
frustumNear, frustumFar);
//
const double mynear = proj(3, 2) / (proj(2, 2) - 1.0);
const double myfar = proj(3, 2) / (1.0 + proj(2, 2));
//
const double nLeft = mynear * (proj(2, 0) - 1.0) / proj(0, 0);
const double nRight = mynear * (1.0 + proj(2, 0)) / proj(0, 0);
const double nTop = mynear * (1.0 + proj(2, 1)) / proj(1, 1);
const double nBottom = mynear * (proj(2, 1) - 1.0) / proj(1, 1);
const double fLeft = myfar * (proj(2, 0) - 1.0) / proj(0, 0);
const double fRight = myfar * (1.0 + proj(2, 0)) / proj(0, 0);
const double fTop = myfar * (1.0 + proj(2, 1)) / proj(1, 1);
const double fBottom = myfar * (proj(2, 1) - 1.0) / proj(1, 1);
//
_projectPt[0] = osg::Vec3d(0.0, 0.0, 0.0);
_projectPt[1] = osg::Vec3d(nLeft, nBottom,  -mynear);
_projectPt[2] = osg::Vec3d(nRight, nBottom, -mynear);
_projectPt[3] = osg::Vec3d(nRight, nTop, -mynear);
_projectPt[4] = osg::Vec3d(nLeft, nTop,  -mynear);
_projectPt[5] = osg::Vec3d(fLeft, fBottom,  - myfar);
_projectPt[6] = osg::Vec3d(fRight, fBottom, - myfar);
_projectPt[7] = osg::Vec3d(fRight, fTop,  -myfar);
_projectPt[8] = osg::Vec3d(fLeft, fTop,  - myfar);
osg::Polytope viewFrstumPoly;
//
osg::Matrixd ViewM = _view->getCamera()->getInverseViewMatrix();
//
osg::Vec3d tempProjectPt[9];
//tempProjectPt[0] = _projectPt[0] * ViewM;
tempProjectPt[1] = _projectPt[1] * ViewM;
tempProjectPt[2] = _projectPt[2] * ViewM;
tempProjectPt[3] = _projectPt[3] * ViewM;
tempProjectPt[4] = _projectPt[4] * ViewM;
tempProjectPt[5] = _projectPt[5] * ViewM;
tempProjectPt[6] = _projectPt[6] * ViewM;
tempProjectPt[7] = _projectPt[7] * ViewM;
tempProjectPt[8] = _projectPt[8] * ViewM;
{
viewFrstumPoly.add(osg::Plane(tempProjectPt[1],tempProjectPt[5],tempProjectPt[8]));
}
{
viewFrstumPoly.add(osg::Plane(tempProjectPt[2],tempProjectPt[7],tempProjectPt[6]));
}

{
viewFrstumPoly.add(osg::Plane(tempProjectPt[3], 
tempProjectPt[4],tempProjectPt[8]));
}

{
viewFrstumPoly.add(osg::Plane(tempProjectPt[1],tempProjectPt[2],tempProjectPt[6]));
}
{
viewFrstumPoly.add(osg::Plane(tempProjectPt[5],tempProjectPt[6],tempProjectPt[7]));
}
{
viewFrstumPoly.add(osg::Plane(tempProjectPt[3],tempProjectPt[4],tempProjectPt[1]));
}
osg::ref_ptr picker = new 
osgUtil::PolytopeIntersector(osgUtil::Intersector::MODEL, poly);
picker->setPrecisionHint(osgUtil::Intersector::USE_DOUBLE_CALCULATIONS);
picker->setPrimitiveMask(osgUtil::PolytopeIntersector::POINT_PRIMITIVES);
picker->setIntersectionLimit(osgUtil::Intersector::NO_LIMIT);
//
osgUtil::IntersectionVisitor iv(picker);
_videoFusionNode->accept(iv);//group of scene 
if (picker->containsIntersections())
{
//
}

-- 
You received this message because you are subscribed to the Google Groups 
"OpenSceneGraph Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to osg-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/osg-users/32729314-2d08-46c7-973c-812c6d8a2bb0n%40googlegroups.com.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Please mirro187, work on your communication

2021-03-16 Thread Daniel Trstenjak
Do you not wonder yourself, why hardy anyone answers to you?

If you put a bit more work into your messages, then this might change
quite a bit, because currently they're hard to understand at all.

Most of the time you don't add any context to your problem, e.g. what
you're trying to achieve from a high level point of view.

Also how you write your messages isn't really reader friendly. Don't
put your whole question into the subject line and only code into the
message itself. Put only a very short summary into the subject line
and then interleave the code example with explaining the problem you have
with it. Also saying what you would have expected might help.

You can't expect others to put work into solving your problems if you
put almost no effort into it explaining them.

Greetings,
Daniel

-- 
You received this message because you are subscribed to the Google Groups 
"OpenSceneGraph Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to osg-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/osg-users/20210316092021.GA12856%40octa.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Why are the two osg::Polytope results different when using the transform method?

2021-03-13 Thread mirr...@gmail.com
win10
//
osg::Matrixd proj = osg::Matrixd::identity();
proj.makePerspective(60, frustumAspectWidth/frustumAspectHeight, 
frustumNear, frustumFar);
//
const double mynear = proj(3, 2) / (proj(2, 2) - 1.0);
const double myfar = proj(3, 2) / (1.0 + proj(2, 2));
//
const double nLeft = mynear * (proj(2, 0) - 1.0) / proj(0, 0);
const double nRight = mynear * (1.0 + proj(2, 0)) / proj(0, 0);
const double nTop = mynear * (1.0 + proj(2, 1)) / proj(1, 1);
const double nBottom = mynear * (proj(2, 1) - 1.0) / proj(1, 1);
const double fLeft = myfar * (proj(2, 0) - 1.0) / proj(0, 0);
const double fRight = myfar * (1.0 + proj(2, 0)) / proj(0, 0);
const double fTop = myfar * (1.0 + proj(2, 1)) / proj(1, 1);
const double fBottom = myfar * (proj(2, 1) - 1.0) / proj(1, 1);
//
osg::Matrixd ViewM = _view->getCamera()->getInverseViewMatrix();
{
   osg::Polytope viewFrstumPoly;
osg::Vec3d pt[9];
pt[1] = osg::Vec3d(nLeft, nBottom,  -mynear)*ViewM ;
pt[2] = osg::Vec3d(nRight, nBottom, -mynear)*ViewM ;
pt[3] = osg::Vec3d(nRight, nTop, -mynear)*ViewM ;
viewFrstumPoly.add(osg::Plane(pt[1],pt[2],pt[3]));
}

{
 osg::Polytope viewFrstumPoly2;
 osg::Vec3d pt[9];
 pt[1] = osg::Vec3d(nLeft, nBottom,  -mynear);
 pt[2] = osg::Vec3d(nRight, nBottom, -mynear) ;
 pt[3] = osg::Vec3d(nRight, nTop, -mynear);
 viewFrstumPoly2.add(osg::Plane(pt[1],pt[2],pt[3]));
  viewFrstumPoly2 .transform(ViewM);
}


 

-- 
You received this message because you are subscribed to the Google Groups 
"OpenSceneGraph Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to osg-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/osg-users/605b9691-4e64-4083-8229-fe6a94203bben%40googlegroups.com.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] How to use the Intersector: : VIEW mode when osgUtil: : PolytopeIntersector and scene node intersection

2021-03-13 Thread mirr...@gmail.com
win10

BoundingBox bb;
bb._min  = osg::vec3d(0,0,0);
bb._max = osg::vec3d(1000,1000,1000);
Polytope poly;
poly.setToBoundingBox(bb);
//
osg::ref_ptr picker = new 
osgUtil::PolytopeIntersector(osgUtil::Intersector::VIEW,poly);
picker->setPrecisionHint(osgUtil::Intersector::USE_DOUBLE_CALCULATIONS);
picker->setPrimitiveMask(osgUtil::PolytopeIntersector::POINT_PRIMITIVES);
picker->setIntersectionLimit(osgUtil::Intersector::NO_LIMIT);
//
osgUtil::IntersectionVisitor iv(picker);
_videoFusionNode->accept(iv);//group node of scene 
if (picker->containsIntersections())
{
 //Can't intersection
}

-- 
You received this message because you are subscribed to the Google Groups 
"OpenSceneGraph Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to osg-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/osg-users/4938c97f-f77d-4747-8bba-502c8a0ff7c4n%40googlegroups.com.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Question about array binding

2021-03-10 Thread Robert Osfield
On Wed, 10 Mar 2021 at 15:35, Werner Modenbach <
werner.modenb...@modenbach-ac.de> wrote:

> Hi Robert,
>
> I had a look at the code in osg::Geometry. The lines in question are:
>
> if ( handleVertexAttributes ){
>
> for(unsigned int index = 0; index < _vertexAttribList.size(); ++index)
>
> {
>
> const Array* array = _vertexAttribList[index].get();
>
> if (array && array->getBinding()==osg::Array::BIND_PER_VERTEX)
>
> {
>
> vas->setVertexAttribArray(state, index, array);
>
> }
>
> }
>
> }
>
> Do you remember, why the condition
> getBinding() == BIND_PER_VERTEX
> is there?
> *But(!) *the same condition is at _normalArray, _colorArray etc. and they
> are handled correct with BIND_OVERALL.
>
> I don't understand what is really done there. Sorry.
>

I'm pretty rusty with the code in question, but my guess is that this
constraint could be rather old, dating back to when vertex attribute
support was first added and mirrored the hardwiring of texture coordinates
to be per vertex.

I can't see any reason why this per vertex restriction would be needed
now.  Try the check against BIND_PER_VERTEX and see what happens.

Which version of the OSG are you using?

Cheers,
Robert.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Question about array binding

2021-03-10 Thread Werner Modenbach
Hi Robert,

I had a look at the code in osg::Geometry. The lines in question are:

if(handleVertexAttributes)
{

for(unsignedintindex=0;index<_vertexAttribList.size();++index)

{

constArray*array=_vertexAttribList[index].get();

if(array&>getBinding()==osg::Array::BIND_PER_VERTEX)

{

vas->setVertexAttribArray(state,index,array);

}

}

}

Do you remember, why the condition
            getBinding() == BIND_PER_VERTEX
is there?
_But(!) _the same condition is at _normalArray, _colorArray etc. and they are 
handled correct with BIND_OVERALL.

I don't understand what is really done there. Sorry.

- Werner -

Am 09.03.2021 um 21:27 schrieb Robert Osfield:
> HI Werner,
>
> I can't think of think of reason that would cause a problem.  It's quite a 
> while since I look at the associated code so it might be simply that I've 
> forgotten constraints.  Have
> a look at the osg::Geometry::drawImplementation() to see if there is a 
> constraint on vertex attributes needing to be BIND_PER_VERTEX.
>
> If you were using the VSG that I'd suggest running with Vulkan debug and API 
> layer as it's great for picking up errors.  Are there any OpenGL errors being 
> produced?
>
> Robert. 
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Why does osg::AutoTransform node disappear when the scene is first created?

2021-03-10 Thread mirr...@gmail.com
Thank you for your question and answer.I have tested Geode to add OSG 
::Geometry and this error will also occur?

在2021年3月8日星期一 UTC+8 下午5:25:41 写道:

> Hi ?
>
> There isn't any way to know what settings are provoking these errors, the 
> best thing you can do is compile a debug version of the OSG and then setup 
> into the AutoTransform traverse method to figure out what maths is being 
> invoked and when the errors are occurring.
>
> The only thing I can add is that osgText::Text has support for rotating to 
> screen and automatically scaling that for most purposes will make 
> osg::AutoTransform rendundent.  I would try to just use osgText::Text's 
> support for scaling and rotating and ditch the osg::AutoTransform. You'll 
> get better performance too.
>
> Cheers,
> Robert.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"OpenSceneGraph Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to osg-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/osg-users/e9c1fb7e-608e-4451-88e7-6f6f1cfa5763n%40googlegroups.com.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] how do I make the light always hit the front of the camera?

2021-03-10 Thread Robert Osfield
If you want a light positioned relative to View's Camera then this is what
the OSG provides by default.  You can probably just remove the LightSource
from the scene graph and rely upon it's settings.  In include/osg/View
you'll find:

   /** Options for controlling the global lighting used for the view.*/
enum LightingMode
{
NO_LIGHT,
HEADLIGHT,
SKY_LIGHT
};

/** Set the global lighting to use for this view.
  * Defaults to headlight. */
void setLightingMode(LightingMode lightingMode);

/** Get the global lighting used for this view.*/
LightingMode getLightingMode() const { return _lightingMode; }

/** Get the global light.*/
void setLight(osg::Light* light) { _light = light; }

/** Get the global lighting if assigned.*/
osg::Light* getLight() { return _light.get(); }

/** Get the const global lighting if assigned.*/
const osg::Light* getLight() const { return _light.get(); }

The vsgViewer::View class subclasses from osg::View, and osgViewer::Viewer
subclasses from osgViewer::View, so all the above methods are also
available via viewer.setLightingMode(..) etc.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] how do I make the light always hit the front of the camera?

2021-03-09 Thread newli...@gmail.com
Hi, Robert .
First of all, thank you for your interest and answer.

I'm rendering using osg::Light and osg::LightSource with a spotlight 
pointing down.

The exact position is set using light->setPosition()

The direction of the light is set with the code below.

 osg::vec3d world =world + osg::Vec3d(0.0, 0.0, -0.6)
 light->setDirection(-world)

However, if the camera's heading is rotated in the current implementation, 
the light currently being rendered in front is stopped at the position and 
only the camera rotates.

I want to rotate the position of the light along with the heading of the 
camera.
However, if you adjust the Direction value to rotate the position of the 
light, the rendered position will be distorted without rotating as desired.

So, I tried various things using the code below, but I didn't get the 
desired result.

osg::PositionAttitudeTransform *_pat = new osg::PositionAttitudeTransform();
osg::Quat ori =  osg::Quat(osg::DegreesToRadians(0.0), osg::Vec3(0, 1, 0)) *
osg::Quat(osg::DegreesToRadians(0.0), 
osg::Vec3(1, 0, 0)) *
osg::Quat(osg::DegreesToRadians(heading_value), 
osg::Vec3(0, 0, 1));
_pat->setAttitude(ori);

Is there a good way to adjust the position of the light like a camera?

2021년 3월 9일 화요일 오후 5시 12분 42초 UTC+9에 robert@gmail.com님이 작성:

> Hi ?
>
> You don't say how you are rendering your present lights so providing 
> guidance on how to adjust it isn't possible, you'll need to provide more 
> information about your render system and what it relies upon for 
> controlling the position and direction of the light.
>
> Also it's hard to understand what you mean.  Rotating something by 360 
> degrees takes it full circle and back to where it was originally - so this 
> bit makes no sense whatsoever.
>
> The light in the scene looks to be a spot light pointing downwards, 
> pointing that back towards the camera would be a 90 degree rotation, but 
> pointing a spotlight at the camera would be pretty odd.  Could you mean 
> something completely different from what you are saying?
>
> Robert.
>

-- 
You received this message because you are subscribed to the Google Groups 
"OpenSceneGraph Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to osg-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/osg-users/00bcb4c9-824e-45bd-b993-375b01a44c81n%40googlegroups.com.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Question about array binding

2021-03-09 Thread Robert Osfield
HI Werner,

I can't think of think of reason that would cause a problem.  It's quite a
while since I look at the associated code so it might be simply that I've
forgotten constraints.  Have a look at the
osg::Geometry::drawImplementation() to see if there is a constraint on
vertex attributes needing to be BIND_PER_VERTEX.

If you were using the VSG that I'd suggest running with Vulkan debug and
API layer as it's great for picking up errors.  Are there any OpenGL errors
being produced?

Robert.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Question about array binding

2021-03-09 Thread Werner Modenbach
Hi all,

I was hunting a long time for some strange effect. I discovered the reason but 
have some understanding issues.
Why is Code 1 not working but code 2? I would prefer Code 1 because of less 
data.

Code 1) (my original code is not working)
        osg::ref_ptr osgVertexFlagsVector;

        osgVertexFlagsVector = new osg::IntArray(1);
        osgVertexFlagsVector->setBinding(osg::Array::BIND_OVERALL);
        _geometry->setVertexAttribArray(VERTEX_FLAGS_ATR_UNIT, 
osgVertexFlagsVector.get(), osg::Array::BIND_OVERALL);

        (*osgVertexFlagsVector)[0] = VERTEX_FLAG_VISIBLE;

Code 2) (this code is working)
        osg::ref_ptr osgVertexFlagsVector;

        osgVertexFlagsVector = new osg::IntArray(numVertices);
    osgVertexFlagsVector->setBinding(osg::Array::BIND_PER_VERTEX);
        _geometry->setVertexAttribArray(VERTEX_FLAGS_ATR_UNIT, 
osgVertexFlagsVector.get(), osg::Array::BIND_PER_VERTEX);

        for (auto i=0; i___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] how do I make the light always hit the front of the camera?

2021-03-09 Thread Robert Osfield
Hi ?

You don't say how you are rendering your present lights so providing
guidance on how to adjust it isn't possible, you'll need to provide more
information about your render system and what it relies upon for
controlling the position and direction of the light.

Also it's hard to understand what you mean.  Rotating something by 360
degrees takes it full circle and back to where it was originally - so this
bit makes no sense whatsoever.

The light in the scene looks to be a spot light pointing downwards,
pointing that back towards the camera would be a 90 degree rotation, but
pointing a spotlight at the camera would be pretty odd.  Could you mean
something completely different from what you are saying?

Robert.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Why does osg::AutoTransform node disappear when the scene is first created?

2021-03-08 Thread Robert Osfield
Hi ?

There isn't any way to know what settings are provoking these errors, the
best thing you can do is compile a debug version of the OSG and then setup
into the AutoTransform traverse method to figure out what maths is being
invoked and when the errors are occurring.

The only thing I can add is that osgText::Text has support for rotating to
screen and automatically scaling that for most purposes will make
osg::AutoTransform rendundent.  I would try to just use osgText::Text's
support for scaling and rotating and ditch the osg::AutoTransform. You'll
get better performance too.

Cheers,
Robert.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] New AlphaPixel website and some upcoming news

2021-03-04 Thread Chris Hanson
Hey everyone. After like 6 years of it sitting there and being stale, we
finally revamped the AlphaPixel website to reflect all the things we now do
(we now have several business units that do things other than 3D software
development).

So, there's a new AlphaPixel Development website at
https://alphapixeldev.com/

and the old AlphaPixel.com URL is sort of a directory of our different
business units/divisions/whatevers.

So, if you haven't been by recently, stop by and see what we're about and
what we do.


Also, we've been working with and funding Robert to properly
implement/integrate an OpenGL extension we developed OSG support for last
year for one of our OSG/osgEarth clients. We're gonna announce that in
conjunction with Robert maybe next week. I suspect a significant number of
the users on this list may find it very useful.

Following that in a little while, we hope to have another exciting
announcement of an OSG demo application that uses the extension to do cool
things.

And we have more cool news queued up following that.

If you're into the social media thing, follow our Twitter or Facebook or
LinkedIn pages to stay informed. 2021 is going to be a busy and exciting
year and we look forward to experiencing it with you all.

-- 
Chris 'Xenon' Hanson, omo sanza lettere. xe...@alphapixel.com
http://www.alphapixel.com/
Training • Consulting • Contracting
3D • Scene Graphs (Open Scene Graph/OSG) • OpenGL 2 • OpenGL 3 • OpenGL 4 •
GLSL • OpenGL ES 1 • OpenGL ES 2 • OpenCL
Legal/IP • Forensics • Imaging • UAVs • GIS • GPS •
osgEarth • Terrain • Telemetry • Cryptography • LIDAR • Embedded • Mobile •
iPhone/iPad/iOS • Android
@alphapixel  facebook.com/alphapixel (775)
623-PIXL [7495]

-- 
You received this message because you are subscribed to the Google Groups 
"OpenSceneGraph Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to osg-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/osg-users/CAGoufmZzJ0NRUgDTwoLovrDsk5h97JLAO63UVDrbmEK%2BVChk0A%40mail.gmail.com.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Correct time to check shader/program info log

2021-02-24 Thread Wojciech Lewandowski
Hi James,

Its not direct answer to your questions but a code snippet overloading
Program which I used to change shader variant depending on compilation/link
result (from most advanced to more basic fallbacks).  This approach was
quite simple I tested Program compilation result including compilation/link
log obtained from PCP(PerContextProgram ?) by simply checking if my Program
was really applied after Program::apply() and if not adopted fallback to
less demanding shaders. Not sure if this will solve your problem but
perhaps will be a step forward to proper solution.

class MyProgram: public osg::Program
{
public:
MyProgram( ): _shaderVariant( DefaultShaderVariant )
{
osg::Shader * vertShader = osgDB::readShaderFile(
osg::Shader::VERTEX, "MyVertexShader.glsl" );
osg::Shader * fragShader = osgDB::readShaderFile(
osg::Shader::FRAGMENT, "MyFragmentShader.glsl" );

addShader( vertShader );
addShader( fragShader );

notified.resize( DefaultShaderVariant + 1 );
}

void setDigitDefine( std::string MACRO, int DIGIT ) const
{
  //  For brevity code removed but
  //  this function simply checks shader sources and
  //   finds all ocurences of
  // #define MACRO DEFAULT_DIGIT
  //  and replaces them  to
  // #define MACRO DIGIT
  // to select shader codepath dependant on macro value
}

void apply( osg::State& state ) const
{
while( _shaderVariant > 0 )
{
osg::Program::apply( state );

// Break if program was applied ie its not null
if( state.getLastAppliedProgramObject() != NULL )
{
if( !notified[0] )
{
std::cout<< "INFO: MyProgram - GLSL Compilation
Succeeded." << std::endl;
std::cout<< "  Shader variant: " << _shaderVariant <<
std::endl;
std::cout<< "  GL Vendor:  " <<
glGetString(GL_VENDOR) << std::endl;
std::cout<< "  GL Renderer:" <<
glGetString(GL_RENDERER) << std::endl;
std::cout<< "  GL Version: " <<
glGetString(GL_VERSION) << std::endl;
notified[0] = true;
}
break;
}

if( !notified[_shaderVariant] )
{
std::string infoLog;
getPCP( state )->getInfoLog( infoLog );
std::cout<< "ERROR: MyProgram - GLSL Compilation Failed."
<< std::endl;
std::cout<< "  Shader variant: " << _shaderVariant <<
std::endl;
std::cout<< "  GL Vendor: " << glGetString(GL_VENDOR) <<
std::endl;
std::cout<< "  GL Renderer: " << glGetString(GL_RENDERER)
<< std::endl;
std::cout<< "  GL Version: " << glGetString(GL_VERSION) <<
std::endl;
std::cout<< infoLog << std::endl;

notified[_shaderVariant] = true;
}

// Switch to fallback variants if program link failed
setDigitDefine( "SHADER_VARIANT", --_shaderVariant );
}
}

protected:
mutable int _shaderVariant;
static const int DefaultShaderVariant = 2;
mutable std::vector< bool > notified;
};

Cheers,
Wojtek Lewandowski

śr., 24 lut 2021 o 10:30 James Turner  napisał(a):

> Hello,
>
> I’m trying to extract shader compile and link info logs at runtime, so I
> can log+report them.
>
> I note osg::Program::getGlProgramInfoLog exists, obviously it takes a
> context ID since the PerContextProgram is what has the actual errors.
>
> Two things I need help with:
>
> 1) does the program log also contain shader compile errors, or is this
> only the link log? I don’t see a corresponding APi on osg::Shader, is why I
> ask
>
> 2) *when* can I call the log functions and expect to get valid results?
> Given the OSg drawing model, obviously the log won’t be available
> immediately. Do I need to use a DrawCallback to check the log after the
> first time the Program has been used?
>
> I looked for examples of using getGlProgramInfoLog but unfortunately
> couldn't find any, maybe pointing me at one would answer both of these
> points.
>
> Kind regards,
> James Turner
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Correct place to check shader compile errors

2021-02-24 Thread Wojciech Lewandowski
Hi James,

Its not direct answer to your questions but a code snippet overloading
Program which I used to change shader variant depending on compilation/link
result (from most advanced to more basic fallbacks).  This approach was
quite simple I tested Program compilation result (including
compilation/ling log) by simply checking if my Program was really applied
after Program::apply() and if not adopted fallback to less demanding
shaders. Not sure if this will solve your problem but perhaps will be a
step forward to proper solution.

class MyProgram: public osg::Program
{
public:
MyProgram( ): _shaderVariant( DefaultShaderVariant )
{
osg::Shader * vertShader = osgDB::readShaderFile(
osg::Shader::VERTEX, "MyVertexShader.glsl" );
osg::Shader * fragShader = osgDB::readShaderFile(
osg::Shader::FRAGMENT, "MyFragmentShader.glsl" );

addShader( vertShader );
addShader( fragShader );

notified.resize( DefaultShaderVariant + 1 );
}

void setDigitDefine( std::string MACRO, int DIGIT ) const
{
  //  For brevity code removed but
  //  this function simply checks shader sources and
  //   finds all ocurences of
  // #define MACRO DEFAULT_DIGIT
  //  and replaces them  to
  // #define MACRO DIGIT
  // to select shader codepath dependant on macro value
}

void apply( osg::State& state ) const
{
while( _shaderVariant > 0 )
{
osg::Program::apply( state );

// Break if program was applied ie its not null
if( state.getLastAppliedProgramObject() != NULL )
{
if( !notified[0] )
{
std::cout<< "INFO: MyProgram - GLSL Compilation
Succeeded." << std::endl;
std::cout<< "  Shader variant: " << _shaderVariant <<
std::endl;
std::cout<< "  GL Vendor:  " <<
glGetString(GL_VENDOR) << std::endl;
std::cout<< "  GL Renderer:" <<
glGetString(GL_RENDERER) << std::endl;
std::cout<< "  GL Version: " <<
glGetString(GL_VERSION) << std::endl;
notified[0] = true;
}
break;
}

if( !notified[_shaderVariant] )
{
std::string infoLog;
getPCP( state )->getInfoLog( infoLog );
std::cout<< "ERROR: MyProgram - GLSL Compilation Failed."
<< std::endl;
std::cout<< "  Shader variant: " << _shaderVariant <<
std::endl;
std::cout<< "  GL Vendor: " << glGetString(GL_VENDOR) <<
std::endl;
std::cout<< "  GL Renderer: " << glGetString(GL_RENDERER)
<< std::endl;
std::cout<< "  GL Version: " << glGetString(GL_VERSION) <<
std::endl;
std::cout<< infoLog << std::endl;

notified[_shaderVariant] = true;
}

// Switch to fallback variants if program link failed
setDigitDefine( "SHADER_VARIANT", --_shaderVariant );
}
}

protected:
mutable int _shaderVariant;
static const int DefaultShaderVariant = 2;
mutable std::vector< bool > notified;
};

Cheers,
Wojtek Lewandowski



śr., 24 lut 2021 o 19:04 'James Turner' via OpenSceneGraph Users <
osg-us...@googlegroups.com> napisał(a):

> I’m trying to extract shader compile and link info logs at runtime, so I
> can log+report them.
>
> I note osg::Program::getGlProgramInfoLog exists, obviously it takes a
> context ID since the PerContextProgram is what has the actual errors.
>
> Two things I need help with:
>
> 1) does the program log also contain shader compile errors, or is this
> only the link log? I don’t see a corresponding APi on osg::Shader, is why I
> ask
>
> 2) *when* can I call the log functions and expect to get valid results?
> Given the OSG drawing model, obviously the log won’t be available
> immediately when creating the Program.. Do I need to use a DrawCallback to
> check the log after the first time the Program has been used?
>
> I looked for examples of using getGlProgramInfoLog but unfortunately
> couldn't find any, maybe pointing me at one would answer both of these
> points.
>
> --
> You received this message because you are subscribed to the Google Groups
> "OpenSceneGraph Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to osg-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/osg-users/437023da-c7b2-4bfb-a6b9-6d6613236e04n%40googlegroups.com
> 
> .
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>

[osg-users] Correct place to check shader compile errors

2021-02-24 Thread 'James Turner' via OpenSceneGraph Users
I’m trying to extract shader compile and link info logs at runtime, so I 
can log+report them.

I note osg::Program::getGlProgramInfoLog exists, obviously it takes a 
context ID since the PerContextProgram is what has the actual errors.

Two things I need help with:

1) does the program log also contain shader compile errors, or is this only 
the link log? I don’t see a corresponding APi on osg::Shader, is why I ask

2) *when* can I call the log functions and expect to get valid results? 
Given the OSG drawing model, obviously the log won’t be available 
immediately when creating the Program.. Do I need to use a DrawCallback to 
check the log after the first time the Program has been used?

I looked for examples of using getGlProgramInfoLog but unfortunately 
couldn't find any, maybe pointing me at one would answer both of these 
points.

-- 
You received this message because you are subscribed to the Google Groups 
"OpenSceneGraph Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to osg-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/osg-users/437023da-c7b2-4bfb-a6b9-6d6613236e04n%40googlegroups.com.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Correct time to check shader/program info log

2021-02-24 Thread James Turner
Hello,

I’m trying to extract shader compile and link info logs at runtime, so I can 
log+report them.

I note osg::Program::getGlProgramInfoLog exists, obviously it takes a context 
ID since the PerContextProgram is what has the actual errors.

Two things I need help with:

1) does the program log also contain shader compile errors, or is this only the 
link log? I don’t see a corresponding APi on osg::Shader, is why I ask

2) *when* can I call the log functions and expect to get valid results? Given 
the OSg drawing model, obviously the log won’t be available immediately. Do I 
need to use a DrawCallback to check the log after the first time the Program 
has been used?

I looked for examples of using getGlProgramInfoLog but unfortunately couldn't 
find any, maybe pointing me at one would answer both of these points.

Kind regards,
James Turner

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] How does OsgAnimation: : Vec3CubicBezier three p, I, o parameters work?

2021-02-24 Thread mirr...@gmail.com
win10

-- 
You received this message because you are subscribed to the Google Groups 
"OpenSceneGraph Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to osg-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/osg-users/ccd5edb7-22fa-4354-97a2-7dab6826ce72n%40googlegroups.com.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] What does this OsgAnimation: : Vec3CubicBezier three p, I, o parameters mean?

2021-02-24 Thread mirr...@gmail.com
win10

-- 
You received this message because you are subscribed to the Google Groups 
"OpenSceneGraph Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to osg-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/osg-users/77e2ae6e-4e2f-4e79-8742-641a6e4c586en%40googlegroups.com.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] OSG installation in windows 10

2021-02-22 Thread Alberto Luaces
Hi, in this day and age I would recommend using a package manager as
vcpkg (https://github.com/microsoft/vcpkg), so you are released from
having also to fetch the external dependencies OSG requires.

For your case, installing OSG and its dependencies is a matter of
issuing

vcpkg.exe install osg:x64-windows

-- 
Alberto

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] How can I hide this white geometry without using the color transparency method and intersect?

2021-02-22 Thread mirr...@gmail.com
Thank you for your question and answer. The problem has been solved.I work 
in a closed environment.Cannot provide code.

I would like to ask how to solve the problem that after OSG thread 
rendering, when the UI thread display will cause thread lag.

void osgQOpenGLWidget::paintGL()

{

OpenThreads::ScopedReadLock locker(_osgMutex);

if (_isFirstFrame) {

_isFirstFrame = false;

m_renderer->getCamera()->getGraphicsContext()->setDefaultFboId(defaultFramebufferObject());

}

m_renderer->frame();

}

在2021年2月8日星期一 UTC+8 下午9:30:15 写道:

> On Mon, 8 Feb 2021 at 13:21, mirr...@gmail.com  wrote:
>
>> system win10
>>
>> //Modifying the depth test sequence doesn't seem to work
>> setRenderBinDetails(1001,"DepthSorteBin");
>>
>
> There isn't any specific advice we can provide as you've provided no 
> specific information about the problem bit of your scene graph, all we have 
> is a screen shot with a random white quad circled.  
>
> The best I can suggest is to look at your database in a modelling tool and 
> remove the offending bit of geometry/triangles.  That assumes the problem 
> is with some geometry in your scene.
>
> However, you don't provide any information that we can use so my 
> suggestion is just a random guess as to what might be wrong.  You really 
> have to try and provide a clear explanation of what is your scene graph and 
> where the problem might be in this scene graph.
>

-- 
You received this message because you are subscribed to the Google Groups 
"OpenSceneGraph Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to osg-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/osg-users/56d8068f-35a7-4aa2-bf59-c7cf6ce47f82n%40googlegroups.com.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] How to change QOpenGLWidget in OsgQt module to another thread rendering?

2021-02-20 Thread mirr...@gmail.com
win10

-- 
You received this message because you are subscribed to the Google Groups 
"OpenSceneGraph Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to osg-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/osg-users/7913a4e1-cd3c-476b-8ae5-703e286471c5n%40googlegroups.com.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] OSG installation in windows 10

2021-02-19 Thread Voerman, L.
Hi Yeshwanth,
from your screenshot we can see that cmake found zlib, but the import
library it found (c:\Users\Yeshwanth\Anaconda3\Library\lib\z.lib) is an x86
library. (Probably the same for curl)
As you are compiling x64 you need the x64 versions of the *.lib files.
CMake doesn't check this, it just finds a .lib with the right name.
Laurens.

On Thu, Feb 18, 2021 at 9:25 AM yeshwanth m 
wrote:

> Hi all,
>
> New to OSG, trying to install OSG in windows 10, using the following link
> https://vicrucann.github.io/tutorials/osg-windows-quick-install/. I think
> libraries didn't link properly. Attached the screenshot(link errors),
> suggest to me the way to install OSG. Thanks in advance.
>
> --
> You received this message because you are subscribed to the Google Groups
> "OpenSceneGraph Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to osg-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/osg-users/CAJAvptFfo5gPvX9PmXMoGb%2B0arovFYj5uNCXz8mfPbUGc1fohg%40mail.gmail.com
> 
> .
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] OSG installation in windows 10

2021-02-18 Thread Alexandre Vaillancourt
Do you have the 3rd party libraries?

Le jeu. 18 févr. 2021 03 h 24, yeshwanth m  a
écrit :

> Hi all,
>
> New to OSG, trying to install OSG in windows 10, using the following link
> https://vicrucann.github.io/tutorials/osg-windows-quick-install/. I think
> libraries didn't link properly. Attached the screenshot(link errors),
> suggest to me the way to install OSG. Thanks in advance.
>
> --
> You received this message because you are subscribed to the Google Groups
> "OpenSceneGraph Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to osg-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/osg-users/CAJAvptFfo5gPvX9PmXMoGb%2B0arovFYj5uNCXz8mfPbUGc1fohg%40mail.gmail.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"OpenSceneGraph Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to osg-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/osg-users/CAJ0zd3Lmez-snFga9LeGh_KCXNSj4Dcp2vThKXj3ZrW%2Br0Shyg%40mail.gmail.com.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] setMaxAnisotropy() Causes Segfault

2021-02-18 Thread merspieler
On Thu, Feb 18, 2021 at 05:08:36PM +, Robert Osfield wrote:
> The texture->setMaxAnisotropy() is a straight forward C++ method, the only
> reason for it to crash would be for the method to be called on a nullptr or
> invalid texture pointer.

Thanks for the hint.

I've checked that with gdb, it is a nullptr.

> Most likely the bug stems from simgear so I would suggest contacting the
> FlightGear team to see if they can reproduce the crash and then hunt the
> down the cause of the invalid pointer.

I'll do that.

Thanks again


signature.asc
Description: PGP signature
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] setMaxAnisotropy() Causes Segfault

2021-02-18 Thread Robert Osfield
The texture->setMaxAnisotropy() is a straight forward C++ method, the only
reason for it to crash would be for the method to be called on a nullptr or
invalid texture pointer.

Most likely the bug stems from simgear so I would suggest contacting the
FlightGear team to see if they can reproduce the crash and then hunt the
down the cause of the invalid pointer.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] OSG installation in windows 10

2021-02-18 Thread 杨光
Maybe you can try when using cmake to build the solution from source code,
don't choose the default x64, but use x86. And make sure your cmake shows
that enough third-party libraries are found on your device to build OSG.

yeshwanth m  于2021年2月18日周四 下午4:24写道:

> Hi all,
>
> New to OSG, trying to install OSG in windows 10, using the following link
> https://vicrucann.github.io/tutorials/osg-windows-quick-install/. I think
> libraries didn't link properly. Attached the screenshot(link errors),
> suggest to me the way to install OSG. Thanks in advance.
>
> --
> You received this message because you are subscribed to the Google Groups
> "OpenSceneGraph Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to osg-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/osg-users/CAJAvptFfo5gPvX9PmXMoGb%2B0arovFYj5uNCXz8mfPbUGc1fohg%40mail.gmail.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"OpenSceneGraph Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to osg-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/osg-users/CAN5EeDn15MDxonbmx8ChGr7_fVytdC06wcqZjs7CMEfJ-pbTyw%40mail.gmail.com.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] setMaxAnisotropy() Causes Segfault

2021-02-18 Thread merspieler
I was told to ask here for help on this.

I'm receiving a SIGSEGV when texture->setMaxAnisotropy() is called.
According to the header file texture is:
osg::ref_ptr texture;

I'm not familiar with osg nor the code that causes it
so I hope, you can help me.

Thread 1 "fgfs" received signal SIGSEGV, Segmentation fault.
0x773e1890 in osg::Texture::setMaxAnisotropy(float) () from 
../../openscenegraph/lib/libosg.so.162
(gdb) bt full
#0  0x773e1890 in osg::Texture::setMaxAnisotropy(float) () from 
../../openscenegraph/lib/libosg.so.162
No symbol table info available.
#1  0x56476bf9 in simgear::canvas::ODGauge::setMaxAnisotropy 
(this=, anis=)
at /games/flightgear-new/simgear/simgear/canvas/ODGauge.cxx:207


I did already a sanity check on the input to rule out any
unreasonable input values.

What can I do to find the issue?


signature.asc
Description: PGP signature
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] osgTerrain and dynamic Heightmaps

2021-02-17 Thread Robert Osfield
Hi Anders,

On Wed, 17 Feb 2021 at 17:02, Anders Backman  wrote:

> I was wondering if there is any way of using the osgTerrain library by
> feeding it with a dynamic (changing over time) heightmap?
> I was thinking that most of the core features are there, including
> the DisplacementMappingTechnique for quick tesselation.
> But perhaps this is completely out of the scope for the Terrain library?
>

I don't recall writing any dynamic functionality into osgTerrain, but
DisplacementMappingTechnique would be the way I'd tackle it.

These days I'd just write my own osg::Geometry/shaders set up for this type
of work without dropping in osgTerrain, but then I'd also write with the
VulkanSceneGraph :-)

Robert.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] osgTerrain and dynamic Heightmaps

2021-02-17 Thread Anders Backman
Hi all.

I was wondering if there is any way of using the osgTerrain library by
feeding it with a dynamic (changing over time) heightmap?
I was thinking that most of the core features are there, including
the DisplacementMappingTechnique for quick tesselation.
But perhaps this is completely out of the scope for the Terrain library?

Cheers,
Anders


-- 
__
Anders Backman, HPC2N
90187 Umeå University, Sweden
and...@cs.umu.se http://www.hpc2n.umu.se
Cell: +46-70-392 64 67
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Using osg::Matrix::ortho2D as ViewMatrix

2021-02-11 Thread Werner Modenbach
Hi all!

I used to set
    camera->setProjectionMatrix(osg::Matrix::ortho2D(0.0f,1.0f,0.0f,1.0f));
when creating RTT-Cameras.

In my SSAO-Module I need to retrieve the projection matrix but
    if (cam->getProjectionMatrixAsOrtho(left,right,bottom,top,zNear,zFar)) ...
seems to return true but the values retrieved look strange.

So two questions:
1) Do I have to assign osg::Matrix::ortho insted to RTT-Cameras? What is the 
difference?
2) Can I retrieve correct values when ortho2D is used?

Many thanks for any assistance.

- Werner -
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Several clipping planes

2021-02-10 Thread Claudio Benghi
Thanks Robert,

apologies for the long delay, It's taking me a lot of studying to 
understand shaders uniforms and attributes, 
so I'm responding to your question as I go on reading and testing.

> Is the clipping always going to base on a horizontal plane?  

Unfortunately no. While this will be the case in 90% of the models, I need 
to have a more flexible API,
so I'm thinking to have uniforms to store reference planes (which will 
rarely or never change) and some method
(uniform or attribute) to pass the clipping distance for the relevant 
primitives.

Are there benefits in moving the objects that need clipping under a 
different group? They will always be a minority of the model geometry.

Thanks,
Claudio

On Thursday, 4 February 2021 at 13:40:27 UTC+1 robert@gmail.com wrote:

> Hi Claudio,
>
> Welcome to the OSG community. For your first post you sure are diving into 
> an advanced topic :-)
>
> Conventionally one would do clipping using gl_ClipPlane, this is set by 
> osg::ClipPlane state attribute and osg::ClipNode to place one or more 
> ClipPlane in a final position in space,  I think OpenGL implementations 
> provide at least 6 clip planes, but It's while since I've head my head deep 
> in OpenGL as I'm mostly working with Vulkan these days.  There is a hard 
> limit though that is driver/hardware dependent.  This type of clipping gets 
> applied during the traseration step just prior to the fragment shader.  It 
> can be used with fixed function and shader pipelines.
>
> From your description it sounds like something custom will be best, which 
> in essence would be to use a fragment shader test to discard/fade out 
> fragments based on some combination of uniform or vertex attribute settings.
>
> Is the clipping always going to base on a horizontal plane?  If so then 
> you just need to encode the height to clip at for each object via a uniform 
> or more efficiently with a vertex attribute bound with BIND_OVERALL.  
> Uniforms have a higher overhead than vertex attributes in OSG/OpenGL so 
> general best used for rarely changing values, with values that change with 
> high frequency i.e. different for each object using vertex attributes will 
> be more efficient.
>
> Cheers,
> Robert.
>

-- 
You received this message because you are subscribed to the Google Groups 
"OpenSceneGraph Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to osg-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/osg-users/18d25f40-3a7f-4c24-9115-b140d5fe490dn%40googlegroups.com.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Anyone built on Android recently?

2021-02-09 Thread Chris Hanson
Just trying to see what the build process landscape looks like in 2021.

It was a mess last time I did it with ancient NDK versions and cruft.

-- 
You received this message because you are subscribed to the Google Groups 
"OpenSceneGraph Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to osg-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/osg-users/CAGoufmaUfLWdQeeTUwDKVKLmF0zs4VGYjpMrF9MNbfKpu3J_Gg%40mail.gmail.com.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] How can I hide this white geometry without using the color transparency method and intersect?

2021-02-08 Thread Robert Osfield
On Mon, 8 Feb 2021 at 13:21, mirr...@gmail.com  wrote:

> system win10
>
> //Modifying the depth test sequence doesn't seem to work
> setRenderBinDetails(1001,"DepthSorteBin");
>

There isn't any specific advice we can provide as you've provided no
specific information about the problem bit of your scene graph, all we have
is a screen shot with a random white quad circled.

The best I can suggest is to look at your database in a modelling tool and
remove the offending bit of geometry/triangles.  That assumes the problem
is with some geometry in your scene.

However, you don't provide any information that we can use so my suggestion
is just a random guess as to what might be wrong.  You really have to try
and provide a clear explanation of what is your scene graph and where the
problem might be in this scene graph.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Is there a good way to set the rotation and orientation of the SpotLight to match the attitude of the model?

2021-02-04 Thread newli...@gmail.com
I implemented Spot Light by referring to osglight.cpp.

However, it is having difficulty in implementing SpotLight to change 
direction according to the heading of the aircraft at the same location.

Even if I get the Pitch, Roll, and Heading values of the aircraft and set 
the values in the Direction of Light, even if I add them to the 
osg::PositionAttitudeTransform object and set the values in setAttitude(), 
the desired result is not obtained.

In common sense, I think you can only rotate the SpotLight's z axis to 
match the aircraft's heading... The result is not implemented as expected.

Is there a good way to set the rotation and orientation of the SpotLight to 
match the attitude of the model?

-- 
You received this message because you are subscribed to the Google Groups 
"OpenSceneGraph Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to osg-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/osg-users/035bc04b-3175-47f5-a449-3170aac59962n%40googlegroups.com.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Several clipping planes

2021-02-04 Thread Robert Osfield
Hi Claudio,

Welcome to the OSG community. For your first post you sure are diving into
an advanced topic :-)

Conventionally one would do clipping using gl_ClipPlane, this is set by
osg::ClipPlane state attribute and osg::ClipNode to place one or more
ClipPlane in a final position in space,  I think OpenGL implementations
provide at least 6 clip planes, but It's while since I've head my head deep
in OpenGL as I'm mostly working with Vulkan these days.  There is a hard
limit though that is driver/hardware dependent.  This type of clipping gets
applied during the traseration step just prior to the fragment shader.  It
can be used with fixed function and shader pipelines.

>From your description it sounds like something custom will be best, which
in essence would be to use a fragment shader test to discard/fade out
fragments based on some combination of uniform or vertex attribute settings.

Is the clipping always going to base on a horizontal plane?  If so then you
just need to encode the height to clip at for each object via a uniform or
more efficiently with a vertex attribute bound with BIND_OVERALL.  Uniforms
have a higher overhead than vertex attributes in OSG/OpenGL so general best
used for rarely changing values, with values that change with high
frequency i.e. different for each object using vertex attributes will be
more efficient.

Cheers,
Robert.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Several clipping planes

2021-02-03 Thread Claudio Benghi
Hello all,

My first post on the new forum, thanks for accepting my request, and for 
the amazing work on OSG over the years.

I intend to use OSG to display the construction sequence of a building site.
Some elements will just appear at a given frame (that's easy), but others 
I'd like to appear progressively.

I don't mean that they will "move" to their destination, but rather, that 
they will be partially visible in their final position as if being 
partially clipped, until they are entirely visible:

[image: Clipping.svg.png]

Since timing will be different for each object, a few clipping planes would 
not be enough. 

>From what I read, it should be possible to use the fragment shader to cut 
elements fairly arbitrarily. 

I've got a couple of questions:

1) Is it possible to use fragment shaders to cut objects at a custom 
distance from a shared reference plane (the distance should be independent 
for each object, see hA and hB in the image above)?

2) What path would you suggest me to attempt? Is gl_ClipDistance the right 
way to go?
Am I completely wrong thinking of something like:

gl_ClipDistance[0] = dot(u_plane0,vsPos) + *CustomObjectH*;

3) Is the StateSet of an object the right way to pass (and update) a custom 
variable for the fragment shader (i.e. the distance from the reference 
plane)?

Many thanks,
Claudio

-- 
You received this message because you are subscribed to the Google Groups 
"OpenSceneGraph Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to osg-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/osg-users/9173059e-957c-471c-a71b-f0dd52a1afb0n%40googlegroups.com.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] getting userData or accumulated Uniform in nodevisitor

2021-02-02 Thread Werner Modenbach
Hi Robert,

many thanks for your answers and support. I'm far from reclaiming something.
So as I understand your explanation the information I expected during cull 
trversal is just not there.
So I'll look for another solution.

Thanks again

- Werner -

Am 02.02.2021 um 13:59 schrieb Robert Osfield:
> On Tue, 2 Feb 2021 at 10:38, Werner Modenbach 
> mailto:werner.modenb...@modenbach-ac.de>> 
> wrote:
>
> Hi Robert,
>
>
> Replying to osg-users list so that others can chip in with insights or learn 
> from the discussion.
>  
>
> I think I'm close to getting the solution.
> Unfortunately the CullStack doesn't handle any StateSets.
> I also do not really understand what a StateGraph is.
> I just guess, calling /CullVisitor->getCurrentStateGraph()->_stateSet 
> /gives me the accumulated StateSet.
> Am I right?
> Or is the accumulation of StateSets somewhere in CullVisitor->getState()? 
> But there is no method for just querying a uniform in State.
> Most of the classes have only push(), pop() or apply() methods. No query 
> methods.
>
>
> I have touched this code for years so you are probably more familiar with it 
> now than I. 
>
> From the top of my head the CullVisitor doesn't directly manage individual 
> state components like Uniform, just the high level StateSet.  The results of 
> the Cull traversal are
> passed on to the a osgUitl::StateGraph that remains at the StateSet levels, 
> it's only once this StateGraph is applied during the draw traversal does the 
> OSG's draw traversal
> behind to handle the individual components of state like models, attributes 
> and modes, and this is done via osg::State.
>
> What you are wanting to do is out of the ordinary, it's not something the OSG 
> was specifically designed to do.  Whether your approach is really necessary 
> or the best approach I
> don't know - I'm just trying to answer questions.  When you do go beyond what 
> the OSG was originally envisaged to do you'll need to accept that you'll need 
> to dig into code and
> figure stuff out, I can only help you so much.
>
> Robert.
>
>
>
>  
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] getting userData or accumulated Uniform in nodevisitor

2021-02-02 Thread Robert Osfield
On Tue, 2 Feb 2021 at 10:38, Werner Modenbach <
werner.modenb...@modenbach-ac.de> wrote:

> Hi Robert,
>

Replying to osg-users list so that others can chip in with insights or
learn from the discussion.


> I think I'm close to getting the solution.
> Unfortunately the CullStack doesn't handle any StateSets.
> I also do not really understand what a StateGraph is.
> I just guess, calling *CullVisitor->getCurrentStateGraph()->_stateSet *gives
> me the accumulated StateSet.
> Am I right?
> Or is the accumulation of StateSets somewhere in CullVisitor->getState()?
> But there is no method for just querying a uniform in State.
> Most of the classes have only push(), pop() or apply() methods. No query
> methods.
>

I have touched this code for years so you are probably more familiar with
it now than I.

>From the top of my head the CullVisitor doesn't directly manage individual
state components like Uniform, just the high level StateSet.  The results
of the Cull traversal are passed on to the a osgUitl::StateGraph that
remains at the StateSet levels, it's only once this StateGraph is applied
during the draw traversal does the OSG's draw traversal behind to handle
the individual components of state like models, attributes and modes, and
this is done via osg::State.

What you are wanting to do is out of the ordinary, it's not something the
OSG was specifically designed to do.  Whether your approach is really
necessary or the best approach I don't know - I'm just trying to answer
questions.  When you do go beyond what the OSG was originally envisaged to
do you'll need to accept that you'll need to dig into code and figure stuff
out, I can only help you so much.

Robert.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] getting userData or accumulated Uniform in nodevisitor

2021-02-01 Thread 杨光
ok i get it,i feel sorry for that

Robert Osfield  于2021年2月1日周一 下午6:45写道:

> On Mon, 1 Feb 2021 at 10:38, 杨光  wrote:
>
>> Hello, I’m sorry to ask you, I use shader on osgearth, the coloring
>> effect is unsatisfactory, and the coloring area will change with the
>> movement of the camera, can you give some hints on this question ?
>>
>
> If you have an unrelated question it's inappropriate to piggyback off
> another thread as it makes it harder for everyone to follow.  It'd be rude
> to interrupt someone else's conversation in real-life, online forum/mailing
> list as just the same. Please start your own thread for your question.
>
> For osgEarth related questions there is a dedicated community for it so
> it's likely to be the best place to ask questions about it there.
>
> Cheers,
> Robert.
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "OpenSceneGraph Users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/osg-users/SlS_7SY0528/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> osg-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/osg-users/CAFN7Y%2BXoqf_pZNJ5fLB_KWSWUqsduJgbogdvMakw_mOJ76rC%2Bw%40mail.gmail.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"OpenSceneGraph Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to osg-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/osg-users/CAN5EeD%3DHRo1aC2Jm8mhvpgOGYhVPaw_tDhxjFt6%3DAwox-RuUdA%40mail.gmail.com.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


  1   2   3   4   5   6   7   8   9   10   >