Re: [osg-users] [build] Can't build OSG 2.8.2 on CentOS 7.5

2018-06-12 Thread Alexey Palagin


robertosfield wrote:
> Hi Alexey,
> Could it be that you are reading a CMake message as a critical problem
> when it's just a message that an optional package hasn't been found?
> Have you tried just running make?
> 
> Robert


Yes, I am reading a CMake message as a critical problem, because I could not 
find an appropriate package. Now I see it is not a problem at all, thank you.

I tried to run make - it run without errors.

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=74058#74058





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


Re: [osg-users] OsgMovie ffmpeg and audio (SDL2) - Audio seems to make video slower. Audio has hiccoughing

2018-06-12 Thread Javier Taibo
  Hi,

  Try replacing m_context->time_base by m_stream->time_base
in FFmpegDecoderVideo::decodeLoop() (FFmpegDecoderVideo.cpp)

  This should solve your problem with FFMPEG versions after 3.0


  Cheers!


On Mon, Jun 11, 2018 at 4:36 PM, Andrea Martini 
wrote:

> Hi everyone,
> i'm using osg3.5.6 on visual studio 2013 (windows 10), and i'm using
> ffmpeg  plugin combined with SDL2 to play video and audio streaming with
> osgmovie example.
> If i don't use SDL2 (no audio), video streaming works fine.
> If i add SDL2 (audio), i get two bad results:
> 1) video stream get slower
> 2) Audio has hiccoughing
>
> I tryied with some video examples (with different resolutions) but i get
> the same result.
>
> Following, i report audio streaming output displayed on the console:
>
> ffmpeg::open(C:\Movie\surfers_360.mp4) size(2048, 1024) aspect ratio 1
> Attaching FFmpegAudioStream
> AudioStream read []
> FFmpegAudioStream::setAudioSink( 0277C50FEEE0)
> Assigning 0277C50FEEE0
> image->s()2048 image-t()=1024 aspectRatio=1
> SDLAudioSink()::startPlaying()
>   audioFrequency()=48000
>   audioNbChannels()=2
>   audioSampleFormat()=4
>   SampleFormat  = SAMPLE_FORMAT_F32
>
> I'm wondering if i should continue with ffmpeg and sdl libraries, or i
> have to look at another one. In this last case, could you suggest me some
> way to follow? (link, examples, ...)
>
> Thank you!
>
> Cheers,
> Andrea
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=74033#74033
>
>
>
>
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>



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


Re: [osg-users] [build] Can't build OSG 2.8.2 on CentOS 7.5

2018-06-12 Thread Robert Osfield
Hi Alexey,
On Tue, 12 Jun 2018 at 14:33, Alexey Palagin  wrote:
> If DCMTK is used for DICOM support (https://en.wikipedia.org/wiki/DICOM), I 
> don't need it. How to switch it off?

It's just an optional plugin, CMake will look for it, if it isn't
installed it'll not attempt to the use the plugin.

Could it be that you are reading a CMake message as a critical problem
when it's just a message that an optional package hasn't been found?

Have you tried just running make?

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


Re: [osg-users] OsgMovie ffmpeg and audio (SDL2) - Audio seems to make video slower. Audio has hiccoughing

2018-06-12 Thread Andrea Martini
Hi Lauren,
GREAT!!! It's works!
Using the 3.0 version of ffmepg, i can play both video and audio correctly.
Thank you a lot!

Cheers,
Andrea

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=74055#74055





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


Re: [osg-users] [build] Can't build OSG 2.8.2 on CentOS 7.5

2018-06-12 Thread Alexey Palagin


robertosfield wrote:
> Hi Alexey,
> 
> You only need to compile against DCMTK (a thread party project for
> loading dicom files). Do you need dicom support?
> 


Hi, Robert.
If DCMTK is used for DICOM support (https://en.wikipedia.org/wiki/DICOM), I 
don't need it. How to switch it off?

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=74054#74054





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


Re: [osg-users] OsgMovie ffmpeg and audio (SDL2) - Audio seems to make video slower. Audio has hiccoughing

2018-06-12 Thread Voerman, L.
Hi Andrea,
The ffmpeg version I was using did not have this problem,
(ffmpeg-20160517-git-af3e944-win64-shared)
but after updating to ffmpeg-4.0 I could hear and see the problem as well.
I've tried ffmpeg versions 3.4.2 and 3.2 as well - still problems,
found a binary version of 3.0 here
 (build 2016-02-08) - that
works.
I don't have a build setup for ffmpeg yet, so I can't dig down to the
actual problem, but I hope finding a working version helps you along.

Laurens.


On Tue, Jun 12, 2018 at 9:04 AM, Andrea Martini 
wrote:

> Hi Laurens,
> sorry for my mistake. I attached the detailed snapshot of both rendering
> window (with stats) and CPUs usage.
> Frame rate is good (60Hz), but i continue to get a bad audio and to get a
> video play slower.
> I would like to underline that if i play this video with a player like
> VLC, all works fine.
> Another detail about osgmovie example with SDL2 (when i play a video
> stream .mp4 with audio) is the following:  i get a good quality for the
> first 3 or 4 seconds of video, and then i start to get audio hiccoughing
> and video slower.
> I don't know if problem could be focused on some streaming buffer (audio
> and video) management.
>
> Thank you!
>
> Cheers,
> Andrea
>
> PS:
>
> i downloaded SDL2 from:  https://www.libsdl.org/download-2.0.php
> SDL2-devel-2.0.8-VC.zip (Visual C++ 32/64-bit)   I'm using 64bit version
>
> About ffmpeg, i downloaded from: https://ffmpeg.zeranoe.com/builds/
> version 4.0
> Windows 64bit
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=74043#74043
>
>
>
>
> ___
> 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] [build] Can't build OSG 2.8.2 on CentOS 7.5

2018-06-12 Thread Robert Osfield
Hi Alexey,

You only need to compile against DCMTK (a thread party project for
loading dicom files). Do you need dicom support?

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


Re: [osg-users] [build] Can't build OSG 2.8.2 on CentOS 7.5

2018-06-12 Thread Robert Osfield
Hi Alexey,

2.8.2 is an ancient release of the OpenSceneGraph, the current up to
date stable release is 3.6.1,  I strongly recommend using this instead
of 2.8.2, this old release is not been touched by anyone for years so
if there are build issues with modern compiler/build tools then it's
not something that is probably worth trying to resolve when we have
far better modern releases that are known to work fine with present
modern compiler/build tools.

Cheers,
Robert.
On Tue, 12 Jun 2018 at 09:59, Alexey Palagin  wrote:
>
> Hello.
> I am trying to build and install OpenSceneGraph 2.8.2 on CentOS 7.5, 
> configure output in attached file.
> How to solve the problems:
>
> Code:
>
> CMake Warning at /usr/share/cmake/Modules/FindITK.cmake:48 (find_package):
> Could not find a package configuration file named "ITKConfig.cmake"
> provided by package "ITK".
>
> Add the installation prefix of "ITK" to CMAKE_PREFIX_PATH or set "ITK_DIR"
> to a directory containing one of the above files. If "ITK" provides a
> separate development package or SDK, be sure it has been installed.
> Call Stack (most recent call first):
> CMakeLists.txt:304 (FIND_PACKAGE)
>
> checking for module 'xulrunner-xpcom<=1.8.9'
> package 'xulrunner-xpcom<=1.8.9' not found
> checking for module 'xulrunner-js'
> package 'xulrunner-js' not found
> checking for module 'xulrunner-nspr'
> package 'xulrunner-nspr' not found
> checking for module 'xulrunner-nss'
> package 'xulrunner-nss' not found
> checking for module 'gtk+-2.0'
> found gtk+-2.0, version 2.24.31
> checking for module 'gtkglext-x11-1.0'
> package 'gtkglext-x11-1.0' not found
> checking for module 'librsvg-2.0'
> found librsvg-2.0, version 2.40.16
> checking for module 'cairo'
> found cairo, version 1.14.8
> checking for module 'poppler-glib'
> found poppler-glib, version 0.26.5
> Found JPEG: /usr/lib64/libjpeg.so
> CMake Warning (dev) at /usr/share/cmake/Modules/FindPNG.cmake:34 
> (find_package):
> File /usr/share/cmake/Modules/FindPNG.cmake includes
> /home/user/Downloads/osg/OpenSceneGraph-OpenSceneGraph-2.8.2/CMakeModules/FindZLIB.cmake
> (found via CMAKE_MODULE_PATH) which shadows
> /usr/share/cmake/Modules/FindZLIB.cmake. This may cause errors later on .
>
> Policy CMP0017 is not set: Prefer files from the CMake module directory
> when including from there. Run "cmake --help-policy CMP0017" for policy
> details. Use the cmake_policy command to set the policy and suppress this
> warning.
> Call Stack (most recent call first):
> CMakeLists.txt:424 (FIND_PACKAGE)
>
>
>
>
> I have xulrunner installed and I can't find gtkglext-x11 package.
> Thanks in advance for answering.
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=74048#74048
>
>
>
> ___
> 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] [build] Can't build OSG 2.8.2 on CentOS 7.5

2018-06-12 Thread Voerman, L.
Hi Alexey,
Can you explain what the actual problem is?
Possibly also why you try to build a very old version?
cmake ends with
"Configuring done"
so the next step would be
"make" osg "make install"
Laurens.

On Tue, Jun 12, 2018 at 10:51 AM, Alexey Palagin 
wrote:

> Hello.
> I am trying to build and install OpenSceneGraph 2.8.2 on CentOS 7.5,
> configure output in attached file.
> How to solve the problems:
>
> Code:
>
> CMake Warning at /usr/share/cmake/Modules/FindITK.cmake:48 (find_package):
> Could not find a package configuration file named "ITKConfig.cmake"
> provided by package "ITK".
>
> Add the installation prefix of "ITK" to CMAKE_PREFIX_PATH or set "ITK_DIR"
> to a directory containing one of the above files. If "ITK" provides a
> separate development package or SDK, be sure it has been installed.
> Call Stack (most recent call first):
> CMakeLists.txt:304 (FIND_PACKAGE)
>
> checking for module 'xulrunner-xpcom<=1.8.9'
> package 'xulrunner-xpcom<=1.8.9' not found
> checking for module 'xulrunner-js'
> package 'xulrunner-js' not found
> checking for module 'xulrunner-nspr'
> package 'xulrunner-nspr' not found
> checking for module 'xulrunner-nss'
> package 'xulrunner-nss' not found
> checking for module 'gtk+-2.0'
> found gtk+-2.0, version 2.24.31
> checking for module 'gtkglext-x11-1.0'
> package 'gtkglext-x11-1.0' not found
> checking for module 'librsvg-2.0'
> found librsvg-2.0, version 2.40.16
> checking for module 'cairo'
> found cairo, version 1.14.8
> checking for module 'poppler-glib'
> found poppler-glib, version 0.26.5
> Found JPEG: /usr/lib64/libjpeg.so
> CMake Warning (dev) at /usr/share/cmake/Modules/FindPNG.cmake:34
> (find_package):
> File /usr/share/cmake/Modules/FindPNG.cmake includes
> /home/user/Downloads/osg/OpenSceneGraph-OpenSceneGraph-
> 2.8.2/CMakeModules/FindZLIB.cmake
> (found via CMAKE_MODULE_PATH) which shadows
> /usr/share/cmake/Modules/FindZLIB.cmake. This may cause errors later on .
>
> Policy CMP0017 is not set: Prefer files from the CMake module directory
> when including from there. Run "cmake --help-policy CMP0017" for policy
> details. Use the cmake_policy command to set the policy and suppress this
> warning.
> Call Stack (most recent call first):
> CMakeLists.txt:424 (FIND_PACKAGE)
>
>
>
>
> I have xulrunner installed and I can't find gtkglext-x11 package.
> Thanks in advance for answering.
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=74048#74048
>
>
>
>
> ___
> 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] [build] Can't build OSG 2.8.2 on CentOS 7.5

2018-06-12 Thread Alexey Palagin
Hello.
I am trying to build and install OpenSceneGraph 2.8.2 on CentOS 7.5, configure 
output in attached file.
How to solve the problems:

Code:

CMake Warning at /usr/share/cmake/Modules/FindITK.cmake:48 (find_package):
Could not find a package configuration file named "ITKConfig.cmake"
provided by package "ITK".

Add the installation prefix of "ITK" to CMAKE_PREFIX_PATH or set "ITK_DIR"
to a directory containing one of the above files. If "ITK" provides a
separate development package or SDK, be sure it has been installed.
Call Stack (most recent call first):
CMakeLists.txt:304 (FIND_PACKAGE)

checking for module 'xulrunner-xpcom<=1.8.9'
package 'xulrunner-xpcom<=1.8.9' not found
checking for module 'xulrunner-js'
package 'xulrunner-js' not found
checking for module 'xulrunner-nspr'
package 'xulrunner-nspr' not found
checking for module 'xulrunner-nss'
package 'xulrunner-nss' not found
checking for module 'gtk+-2.0'
found gtk+-2.0, version 2.24.31
checking for module 'gtkglext-x11-1.0'
package 'gtkglext-x11-1.0' not found
checking for module 'librsvg-2.0'
found librsvg-2.0, version 2.40.16
checking for module 'cairo'
found cairo, version 1.14.8
checking for module 'poppler-glib'
found poppler-glib, version 0.26.5
Found JPEG: /usr/lib64/libjpeg.so
CMake Warning (dev) at /usr/share/cmake/Modules/FindPNG.cmake:34 (find_package):
File /usr/share/cmake/Modules/FindPNG.cmake includes
/home/user/Downloads/osg/OpenSceneGraph-OpenSceneGraph-2.8.2/CMakeModules/FindZLIB.cmake
(found via CMAKE_MODULE_PATH) which shadows
/usr/share/cmake/Modules/FindZLIB.cmake. This may cause errors later on .

Policy CMP0017 is not set: Prefer files from the CMake module directory
when including from there. Run "cmake --help-policy CMP0017" for policy
details. Use the cmake_policy command to set the policy and suppress this
warning.
Call Stack (most recent call first):
CMakeLists.txt:424 (FIND_PACKAGE)




I have xulrunner installed and I can't find gtkglext-x11 package.
Thanks in advance for answering.

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=74048#74048



The C compiler identification is GNU 4.8.5
The CXX compiler identification is GNU 4.8.5
Check for working C compiler: /usr/bin/cc
Check for working C compiler: /usr/bin/cc -- works
Detecting C compiler ABI info
Detecting C compiler ABI info - done
Check for working CXX compiler: /usr/bin/c++
Check for working CXX compiler: /usr/bin/c++ -- works
Detecting CXX compiler ABI info
Detecting CXX compiler ABI info - done
Looking for include file pthread.h
Looking for include file pthread.h - found
Looking for pthread_create
Looking for pthread_create - not found
Looking for pthread_create in pthreads
Looking for pthread_create in pthreads - not found
Looking for pthread_create in pthread
Looking for pthread_create in pthread - found
Found Threads: TRUE  
Looking for XOpenDisplay in /usr/lib64/libX11.so;/usr/lib64/libXext.so
Looking for XOpenDisplay in /usr/lib64/libX11.so;/usr/lib64/libXext.so - found
Looking for gethostbyname
Looking for gethostbyname - found
Looking for connect
Looking for connect - found
Looking for remove
Looking for remove - found
Looking for shmat
Looking for shmat - found
Looking for IceConnectionNumber in ICE
Looking for IceConnectionNumber in ICE - found
Found X11: /usr/lib64/libX11.so
Found OpenGL: /usr/lib64/libGL.so  
Found CURL: /usr/lib64/libcurl.so (found version "7.29.0") 
CMake Warning at /usr/share/cmake/Modules/FindITK.cmake:48 (find_package):
  Could not find a package configuration file named "ITKConfig.cmake"
  provided by package "ITK".

  Add the installation prefix of "ITK" to CMAKE_PREFIX_PATH or set "ITK_DIR"
  to a directory containing one of the above files.  If "ITK" provides a
  separate development package or SDK, be sure it has been installed.
Call Stack (most recent call first):
  CMakeLists.txt:304 (FIND_PACKAGE)


Found PkgConfig: /usr/bin/pkg-config (found version "0.27.1") 
checking for module 'xulrunner-xpcom<=1.8.9'
  package 'xulrunner-xpcom<=1.8.9' not found
checking for module 'xulrunner-js'
  package 'xulrunner-js' not found
checking for module 'xulrunner-nspr'
  package 'xulrunner-nspr' not found
checking for module 'xulrunner-nss'
  package 'xulrunner-nss' not found
checking for module 'gtk+-2.0'
  found gtk+-2.0, version 2.24.31
checking for module 'gtkglext-x11-1.0'
  package 'gtkglext-x11-1.0' not found
checking for module 'librsvg-2.0'
  found librsvg-2.0, version 2.40.16
checking for module 'cairo'
  found cairo, version 1.14.8
checking for module 'poppler-glib'
  found poppler-glib, version 0.26.5
Found JPEG: /usr/lib64/libjpeg.so  
CMake Warning (dev) at /usr/share/cmake/Modules/FindPNG.cmake:34 (find_package):
  File /usr/share/cmake/Modules/FindPNG.cmake includes
  
/home/alexegin/Downloads/osg/OpenSceneGraph-OpenSceneGraph-2.8.2/CMakeModules/FindZLIB.cmake
  (found via CMAKE_MODULE_PATH) which shadows
  /usr/share/cmake/Modules/FindZLIB.cmake.  This may 

Re: [osg-users] C++11 for next stable release of OpenSceneGraph?

2018-06-12 Thread Sebastian Messerschmidt



Hi Daniel,

Sorry I was mixing up VSG and OSG here. For OSG you're totally right 
with your concerns.


Cheers
Sebastian > Hi Daniel, > Hi Sebastian,



I'd rather target C++14/17 though since almost all modern compilers
are good at keeping up with the new features (even Microsoft is doing
a good job here).


you just have to consider that switching compilers isn't that easy for
everyone, because they've constraints that aren't completely under their
control.


But VSG is a fresh start and there are no existing projects that use it 
a this point. So "switching" compilers is not an issue, right? I mean if 
someone is planning on using it, using a modern compiler is simply a 
prerequisite. Since the project just started I think it won't be used in 
production before 2019. Until then most environments should be up2date 
with C++14 conforming compilers.




So going for C++11 should be fine at this point in time, but I wouldn't
go beyond.


Most C++11 compilers I've encountered support a subset of C++14 anyways, 
which is why I also pointed out, that defining a set of features might 
be possible too.



Cheers
Sebastian
___
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] C++11 for next stable release of OpenSceneGraph?

2018-06-12 Thread Robert Osfield
HI Guys,

Thanks for the feedback on adopting C++11 and later for the next
stable OpenSceneGraph release.

I am not planning on radical change to OSG in this timeframe, instead
where things will be cleaned up and it's an easy change to adopt
recent C++ functionality to achieve this.  I don't foresee a general
walk through of the OSG codebase changing everything we can to a
modern C++ way of doing things just because it could be done.

FYI, prior to the 3.6.1 release I stepped through making sure it built
cleanly under C++11, 14 and 17, the only thing I had to amend was to
replace the deprecated C++ usage.  This means that 3.6.1 is forwards
and backwards compatible to a wide range of C++ compilers.

For me, the key thing for the OpenSceneGraph project is now stability.
I want it to be a rock solid base for people to develop and maintain
their graphics application upon.

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


Re: [osg-users] C++11 for next stable release of OpenSceneGraph?

2018-06-12 Thread Sebastian Messerschmidt

Hi Daniel, > Hi Sebastian,



I'd rather target C++14/17 though since almost all modern compilers
are good at keeping up with the new features (even Microsoft is doing
a good job here).


you just have to consider that switching compilers isn't that easy for
everyone, because they've constraints that aren't completely under their
control.


But VSG is a fresh start and there are no existing projects that use it 
a this point. So "switching" compilers is not an issue, right? I mean if 
someone is planning on using it, using a modern compiler is simply a 
prerequisite. Since the project just started I think it won't be used in 
production before 2019. Until then most environments should be up2date 
with C++14 conforming compilers.




So going for C++11 should be fine at this point in time, but I wouldn't
go beyond.


Most C++11 compilers I've encountered support a subset of C++14 anyways, 
which is why I also pointed out, that defining a set of features might 
be possible too.



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


Re: [osg-users] C++11 for next stable release of OpenSceneGraph?

2018-06-12 Thread Daniel Trstenjak
Hi Sebastian,

> I'd rather target C++14/17 though since almost all modern compilers
> are good at keeping up with the new features (even Microsoft is doing
> a good job here).

you just have to consider that switching compilers isn't that easy for
everyone, because they've constraints that aren't completely under their
control.

So going for C++11 should be fine at this point in time, but I wouldn't
go beyond.

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


Re: [osg-users] C++11 for next stable release of OpenSceneGraph?

2018-06-12 Thread Sebastian Messerschmidt

Hi,

I totally support the step to use a more modern feature set of C++. It 
really makes code easier to read, maintain and coding more fun. I'd 
rather target C++14/17 though since almost all modern compilers are good 
at keeping up with the new features (even Microsoft is doing a good job 
here).  If you consider this too much of a stretch, you might consider 
to simply constrain the set of features allowed for now (excluding not 
so well supported ones).


Another word on coding style: Lambdas, especially when the get more 
complex should follow a consistent style. Else they tend to increase the 
parsing effort for the human brain beyond most people's limit.


From my experience the should always be defined and named before use in 
a function. This way the function of the lambda is stated by the name 
which saves a lot of guesswork.


E.g.

 the "auto" inside the lambda params is a C++14 feature btw.
auto find_name= [](const auto& elem){return token==elem.name;};

std::find_if(std::begin(elements), std::end(elements), find_name);

instead of:
std::find_if(std::begin(elements), std::end(elements), [](const 
auto& elem){return token==elem.name;});



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