Re: [osg-users] [build] Could NOT find osgDB (missing: OSGDB_LIBRARY)

2015-02-02 Thread Laurent Berger
I have installed myself using command :


Code:
cmake -G Unix Makefiles
make 
sudo make install



 with previous command include are in /usr/local/include
and lib in /usr/local/lib64
So now I have set OSG_DIR=/usr/local/lib64
and may be now I have a standard place for OSG
is it right?


Cheers,
Laurent

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





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


[osg-users] Sending fake mouse events to a TrackballManipulator? (again)

2015-02-02 Thread Émeric MASCHINO
Hi,

I need to simulate mouse inputs for a basic test application.
Following Robert's advice [1], I'm injecting mouse events to the event
queue of the viewer's application.
My implementation is very similar to the one in
GraphicsWindowWin32::handleNativeWindowingEvent.
But a mouse drag (independently of the mouse button: left, middle,
right; don't understand why) rotates the scene around the axis
perpendicular to the display (Oz I presume). And there seems to be a
huge threshold somewhere, as the scene is rotated several times while
I'm dragging the mouse very slightly.
To sum up, I'm getting no 3D rotation, nor panning or zooming, only
flat 2D rotation around the Oz axis. Does this strange behavior
suggest something obvious that I'm missing?

If helpful, my code looks like this:

void transformMouseXY(float x, float y)
{
assert(g_viewer.valid());   // g_viewer is a global
osg::ref_ptrosgViewer::Viewer
assert(g_viewer-getEventQueue());

if (g_viewer-getEventQueue()-getUseFixedMouseInputRange())
{
osgGA::GUIEventAdapter* eventState =
g_viewer-getEventQueue()-getCurrentEventState();

// SCREEN_WIDTH and SCREEN_HEIGHT are two constant unsigned 
integers
x = eventState-getXmin() +
(eventState-getXmax()-eventState-getXmin())*x/float(SCREEN_WIDTH);
y = eventState-getYmin() +
(eventState-getYmax()-eventState-getYmin())*y/float(SCREEN_HEIGHT);
}
}

void inputProc(unsigned int MessageID, const void* Data)
{
assert(g_viewer.valid());

osgGA::EventQueue* queue = g_viewer-getEventQueue();
assert(queue);

double eventTime = queue-getTime();

switch (MessageID)
{
caseMSG_LBUTTON_DOWN:
{
float mx = ((unsigned int*)Data)[0];
float my = ((unsigned int*)Data)[1];
transformMouseXY(mx, my);
queue-mouseButtonPress(mx, my, 1, eventTime);
}
break;
caseMSG_MBUTTON_DOWN:
{
float mx = ((unsigned int*)Data)[0];
float my = ((unsigned int*)Data)[1];
transformMouseXY(mx, my);
queue-mouseButtonPress(mx, my, 2, eventTime);
}
break;
caseMSG_RBUTTON_DOWN:
{
float mx = ((unsigned int*)Data)[0];
float my = ((unsigned int*)Data)[1];
transformMouseXY(mx, my);
queue-mouseButtonPress(mx, my, 3, eventTime);
}
break;
caseMSG_LBUTTON_UP:
{
float mx = ((unsigned int*)Data)[0];
float my = ((unsigned int*)Data)[1];
transformMouseXY(mx, my);
queue-mouseButtonRelease(mx, my, 1, eventTime);
}
break;
caseMSG_MBUTTON_UP:
{
float mx = ((unsigned int*)Data)[0];
float my = ((unsigned int*)Data)[1];
transformMouseXY(mx, my);
queue-mouseButtonRelease(mx, my, 2, eventTime);
}
break;
caseMSG_RBUTTON_UP:
{
float mx = ((unsigned int*)Data)[0];
float my = ((unsigned int*)Data)[1];
transformMouseXY(mx, my);
queue-mouseButtonRelease(mx, my, 3, eventTime);
}
break;
caseMSG_MOUSEMOVE:
{
float mx = ((unsigned int*)Data)[0];
float my = ((unsigned int*)Data)[1];
transformMouseXY(mx, my);
queue-mouseMotion(mx, my, eventTime);
}
break;
caseMSG_UNKNOWN:
default:
{
// DO STUFF
}
}

g_viewer-frame();
}

Thanks,

 Émeric

[1] http://forum.openscenegraph.org/viewtopic.php?t=1155
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] (no subject)

2015-02-02 Thread Philippe Renon
Hi Robert,

Thanks for the quick answers.
Please find attached the two modified files (originals are from version 3.3.3):
The files are:
- include/osg/BufferObject
- include/osg/GLDefines

Qt also uses the #ifdef #define pattern so switching include order might not be 
ideal (haven't tested...).

I guess it is easier to change osg than Qt ;)
But there is a somewhat related Qt bug open : 
https://bugreports.qt.io/browse/QTBUG-43748
Qt unnecessarily exposes GL constants publicly.

Regards,
Philippe

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




Attachments: 
http://forum.openscenegraph.org//files/4674_1422921720._672.
http://forum.openscenegraph.org//files/4674_1422921695._155.


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


Re: [osg-users] [build] Could NOT find osgDB (missing: OSGDB_LIBRARY)

2015-02-02 Thread Robert Osfield
HI Laurent,

Have you installed the headers for the OSG?

Robert.

On 2 February 2015 at 13:24, Laurent Berger laurent.ber...@univ-lemans.fr
wrote:

 Hi,

 I have got some problems to build my application on Linux Mint using
 openscenegraph/
 I have got an error when I try to build my makefile using cmake. My
 cmakelist.txt works fine on windows 7  64 bits with openscenegraph. Problem
 is only for linux :

 Code:

 cmake -G Unix Makefiles
 -- Could NOT find osgDB (missing:  OSGDB_LIBRARY)
 -- Could NOT find osgUtil (missing:  OSGUTIL_LIBRARY)
 -- Could NOT find osgGA (missing:  OSGGA_LIBRARY)
 -- Could NOT find osgViewer (missing:  OSGVIEWER_LIBRARY)
 -- Could NOT find osgText (missing:  OSGTEXT_LIBRARY)
 -- Could NOT find osgSim (missing:  OSGSIM_LIBRARY)
 -- Could NOT find osg (missing:  OSG_LIBRARY)
 -- Could NOT find OpenThreads (missing:  OPENTHREADS_LIBRARY)
 CMake Error at
 /usr/local/share/cmake-3.0/Modules/FindPackageHandleStandardArgs.cmake:136
 (message):
   Could NOT find OpenSceneGraph (missing: OPENSCENEGRAPH_LIBRARIES
   OSGDB_FOUND OSGUTIL_FOUND OSGGA_FOUND OSGVIEWER_FOUND OSGTEXT_FOUND
   OSGSIM_FOUND OSG_FOUND OPENTHREADS_FOUND) (found suitable version
 3.2.1,
   minimum required is 3.2.1)
 Call Stack (most recent call first):

 /usr/local/share/cmake-3.0/Modules/FindPackageHandleStandardArgs.cmake:343
 (_FPHSA_FAILURE_MESSAGE)
   /usr/local/share/cmake-3.0/Modules/FindOpenSceneGraph.cmake:230
 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
   CMakeLists.txt:17 (find_package)

 -- Configuring incomplete, errors occurred!







 I have build Openscenegraph :

 Code:

 cmake -G Unix Makefiles
 make
 sudo make install
 cd ..



 I have inserted in .bashrc :

 Code:
 export PATH=${PATH}:/usr/local/share/OpenSceneGraph/bin
 export
 LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/share/OpenSceneGraph-3.2.1/lib
 export
 OSG_FILE_PATH=/usr/local/share/OpenSceneGraph/OpenSceneGraph-Data:usr/local/share/OpenSceneGraph/OpenSceneGraph-Data/Images



 I can run examples as osgplanets



 Thank you for your help!

 Cheers,
 Laurent


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





 ___
 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] [osgPlugins] plugin v8 in version 3.3.1

2015-02-02 Thread Robert Osfield
Hi Nguyen,


On 30 January 2015 at 11:26, nguyen duy nam namd...@gmail.com wrote:

 Hi,
 thanks for reply.
 really i dont need. im just tried build and use new version with new
 feature.


Great. I have just commented out the FIND_PACKAGE and the ADD_SUBDIRECTORY
for the V8 and Python plugins.  If you updated to svn/trunk the build will
no longer check or attempt to build these plugins.

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


Re: [osg-users] [osgPlugins] Loading dae-File results in the object without textures

2015-02-02 Thread Andreas Schreiber
Hi

I already searched in the forum, if there is any solution for my problem. But 
did not find any.

I've been trying to load a dae-File with 
osg::ref_ptrosg::Node building = new osg::Node();
building = 
osgDB::readNodeFile(D:/Uni/Bachelorarbeit/OSG/TestingProject/StraßenSzene/Modelle/House/House.dae);
 .

When I compile my project it shows the house without a texture.

When I drag the dae-File in the osgviewer.exe or open it over the console 
osgviewer house.dae it shows the model with its textures.

I hope anyone can show me what i am doing wrong, or give me an example code 
where a dae-file is loaded.

... 

Thank you!

Cheers,
Andreas

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





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


[osg-users] Cloning uniforms callbacks

2015-02-02 Thread Nicolas Baillard
Hello everyone.

I just noticed that when I clone a node using the flags DEEP_COPY_NODES, 
DEEP_COPY_DRAWABLES, DEEP_COPY_CALLBACKS and DEEP_COPY_UNIFORMS then the 
callbacks of the uniforms are not cloned. As a result my cloned uniforms don't 
have any callbacks. I tried using other flags as well but it didn't change 
anything.

Looking at the code I believe the Uniform(const Uniform rhs, const CopyOp 
copyop) constructor is lacking some lines to apply the copy operation to the 
callbacks (just like the Node copy constructor does for example).

Is it me not using OpenSceneGraph properly ? Or is it a bug ? If so then can I 
propose a patch ?

Regards,
Nicolas

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





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


Re: [osg-users] [build] Could NOT find osgDB (missing: OSGDB_LIBRARY)

2015-02-02 Thread Laurent Berger
Thanks for your answer.

I think yes  : I can find  in /usr/local/include osg osgnimation...osgVolume 
osgWidget

In cmakecache.txt I ve got :

 
 //Path to a file.
 OPENTHREADS_INCLUDE_DIR:PATH=/usr/local/include
 
 //Path to a library.
 OPENTHREADS_LIBRARY:FILEPATH=OPENTHREADS_LIBRARY-NOTFOUND
 
 //Path to a library.
 OPENTHREADS_LIBRARY_DEBUG:FILEPATH=OPENTHREADS_LIBRARY_DEBUG-NOTFOUND
 


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





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


[osg-users] [build] Could NOT find osgDB (missing: OSGDB_LIBRARY)

2015-02-02 Thread Laurent Berger
Hi,

I have got some problems to build my application on Linux Mint using 
openscenegraph/
I have got an error when I try to build my makefile using cmake. My 
cmakelist.txt works fine on windows 7  64 bits with openscenegraph. Problem is 
only for linux :

Code:

cmake -G Unix Makefiles
-- Could NOT find osgDB (missing:  OSGDB_LIBRARY) 
-- Could NOT find osgUtil (missing:  OSGUTIL_LIBRARY) 
-- Could NOT find osgGA (missing:  OSGGA_LIBRARY) 
-- Could NOT find osgViewer (missing:  OSGVIEWER_LIBRARY) 
-- Could NOT find osgText (missing:  OSGTEXT_LIBRARY) 
-- Could NOT find osgSim (missing:  OSGSIM_LIBRARY) 
-- Could NOT find osg (missing:  OSG_LIBRARY) 
-- Could NOT find OpenThreads (missing:  OPENTHREADS_LIBRARY) 
CMake Error at 
/usr/local/share/cmake-3.0/Modules/FindPackageHandleStandardArgs.cmake:136 
(message):
  Could NOT find OpenSceneGraph (missing: OPENSCENEGRAPH_LIBRARIES
  OSGDB_FOUND OSGUTIL_FOUND OSGGA_FOUND OSGVIEWER_FOUND OSGTEXT_FOUND
  OSGSIM_FOUND OSG_FOUND OPENTHREADS_FOUND) (found suitable version 3.2.1,
  minimum required is 3.2.1)
Call Stack (most recent call first):
  /usr/local/share/cmake-3.0/Modules/FindPackageHandleStandardArgs.cmake:343 
(_FPHSA_FAILURE_MESSAGE)
  /usr/local/share/cmake-3.0/Modules/FindOpenSceneGraph.cmake:230 
(FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  CMakeLists.txt:17 (find_package)

-- Configuring incomplete, errors occurred!







I have build Openscenegraph : 

Code:

cmake -G Unix Makefiles
make
sudo make install
cd ..



I have inserted in .bashrc :

Code:
export PATH=${PATH}:/usr/local/share/OpenSceneGraph/bin
export 
LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/share/OpenSceneGraph-3.2.1/lib
export 
OSG_FILE_PATH=/usr/local/share/OpenSceneGraph/OpenSceneGraph-Data:usr/local/share/OpenSceneGraph/OpenSceneGraph-Data/Images



I can run examples as osgplanets 



Thank you for your help!

Cheers,
Laurent


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





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


Re: [osg-users] Cloning uniforms callbacks

2015-02-02 Thread Robert Osfield
Hi Nicolas,

From your description it sounds like a bug, but haven't reviewed the code
to confirm it yet.  If you can come up with a fix please just send along
your modified file.

Cheers,
Robert.

On 2 February 2015 at 13:43, Nicolas Baillard nicolas.baill...@gmail.com
wrote:

 Hello everyone.

 I just noticed that when I clone a node using the flags DEEP_COPY_NODES,
 DEEP_COPY_DRAWABLES, DEEP_COPY_CALLBACKS and DEEP_COPY_UNIFORMS then the
 callbacks of the uniforms are not cloned. As a result my cloned uniforms
 don't have any callbacks. I tried using other flags as well but it didn't
 change anything.

 Looking at the code I believe the Uniform(const Uniform rhs, const
 CopyOp copyop) constructor is lacking some lines to apply the copy
 operation to the callbacks (just like the Node copy constructor does for
 example).

 Is it me not using OpenSceneGraph properly ? Or is it a bug ? If so then
 can I propose a patch ?

 Regards,
 Nicolas

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





 ___
 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] Could NOT find osgDB (missing: OSGDB_LIBRARY)

2015-02-02 Thread Robert Osfield
Hi Laurent,

It's not a Linux specific issue as it'll work fine if the heads and libs
are installed in standard places.

If your headers and libs are in a non standard place you'll need to tell
Cmake where to look, either at first configuration or via the ccmake tool.
For instance try setting the OSG_DIR env var to where you've put the OSG.
If you are still having problems have a look at CMake's
/usr/share/cmake-version/Modules directory for it's Find OSG related
scripts.

Robert.

On 2 February 2015 at 14:21, Laurent Berger laurent.ber...@univ-lemans.fr
wrote:

 Thanks for your answer.

 I think yes  : I can find  in /usr/local/include osg
 osgnimation...osgVolume osgWidget

 In cmakecache.txt I ve got :

 
  //Path to a file.
  OPENTHREADS_INCLUDE_DIR:PATH=/usr/local/include
 
  //Path to a library.
  OPENTHREADS_LIBRARY:FILEPATH=OPENTHREADS_LIBRARY-NOTFOUND
 
  //Path to a library.
  OPENTHREADS_LIBRARY_DEBUG:FILEPATH=OPENTHREADS_LIBRARY_DEBUG-NOTFOUND
 


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





 ___
 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] Could NOT find osgDB (missing: OSGDB_LIBRARY)

2015-02-02 Thread Laurent Berger
Thanks it's ok now with OSG_DIR==/usr/local/share/OpenSceneGraph-3.2.1/

But what's standard places? (I'm not a Linux specialist)

... 


Thank you!

Cheers,
Laurent

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





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


Re: [osg-users] [build] Could NOT find osgDB (missing: OSGDB_LIBRARY)

2015-02-02 Thread Robert Osfield
HI Laurent,

On 2 February 2015 at 16:31, Laurent Berger laurent.ber...@univ-lemans.fr
wrote:

 Thanks it's ok now with OSG_DIR==/usr/local/share/OpenSceneGraph-3.2.1/


That's certainly non standard :-)

But what's standard places? (I'm not a Linux specialist)


Header files are normally placed in:

  /usr/include
  /usr/local/include

Libs in

  /usr/lib
  /usr/local/lib

There are a few other variations too.  Have a look at the CMake find
modules to see where it checks.

One doesn't normally place headers and libs under a specific version
subdirectory like your have in case.  Do you compile and install it
yourself?

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


Re: [osg-users] (no subject)

2015-02-02 Thread Philippe Renon

robertosfield wrote:
 
 
 Could you try removing the #define GL_ARB_vertex_buffer_object line from the 
 include/osg/BufferObject header to see if that allows the Qt header to 
 compile fine.
 
 


Removing the #define GL_ARB_vertex_buffer_object line did the trick.

Fixing the GL_SHADER_STORAGE_BARRIER_BIT redefine warning is also 
straightfoward:


 
 diff --git a/include/osg/GLDefines b/include/osg/GLDefines
 index e89bd3a..11ef3d2 100644
 --- a/include/osg/GLDefines
 +++ b/include/osg/GLDefines
 @@ -493,7 +493,7 @@ typedef char GLchar;
  #endif
 
  #ifndef GL_VERSION_4_3
 -#define GL_SHADER_STORAGE_BARRIER_BIT 0x2000
 +#define GL_SHADER_STORAGE_BARRIER_BIT 0x2000
 

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





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


Re: [osg-users] (no subject)

2015-02-02 Thread Philippe Renon

robertosfield wrote:
 Hi Phileppe,
 
 
 I presume Qt5.4 is define the various GL values in it's headers as well as 
 the OSG.  You could try changing the include order of the Qt and OSG headers 
 to see if that can resolve the issue.  I don't have Qt5.4 on my system to 
 test against so I'll have to defer to you to see if you can find a solution.  
 If you do just let me know the changes required and we can then discuss how 
 to tweak the OSG or it's Qt usage to avoid the issues.
 
 Robert.
 
 


It is exactly that and I tend to include OSG first and then Qt.
Will try the other way around although fixing OSG is pretty simple (see my last 
post on that subject).

Philippe.

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





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


Re: [osg-users] [osgPlugins] plugin v8 in version 3.3.1

2015-02-02 Thread nguyen duy nam
Hi,
thanks for reply.
really i dont need. im just tried build and use new version with new feature.

... 

Thank you!

Cheers,
nguyen

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





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


Re: [osg-users] (no subject)

2015-02-02 Thread Robert Osfield
Hi Phileppe,

Good to hear you've been able to fix the problems.  Could you send me the
whole modified files so I can do graphical diff to make sure I get all the
correct modifications.

Thanks,
Robert.

On 1 February 2015 at 12:08, Philippe Renon philippe_re...@yahoo.fr wrote:


 robertosfield wrote:
 
 
  Could you try removing the #define GL_ARB_vertex_buffer_object line from
 the include/osg/BufferObject header to see if that allows the Qt header to
 compile fine.
 
 


 Removing the #define GL_ARB_vertex_buffer_object line did the trick.

 Fixing the GL_SHADER_STORAGE_BARRIER_BIT redefine warning is also
 straightfoward:


 
  diff --git a/include/osg/GLDefines b/include/osg/GLDefines
  index e89bd3a..11ef3d2 100644
  --- a/include/osg/GLDefines
  +++ b/include/osg/GLDefines
  @@ -493,7 +493,7 @@ typedef char GLchar;
   #endif
 
   #ifndef GL_VERSION_4_3
  -#define GL_SHADER_STORAGE_BARRIER_BIT 0x2000
  +#define GL_SHADER_STORAGE_BARRIER_BIT 0x2000
 

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





 ___
 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