Re: [osg-users] [osgOcean] Dose anybody has other learing resources about osgOcean?

2016-11-21 Thread Rambabu Repaka
Hi,Can anyone have the source code of latest version of osg ocean (except osg 
ocean 1.0).

...


Thank you!

Cheers,
Rambabu

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





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


Re: [osg-users] [osgPlugins] Exporting OpenFlight from OSG and DDS textures

2016-11-21 Thread Rambabu Repaka
Hi,Can anyone provide the link for download of jpeg and png plugins for osg 
3.5.1 version.

... 

Thank you!

Cheers,
Rambabu

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





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


Re: [osg-users] Draw geometry that keeps its size in screen even with user manipulation (scaling, etc)

2016-11-21 Thread Trajce Nikolov NICK
> Do I need to add an autotransform for each circle?

Probably yes ... Give it a shot

On Mon, Nov 21, 2016 at 6:10 PM, Bruno Oliveira <
bruno.manata.olive...@gmail.com> wrote:

> Thank you Tracje,
>
> however I tried using that. My node has, for instance, 10 circles that
> represent points and that are at a certain distance. I use autotransform on
> the whole node of 10 circles with "setAutoScaleToScreen(true);" but what
> happens is that when I zoom my scene, the distance between the circles does
> not change.
> Do I need to add an autotransform for each circle?
>
> 2016-11-21 16:20 GMT+00:00 Trajce Nikolov NICK <
> trajce.nikolov.n...@gmail.com>:
>
>> Hi Bruno,
>>
>> maybe you can have a look at osg::AutoTransform
>>
>> On Mon, Nov 21, 2016 at 4:08 PM, Bruno Oliveira <
>> bruno.manata.olive...@gmail.com> wrote:
>>
>>> Hello,
>>>
>>> I am drawing some basic shapes/geometries (in this case, some rectangles
>>> or circles), but need them to have fixed size in screen pixel coordinates,
>>> even when the user manipulates the scene.
>>>
>>> For instance, I want to draw rectangles that are 10-pixel wide, and keep
>>> these 10 pixels even when the user zooms in or zooms out the scene.
>>>
>>> How can I do this?
>>>
>>>
>>> ( I think this can't be accomplished with osg::Transform::ABSOLUTE_RF,
>>> since I want the shapes to translate/rotate when user manipulates the scene)
>>>
>>> ___
>>> osg-users mailing list
>>> osg-users@lists.openscenegraph.org
>>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-opens
>>> cenegraph.org
>>>
>>>
>>
>>
>> --
>> trajce nikolov nick
>>
>> ___
>> 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
>
>


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


Re: [osg-users] Draw geometry that keeps its size in screen even with user manipulation (scaling, etc)

2016-11-21 Thread Bruno Oliveira
Thank you Tracje,

however I tried using that. My node has, for instance, 10 circles that
represent points and that are at a certain distance. I use autotransform on
the whole node of 10 circles with "setAutoScaleToScreen(true);" but what
happens is that when I zoom my scene, the distance between the circles does
not change.
Do I need to add an autotransform for each circle?

2016-11-21 16:20 GMT+00:00 Trajce Nikolov NICK <
trajce.nikolov.n...@gmail.com>:

> Hi Bruno,
>
> maybe you can have a look at osg::AutoTransform
>
> On Mon, Nov 21, 2016 at 4:08 PM, Bruno Oliveira <
> bruno.manata.olive...@gmail.com> wrote:
>
>> Hello,
>>
>> I am drawing some basic shapes/geometries (in this case, some rectangles
>> or circles), but need them to have fixed size in screen pixel coordinates,
>> even when the user manipulates the scene.
>>
>> For instance, I want to draw rectangles that are 10-pixel wide, and keep
>> these 10 pixels even when the user zooms in or zooms out the scene.
>>
>> How can I do this?
>>
>>
>> ( I think this can't be accomplished with osg::Transform::ABSOLUTE_RF,
>> since I want the shapes to translate/rotate when user manipulates the scene)
>>
>> ___
>> osg-users mailing list
>> osg-users@lists.openscenegraph.org
>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>>
>>
>
>
> --
> trajce nikolov nick
>
> ___
> 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] Draw geometry that keeps its size in screen even with user manipulation (scaling, etc)

2016-11-21 Thread Trajce Nikolov NICK
Hi Bruno,

maybe you can have a look at osg::AutoTransform

On Mon, Nov 21, 2016 at 4:08 PM, Bruno Oliveira <
bruno.manata.olive...@gmail.com> wrote:

> Hello,
>
> I am drawing some basic shapes/geometries (in this case, some rectangles
> or circles), but need them to have fixed size in screen pixel coordinates,
> even when the user manipulates the scene.
>
> For instance, I want to draw rectangles that are 10-pixel wide, and keep
> these 10 pixels even when the user zooms in or zooms out the scene.
>
> How can I do this?
>
>
> ( I think this can't be accomplished with osg::Transform::ABSOLUTE_RF,
> since I want the shapes to translate/rotate when user manipulates the scene)
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>


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


[osg-users] Draw geometry that keeps its size in screen even with user manipulation (scaling, etc)

2016-11-21 Thread Bruno Oliveira
Hello,

I am drawing some basic shapes/geometries (in this case, some rectangles or
circles), but need them to have fixed size in screen pixel coordinates,
even when the user manipulates the scene.

For instance, I want to draw rectangles that are 10-pixel wide, and keep
these 10 pixels even when the user zooms in or zooms out the scene.

How can I do this?


( I think this can't be accomplished with osg::Transform::ABSOLUTE_RF,
since I want the shapes to translate/rotate when user manipulates the scene)
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Use OSG with an existing renderer in OpenGL ES

2016-11-21 Thread Riccardo Corsi
Hi Fabien,

in your situation the approach suggested by Chris is certainly the most
promising.
Create a second GL context (shared), render everything you need to with osg
in the second context to an FBO target and have Qt retrieve the fbo's
texture content, to display it in one of its widgets/primitives.
This way you don't need to know which GL states Qt/qml uses and/or modifies
and you're sure neither qml nor osg rendering will be corrupted.

You can find a sample integration I wrote some times ago here:
https://github.com/rickyviking/qmlosg
and a more recent example here: https://github.com/podsvirov/osgqtquick

Ricky


On Mon, Nov 21, 2016 at 11:52 AM, Robert Osfield 
wrote:

> On 21 November 2016 at 09:12, Fabien Boco  wrote:
> > This is why I'm looking for an OpenGL ES alternative for
> glPush/PopAttrib which works fine on the Windows version application.
>
>
> The alternative to using glPush/glPop on the OSG would be to dirty the
> associated modes and attributes that are tracked in osg::State.  In
> osg::State there are series of haveApplied*() methods to help with
> tell the OSG's state tracking mechanism something has externally
> changed.  This requires you to know what modes and attributes will
> have been changed by the 3rd party code so it's not an easy
> alternative to glPush/glPop.
>
> Personally I find Qt's approach of changing GL state problematic, I
> much prefer windowing libraries to just create a graphics context and
> leave GL work entirely to dedicated graphics libraries.
>
> 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] Rendering 3d Model using osgEarth.

2016-11-21 Thread Uma Devi Selvaraj
Hi,
 
  Thanks robert 

... 

Thank you!

Cheers,
Uma

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





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


Re: [osg-users] Rendering 3d Model using osgEarth.

2016-11-21 Thread Robert Osfield
On 21 November 2016 at 09:37, Uma Devi Selvaraj  wrote:
> Hi all,
>
> I have installed osgEarth 2.8 in my system. Now I want to display 3d 
> Model using osgEarth. Do in need to create earth file for that model. How to 
> display the model without "earth" in center.?

You don't use osgEarth to display models, you use osgEarth to render
whole earth paged databases for the terrain.

If you want to place 3d models on the earth model then you do it
entirely with standard OSG mechanisms, the most obvious example of
this is in osgsimulation example.

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


Re: [osg-users] Use OSG with an existing renderer in OpenGL ES

2016-11-21 Thread Robert Osfield
On 21 November 2016 at 09:12, Fabien Boco  wrote:
> This is why I'm looking for an OpenGL ES alternative for glPush/PopAttrib 
> which works fine on the Windows version application.


The alternative to using glPush/glPop on the OSG would be to dirty the
associated modes and attributes that are tracked in osg::State.  In
osg::State there are series of haveApplied*() methods to help with
tell the OSG's state tracking mechanism something has externally
changed.  This requires you to know what modes and attributes will
have been changed by the 3rd party code so it's not an easy
alternative to glPush/glPop.

Personally I find Qt's approach of changing GL state problematic, I
much prefer windowing libraries to just create a graphics context and
leave GL work entirely to dedicated graphics libraries.

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


[osg-users] Change Graphic Context Runtimely

2016-11-21 Thread tianzjyh
Hi, 
  I found it difficult to achieve dynamic switching OpenGL context at run time.


  In the following code, I try to achieve this switching in a single 
thread(rendering thread not included), but I got a frozen window after pressing 
the switch key.


  My purpose is mainly to implement a quad-buffer switch option for users.


  Which step have made the froze of the main loop?


Codes:
--
1#include 
2
3#include 
4#include 
5#include 
6#include 
7#include 
8
9osg::GraphicsContext* createGC(float x, float y, float w, float h, bool stereo)
10{
11osg::DisplaySettings* ds = osg::DisplaySettings::instance().get();
12osg::ref_ptr traits = new 
osg::GraphicsContext::Traits;
13traits->windowName = "";
14traits->windowDecoration = true;
15traits->x = x;
16traits->y = y;
17traits->width = w;
18traits->height = h;
19traits->doubleBuffer = true;
20traits->quadBufferStereo = stereo;
21traits->alpha = ds->getMinimumNumAlphaBits();
22traits->stencil = ds->getMinimumNumStencilBits();
23traits->sampleBuffers = ds->getMultiSamples();
24traits->samples = ds->getNumMultiSamples();
25
26return osg::GraphicsContext::createGraphicsContext(traits.get());
27}
28
29bool _stereo = false;
30osg::ref_ptr _newgc = NULL;
31
32class SwitchGC : public osgGA::GUIEventHandler
33{
34public:
35virtual bool handle(const osgGA::GUIEventAdapter& ea, 
osgGA::GUIActionAdapter& aa)
36{
37switch (ea.getEventType())
38{
39case osgGA::GUIEventAdapter::EventType::KEYDOWN:
40{
41   if (ea.getKey() == osgGA::GUIEventAdapter::KEY_S)
42   {
43   //
44   osgViewer::Viewer* viewer = dynamic_cast();
45   if (viewer)
46   {
47   _stereo = !_stereo;
48   _newgc = createGC(0, 0, 1000, 1000, _stereo);
49   //viewer->getCamera()->setGraphicsContext(gc);
50   osg::DisplaySettings::instance()->setStereo(_stereo);
51   if (_stereo)
52   {
53   
osg::DisplaySettings::instance()->setStereoMode(osg::DisplaySettings::QUAD_BUFFER);
54   }
55   }
56
57   return true;
58   }
59}
60break;
61default:
62break;
63}
64
65return false;
66}
67private:
68};
69
70int main(int, char**)
71{
72osgViewer::Viewer* viewer = new osgViewer::Viewer();
73
74_stereo = !_stereo;
75osg::GraphicsContext* gc = createGC(0, 0, 1000, 1000, _stereo);
76osg::DisplaySettings::instance()->setStereo(_stereo);
77if (_stereo)
78{
79osg::DisplaySettings::instance()->setStereoMode(osg::DisplaySettings::QUAD_BUFFER);
80}
81
82
83viewer->getCamera()->setGraphicsContext(gc);
84viewer->setSceneData(osgDB::readNodeFile("cow.osg"));
85
86osg::Camera* camera = viewer->getCamera();
87const osg::GraphicsContext::Traits* traits = gc->getTraits();
88
89camera->setClearColor(osg::Vec4(0.2, 0.2, 0.2, 1.0));
90camera->setViewport(new osg::Viewport(0, 0, traits->width, traits->height));
91camera->setProjectionMatrixAsPerspective(30.0f, 
static_cast(traits->width) / static_cast(traits->height), 1.0f, 
1.0f);
92
93viewer->addEventHandler(new SwitchGC());
94viewer->setCameraManipulator(new osgGA::TrackballManipulator);
95
96while (!viewer->done())
97{
98if (_newgc.get() != NULL)
99{
100osg::GraphicsContext*oldgc =  viewer->getCamera()->getGraphicsContext();
101if (oldgc)
102{
103oldgc->close(true);
104}
105
106viewer->getCamera()->setGraphicsContext(_newgc);
107_newgc = NULL;
108
109camera->setClearColor(osg::Vec4(0.2, 0.2, 0.2, 1.0));
110camera->setViewport(new osg::Viewport(0, 0, traits->width, traits->height));
111camera->setProjectionMatrixAsPerspective(30.0f, 
static_cast(traits->width) / static_cast(traits->height), 1.0f, 
1.0f);
112
113viewer->realize();
114viewer->addEventHandler(new SwitchGC());
115viewer->setCameraManipulator(new osgGA::TrackballManipulator);
116
117}
118
119viewer->frame();
120
121}
122return 0;
123}
124

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


[osg-users] Rendering 3d Model using osgEarth.

2016-11-21 Thread Uma Devi Selvaraj
Hi all,

I have installed osgEarth 2.8 in my system. Now I want to display 3d 
Model using osgEarth. Do in need to create earth file for that model. How to 
display the model without "earth" in center.?

... 

Thank you!

Cheers,
Uma

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





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


Re: [osg-users] calculating area of the 3d model.

2016-11-21 Thread Uma Devi Selvaraj
Hi,

  Thanks paul. I will look into it. :)

... 

Thank you!

Cheers,
Uma

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





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


Re: [osg-users] Use OSG with an existing renderer in OpenGL ES

2016-11-21 Thread Fabien Boco
I'm actually facing the second situation. 

I'm trying to render some OSG with QML. Qt provide a "scope" where you can do 
your custom stuff (OSG here). If you know Qt : you have to connect a slot where 
you can do your custom OpenGL to a specific signal.

I already tried to play with contexts (as you did) but there's nothing to do =/

This is why I'm looking for an OpenGL ES alternative for glPush/PopAttrib which 
works fine on the Windows version application.

 --
Post generated by Mail2Forum[/quote]

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





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