Re: [osg-users] How to properly compile osg with EGL support?

2019-01-23 Thread Omar Álvarez
Hi,

Sounds good. Tomorrow morning I will compile it. I will probably also make
some changes in how GL is used in CMake since to make EGL work you need to
link to GLVND GL. Thanks for the tips to get OSG to compile.

If you have some code already I will gladly take a look and see if I can
make it work. I’ll be happy to share my findings with everybody. If
everything goes ok we should have a working example and maybe a tutorial.
Do you have a github repo?

Regards,

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


Re: [osg-users] How to properly compile osg with EGL support?

2019-01-23 Thread Chris Hanson
Based on what we've seen, the technique SHOULD work. I'm not in a position
to test and hack on it myself because I don't have an NVidia Linux box
handy.

It'd be good to have a standard example of osgViewerEGLnoX or something,
because there seems to be a growing number of folks who don't want an
XServer gumming up the works.

On Wed, Jan 23, 2019 at 9:59 PM Trajce Nikolov NICK <
trajce.nikolov.n...@gmail.com> wrote:

> Hi Omar,
>
> we are trying to get this running as well. Julien's hints should be enough
> to get it built. I also wrote some code to support EGL based on some
> off-list disucussion we had with Chris. All was great but got some crashes
> in osg and was not able to actually run it. I can share my work with you
> (tomorrow) if you want to give it a try and maybe together we make it work
> and share it with the community?
>
> Cheers,
> Nick
>
>
> 
>  Virus-free.
> www.avast.com
> 
> <#m_2139364992193776022_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
>
> On Wed, Jan 23, 2019 at 7:51 PM Chris Hanson  wrote:
>
>> I know of a couple other people trying to do this. Let me know how you
>> get on with the X-less OSG.
>>
>> On Wed, Jan 23, 2019 at 7:31 PM Julien Valentin <
>> julienvalenti...@gmail.com> wrote:
>>
>>> few advices:
>>> check your driver support with eglinfo
>>> try adding -legl to the linker flags
>>> try VERBOSE=1 make
>>> to check used linkerflags
>>> Cheers
>>>
>>>
>>>
>>> Omar Álvarez wrote:
>>> > Hi.
>>> > I am trying to compile OSG with EGL support in order to be able to run
>>> OSG server side without an X display server. I have installed EGL headers
>>> and the latest and the NVIDIA driver. EGL is detected by OSG and I am
>>> requesting GLVND GL:
>>> > > cmake -DOpenGL_GL_PREFERENCE=GLVND .
>>> >
>>> >
>>> > I am getting linking errors:
>>> > > [ 33%] Linking CXX executable ../../bin/osgversion
>>> > > ../../lib/libosg.so.3.6.3: undefined reference to `glDrawArrays'
>>> > > ../../lib/libosg.so.3.6.3: undefined reference to `glCallList'
>>> > > ../../lib/libosg.so.3.6.3: undefined reference to `glPointSize'
>>> > > ../../lib/libosg.so.3.6.3: undefined reference to `glTexParameteriv'
>>> > > ../../lib/libosg.so.3.6.3: undefined reference to `glFrontFace'
>>> > > ../../lib/libosg.so.3.6.3: undefined reference to `glLightModeli'
>>> > > ../../lib/libosg.so.3.6.3: undefined reference to `glGetBooleanv'
>>> > > .
>>> >
>>> >
>>> > Is this the proper way for compiling OSG with EGL support?
>>> > I am using CMake 3.13, Ubuntu 18.04 and gcc 7.3. I think the way in
>>> which the OpenGL library is linked has to change (to support the new CMake
>>> flag OpenGL_GL_PREFERENCE).
>>> >
>>> >  --
>>> > Post generated by Mail2Forum
>>>
>>>
>>> 
>>> Twirling twirling twirling toward freedom
>>>
>>> --
>>> Read this topic online here:
>>> http://forum.openscenegraph.org/viewtopic.php?p=75535#75535
>>>
>>>
>>>
>>>
>>>
>>> ___
>>> osg-users mailing list
>>> osg-users@lists.openscenegraph.org
>>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>>>
>>
>>
>> --
>> 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]
>> ___
>> osg-users mailing list
>> osg-users@lists.openscenegraph.org
>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>>
>
>
> --
> trajce nikolov nick
>
>
> 
>  Virus-free.
> www.avast.com
> 
> <#m_2139364992193776022_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>


-- 
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 •

Re: [osg-users] How to properly compile osg with EGL support?

2019-01-23 Thread Trajce Nikolov NICK
Hi Omar,

we are trying to get this running as well. Julien's hints should be enough
to get it built. I also wrote some code to support EGL based on some
off-list disucussion we had with Chris. All was great but got some crashes
in osg and was not able to actually run it. I can share my work with you
(tomorrow) if you want to give it a try and maybe together we make it work
and share it with the community?

Cheers,
Nick


Virus-free.
www.avast.com

<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>

On Wed, Jan 23, 2019 at 7:51 PM Chris Hanson  wrote:

> I know of a couple other people trying to do this. Let me know how you get
> on with the X-less OSG.
>
> On Wed, Jan 23, 2019 at 7:31 PM Julien Valentin <
> julienvalenti...@gmail.com> wrote:
>
>> few advices:
>> check your driver support with eglinfo
>> try adding -legl to the linker flags
>> try VERBOSE=1 make
>> to check used linkerflags
>> Cheers
>>
>>
>>
>> Omar Álvarez wrote:
>> > Hi.
>> > I am trying to compile OSG with EGL support in order to be able to run
>> OSG server side without an X display server. I have installed EGL headers
>> and the latest and the NVIDIA driver. EGL is detected by OSG and I am
>> requesting GLVND GL:
>> > > cmake -DOpenGL_GL_PREFERENCE=GLVND .
>> >
>> >
>> > I am getting linking errors:
>> > > [ 33%] Linking CXX executable ../../bin/osgversion
>> > > ../../lib/libosg.so.3.6.3: undefined reference to `glDrawArrays'
>> > > ../../lib/libosg.so.3.6.3: undefined reference to `glCallList'
>> > > ../../lib/libosg.so.3.6.3: undefined reference to `glPointSize'
>> > > ../../lib/libosg.so.3.6.3: undefined reference to `glTexParameteriv'
>> > > ../../lib/libosg.so.3.6.3: undefined reference to `glFrontFace'
>> > > ../../lib/libosg.so.3.6.3: undefined reference to `glLightModeli'
>> > > ../../lib/libosg.so.3.6.3: undefined reference to `glGetBooleanv'
>> > > .
>> >
>> >
>> > Is this the proper way for compiling OSG with EGL support?
>> > I am using CMake 3.13, Ubuntu 18.04 and gcc 7.3. I think the way in
>> which the OpenGL library is linked has to change (to support the new CMake
>> flag OpenGL_GL_PREFERENCE).
>> >
>> >  --
>> > Post generated by Mail2Forum
>>
>>
>> 
>> Twirling twirling twirling toward freedom
>>
>> --
>> Read this topic online here:
>> http://forum.openscenegraph.org/viewtopic.php?p=75535#75535
>>
>>
>>
>>
>>
>> ___
>> osg-users mailing list
>> osg-users@lists.openscenegraph.org
>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>>
>
>
> --
> 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]
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>


-- 
trajce nikolov nick


Virus-free.
www.avast.com

<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] How to properly compile osg with EGL support?

2019-01-23 Thread Chris Hanson
I know of a couple other people trying to do this. Let me know how you get
on with the X-less OSG.

On Wed, Jan 23, 2019 at 7:31 PM Julien Valentin 
wrote:

> few advices:
> check your driver support with eglinfo
> try adding -legl to the linker flags
> try VERBOSE=1 make
> to check used linkerflags
> Cheers
>
>
>
> Omar Álvarez wrote:
> > Hi.
> > I am trying to compile OSG with EGL support in order to be able to run
> OSG server side without an X display server. I have installed EGL headers
> and the latest and the NVIDIA driver. EGL is detected by OSG and I am
> requesting GLVND GL:
> > > cmake -DOpenGL_GL_PREFERENCE=GLVND .
> >
> >
> > I am getting linking errors:
> > > [ 33%] Linking CXX executable ../../bin/osgversion
> > > ../../lib/libosg.so.3.6.3: undefined reference to `glDrawArrays'
> > > ../../lib/libosg.so.3.6.3: undefined reference to `glCallList'
> > > ../../lib/libosg.so.3.6.3: undefined reference to `glPointSize'
> > > ../../lib/libosg.so.3.6.3: undefined reference to `glTexParameteriv'
> > > ../../lib/libosg.so.3.6.3: undefined reference to `glFrontFace'
> > > ../../lib/libosg.so.3.6.3: undefined reference to `glLightModeli'
> > > ../../lib/libosg.so.3.6.3: undefined reference to `glGetBooleanv'
> > > .
> >
> >
> > Is this the proper way for compiling OSG with EGL support?
> > I am using CMake 3.13, Ubuntu 18.04 and gcc 7.3. I think the way in
> which the OpenGL library is linked has to change (to support the new CMake
> flag OpenGL_GL_PREFERENCE).
> >
> >  --
> > Post generated by Mail2Forum
>
>
> 
> Twirling twirling twirling toward freedom
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=75535#75535
>
>
>
>
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>


-- 
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]
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] How to properly compile osg with EGL support?

2019-01-23 Thread Julien Valentin
few advices:
check your driver support with eglinfo 
try adding -legl to the linker flags
try VERBOSE=1 make 
to check used linkerflags
Cheers



Omar Álvarez wrote:
> Hi.
> I am trying to compile OSG with EGL support in order to be able to run OSG 
> server side without an X display server. I have installed EGL headers and the 
> latest and the NVIDIA driver. EGL is detected by OSG and I am requesting 
> GLVND GL:
> > cmake -DOpenGL_GL_PREFERENCE=GLVND .
> 
> 
> I am getting linking errors:
> > [ 33%] Linking CXX executable ../../bin/osgversion
> > ../../lib/libosg.so.3.6.3: undefined reference to `glDrawArrays'
> > ../../lib/libosg.so.3.6.3: undefined reference to `glCallList'
> > ../../lib/libosg.so.3.6.3: undefined reference to `glPointSize'
> > ../../lib/libosg.so.3.6.3: undefined reference to `glTexParameteriv'
> > ../../lib/libosg.so.3.6.3: undefined reference to `glFrontFace'
> > ../../lib/libosg.so.3.6.3: undefined reference to `glLightModeli'
> > ../../lib/libosg.so.3.6.3: undefined reference to `glGetBooleanv'
> > .
> 
> 
> Is this the proper way for compiling OSG with EGL support?
> I am using CMake 3.13, Ubuntu 18.04 and gcc 7.3. I think the way in which the 
> OpenGL library is linked has to change (to support the new CMake flag 
> OpenGL_GL_PREFERENCE). 
> 
>  --
> Post generated by Mail2Forum



Twirling twirling twirling toward freedom

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





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


[osg-users] How to properly compile osg with EGL support?

2019-01-23 Thread Omar Álvarez
Hi.

I am trying to compile OSG with EGL support in order to be able to run OSG
server side without an X display server. I have installed EGL headers and
the latest and the NVIDIA driver. EGL is detected by OSG and I am
requesting GLVND GL:

cmake -DOpenGL_GL_PREFERENCE=GLVND .

I am getting linking errors:

[ 33%] Linking CXX executable ../../bin/osgversion
../../lib/libosg.so.3.6.3: undefined reference to
`glDrawArrays'../../lib/libosg.so.3.6.3: undefined reference to
`glCallList'../../lib/libosg.so.3.6.3: undefined reference to
`glPointSize'../../lib/libosg.so.3.6.3: undefined reference to
`glTexParameteriv'
../../lib/libosg.so.3.6.3: undefined reference to
`glFrontFace'../../lib/libosg.so.3.6.3: undefined reference to
`glLightModeli'../../lib/libosg.so.3.6.3: undefined reference to
`glGetBooleanv'.

Is this the proper way for compiling OSG with EGL support?

I am using CMake 3.13, Ubuntu 18.04 and gcc 7.3. I think the way in which
the OpenGL library is linked has to change (to support the new CMake flag
OpenGL_GL_PREFERENCE).
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Capturing all visible nodes

2019-01-23 Thread Robert Osfield
Hi Issac,

On Wed, 23 Jan 2019 at 01:16, Isaac Wolf  wrote:
> Robert, the end goal is to take a picture of an object in real life and apply 
> it as a texture to a 3D model by orienting the geometry in the program to be 
> roughly the same as in the picture.
>
> My plan was to capture all the points currently visible, retrieve their 
> locations on the screen, and then apply those values as texture coordinates 
> to the model. As if the XY screen space is the UV texture space.
>
> I understand that this will result in skewed textures once the model is 
> rotated, but that is just fine for the purposes of the project.
>
> The "only visible points" portion of this is important, because the user 
> could be zoomed in on a model, and the texture should only be applied to that 
> space.

What you describe is texture projection, and just so happens that
OpenGL/OSG support it out of the box, no need to go intersecting the
scene and generating texcoords yourself, it can all be done down on
the GPU automatically for you :-)

What you'll need is an eye linear texgen, osg::TexGenNode.  The
osgspotlight example shows how it's done - look at the
createSpotLightNode() function.

// create tex gen.

osg::Vec3 up(0.0f,0.0f,1.0f);
up = (direction ^ up) ^ direction;
up.normalize();

osg::TexGenNode* texgenNode = new osg::TexGenNode;
texgenNode->setTextureUnit(textureUnit);
osg::TexGen* texgen = texgenNode->getTexGen();
texgen->setMode(osg::TexGen::EYE_LINEAR);
texgen->setPlanesFromMatrix(osg::Matrixd::lookAt(position,
position+direction, up)*
osg::Matrixd::perspective(angle,1.0,0.1,100)*
osg::Matrixd::translate(1.0,1.0,1.0)*
osg::Matrixd::scale(0.5,0.5,0.5));


group->addChild(texgenNode);

You'll need to learn a bit about texgen and the OSG's positional state
API around it, but once you understand it it should just fall in to
place, you'll be able to easily update the projection of the photo to
change the projection and move the viewer's camera independently.
There are several examples that use TexGenNode so have a look at them.

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


Re: [osg-users] Loading osgt from string / Compile resources into binary

2019-01-23 Thread Robert Osfield
Hi Michael,

> is it possible to somehow compile resources like models/nodes into an 
> executable?
> How about putting the content of an osgt file as a string into my source code?
> But as far as I've seen, there is no readNodeFromString method in osgDB.

You can pass a std::stringstream to the ReaderWriter that support
reading from istream.  You'll need to get the osgDB::ReaderWriter from
the osgDB::Registry instance.

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