Re: [osg-users] multiple inheritance ERROR

2014-09-26 Thread Javier Taibo
  Search for dreaded diamond problem in Google and you'll find good
explanations of this problem and possible solutions.

  Regards,


On Fri, Sep 26, 2014 at 5:01 AM, jiang.sa...@gmail.com 
jiang.sa...@gmail.com wrote:

 Hi,

 recently, I write a sample application based on osgEarth 2.5.  when using 
 FeatureManipTool class  like the way

 osg::ref_ptrFeatureManipTool _featureManipulator;

 I got some errors:

 error C2385: ambiguous access of 'unref'
 1 could be the 'unref' in base 'osg::Referenced'
 1 or could be the 'unref' in base 'osg::Referenced'

 after debuging, I found that this class is using multiple inheritance.
 then how can I solve the problem?
 thanks!


 --
 jiang.sa...@gmail.com

 ___
 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] update operations vs. update traversals

2014-09-26 Thread Christian Buchner
Hi Robert,

thank you for the explanation.

My use case is actually installing new nodes into the scene graph
(dynamically generated ImageStreams playing videos as needed).

I will be using update operations, but not necessarily using separate
threads for these. Although it would be interesting to see if the video
decoding could be shifted entirely to a separate thread - if the FFMPEG
plugin doesn't already do that).

Christian


2014-09-25 18:01 GMT+02:00 Robert Osfield robert.osfi...@gmail.com:

 Hi Christian,

 On 25 September 2014 16:35, Christian Buchner christian.buch...@gmail.com
  wrote:

 when looking at the osgViewerBase class I noticed a feature where the
 user can install update operations that get executed once per frame.
 addUpdateOperation() is the function I am talking about.

 I was wondering if this method of updating the scene graph has any
 advantages over the classic methods of installing update callbacks, or
 updating things during the update traversal.

 The only two OSG examples making use of this feature are the osgtext
 example and the osgthreadedterrain examples. Internally within OSG the
 function isn't used anywhere, it seems.


 The osg::OperationQueue that manages the update operations is a thread
 safe container that allows you to pass Operations from other threads to the
 viewer so that viewer can call then during the update traversal.  Merging
 data built by a background thread is a good example of how one might use
 this facility.

 You can potentially do something similar with an update callback but it'd
 need to manage the thread safety etc.

 As conceptual note, scene graph Callbacks are really to do with the scene
 itself, such as animating an object, rather than viewer level operations.

 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] update operations vs. update traversals

2014-09-26 Thread Robert Osfield
Hi Christian,

On 26 September 2014 10:02, Christian Buchner christian.buch...@gmail.com
wrote:

 My use case is actually installing new nodes into the scene graph
 (dynamically generated ImageStreams playing videos as needed).


Depending on how much work you do in creating the new nodes it might be
appropriate to use a back ground thread and pass the merge via an custom
osg::Operation, but if it's just quads then it's like they you won't need a
separate database thread as it'll be so cheap to create the objects in the
main thread - all could be done inside the osg::Operation.



 I will be using update operations, but not necessarily using separate
 threads for these. Although it would be interesting to see if the video
 decoding could be shifted entirely to a separate thread - if the FFMPEG
 plugin doesn't already do that).


 All the video related plugins run a separate thread(s) for doing the
reading of the video.

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


Re: [osg-users] osgAndroidExampleGLES2 can not drag and zoom the model cow.osg.

2014-09-26 Thread Xia Qingran
Hi,
I have built the osgAndroidExampleGLES2 android apk and install it on my 
Android phone.

It can load the cow.osg, but it can not drag and zoom the model. If I tried to 
use two fingers to enlarge the model, then the model is gone. The snapshot is 
on the attachment.


I use the latest source code from your svn source tree TRUNK. I built them on 
my Windows 7 x64 platform by cygwin and Android NDK r10b. 

... 

Thank you!

Cheers,
Xia[img][/img]

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




Attachments: 
http://forum.openscenegraph.org//files/screenshot_2014_09_26_11_00_44_159.png


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


[osg-users] osgAnimation pause and reverse play

2014-09-26 Thread Maxim Kuzmin
Hi,

I've got 3d-model with animations. I would like to be able to play backwards 
and pause these animations. How can I do it? I know that it is possible with 
osg::AnimationPath, but here I've got only osg::Animation.

Thank you!

Cheers,
Maxim

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





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


[osg-users] MSAA in GraphicsWindowEmbedded

2014-09-26 Thread Sandro Weber
Hi everyone,

I am using OSG in combination with Equalizer. So I'm setting up my Viewers via 
Viewer::setUpViewerAsEmbeddedInWindow(). Now I want to use MSAA. Setting 
DisplaySettings for the Viewer doesn't do anything for me. So I looked at the 
GraphicsContext::Traits for the embedded window but these are only accessible 
as const. Is there a way to do this?

Thanks for your help.

Cheers,
Sandro

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





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


Re: [osg-users] MSAA in GraphicsWindowEmbedded

2014-09-26 Thread Alistair Baxter
If you're using GraphicsWindowEmbedded,  you have to set up MSAA when creating 
the OpenGL Context that you are creating outside OSG.

-Original Message-
From: osg-users [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf 
Of Sandro Weber
Sent: 26 September 2014 16:48
To: osg-users@lists.openscenegraph.org
Subject: [osg-users] MSAA in GraphicsWindowEmbedded

Hi everyone,

I am using OSG in combination with Equalizer. So I'm setting up my Viewers via 
Viewer::setUpViewerAsEmbeddedInWindow(). Now I want to use MSAA. Setting 
DisplaySettings for the Viewer doesn't do anything for me. So I looked at the 
GraphicsContext::Traits for the embedded window but these are only accessible 
as const. Is there a way to do this?

Thanks for your help.

Cheers,
Sandro

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





___
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] Building OSG with OpenGL ES 2

2014-09-26 Thread joey pedroza
Hi Team,

It was decided that it is a priority to get this project to run on windows.  So 
I went down the path of trying to get it to work. That is my life right now.

Unfortunately they don't want to use SDL 2.

Here is where I'm at currently, I have been able to successfully compile the 
latest OSG with OpenGLES2.0 by removing the two files suggested 
GraphicsWindowWin32 and PixelBufferWin32.  I am using PowerVR open gl 
libraries.  This is an emulator.  It currently works for the overlay project so 
I know this will work here.

Now I need to pass a graphic context to my code but the samples I saw do this. 
and I no longer have GraphicsWindowWin32? how else can I get a gc?

osg::ref_ptrosg::Referenced windata = new 
osgViewer::GraphicsWindowWin32::WindowData( hwnd );
/** WindowData is used to pass in the Win32 window handle attached the 
GraphicsContext::Traits structure.*/
osg::ref_ptrosg::GraphicsContext::Traits traits = new 
osg::GraphicsContext::Traits;
traits-x = 0;
traits-y = 0;
traits-width = 800;
traits-height = 600;
traits-windowDecoration = false;
traits-doubleBuffer = true;
traits-inheritedWindowData = windata;
osg::ref_ptrosg::GraphicsContext gc = 
osg::GraphicsContext::createGraphicsContext( traits.get() );
osg::ref_ptrosg::Camera camera = new osg::Camera;
camera-setGraphicsContext( gc );
camera-setViewport( new osg::Viewport(0, 0, traits-width, traits-height) );
camera-setClearMask( GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT );
camera-setClearColor( osg::Vec4f(0.2f, 0.2f, 0.4f, 1.0f) );
camera-setProjectionMatrixAsPerspective( 
30.0f,(double)traits-width/(double)traits-height,1.0,1000.0 ); 
g_viewer = new osgViewer::Viewer;
g_viewer-setCamera( camera.get() );
g_viewer-setSceneData( osgDB::readNodeFile(cessna.osg) );
g_viewer-setKeyEventSetsDone( 0 );
g_viewer-setCameraManipulator( new osgGA::TrackballManipulator );

In our overlay project which is where we get the graphic context that we want 
to pass on to osg the code is like so
case WM_CREATE:
egl_window = hWnd;

//Store the device context.
hDC = GetDC(hWnd);

//Get the default display.
egl_display = eglGetDisplay(hDC);
//eglDisplay = eglGetDisplay(EGL_DEFAULT_DISPLAY);

//Initialize EGL.
eglInitialize(egl_display, egl_major_version, egl_minor_version);

//Make OpenGL ES the current API.
eglBindAPI(EGL_OPENGL_ES_API);

//Find a configuration that matches all requirements.
eglChooseConfig(egl_display, egl_config_attributes, egl_config, 1, 
configs);

//Create a drawing surface.
egl_surface = eglCreateWindowSurface(egl_display, egl_config, 
egl_window, NULL);

//Create a context.
egl_context = eglCreateContext(egl_display, egl_config, NULL, 
egl_context_attributes);

//Bind the context to the current thread and use window surface for 
drawing.
eglMakeCurrent(egl_display, egl_surface, egl_surface, egl_context);

//Specify the minimum number of video frame periods per buffer swap.
//If interval is set to a value of 0, buffer swaps are not 
synchronized to a video frame,
//and the swap happens as soon as the render is complete.
eglSwapInterval(egl_display, 1);
//eglSwapInterval(egl_display, 0);

//Get the version of OpenGL ES and GL Shading Language.
opengl_es_version = glGetString(GL_VERSION);
glsl_version = glGetString(GL_SHADING_LANGUAGE_VERSION);

//Set the clear values for the color buffer.
glClearColor(0.0f, 0.0f, 0.0f, 1.0f);

//Set the OpenGL display settings.
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);

glEnable(GL_DEPTH_TEST);
glDepthMask(GL_TRUE);
glDepthFunc(GL_LEQUAL);
glClearDepthf(1.0f);
glDepthRangef(0.0f, 1.0f);

//Load the default shader program.
shader.load_default_shader();
default_shader_program = shader.get_default_shader_program();

//Generate texture names.
generate_texture_names(texture_id);

Thank you!

Cheers,
joey

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





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


Re: [osg-users] [build] Building OSG with OpenGL ES 2

2014-09-26 Thread Chris Hanson
You need to be using GraphicsWindowEmbedded, and your call to
eglGetDisplay() should use EGL_DEFAULT_DISPLAY .

On Fri, Sep 26, 2014 at 12:10 PM, joey pedroza jpedr...@thex1.com wrote:

 Hi Team,

 It was decided that it is a priority to get this project to run on
 windows.  So I went down the path of trying to get it to work. That is my
 life right now.

 Unfortunately they don't want to use SDL 2.

 Here is where I'm at currently, I have been able to successfully compile
 the latest OSG with OpenGLES2.0 by removing the two files suggested
 GraphicsWindowWin32 and PixelBufferWin32.  I am using PowerVR open gl
 libraries.  This is an emulator.  It currently works for the overlay
 project so I know this will work here.

 Now I need to pass a graphic context to my code but the samples I saw do
 this. and I no longer have GraphicsWindowWin32? how else can I get a gc?

 osg::ref_ptrosg::Referenced windata = new
 osgViewer::GraphicsWindowWin32::WindowData( hwnd );
 /** WindowData is used to pass in the Win32 window handle attached the
 GraphicsContext::Traits structure.*/
 osg::ref_ptrosg::GraphicsContext::Traits traits = new
 osg::GraphicsContext::Traits;
 traits-x = 0;
 traits-y = 0;
 traits-width = 800;
 traits-height = 600;
 traits-windowDecoration = false;
 traits-doubleBuffer = true;
 traits-inheritedWindowData = windata;
 osg::ref_ptrosg::GraphicsContext gc =
 osg::GraphicsContext::createGraphicsContext( traits.get() );
 osg::ref_ptrosg::Camera camera = new osg::Camera;
 camera-setGraphicsContext( gc );
 camera-setViewport( new osg::Viewport(0, 0, traits-width,
 traits-height) );
 camera-setClearMask( GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT );
 camera-setClearColor( osg::Vec4f(0.2f, 0.2f, 0.4f, 1.0f) );
 camera-setProjectionMatrixAsPerspective(
 30.0f,(double)traits-width/(double)traits-height,1.0,1000.0 );
 g_viewer = new osgViewer::Viewer;
 g_viewer-setCamera( camera.get() );
 g_viewer-setSceneData( osgDB::readNodeFile(cessna.osg) );
 g_viewer-setKeyEventSetsDone( 0 );
 g_viewer-setCameraManipulator( new osgGA::TrackballManipulator );

 In our overlay project which is where we get the graphic context that we
 want to pass on to osg the code is like so
 case WM_CREATE:
 egl_window = hWnd;

 //Store the device context.
 hDC = GetDC(hWnd);

 //Get the default display.
 egl_display = eglGetDisplay(hDC);
 //eglDisplay = eglGetDisplay(EGL_DEFAULT_DISPLAY);

 //Initialize EGL.
 eglInitialize(egl_display, egl_major_version,
 egl_minor_version);

 //Make OpenGL ES the current API.
 eglBindAPI(EGL_OPENGL_ES_API);

 //Find a configuration that matches all requirements.
 eglChooseConfig(egl_display, egl_config_attributes,
 egl_config, 1, configs);

 //Create a drawing surface.
 egl_surface = eglCreateWindowSurface(egl_display, egl_config,
 egl_window, NULL);

 //Create a context.
 egl_context = eglCreateContext(egl_display, egl_config, NULL,
 egl_context_attributes);

 //Bind the context to the current thread and use window
 surface for drawing.
 eglMakeCurrent(egl_display, egl_surface, egl_surface,
 egl_context);

 //Specify the minimum number of video frame periods per buffer
 swap.
 //If interval is set to a value of 0, buffer swaps are not
 synchronized to a video frame,
 //and the swap happens as soon as the render is complete.
 eglSwapInterval(egl_display, 1);
 //eglSwapInterval(egl_display, 0);

 //Get the version of OpenGL ES and GL Shading Language.
 opengl_es_version = glGetString(GL_VERSION);
 glsl_version = glGetString(GL_SHADING_LANGUAGE_VERSION);

 //Set the clear values for the color buffer.
 glClearColor(0.0f, 0.0f, 0.0f, 1.0f);

 //Set the OpenGL display settings.
 glEnable(GL_BLEND);
 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);

 glEnable(GL_DEPTH_TEST);
 glDepthMask(GL_TRUE);
 glDepthFunc(GL_LEQUAL);
 glClearDepthf(1.0f);
 glDepthRangef(0.0f, 1.0f);

 //Load the default shader program.
 shader.load_default_shader();
 default_shader_program = shader.get_default_shader_program();

 //Generate texture names.
 generate_texture_names(texture_id);

 Thank you!

 Cheers,
 joey

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





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

Re: [osg-users] [build] Building OSG with OpenGL ES 2

2014-09-26 Thread joey pedroza
Hi,

Thanks for the quick update, is GraphicsWindowEmbedded a OSG class or is that a 
project setting.  I haven't been able to find much on what that is so I can 
apply it. Is there an example?

Thank you!

Cheers,
joey

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





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


Re: [osg-users] [build] Building OSG with OpenGL ES 2

2014-09-26 Thread Chris Hanson
It's an existing class:
http://trac.openscenegraph.org/documentation/OpenSceneGraphReferenceDocs/a00351.html

The osgviewerGLUT.cpp example uses it.

On Fri, Sep 26, 2014 at 1:44 PM, joey pedroza jpedr...@thex1.com wrote:

 Hi,

 Thanks for the quick update, is GraphicsWindowEmbedded a OSG class or is
 that a project setting.  I haven't been able to find much on what that is
 so I can apply it. Is there an example?

 Thank you!

 Cheers,
 joey

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





 ___
 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
Digital Imaging • GIS • GPS • osgEarth • Terrain • Telemetry • Cryptography
• Digital Audio • LIDAR • Kinect • Embedded • Mobile • iPhone/iPad/iOS •
Android
@alphapixel https://twitter.com/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


[osg-users] Aerocomputers is hiring

2014-09-26 Thread Don Burns
Hi Folks,

Its been a while.  :)

I'm posting because we are hiring and I remember what a good resource
osg-users is for the kind of person we are looking for.  Please email me
directly if you are interested.

--


*Job Title*: 3D Graphics Software Development Engineer

*Experience*: Entry level to mid-senior

*Employment Type*: Full Time

*Job Description*:

At AeroComputers we believe that our Law Enforcement, Search and Rescue,
Fire Fighters and other public services should have the best possible
equipment to help them do their jobs.  To that end, and since 1993 we've
been building moving map systems that install into airborne units and
integrate camera gimbal systems to combine real-time video with the map for
best situation awareness.

The company is on a growth track and we are looking to expand the
development team with the right individual who has the following required
skills:


   - C++
   - OpenGL
   - Scene Graph
   - Qt
   - GIS development
   - Widows/VisualStudio

In addition, the following are desired skills:


   - Video
   - MS SQL
   - real-time
   - Networking and serial device protocols




AeroComputers, Inc., based in Oxnard, California, has been designing,
building and marketing computer systems that manage tactical operations for
airborne applications since 1993. Currently employed by over 125 law
enforcement, fire, military and other public safety agencies worldwide,
AeroComputers is the industry leader in providing mission management
systems that integrate GPS-based moving maps, image collection and
transmission, illumination and data storage.

-- 
*Don Burns*
Director of Product Development
AeroComputers, Inc.
2889 W. 5th Street, #111
Oxnard, CA  93030
+1(805) 985-3390 x123
dbu...@aerocomputers.com
www.aerocomputers.com
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Qt5 integration first try

2014-09-26 Thread John Drummond
Hi Claus,

Now working perfectly with threading model set to DrawThreadPerContext 

Attached is a QtCreator project based on the osgearth_qt_simple example for 
anyone that is interested.


Thank you!

Cheers,
John

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




Attachments: 
http://forum.openscenegraph.org//files/osgearthqtsimplemt_475.zip


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


Re: [osg-users] [build] Building OSG with OpenGL ES 2

2014-09-26 Thread joey pedroza
Hi,

Thanks, I was able to find some other examples once I knew what I was looking 
for, but that portion of code seems to compile but the part that is failing for 
me is the line of code below.  It crashes saying something about invalid 
pointer.  Before that line worked for me just fine. Does Read Node use anything 
from the two files I deleted, see my line below.

osg::ref_ptrosg::Node globeE = 
osgDB::readNodeFile(C:\\workspace\\data\\world.tif);

I've used other sample nodes but they all crash with the same thing, about an 
invalid pointer. I stepped into it and eventually I get the error.

Another question I have the create EGL stuff, I build my embedded stuff after 
all the EGL is created?


Thank you!

Cheers,
joey

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





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