Re: [osg-users] [vpb] Building Virtual Planet Builder in Linux

2012-09-12 Thread Nav Joseph
@Jordi: Thanks for the timely reply. It helped me get things done fast. I see 
why a mailing list is beneficial.
Checked with glxinfo, and I do have direct rendering. Don't know what info 
indicates that my drivers are ok though. But I guess that doesn't matter 
because I haven't installed the linux drivers for the graphics card. The driver 
software tells me that I need to remove Nouveau first. Will be doing that soon.

How to compile osg with gdal? I had a look at the CMake files, but there didn't 
seem to be any option for gdal. Do I have to run cmake with a command like 

Code:
cmake ../osg -DGDAL_INCLUDE_DIR=../gdal/include
make
make install


How do I find out whether GDAL_INCLUDE_DIR is the correct macro to use or not? 
I'm guessing from what I remember from the Windows CMake GUI.

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





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


Re: [osg-users] [vpb] Building Virtual Planet Builder in Linux

2012-09-12 Thread Jordi Torres
Hi Nav,

If you have installed gdal in your system, probably it will be
autodetected. If you use a custom directory you will need to pass this
information to cmake. There exists two ways:

Use ccmake (you need to install cmake-curses package) .. instead of cmake
.. and search for the entry

GDAL_INCLUDE_DIR /usr/include/gdal(these are my
autodetected values)
GDAL_LIBRARY /usr/lib/libgdal1.7.0.so (these are my
autodetected values)

you can make use of cmake-gui if you feel more comfortable (you need to
install cmake-qt-gui package)

Use the paremeters as you said

cmake ../osg -DGDAL_INCLUDE_DIR=/pathtogdalincludedir
-DGDAL_LIBRARY=/pathtolib

Cheers

 2012/9/12 Nav Joseph nk...@tatapowersed.com

 @Jordi: Thanks for the timely reply. It helped me get things done fast. I
 see why a mailing list is beneficial.
 Checked with glxinfo, and I do have direct rendering. Don't know what info
 indicates that my drivers are ok though. But I guess that doesn't matter
 because I haven't installed the linux drivers for the graphics card. The
 driver software tells me that I need to remove Nouveau first. Will be doing
 that soon.

 How to compile osg with gdal? I had a look at the CMake files, but there
 didn't seem to be any option for gdal. Do I have to run cmake with a
 command like

 Code:
 cmake ../osg -DGDAL_INCLUDE_DIR=../gdal/include
 make
 make install


 How do I find out whether GDAL_INCLUDE_DIR is the correct macro to use or
 not? I'm guessing from what I remember from the Windows CMake GUI.

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





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




-- 
Jordi Torres Fabra

gvSIG 3D blog
http://gvsig3d.blogspot.com
Instituto de Automática e Informática Industrial
http://www.ai2.upv.es
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Using glDrawElements causes crash with osg::Stats

2012-09-12 Thread Robert Osfield
Hi Karl,

The OSG uses lazy state updating to aovid calling OpenGL when it's not
needed but when you do your own OpenGL calls outside this lazy state
update mechanism the OSG doesn't know the OpenGL state is now
different than when the OSG last applied something so ends up not
applying state when it should.

The way to fix it is to stop the state leakage from your own custom
cost vis the glPush*()/glPop*() or to tell the OSG that you've changed
the state via the osg::State::haveApplied*() calls or simply to use
the osg::State class itself for applying the state you want to change.
 There are a whole series of methods for doing vertex array set up
that you can use so have a look at these.

Robert.

On 11 September 2012 18:40, Cary, Karl A. karl.a.c...@saic.com wrote:
 I have a situation that is requiring me to use raw gl commands in the
 drawImplementation of an osg::Drawable. I have a double buffer that is not
 updated fully until draw time as opposed to update time and I am not at
 liberty to change this. Currently in the drawImplementation, I get the
 current buffer, then perform glVertex and glNormal commands on the list of
 vertices in the buffer. This works just fine and there are no problems other
 than it can slow down the scene do to the number of verts. I was attempting
 to convert this to a glDrawElements call as a quick improvement and saw a
 noticeable performance increase. Everything is drawing just fine and I
 haven’t found any slow downs or stability issues, with one exception. If I
 enable osg::Stats, it crashes immediately and I have no idea why. I was
 hoping someone might have some insight for me. Here is the
 drawImplementation code:



 {

 //get the current active buffer

 VertBuffer buffer = getCurBuffer();



 //set up the client state

 glPushClientAttrib(GL_CLIENT_VERTEX_ARRAY_BIT); //crashes immediately
 without this

 glEnableClientState(GL_VERTEX_ARRAY);

 glEnableClientState(GL_NORMAL_ARRAY);



 //set up arrays

 glVertexPointer(3, GL_FLOAT, 0, (GLvoid*)pmCoords);

 glNormalPointer(GL_FLOAT, 0, (GLvoid*)pmNormals);



 //draw

 if (buffer.vertexList.size()  0)

 {

 glDrawElements(GL_TRIANGLES,
 buffer.vertexList.size(), GL_UNSIGNED_INT, (buffer.vertexList)[0]);

 }



 //disable client state

 glDisableClientState(GL_VERTEX_ARRAY);

 glDisableClientState(GL_NORMAL_ARRAY);

 glPopClientAttrib();

 }



 In this, VertBuffer, is just a structure that holds a std::vectorunsigned
 int of the vertices to draw (vertexList), and some other info that is not
 used during the draw. pmCoords and pmNormals are lists of all available
 coordinates and their normals. The vertexList is just a list of indices in
 these coordinates to draw at this time.



 As I said, everything works fine if the draw is as follows instead:



 glBegin(GL_TRIANGLES);

 for (int ii = 0; ii  buffer.vertexList.size(); ii+= 3)

 {


 glNormal3fv(pmNormals[buffer.vertexList[ii]];

 glVertex3fv(pmCoords[buffer.vertexList[ii]];

 glNormal3fv(pmNormals[buffer.vertexList[ii+1]];

 glVertex3fv(pmCoords[buffer.vertexList[ii+1]];

 glNormal3fv(pmNormals[buffer.vertexList[ii+2]];

 glVertex3fv(pmCoords[buffer.vertexList[ii+2]];

 }

 glEnd();



 I’ve tried copying the data locally from the buffer and that did nothing
 different. I even tried to create a small array locally that contained the
 same data. If I only drew 1 triangle it was fine, but if I tried to draw
 more, it would sometimes work and sometimes crash.



 Karl Cary

 SAIC

 Software Developer

 301-227-5656




 ___
 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] NodeTrackerManipulator

2012-09-12 Thread Gianni Ambrosio
Hi,
I would need to update the _center member variable of OrbitManipulator from my 
NodeTrackerManipulator so that getInverseMatrix() uses un up to date _center 
value. I can update it in my getInverseMatrix() implementation with the usual 
trick of const_cast but I would avoid that if possible. Is there a more elegant 
way of updating the _center value?

Regards,
Gianni

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





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


Re: [osg-users] Opengl 3

2012-09-12 Thread Peterakos
Hello.

I did exactly what's written in comments in osgsimplegl3, except teh
CMAKE_CXX_FLAGS thing.
I created the solution, built it and worked fine except for 2 projects
which concern QT.
I managed to ran the osgsimplegl3.
The only thing i did with the gl3/gl3.h is to add this path in visual
studio's include path.

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


[osg-users] Camera Default Light

2012-09-12 Thread Laith Dhawahir
Hi,

How can I change or set the camera default light ?


Thank you!

Cheers,
Laith

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





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


[osg-users] Trouble building from source

2012-09-12 Thread Theuns Heydenrych
I need some help with dependencies issues, please.

I am using the latest code from the svn repo.
I am building on Ubuntu 12.04 64bit, the code does compile, and after
executing sudo make install and then executing osgbillboard i get the
following error:
osgbillboard: error while loading shared libraries: libosg.so.93: cannot
open shared object file: No such file or directory
The  libosg.so.93 is present in the /usr/local/lib64/ directory.
When running ldd on /usr/local/lib64/libosg.so.93 i get the following result

linux-vdso.so.1 =  (0x7fffbe4c7000)
libOpenThreads.so.12 = not found
libpthread.so.0 = /lib/x86_64-linux-gnu/libpthread.so.0
(0x7fe40b908000)
librt.so.1 = /lib/x86_64-linux-gnu/librt.so.1 (0x7fe40b6ff000)
libdl.so.2 = /lib/x86_64-linux-gnu/libdl.so.2 (0x7fe40b4fb000)
libGL.so.1 = /usr/lib/nvidia-current-updates/libGL.so.1
(0x7fe40b1e3000)
libstdc++.so.6 = /usr/lib/x86_64-linux-gnu/libstdc++.so.6
(0x7fe40aee2000)
libm.so.6 = /lib/x86_64-linux-gnu/libm.so.6 (0x7fe40abe8000)
libgcc_s.so.1 = /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x7fe40a9d2000)
libc.so.6 = /lib/x86_64-linux-gnu/libc.so.6 (0x7fe40a614000)
/lib64/ld-linux-x86-64.so.2 (0x7fe40c066000)
libnvidia-tls.so.295.49 =
/usr/lib/nvidia-current-updates/tls/libnvidia-tls.so.295.49
(0x7fe40a411000)
libnvidia-glcore.so.295.49 =
/usr/lib/nvidia-current-updates/libnvidia-glcore.so.295.49
(0x7fe4080d7000)
libX11.so.6 = /usr/lib/x86_64-linux-gnu/libX11.so.6 (0x7fe407da2000)
libXext.so.6 = /usr/lib/x86_64-linux-gnu/libXext.so.6 (0x7fe407b91000)
libxcb.so.1 = /usr/lib/x86_64-linux-gnu/libxcb.so.1 (0x7fe407972000)
libXau.so.6 = /usr/lib/x86_64-linux-gnu/libXau.so.6 (0x7fe40776f000)
libXdmcp.so.6 = /usr/lib/x86_64-linux-gnu/libXdmcp.so.6
(0x7fe407569000)

libOpenThreads.so.12 is not found, but it is present in /usr/local/lib64/

When executing cmake ../OpenSceneGraph -DCMAKE_BUILD_TYPE=Release i get the
following output.

-- The C compiler identification is GNU
-- The CXX compiler identification is GNU
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- 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 files CMAKE_HAVE_PTHREAD_H
-- Looking for include files CMAKE_HAVE_PTHREAD_H - 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/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so
-- Looking for XOpenDisplay in
/usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/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/lib/x86_64-linux-gnu/libX11.so
-- Found OpenGL: /usr/lib/x86_64-linux-gnu/libGL.so
-- Found LibXml2: /usr/lib/x86_64-linux-gnu/libxml2.so
-- checking for module 'gta'
--   package 'gta' not found
-- Found CURL: /usr/lib/x86_64-linux-gnu/libcurl.so
-- Found OpenAL: /usr/lib/x86_64-linux-gnu/libopenal.so
-- checking for module 'cairo'
--   found cairo, version 1.10.2
-- checking for module 'poppler-glib'
--   found poppler-glib, version 0.18.4
-- Performing Test POPPLER_HAS_CAIRO
-- Performing Test POPPLER_HAS_CAIRO - Success
-- checking for module 'librsvg-2.0'
--   found librsvg-2.0, version 2.36.1
-- checking for module 'gtk+-2.0'
--   found gtk+-2.0, version 2.24.10
-- checking for module 'gtkglext-x11-1.0'
--   found gtkglext-x11-1.0, version 1.2.0
-- Looking for Q_WS_X11
-- Looking for Q_WS_X11 - found
-- Looking for Q_WS_WIN
-- Looking for Q_WS_WIN - not found.
-- Looking for Q_WS_QWS
-- Looking for Q_WS_QWS - not found.
-- Looking for Q_WS_MAC
-- Looking for Q_WS_MAC - not found.
-- Found Qt4: /usr/bin/qmake (found version 4.8.1)
-- Found JPEG: /usr/lib/x86_64-linux-gnu/libjpeg.so
-- Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.so (found version 1.2.3.4)
-- Found PNG: /usr/lib/x86_64-linux-gnu/libpng.so
-- Found TIFF: /usr/lib/x86_64-linux-gnu/libtiff.so
-- Performing Test _OPENTHREADS_ATOMIC_USE_GCC_BUILTINS
-- Performing Test _OPENTHREADS_ATOMIC_USE_GCC_BUILTINS - Success
-- Performing Test _OPENTHREADS_ATOMIC_USE_MIPOSPRO_BUILTINS
-- Performing Test _OPENTHREADS_ATOMIC_USE_MIPOSPRO_BUILTINS - Failed
-- Performing Test _OPENTHREADS_ATOMIC_USE_SUN
-- Performing Test _OPENTHREADS_ATOMIC_USE_SUN - Failed
-- Performing Test _OPENTHREADS_ATOMIC_USE_WIN32_INTERLOCKED
-- Performing Test 

Re: [osg-users] Camera Default Light

2012-09-12 Thread Robert Osfield
Hi Laith,

On 12 September 2012 11:03, Laith Dhawahir laithbasildot...@gmail.com wrote:
 How can I change or set the camera default light ?

You don't set a Camera's default light, rather you can set a View's
default light, see include/osg/View or provide the appropriate Light
via an osg::LightSource placed into the scene graph.  Note, that
osgViewer::Viewer subclasses from osg::View (via osgViewer::View).

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


Re: [osg-users] Trouble building from source

2012-09-12 Thread Robert Osfield
Hi Theuns,

I am using Kubuntu 12.04 64bit for all dev work and when I run cmake I
get the same pthread related warnings as you but everything builds and
links OK.  I haven't recently tried to install the OSG, instead I set
PATH and LD_LIBRARY_PATH to the OpenSceneGraph build directory - I do
this as I'm working on the OSG dev all the time so don't want to have
to keep installing this.

Previously when testing installs I haven't had problems with
libOpenThreads though, and little has changed on the cmake build front
that would suggest we might have a regression.  Once I've completed my
present work item I'll clean my system and try to recreate the linking
side.

Robert.

On 12 September 2012 11:45, Theuns Heydenrych
theunsheydenr...@gmail.com wrote:
 I need some help with dependencies issues, please.

 I am using the latest code from the svn repo.
 I am building on Ubuntu 12.04 64bit, the code does compile, and after
 executing sudo make install and then executing osgbillboard i get the
 following error:
 osgbillboard: error while loading shared libraries: libosg.so.93: cannot
 open shared object file: No such file or directory
 The  libosg.so.93 is present in the /usr/local/lib64/ directory.
 When running ldd on /usr/local/lib64/libosg.so.93 i get the following result

 linux-vdso.so.1 =  (0x7fffbe4c7000)
 libOpenThreads.so.12 = not found
 libpthread.so.0 = /lib/x86_64-linux-gnu/libpthread.so.0
 (0x7fe40b908000)
 librt.so.1 = /lib/x86_64-linux-gnu/librt.so.1 (0x7fe40b6ff000)
 libdl.so.2 = /lib/x86_64-linux-gnu/libdl.so.2 (0x7fe40b4fb000)
 libGL.so.1 = /usr/lib/nvidia-current-updates/libGL.so.1
 (0x7fe40b1e3000)
 libstdc++.so.6 = /usr/lib/x86_64-linux-gnu/libstdc++.so.6
 (0x7fe40aee2000)
 libm.so.6 = /lib/x86_64-linux-gnu/libm.so.6 (0x7fe40abe8000)
 libgcc_s.so.1 = /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x7fe40a9d2000)
 libc.so.6 = /lib/x86_64-linux-gnu/libc.so.6 (0x7fe40a614000)
 /lib64/ld-linux-x86-64.so.2 (0x7fe40c066000)
 libnvidia-tls.so.295.49 =
 /usr/lib/nvidia-current-updates/tls/libnvidia-tls.so.295.49
 (0x7fe40a411000)
 libnvidia-glcore.so.295.49 =
 /usr/lib/nvidia-current-updates/libnvidia-glcore.so.295.49
 (0x7fe4080d7000)
 libX11.so.6 = /usr/lib/x86_64-linux-gnu/libX11.so.6 (0x7fe407da2000)
 libXext.so.6 = /usr/lib/x86_64-linux-gnu/libXext.so.6 (0x7fe407b91000)
 libxcb.so.1 = /usr/lib/x86_64-linux-gnu/libxcb.so.1 (0x7fe407972000)
 libXau.so.6 = /usr/lib/x86_64-linux-gnu/libXau.so.6 (0x7fe40776f000)
 libXdmcp.so.6 = /usr/lib/x86_64-linux-gnu/libXdmcp.so.6
 (0x7fe407569000)

 libOpenThreads.so.12 is not found, but it is present in /usr/local/lib64/

 When executing cmake ../OpenSceneGraph -DCMAKE_BUILD_TYPE=Release i get the
 following output.

 -- The C compiler identification is GNU
 -- The CXX compiler identification is GNU
 -- Check for working C compiler: /usr/bin/gcc
 -- Check for working C compiler: /usr/bin/gcc -- 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 files CMAKE_HAVE_PTHREAD_H
 -- Looking for include files CMAKE_HAVE_PTHREAD_H - 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/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so
 -- Looking for XOpenDisplay in
 /usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/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/lib/x86_64-linux-gnu/libX11.so
 -- Found OpenGL: /usr/lib/x86_64-linux-gnu/libGL.so
 -- Found LibXml2: /usr/lib/x86_64-linux-gnu/libxml2.so
 -- checking for module 'gta'
 --   package 'gta' not found
 -- Found CURL: /usr/lib/x86_64-linux-gnu/libcurl.so
 -- Found OpenAL: /usr/lib/x86_64-linux-gnu/libopenal.so
 -- checking for module 'cairo'
 --   found cairo, version 1.10.2
 -- checking for module 'poppler-glib'
 --   found poppler-glib, version 0.18.4
 -- Performing Test POPPLER_HAS_CAIRO
 -- Performing Test POPPLER_HAS_CAIRO - Success
 -- checking for module 'librsvg-2.0'
 --   found librsvg-2.0, version 2.36.1
 -- checking for module 'gtk+-2.0'
 --   found gtk+-2.0, version 2.24.10
 -- checking for module 'gtkglext-x11-1.0'
 --   found gtkglext-x11-1.0, version 1.2.0
 -- Looking for Q_WS_X11
 -- Looking for Q_WS_X11 - found
 -- Looking for Q_WS_WIN
 -- Looking for 

Re: [osg-users] Trouble building from source

2012-09-12 Thread Alberto Luaces
I think Theuns overlooked the cmake-time warning:

 The build system is configured to install libraries to /usr/local/lib64
 Your applications may not be able to find your installed libraries unless you:
 set your LD_LIBRARY_PATH (user specific) or
 update your ld.so configuration (system wide)

 You have an ld.so.conf.d directory on your system, so if you wish to ensure 
that
 applications find the installed osg libraries, system wide, you could install 
an
 OpenSceneGraph specific ld.so configuration with:
 sudo make install_ld_conf

Regards,

Alberto

Robert Osfield writes:

 Hi Theuns,

 I am using Kubuntu 12.04 64bit for all dev work and when I run cmake I
 get the same pthread related warnings as you but everything builds and
 links OK.  I haven't recently tried to install the OSG, instead I set
 PATH and LD_LIBRARY_PATH to the OpenSceneGraph build directory - I do
 this as I'm working on the OSG dev all the time so don't want to have
 to keep installing this.

 Previously when testing installs I haven't had problems with
 libOpenThreads though, and little has changed on the cmake build front
 that would suggest we might have a regression.  Once I've completed my
 present work item I'll clean my system and try to recreate the linking
 side.

 Robert.

 On 12 September 2012 11:45, Theuns Heydenrych
 theunsheydenr...@gmail.com wrote:
 I need some help with dependencies issues, please.

 I am using the latest code from the svn repo.
 I am building on Ubuntu 12.04 64bit, the code does compile, and after
 executing sudo make install and then executing osgbillboard i get the
 following error:
 osgbillboard: error while loading shared libraries: libosg.so.93: cannot
 open shared object file: No such file or directory
 The  libosg.so.93 is present in the /usr/local/lib64/ directory.
 When running ldd on /usr/local/lib64/libosg.so.93 i get the following result

 linux-vdso.so.1 =  (0x7fffbe4c7000)
 libOpenThreads.so.12 = not found
 libpthread.so.0 = /lib/x86_64-linux-gnu/libpthread.so.0
 (0x7fe40b908000)
 librt.so.1 = /lib/x86_64-linux-gnu/librt.so.1 (0x7fe40b6ff000)
 libdl.so.2 = /lib/x86_64-linux-gnu/libdl.so.2 (0x7fe40b4fb000)
 libGL.so.1 = /usr/lib/nvidia-current-updates/libGL.so.1
 (0x7fe40b1e3000)
 libstdc++.so.6 = /usr/lib/x86_64-linux-gnu/libstdc++.so.6
 (0x7fe40aee2000)
 libm.so.6 = /lib/x86_64-linux-gnu/libm.so.6 (0x7fe40abe8000)
 libgcc_s.so.1 = /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x7fe40a9d2000)
 libc.so.6 = /lib/x86_64-linux-gnu/libc.so.6 (0x7fe40a614000)
 /lib64/ld-linux-x86-64.so.2 (0x7fe40c066000)
 libnvidia-tls.so.295.49 =
 /usr/lib/nvidia-current-updates/tls/libnvidia-tls.so.295.49
 (0x7fe40a411000)
 libnvidia-glcore.so.295.49 =
 /usr/lib/nvidia-current-updates/libnvidia-glcore.so.295.49
 (0x7fe4080d7000)
 libX11.so.6 = /usr/lib/x86_64-linux-gnu/libX11.so.6 (0x7fe407da2000)
 libXext.so.6 = /usr/lib/x86_64-linux-gnu/libXext.so.6 (0x7fe407b91000)
 libxcb.so.1 = /usr/lib/x86_64-linux-gnu/libxcb.so.1 (0x7fe407972000)
 libXau.so.6 = /usr/lib/x86_64-linux-gnu/libXau.so.6 (0x7fe40776f000)
 libXdmcp.so.6 = /usr/lib/x86_64-linux-gnu/libXdmcp.so.6
 (0x7fe407569000)

 libOpenThreads.so.12 is not found, but it is present in /usr/local/lib64/

 When executing cmake ../OpenSceneGraph -DCMAKE_BUILD_TYPE=Release i get the
 following output.

 -- The C compiler identification is GNU
 -- The CXX compiler identification is GNU
 -- Check for working C compiler: /usr/bin/gcc
 -- Check for working C compiler: /usr/bin/gcc -- 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 files CMAKE_HAVE_PTHREAD_H
 -- Looking for include files CMAKE_HAVE_PTHREAD_H - 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/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so
 -- Looking for XOpenDisplay in
 /usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/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/lib/x86_64-linux-gnu/libX11.so
 -- Found OpenGL: /usr/lib/x86_64-linux-gnu/libGL.so
 -- Found LibXml2: /usr/lib/x86_64-linux-gnu/libxml2.so
 -- checking for module 'gta'
 --   package 'gta' not found
 -- Found CURL: /usr/lib/x86_64-linux-gnu/libcurl.so
 -- Found OpenAL: 

Re: [osg-users] Trouble building from source

2012-09-12 Thread Theuns Heydenrych
Thanks Alberto
You are correct, after exported the LD_LIBRARY_PATH it worked.
But the cmake output is still a bit confusing with the pthread(s) stuff not
found.

Thanks for the quick reply



On Wed, Sep 12, 2012 at 1:09 PM, Alberto Luaces alua...@udc.es wrote:

 I think Theuns overlooked the cmake-time warning:

  The build system is configured to install libraries to /usr/local/lib64
  Your applications may not be able to find your installed libraries unless
 you:
  set your LD_LIBRARY_PATH (user specific) or
  update your ld.so configuration (system wide)

  You have an ld.so.conf.d directory on your system, so if you wish to
 ensure that
  applications find the installed osg libraries, system wide, you could
 install an
  OpenSceneGraph specific ld.so configuration with:
  sudo make install_ld_conf

 Regards,

 Alberto

 Robert Osfield writes:

  Hi Theuns,
 
  I am using Kubuntu 12.04 64bit for all dev work and when I run cmake I
  get the same pthread related warnings as you but everything builds and
  links OK.  I haven't recently tried to install the OSG, instead I set
  PATH and LD_LIBRARY_PATH to the OpenSceneGraph build directory - I do
  this as I'm working on the OSG dev all the time so don't want to have
  to keep installing this.
 
  Previously when testing installs I haven't had problems with
  libOpenThreads though, and little has changed on the cmake build front
  that would suggest we might have a regression.  Once I've completed my
  present work item I'll clean my system and try to recreate the linking
  side.
 
  Robert.
 
  On 12 September 2012 11:45, Theuns Heydenrych
  theunsheydenr...@gmail.com wrote:
  I need some help with dependencies issues, please.
 
  I am using the latest code from the svn repo.
  I am building on Ubuntu 12.04 64bit, the code does compile, and after
  executing sudo make install and then executing osgbillboard i get the
  following error:
  osgbillboard: error while loading shared libraries: libosg.so.93:
 cannot
  open shared object file: No such file or directory
  The  libosg.so.93 is present in the /usr/local/lib64/ directory.
  When running ldd on /usr/local/lib64/libosg.so.93 i get the following
 result
 
  linux-vdso.so.1 =  (0x7fffbe4c7000)
  libOpenThreads.so.12 = not found
  libpthread.so.0 = /lib/x86_64-linux-gnu/libpthread.so.0
  (0x7fe40b908000)
  librt.so.1 = /lib/x86_64-linux-gnu/librt.so.1 (0x7fe40b6ff000)
  libdl.so.2 = /lib/x86_64-linux-gnu/libdl.so.2 (0x7fe40b4fb000)
  libGL.so.1 = /usr/lib/nvidia-current-updates/libGL.so.1
  (0x7fe40b1e3000)
  libstdc++.so.6 = /usr/lib/x86_64-linux-gnu/libstdc++.so.6
  (0x7fe40aee2000)
  libm.so.6 = /lib/x86_64-linux-gnu/libm.so.6 (0x7fe40abe8000)
  libgcc_s.so.1 = /lib/x86_64-linux-gnu/libgcc_s.so.1
 (0x7fe40a9d2000)
  libc.so.6 = /lib/x86_64-linux-gnu/libc.so.6 (0x7fe40a614000)
  /lib64/ld-linux-x86-64.so.2 (0x7fe40c066000)
  libnvidia-tls.so.295.49 =
  /usr/lib/nvidia-current-updates/tls/libnvidia-tls.so.295.49
  (0x7fe40a411000)
  libnvidia-glcore.so.295.49 =
  /usr/lib/nvidia-current-updates/libnvidia-glcore.so.295.49
  (0x7fe4080d7000)
  libX11.so.6 = /usr/lib/x86_64-linux-gnu/libX11.so.6
 (0x7fe407da2000)
  libXext.so.6 = /usr/lib/x86_64-linux-gnu/libXext.so.6
 (0x7fe407b91000)
  libxcb.so.1 = /usr/lib/x86_64-linux-gnu/libxcb.so.1
 (0x7fe407972000)
  libXau.so.6 = /usr/lib/x86_64-linux-gnu/libXau.so.6
 (0x7fe40776f000)
  libXdmcp.so.6 = /usr/lib/x86_64-linux-gnu/libXdmcp.so.6
  (0x7fe407569000)
 
  libOpenThreads.so.12 is not found, but it is present in
 /usr/local/lib64/
 
  When executing cmake ../OpenSceneGraph -DCMAKE_BUILD_TYPE=Release i get
 the
  following output.
 
  -- The C compiler identification is GNU
  -- The CXX compiler identification is GNU
  -- Check for working C compiler: /usr/bin/gcc
  -- Check for working C compiler: /usr/bin/gcc -- 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 files CMAKE_HAVE_PTHREAD_H
  -- Looking for include files CMAKE_HAVE_PTHREAD_H - 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/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so
  -- Looking for XOpenDisplay in
 
 /usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/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
  -- 

Re: [osg-users] framebuffer texture applied to plane, need texture always full screen

2012-09-12 Thread Paul Griffiths

Paul Martz wrote:
 His description is difficult to understand, but it seems like he wants some 
 type 
 of stencil solution. So the plane rendering pass would be:
 1. Render the plane with stencil set to write a 1 bit.
 2. Render a fullscreen quad to display the texture, but only where stencil is 
 1.


Yes, that is correct, render a fullscreen quad but only where the plane is (at 
any angle)

New to osg, is there a stencil example?

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





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


[osg-users] clipped Scenes within a clipped scenes?

2012-09-12 Thread Paul Griffiths
Hi,
Is it possible to have a clipped scene within a clipped scene?

Say, i have a clipped cube, can i add this object within another scene which is 
also clipped(using 4 clipplanes?)

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





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


Re: [osg-users] clipped Scenes within a clipped scenes?

2012-09-12 Thread Robert Osfield
Hi Paul,

On 12 September 2012 13:16, Paul Griffiths gaffe...@gmail.com wrote:
 Hi,
 Is it possible to have a clipped scene within a clipped scene?

 Say, i have a clipped cube, can i add this object within another scene which 
 is also clipped(using 4 clipplanes?)

The simple answer has to be no as fixed function pipeline in OpenGL
drivers and hence the OSG are typically limited to 6 clipping planes.

However, you could implement your own shaders that overcome this
limitation, using uniform to pass in the position of the clipping
planes.

The alternative would be to a multi-pass approach, but whether this is
possible in your case will depend a great deal on exactly how you
clipping things, i.e. object space vs viewport space.

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


Re: [osg-users] Using glDrawElements causes crash with osg::Stats

2012-09-12 Thread Cary, Karl A.
Alright so I adjusted my code to do everything through the osg::State,
including trying the osg::State's glDrawElementsInstanced instead of the
normal GL glDrawElements, and I am still having the same issue. It still
works normally but crashes when I enable stats. Is there a call I need
to make that I am missing? Here is the adjusted code:

Void MyDrawable::drawImplementation(osg::RenderInfo ri)
{
//get the current active buffer
VertBuffer buffer = getCurBuffer();

//get osg State and apply vertex and normal pointers
osg::State state = *ri.getState();
state.setVertexPointer(3, GL_FLOAT, 0, (GLvoid*)pmCoords);
state.setNormalPointer(GL_FLOAT, 0, (GLvoid*)pmNormals);

//draw
if (buffer.vertexList.size()  0)
{
state.glDrawElementsInstanced(GL_TRIANGLES,
buffer.vertexList.size(), GL_UNSIGNED_INT, (buffer.vertexList)[0], 1);
}

//disable vertex and normal pointers
state.disableNormalPointer();
state.disableVertexPointer();
}

-Original Message-
From: osg-users-boun...@lists.openscenegraph.org
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Robert
Osfield
Sent: Wednesday, September 12, 2012 4:15 AM
To: OpenSceneGraph Users
Subject: Re: [osg-users] Using glDrawElements causes crash with
osg::Stats

Hi Karl,

The OSG uses lazy state updating to aovid calling OpenGL when it's not
needed but when you do your own OpenGL calls outside this lazy state
update mechanism the OSG doesn't know the OpenGL state is now different
than when the OSG last applied something so ends up not applying state
when it should.

The way to fix it is to stop the state leakage from your own custom cost
vis the glPush*()/glPop*() or to tell the OSG that you've changed the
state via the osg::State::haveApplied*() calls or simply to use the
osg::State class itself for applying the state you want to change.
 There are a whole series of methods for doing vertex array set up that
you can use so have a look at these.

Robert.

On 11 September 2012 18:40, Cary, Karl A. karl.a.c...@saic.com wrote:
 I have a situation that is requiring me to use raw gl commands in the 
 drawImplementation of an osg::Drawable. I have a double buffer that is

 not updated fully until draw time as opposed to update time and I am 
 not at liberty to change this. Currently in the drawImplementation, I 
 get the current buffer, then perform glVertex and glNormal commands on

 the list of vertices in the buffer. This works just fine and there are

 no problems other than it can slow down the scene do to the number of 
 verts. I was attempting to convert this to a glDrawElements call as a 
 quick improvement and saw a noticeable performance increase. 
 Everything is drawing just fine and I haven't found any slow downs or 
 stability issues, with one exception. If I enable osg::Stats, it 
 crashes immediately and I have no idea why. I was hoping someone might

 have some insight for me. Here is the drawImplementation code:



 {

 //get the current active buffer

 VertBuffer buffer = getCurBuffer();



 //set up the client state

 glPushClientAttrib(GL_CLIENT_VERTEX_ARRAY_BIT); //crashes immediately 
 without this

 glEnableClientState(GL_VERTEX_ARRAY);

 glEnableClientState(GL_NORMAL_ARRAY);



 //set up arrays

 glVertexPointer(3, GL_FLOAT, 0, (GLvoid*)pmCoords);

 glNormalPointer(GL_FLOAT, 0, (GLvoid*)pmNormals);



 //draw

 if (buffer.vertexList.size()  0)

 {

 glDrawElements(GL_TRIANGLES, 
 buffer.vertexList.size(), GL_UNSIGNED_INT, (buffer.vertexList)[0]);

 }



 //disable client state

 glDisableClientState(GL_VERTEX_ARRAY);

 glDisableClientState(GL_NORMAL_ARRAY);

 glPopClientAttrib();

 }



 In this, VertBuffer, is just a structure that holds a 
 std::vectorunsigned
 int of the vertices to draw (vertexList), and some other info that is

 int not
 used during the draw. pmCoords and pmNormals are lists of all 
 available coordinates and their normals. The vertexList is just a list

 of indices in these coordinates to draw at this time.



 As I said, everything works fine if the draw is as follows instead:



 glBegin(GL_TRIANGLES);

 for (int ii = 0; ii  buffer.vertexList.size(); ii+= 
 3)

 {


 glNormal3fv(pmNormals[buffer.vertexList[ii]];

 
 glVertex3fv(pmCoords[buffer.vertexList[ii]];

 glNormal3fv(pmNormals[buffer.vertexList[ii+1]];

 glVertex3fv(pmCoords[buffer.vertexList[ii+1]];

 glNormal3fv(pmNormals[buffer.vertexList[ii+2]];

 glVertex3fv(pmCoords[buffer.vertexList[ii+2]];

 }

 glEnd();



 I've tried copying the data locally from the buffer and that did 
 nothing different. I even tried to create a small array locally that 
 contained the same data. If I only drew 1 triangle it was fine, but if

 I tried to draw more, it would sometimes work and sometimes crash.



 Karl Cary

 SAIC

 Software 

[osg-users] [forum] Anyone knows how to load CityGML files in OSG?

2012-09-12 Thread Fan ZHANG
Hi,

There is a plugin libcitygml that supports citygml files read operation in OSG.
And I can use osgviewer to see citygml files.
Now I want to load citygml files with codes.
Should it be added as Node or something?
Actually I tried with the osgDB::readNodeFile
Failed
So please anyone knows the right way?


Thank you!

Cheers,
Fan :D

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





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


Re: [osg-users] [forum] Anyone knows how to load CityGML files in OSG?

2012-09-12 Thread Tassilo Glander
Hi Fan,

not sure what you mean with load citygml files with codes. You want to access 
the citygml semantics and attributes in addition to just see the graphical 
model? Then you have to take a look at the reader in libcitygml to see how it 
stores the citygml nodes and maybe write your own.

Cheers,
Tassilo

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





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


Re: [osg-users] Multiple Buffers on Multiple viewers

2012-09-12 Thread Randall Hand
Just updating the status..
 I finally figured this out, about 2am after several more attempts.

Basically, I learned that OpenSceneGraph isn't "magic" and simply 
traverses the graph in order, so I had to be a bit more careful about 
the order that I did things like constructing GC's, assigning viewports,
 and attaching to the main graph.

Also, I finally learned how to use osgViewer::Viewer andm 
osgViewer::CompositeViewer effectively.. Tu rns out I didn't need a 
Composite Viewer, I could get my same functionality with multiple 
contexts/viewports in a single Viewer.. and it's simpler, faster, and 
less error-prone.

Liking OSG so far.. Bit of a learning curve from basic OpenGL, but not 
as bad as I thought once I quit expected it to do magic things for me :)


   	   
   	Randall Hand  
  September 11, 
2012 4:36 PM
  I've done this in raw 
OpenGL before, but I can't for the life of me getit working in 
OpenSceneGraph.  I need to render a scene and then displaythe result
 in 2 separate windows: One showing the Color Buffer, oneSHowing the
 Depth Buffer (and eventually a 3rd showing the STencilBuffer).  
I've tried all day and got varying results, but nothingapproaching 
success.  CAn someone tell me what I'm doing wrong?Relevant code
 below.. Don't laugh too hard, I've been googling andreading the 
examples and cut-n-pasting code snippets all day, and I'mrelatively 
sure that at least 50% of this is unnecessary..  Right nowit's in a 
state of opening my windows  showing _a_ texture, but it'sall 
black (except for the red border I allowed just to see if this codeis
 doing anything at all).  The closest I got was using about 4 cameras(a
 Main camera, a Depth FBO camera, then 2 separate cameras for the 2final
 screen-aligned quads), which would render my geometry on screenbut 
nothing into the Depth or Color buffer textures.. 
Initialization stuff up here, nothing to do with OpenSceneGraph ...there's
 a global global osgViewer::CompositeViewer "compViewer"
viewerColor = new osgViewer::View();viewerDepth = new 
osgViewer::View();{std::cout  "** 
Initializing depth  color texture "  std::endl;
// Now setup the Depth Texture__depthTexture = new 
osg::Texture2D();__depthTexture-setTextureSize(width, 
height);
__depthTexture-setInternalFormat(GL_DEPTH_COMPONENT);   __depthTexture-setFilter(osg::Texture2D::MIN_FILTER,osg::Texture2D::LINEAR);
   __depthTexture-setFilter(osg::Texture2D::MAG_FILTER,osg::Texture2D::LINEAR);
__colorTexture = new osg::Texture2D();
__colorTexture-setTextureSize(width, height);
__colorTexture-setInternalFormat(GL_RGBA);   __colorTexture-setFilter(osg::Texture2D::MIN_FILTER,osg::Texture2D::LINEAR);
   __colorTexture-setFilter(osg::Texture2D::MAG_FILTER,osg::Texture2D::LINEAR);
osg::ref_ptrosg::GraphicsContext::Traits traits = newosg::GraphicsContext::Traits;
traits-x = xPos + 0;traits-y = yPos + 0;
traits-width = width;traits-height = height;
traits-windowDecoration = true;
traits-doubleBuffer = true;traits-sharedContext = 0;
traits-vsync = false;
osg::ref_ptrosg::GraphicsContext gc =osg::GraphicsContext::createGraphicsContext(traits.get());
std::cout  "** Initializing prime camera"  
std::endl;__camera = new osg::Camera();
__camera-setGraphicsContext(gc.get());
__camera-setViewport(new osg::Viewport(0,0, traits-width,traits-height));
   __camera-setComputeNearFarMode(osg::Camera::DO_NOT_COMPUTE_NEAR_FAR);
__camera-setProjectionMatrixAsPerspective(70,1.0, 1,200);
__camera-setClearDepth(1.0);
__camera-setViewMatrixAsLookAt( osg::Vec3(0,0,0),osg::Vec3(0,100,0),
 osg::Vec3(0,0,1) );GLenum buffer = traits-doubleBuffer ?
 GL_BACK : GL_FRONT;__camera-setDrawBuffer(buffer); 
   __camera-setReadBuffer(buffer);   __camera-getOrCreateStateSet()-setRenderBinDetails(50,"RenderBin");
//__camera-setRenderOrder(osg::Camera::NESTED_RENDER);  
  __camera-setRenderOrder(osg::Camera::PRE_RENDER);   __camera-setRenderTargetImplementation(osg::Camera::FRAME_BUFFER_OBJECT);
__camera-attach(osg::Camera::DEPTH_BUFFER, __depthTexture);
__camera-attach(osg::Camera::COLOR_BUFFER, __colorTexture);
std::cout  "** Attaching cmaeras to viewer "  
std::endl;// add this slave camera to the viewer, with a 
shift left of theprojection matrixif (__Side == 
"leftview") {//viewerColor-addSlave(__depthCamera,osg::Matrixd::translate(-0.8,0,0),
 osg::Matrixd());
viewerColor-addSlave(__camera.get(),osg::Matrixd::translate(-0.8,0,0),
 osg::Matrixd());} else if (__Side == "rightview") {
//viewerColor-addSlave(__depthCamera,osg::Matrixd::translate(+0.8,0,0),
 osg::Matrixd());
viewerColor-addSlave(__camera.get(),osg::Matrixd::translate(0.8,0,0),
 osg::Matrixd()); 

Re: [osg-users] [forum] Anyone knows how to load CityGML files in OSG?

2012-09-12 Thread Fan ZHANG
Thanks so much for your fast reply~
I mean to start to deal with citygml files, not just 'see' the graphical model 
on the screen with osgviewer. So I just want to ask how to load citygml files 
and make it display on the screen using C++ codes of my own? I know this is 
sort of simple and stupid questionI just tried several times and failed, so 
I posted it here... 



tassilo.glander wrote:
 Hi Fan,
 
 not sure what you mean with load citygml files with codes. You want to 
 access the citygml semantics and attributes in addition to just see the 
 graphical model? Then you have to take a look at the reader in libcitygml to 
 see how it stores the citygml nodes and maybe write your own.
 
 Cheers,
 Tassilo


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





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


Re: [osg-users] [forum] Anyone knows how to load CityGML files in OSG?

2012-09-12 Thread Tassilo Glander
Hi Fan,

can you post a code snippet of what you tried? And some details about how it 
failed? Because it should work with the readNodeFIle method, for example like 
this:

osg::Node* n = osgDB::readNodeFile(pathToCityGMLFile);
osgViewer::Viewer viewer;

// add model to viewer.
viewer.setSceneData( n);

return viewer.run();

This is independent from the data you try to load (CityGML, 3ds, obj, ...), as 
long as a plugin exists it will be loaded.

Cheers,
Tassilo

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





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


Re: [osg-users] [forum] Anyone knows how to load CityGML files in OSG?

2012-09-12 Thread Tassilo Glander
Hi Fan,

I do not see something wrong in this moment. I would try a few things:
* Do you get commandline output while loading? (libcitygml usually puts out 
something text while loading)
* You could check that something is loaded with a debugger to check what is 
returned or add some code to see if a node is returned.
* You could try to load another model that is known to work, like the cow.osg 
model
* Do you have only one osg on your machine? Might be that when you try 
osgviewer you actually use another version...

Cheers,
Tassilo[/list]

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





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


Re: [osg-users] [forum] Anyone knows how to load CityGML files in OSG?

2012-09-12 Thread Fan ZHANG
Okay thanks so much for your suggestions.
I will try to fix this up and leave a feedback here if problem solved.

Thanks again.




tassilo.glander wrote:
 Hi Fan,
 
 I do not see something wrong in this moment. I would try a few things:
 * Do you get commandline output while loading? (libcitygml usually puts out 
 something text while loading)
 * You could check that something is loaded with a debugger to check what is 
 returned or add some code to see if a node is returned.
 * You could try to load another model that is known to work, like the cow.osg 
 model
 * Do you have only one osg on your machine? Might be that when you try 
 osgviewer you actually use another version...
 
 Cheers,
 Tassilo[/list]
 :D  :D


ohh newbie to OSG..

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





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


Re: [osg-users] [forum] Anyone knows how to load CityGML files in OSG?

2012-09-12 Thread Fan ZHANG
oh what a shame
Simply needs to remove '/root' at the beginning of the file path
Now it works...

tks~



tassilo.glander wrote:
 Hi Fan,
 
 I do not see something wrong in this moment. I would try a few things:
 * Do you get commandline output while loading? (libcitygml usually puts out 
 something text while loading)
 * You could check that something is loaded with a debugger to check what is 
 returned or add some code to see if a node is returned.
 * You could try to load another model that is known to work, like the cow.osg 
 model
 * Do you have only one osg on your machine? Might be that when you try 
 osgviewer you actually use another version...
 
 Cheers,
 Tassilo[/list]



ohh newbie to OSG..

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





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


Re: [osg-users] Camera Default Light

2012-09-12 Thread Laith Dhawahir
Hi Robert,

Thanks alot, yes what you said is 100% correct :) thanks for your time 

Thank you!

Cheers,
Laith

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





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


[osg-users] Releasing Graphics context?

2012-09-12 Thread Akilan Thangamani
Hi,

My application renders on multiple screens and each attached with seperate 
graphics context. The apps demands addition/removal of any graphics context 
dynamically. Suppose when the context is removed and added subsequently for the 
same screen, it throws msg like unable to makeCurrentContext(...). Following 
to that, I couldn't render anything on to  the screen. To release graphics 
context, I tried context-close().  I am not sure what needs to be done??


Thanks

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





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


Re: [osg-users] Opengl 3

2012-09-12 Thread Paul Martz



On 9/12/2012 2:47 AM, Peterakos wrote:

Hello.

I did exactly what's written in comments in osgsimplegl3, except teh
CMAKE_CXX_FLAGS thing.
I created the solution, built it and worked fine except for 2 projects which
concern QT.


So the errors you posted were from OSG's Qt source? Since you did not post the 
full error text, I had no way of knowing that. Instead, I assumed you were 
seeing those errors in libosg.


I rarely build OSG with Qt and have never built OSG/GL3 with Qt, so this is 
completely untested as far as I know. Qt 4.8.x does have GL3 context creation 
support, so it should be possible to make it work with OSG/GL3, but all the GL3 
development efforts to date have been with osgViewer on Windows. If you need Qt 
support in OSG/GL3, please make any changes and post a submission.

   -Paul


I managed to ran the osgsimplegl3.
The only thing i did with the gl3/gl3.h is to add this path in visual studio's
include path.

thnx.


___
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] Releasing Graphics context?

2012-09-12 Thread Robert Osfield
Hi Akilan,

I'm afraid you have provide too few details of how you create, use and
destroy your graphics contexts to know what to be able to guess at
what might be amiss and what might be appropriate.  You also don't
mention anything about the OSG version, operating system you've used
etc.

Robert.

On 12 September 2012 16:33, Akilan Thangamani
akilan.thangam...@gmail.com wrote:
 Hi,

 My application renders on multiple screens and each attached with seperate 
 graphics context. The apps demands addition/removal of any graphics context 
 dynamically. Suppose when the context is removed and added subsequently for 
 the same screen, it throws msg like unable to makeCurrentContext(...). 
 Following to that, I couldn't render anything on to  the screen. To release 
 graphics context, I tried context-close().  I am not sure what needs to be 
 done??


 Thanks

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





 ___
 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] Fwd: Build failed in Jenkins: OSG-trunk #363

2012-09-12 Thread Ryan Pavlik
FYI:

-- Forwarded message --
Date: Wed, Sep 12, 2012 at 8:55 AM
Subject: Build failed in Jenkins: OSG-trunk #363


Changes:

[robert] Converted sorting of directory contents across to use the new
osgDB::FileNameComparator and osgDB::getSortedDirectoryContents()

--

[build] $ make install
[  0%] Built target OpenThreads
[ 10%] Built target osg
[ 13%] Built target osgUtil
[ 15%] Built target osgDB
[ 17%] Built target osgGA
[ 18%] Built target osgText
[ 19%] Built target osgViewer
[ 21%] Built target osgAnimation
[ 22%] Built target osgFX
[ 23%] Built target osgManipulator
[ 24%] Built target osgParticle
[ 24%] Built target osgVolume
[ 24%] Building CXX object
src/osgPresentation/CMakeFiles/osgPresentation.dir/SlideShowConstructor.o
src/osgPresentation/SlideShowConstructor.cpp: In member function
‘osg::Image* osgPresentation::SlideShowConstructor::readImage(const
std::string, const osgPresentation::SlideShowConstructor::ImageData)’:
src/osgPresentation/SlideShowConstructor.cpp:937:55: error:
‘FileNameComparator’ is not a member of ‘osgDB’
src/osgPresentation/SlideShowConstructor.cpp: In member function ‘void
osgPresentation::SlideShowConstructor::addVolume(const std::string, const
osgPresentation::SlideShowConstructor::PositionData, const
osgPresentation::SlideShowConstructor::VolumeData)’:
src/osgPresentation/SlideShowConstructor.cpp:1909:55: error:
‘FileNameComparator’ is not a member of ‘osgDB’
make[2]: ***
[src/osgPresentation/CMakeFiles/osgPresentation.dir/SlideShowConstructor.o]
Error 1
make[1]: *** [src/osgPresentation/CMakeFiles/osgPresentation.dir/all] Error
2
make: *** [all] Error 2
Build step 'CMake Build' marked build as failure
[locks-and-latches] Releasing all the locks
[locks-and-latches] All the locks released



-- 
Ryan Pavlik
HCI Graduate Student
Virtual Reality Applications Center
Iowa State University

rpav...@iastate.edu
http://academic.cleardefinition.com
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Fwd: Build failed in Jenkins: OSG-trunk #363

2012-09-12 Thread Robert Osfield
Hi Ryan,

I did attempt to check the required changes in earlier but double
checking now I see that this particular commit can't have succeeded
for some reason - perhaps I didn't spot an error report when I did the
svn commit.

I have just checked in the files again.  Could you do an svn update
and let me know how you get on.

Thanks,
Robert.

On 12 September 2012 16:45, Ryan Pavlik rpav...@iastate.edu wrote:
 FYI:

 -- Forwarded message --
 Date: Wed, Sep 12, 2012 at 8:55 AM
 Subject: Build failed in Jenkins: OSG-trunk #363


 Changes:

 [robert] Converted sorting of directory contents across to use the new
 osgDB::FileNameComparator and osgDB::getSortedDirectoryContents()

 --

 [build] $ make install
 [  0%] Built target OpenThreads
 [ 10%] Built target osg
 [ 13%] Built target osgUtil
 [ 15%] Built target osgDB
 [ 17%] Built target osgGA
 [ 18%] Built target osgText
 [ 19%] Built target osgViewer
 [ 21%] Built target osgAnimation
 [ 22%] Built target osgFX
 [ 23%] Built target osgManipulator
 [ 24%] Built target osgParticle
 [ 24%] Built target osgVolume
 [ 24%] Building CXX object
 src/osgPresentation/CMakeFiles/osgPresentation.dir/SlideShowConstructor.o
 src/osgPresentation/SlideShowConstructor.cpp: In member function
 ‘osg::Image* osgPresentation::SlideShowConstructor::readImage(const
 std::string, const osgPresentation::SlideShowConstructor::ImageData)’:
 src/osgPresentation/SlideShowConstructor.cpp:937:55: error:
 ‘FileNameComparator’ is not a member of ‘osgDB’
 src/osgPresentation/SlideShowConstructor.cpp: In member function ‘void
 osgPresentation::SlideShowConstructor::addVolume(const std::string, const
 osgPresentation::SlideShowConstructor::PositionData, const
 osgPresentation::SlideShowConstructor::VolumeData)’:
 src/osgPresentation/SlideShowConstructor.cpp:1909:55: error:
 ‘FileNameComparator’ is not a member of ‘osgDB’
 make[2]: ***
 [src/osgPresentation/CMakeFiles/osgPresentation.dir/SlideShowConstructor.o]
 Error 1
 make[1]: *** [src/osgPresentation/CMakeFiles/osgPresentation.dir/all] Error
 2
 make: *** [all] Error 2
 Build step 'CMake Build' marked build as failure
 [locks-and-latches] Releasing all the locks
 [locks-and-latches] All the locks released



 --
 Ryan Pavlik
 HCI Graduate Student
 Virtual Reality Applications Center
 Iowa State University

 rpav...@iastate.edu
 http://academic.cleardefinition.com

 ___
 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] Opengl 3

2012-09-12 Thread Peterakos
Hello

These error i posted in my first post gave me a hard time. Even though I
tried everything to make them disappear they simple didnt.
I even tried to delete the whole OpenScenegraph/build directory and build
everything from scratch. But they were still there.

After that i deleted everything that had to do with openscenegraph and
build everything again. Only then they disappeared (i used the same
settings in cmake that i was using before). I cant explain it.

So now I build open scene graph with the open gl 3 cmake settings and i run
osgsimplegl3 with no problems (except for the 2 projects that relate with
qt).

Thank you for your time.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] RigGeometry setRigTransformImplementation, Update stops being called

2012-09-12 Thread Thomas Hogarth
Hi All   

I'm doing some hardware accelerated skinning which I've done a few times 
before, but i'm hitting a strange issue. So I do the below to in a visitor to 
add my HardwareRigTransform to the RigGeometry.


Code:

osgAnimation::RigGeometry* rig = 
dynamic_castosgAnimation::RigGeometry*(drawable);
if (rig){
//apply the HardwareRigTransform
rig-setRigTransformImplementation(new HardwareRigTransform);
stateMask |= GLES2ShaderGenCache::RIGGED;
}




However, once I do this RigGeometry::update() stops being called entirely 
(added some console output to it). So in turn my hardware rig transforms 
operator isn't being called. 

Like I say I've done this before and as far as I can tell the code is the same, 
so was wondering if someone might have run into a similar issue.

If I don't add the hardware rig transform I can see the rigged model (from fbx) 
animating as expected.


Cheers
Tom

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





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


Re: [osg-users] Fwd: Build failed in Jenkins: OSG-trunk #363

2012-09-12 Thread Ryan Pavlik
The build is back to green - all is well.  Thanks!

Ryan

On Wed, Sep 12, 2012 at 11:03 AM, Robert Osfield
robert.osfi...@gmail.comwrote:

 Hi Ryan,

 I did attempt to check the required changes in earlier but double
 checking now I see that this particular commit can't have succeeded
 for some reason - perhaps I didn't spot an error report when I did the
 svn commit.

 I have just checked in the files again.  Could you do an svn update
 and let me know how you get on.

 Thanks,
 Robert.

 On 12 September 2012 16:45, Ryan Pavlik rpav...@iastate.edu wrote:
  FYI:
 
  -- Forwarded message --
  Date: Wed, Sep 12, 2012 at 8:55 AM
  Subject: Build failed in Jenkins: OSG-trunk #363
 
 
  Changes:
 
  [robert] Converted sorting of directory contents across to use the new
  osgDB::FileNameComparator and osgDB::getSortedDirectoryContents()
 
  --
 
  [build] $ make install
  [  0%] Built target OpenThreads
  [ 10%] Built target osg
  [ 13%] Built target osgUtil
  [ 15%] Built target osgDB
  [ 17%] Built target osgGA
  [ 18%] Built target osgText
  [ 19%] Built target osgViewer
  [ 21%] Built target osgAnimation
  [ 22%] Built target osgFX
  [ 23%] Built target osgManipulator
  [ 24%] Built target osgParticle
  [ 24%] Built target osgVolume
  [ 24%] Building CXX object
  src/osgPresentation/CMakeFiles/osgPresentation.dir/SlideShowConstructor.o
  src/osgPresentation/SlideShowConstructor.cpp: In member function
  ‘osg::Image* osgPresentation::SlideShowConstructor::readImage(const
  std::string, const osgPresentation::SlideShowConstructor::ImageData)’:
  src/osgPresentation/SlideShowConstructor.cpp:937:55: error:
  ‘FileNameComparator’ is not a member of ‘osgDB’
  src/osgPresentation/SlideShowConstructor.cpp: In member function ‘void
  osgPresentation::SlideShowConstructor::addVolume(const std::string,
 const
  osgPresentation::SlideShowConstructor::PositionData, const
  osgPresentation::SlideShowConstructor::VolumeData)’:
  src/osgPresentation/SlideShowConstructor.cpp:1909:55: error:
  ‘FileNameComparator’ is not a member of ‘osgDB’
  make[2]: ***
 
 [src/osgPresentation/CMakeFiles/osgPresentation.dir/SlideShowConstructor.o]
  Error 1
  make[1]: *** [src/osgPresentation/CMakeFiles/osgPresentation.dir/all]
 Error
  2
  make: *** [all] Error 2
  Build step 'CMake Build' marked build as failure
  [locks-and-latches] Releasing all the locks
  [locks-and-latches] All the locks released
 
 
 
  --
  Ryan Pavlik
  HCI Graduate Student
  Virtual Reality Applications Center
  Iowa State University
 
  rpav...@iastate.edu
  http://academic.cleardefinition.com
 
  ___
  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




-- 
Ryan Pavlik
HCI Graduate Student
Virtual Reality Applications Center
Iowa State University

rpav...@iastate.edu
http://academic.cleardefinition.com
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] RigGeometry setRigTransformImplementation, Update stops being called

2012-09-12 Thread Thomas Hogarth
Hi Again

No worries I solved this, turns out my ShaderGen stuff was applying it's own 
drawable updatecallback, which was booting something off that osgAnimation was 
using. 

I just moved my callback up to the parent geode and everything seems cool.

Hope this helps someone in the future.
Tom

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





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


Re: [osg-users] [vpb] [SOLVED] Building Virtual Planet Builder in Linux

2012-09-12 Thread Nav Joseph
Tried the GDAL macros and osg built successfully. VPB didn't; and it appeared 
to be because of the osg paths I had set wrongly in bash_profile.
Anyway, I was under a time-crunch, so just rebuilt osg without gdal for the 
time-being.
Thank you very much for helping out. Hope this thread will be helpful for 
someone else in future.

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





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


Re: [osg-users] Releasing Graphics context?

2012-09-12 Thread Akilan Thangamani
Robert

I have 2 screens to be rendered with texture2D. I created context to each 
screen with appropriate screen id such a way,

osg::ref_ptrpsg::GraphicsContext::Traits traits = new .;
traits-x = 0;
traits-y = 0;
traits-screenNum = 0; //1 for other screen
trait-width = screen_width;
trait-height = screen_height;
trait-doubleBuffer = true;
trait-sharedContext = 0;

osg::ref_ptrosg::GraphicsContext gc = 
osg::GraphicsContext::createGraphicsContext(trait.get());

The gc of each screen is set to a camera and camera as slave to view.
When I render texture to both the screen I get the display fine. As soon as I 
try to remove one of the screen context using gc-close() and recreate again 
for the same screen, I get such an error. Further, I couldn't render any 
texture the updated screen.



Thanks

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





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