Re: [osg-users] [vpb] Multiple maps in model with osgdem? (vpb)

2011-09-09 Thread Torben Dannhauer
Hi,

if you use VPB and restrict your differnet maps to different levels, be aware 
of the popping effect if you change your camera position and run into a new 
map. 

If you want a smooth transition ( blending) between the different map, look at 
the osgmultitexturecontrol example and configure your VPB run to add every map 
to a different texture layer. I thing the osgMultiTextureControl allows up to 3 
different layers.



Thank you!

Cheers,
Torben

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





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


[osg-users] [build] OpenGLES2.0 build error

2011-09-09 Thread Tobias Weißhaar
Hi guys,

Now I have generated a project with this command:

cmake -G Xcode \
-DOSG_BUILD_PLATFORM_IPHONE_SIMULATOR:BOOL=ON \
-DBUILD_OSG_APPLICATIONS:BOOL=OFF \
-DBUILD_OSG_EXAMPLES:BOOL=OFF \
-DOSG_BUILD_FRAMEWORKS:BOOL=OFF \
-DOSG_WINDOWING_SYSTEM:STRING=IOS \
-DCMAKE_OSX_ARCHITECTURES:STRING=i386 \
-DOSG_GL1_AVAILABLE:BOOL=OFF \
-DOSG_GL2_AVAILABLE:BOOL=OFF \
-DOSG_GLES2_AVAILABLE:BOOL=ON \
-DOSG_GL_DISPLAYLISTS_AVAILABLE:BOOL=OFF \
-DOSG_GL_FIXED_FUNCTION_AVAILABLE:BOOL=ON \
-DOSG_GL_LIBRARY_STATIC:BOOL=OFF \
-DOSG_GL_MATRICES_AVAILABLE:BOOL=ON \
-DOSG_GL_VERTEX_ARRAY_FUNCS_AVAILABLE:BOOL=ON \
-DOSG_GL_VERTEX_FUNCS_AVAILABLE:BOOL=OFF \
-DDYNAMIC_OPENSCENEGRAPH:BOOL=OFF \
-DDYNAMIC_OPENTHREADS:BOOL=OFF \  

I want to use OpenGLES2.0 and not 1.0. With 1.0 all went fine but now I get 
errors like this:

glLoadMatrix has not been declared
GL_VERTEX_ARRAY has not been declared
...


Thank you!

Cheers,
Tobias

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





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


Re: [osg-users] OSG Collada plugin

2011-09-09 Thread Héctor Martínez
Hi,

I am still having the same problem. Does somebody have any idea of what is
happening?

Thank you.

Héctor

-Original Message-
From: osg-users-boun...@lists.openscenegraph.org
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Héctor
Martínez
Sent: miércoles, 24 de agosto de 2011 9:29
To: 'OpenSceneGraph Users'
Subject: Re: [osg-users] OSG Collada plugin

Hi Jean-Sebastien,

thank you for your response. It is possible that I am missing something, but
it seems that every library is in debug mode. I have checked with Dependency
Walker the libs and I have all the debug dependencies in the folder. I have
exported one single cube with Blender, just to check that there are no
problems with textures and the same problem is happening.

If I try to run the application from command line instead of from Visual
Studio, this is the error that I find:

HEAP CORRUPTION DETECTED: after Normal block (#37612) at 0x0047CF58.
CRT detected that the application wrote to memory after end of heap
buffer.

And I have seen that the messages in the command line goes a bit further
than in VS:
ReaderWriterDAE( “OSG/box.dae” )
URI loaded: OSG/box.dae
Adding parent0039C498
Adding parent0039C498

Maybe those lines can be helpful to see where the problem is...

Héctor


-Original Message-
From: osg-users-boun...@lists.openscenegraph.org
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of
Jean-Sébastien Guay
Sent: martes, 23 de agosto de 2011 15:35
To: OpenSceneGraph Users
Subject: Re: [osg-users] OSG Collada plugin

Hi Héctor,

 I am having some problems to load collada files into my project. I 
 have used the collada dom lib (libcollada14dom21) to build the plugin.

 The line that is throwing the breakpoint is:

 osg::ref_ptrosg::Node model = osgDB::readNodeFile(modelFilePath);

This line will be loading the collada plugin, as well as the collada DOM
DLLs and others the plugin depends on. So if that line is making your app
crash, I would suspect the common gotcha about linking debug and release
together (or in general, different runtimes).

So check your compile settings and make sure all your libs and DLLs (even
the collada ones and its dependencies) are differentiated between debug and
release, and that they all match in the linker settings.

Hope this helps,

J-S
--
__
Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com
http://www.cm-labs.com/
 http://whitestar02.dyndns-web.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

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


[osg-users] Get euler angles from rotation matrix

2011-09-09 Thread Alexey Petruchik
Hi, everyone

I have a rotation matrix, and I need to reconstruct yaw, pitch, roll angles 
from it. Is there any osg function to do this. I looked through 
MatrixDecomposition.cpp but didn't find any.

Thank you!

Cheers,
Alexey

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





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


Re: [osg-users] [build] OpenGLES2.0 build error

2011-09-09 Thread Robert Osfield
HI Tibias,

In OpenGL ES 2.0 the fixed function pipeline is not available so you
have to switch this off with:
OSG_GL_FIXED_FUNCTION_AVAILABLE:BOOL=OFF

Robert.

2011/9/9 Tobias Weißhaar tobi_weissh...@onlinehome.de:
 Hi guys,

 Now I have generated a project with this command:

 cmake -G Xcode \
 -DOSG_BUILD_PLATFORM_IPHONE_SIMULATOR:BOOL=ON \
 -DBUILD_OSG_APPLICATIONS:BOOL=OFF \
 -DBUILD_OSG_EXAMPLES:BOOL=OFF \
 -DOSG_BUILD_FRAMEWORKS:BOOL=OFF \
 -DOSG_WINDOWING_SYSTEM:STRING=IOS \
 -DCMAKE_OSX_ARCHITECTURES:STRING=i386 \
 -DOSG_GL1_AVAILABLE:BOOL=OFF \
 -DOSG_GL2_AVAILABLE:BOOL=OFF \
 -DOSG_GLES2_AVAILABLE:BOOL=ON \
 -DOSG_GL_DISPLAYLISTS_AVAILABLE:BOOL=OFF \
 -DOSG_GL_FIXED_FUNCTION_AVAILABLE:BOOL=ON \
 -DOSG_GL_LIBRARY_STATIC:BOOL=OFF \
 -DOSG_GL_MATRICES_AVAILABLE:BOOL=ON \
 -DOSG_GL_VERTEX_ARRAY_FUNCS_AVAILABLE:BOOL=ON \
 -DOSG_GL_VERTEX_FUNCS_AVAILABLE:BOOL=OFF \
 -DDYNAMIC_OPENSCENEGRAPH:BOOL=OFF \
 -DDYNAMIC_OPENTHREADS:BOOL=OFF \

 I want to use OpenGLES2.0 and not 1.0. With 1.0 all went fine but now I get 
 errors like this:

 glLoadMatrix has not been declared
 GL_VERTEX_ARRAY has not been declared
 ...


 Thank you!

 Cheers,
 Tobias

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





 ___
 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] Bug in TabBoxDragger?

2011-09-09 Thread Robert Osfield
Hi Marco,

I don't really have any idea what might be up, it's very strange that
not all tabs are appearing, I haven't seen or heard of similar
problems before.

As a long shot could you try changing the viewer threading model to
SingleThreaded.

Robert.

On Fri, Sep 9, 2011 at 12:02 PM, Marco Fiocco marco.fio...@gmail.com wrote:
 Hi, I've tried to use a TabBoxDragger inside a CompositeViewer using Qt, by
 modifying the osgviewerQT example.
 Something very weird happens - the dragger handles are drawn for every face
 except one!
 If Qt is not used it works correctly, but I need Qt.
 Could you help me to find a workaround? I don't understand if it is a bug of
 osgQt or TabBoxDragger...
 Here is the code that I'm compiling, and in the attached screenshot you can
 see the problem in the top left window.
 Thank you very much in advance,
 Marco
 ---SOURCE CODE---
 osg::Node* addDraggerToScene(osg::Node* scene, const std::string name)
 {
  //scene-getOrCreateStateSet()-setMode(GL_NORMALIZE, 1);
     osg::MatrixTransform* selection = new osg::MatrixTransform;
     selection-addChild(scene);
     osgManipulator::TabBoxDragger* dragger = new
 osgManipulator::TabBoxDragger();
  dragger-setupDefaultGeometry();
     osg::Group* root = new osg::Group;
     root-addChild(selection);

     root-addChild(dragger);
     float scale = scene-getBound().radius() * 1.6;
     dragger-setMatrix(osg::Matrix::scale(scale, scale, scale) *
                        osg::Matrix::translate(scene-getBound().center()));
     dragger-addTransformUpdating(selection);
     // we want the dragger to handle it's own events automatically
     dragger-setHandleEvents(true);
     // if we don't set an activation key or mod mask then any mouse click on
     // the dragger will activate it, however if do define either of
 ActivationModKeyMask or
     // and ActivationKeyEvent then you'll have to press either than mod key
 or the specified key to
     // be able to activate the dragger when you mouse click on it.  Please
 note the follow allows
     // activation if either the ctrl key or the 'a' key is pressed and held
 down.
     dragger-setActivationModKeyMask(osgGA::GUIEventAdapter::MODKEY_CTRL);
     dragger-setActivationKeyEvent('a');
     return root;
 }
 void addClipBox(osg::Group * scene)
 {
  osg::Group* root = new osg::Group;
  QString model_filepath =
 QString(C:/OpenSceneGraph-3.1/bin/OpenSceneGraph-Data-2.8.0/cow.osg);
  osg::Node* subgraph = osgDB::readNodeFile(model_filepath.toAscii().data()
 );
  osg::ref_ptrosg::Geode geode_1 = new osg::Geode;
     osg::ref_ptrosg::MatrixTransform transform_1 = new
 osg::MatrixTransform;
  const float radius = 0.8f;
     const float height = 1.0f;
     osg::ref_ptrosg::TessellationHints hints = new osg::TessellationHints;
     hints-setDetailRatio(2.0f);
     osg::ref_ptrosg::ShapeDrawable shape;
     shape = new osg::ShapeDrawable(new osg::Box(osg::Vec3(0.0f, 0.0f,
 -2.0f), 10, 10.0f, 0.1f), hints.get());
     shape-setColor(osg::Vec4(0.5f, 0.5f, 0.7f, 1.0f));
     geode_1-addDrawable(shape.get());
  //osg::ref_ptrosg::MatrixTransform transform_1 = new
 osg::MatrixTransform;
  transform_1.get()-addChild(addDraggerToScene(geode_1.get(),TabBoxDragger));
  root-addChild(transform_1.get());
  scene-addChild(root);
 }
 class ViewerWidget : public QWidget, public osgViewer::CompositeViewer
 {
 public:
     ViewerWidget(osgViewer::ViewerBase::ThreadingModel
 threadingModel=osgViewer::CompositeViewer::SingleThreaded) : QWidget()
     {
         setThreadingModel(threadingModel);
   osg::Group * _root = new osg::Group;

 //_root-addChild(osgDB::readNodeFile(C:/OpenSceneGraph-3.1/bin/OpenSceneGraph-Data-2.8.0/cow.osg));
         QWidget* widget1 = addViewWidget( createCamera(0,0,100,100), _root
 );
         QWidget* widget2 = addViewWidget( createCamera(0,0,100,100),
 osgDB::readNodeFile(C:/OpenSceneGraph-3.1/bin/OpenSceneGraph-Data-2.8.0/glider.osg)
 );
         QWidget* widget3 = addViewWidget( createCamera(0,0,100,100),
 osgDB::readNodeFile(C:/OpenSceneGraph-3.1/bin/OpenSceneGraph-Data-2.8.0/axes.osg)
 );
         QWidget* widget4 = addViewWidget( createCamera(0,0,100,100),
 osgDB::readNodeFile(C:/OpenSceneGraph-3.1/bin/OpenSceneGraph-Data-2.8.0/fountain.osg)
 );
         QWidget* popupWidget = addViewWidget(
 createCamera(900,100,320,240,Popup window,true),

 osgDB::readNodeFile(C:\OpenSceneGraph-3.1\bin\OpenSceneGraph-Data-2.8.0\dumptruck.osgt)
 );
         popupWidget-show();
   addClipBox(_root);
         QGridLayout* grid = new QGridLayout;
         grid-addWidget( widget1, 0, 0 );
         grid-addWidget( widget2, 0, 1 );
         grid-addWidget( widget3, 1, 0 );
         grid-addWidget( widget4, 1, 1 );
         setLayout( grid );
         connect( _timer, SIGNAL(timeout()), this, SLOT(update()) );
         _timer.start( 10 );
     }

     QWidget* addViewWidget( osg::Camera* camera, osg::Node* scene )
     {
         osgViewer::View* view = new osgViewer::View;
         view-setCamera( camera );

Re: [osg-users] [build] OpenGLES2.0 build error

2011-09-09 Thread Tobias Weißhaar
Hi,

OK i got it :)


Thank you!

Cheers,
Tobias

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





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


[osg-users] Offscreen viewer maximum resolution problem

2011-09-09 Thread Marco Fiocco
Hi, I need to render an offscreen image with a resolution of 2048x2048, and
I'm sure that the graphics card can do that because the max framebuffer size
is 8192x8192.
I'm doing that by using a newly instanced CompositeViewer with Qt and by
calling once frame(), then a screenshot callback captures the framebuffer.
The problem is:
if the current MONITOR screen has a resolution of 1024x768, the offscreen
shot is rendered only in the 1024x768 corner of the whole buffer size
(2048x2048), the rest is black. The aspect ratio of that piece is correct
though, i.e. the projection matrix is correctly set to render the resolution
of 2048x2048.
You can see the problem in the attached shots, one is the fullscreen
resolution, the other is the 2048x2048 offscreen shot.

fullscreen: http://cl.ly/2s2M0D3Q090R2w1r2w44
offscreen: http://cl.ly/390L1k2o2k1B2P1r312r

Do you know what could be the problem?

Thanks in advance

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


Re: [osg-users] [vpb] Is the VPB 1.0.0 available?

2011-09-09 Thread Mattias Helsing
Hi all

The previous post had a CMake snippet that was bad. Here's one that
actually works:

# with visual studio 2010 we get multiply defined symbols
if(MSVC)
  if(${MSVC_VERSION} STREQUAL 1600)
message(Visual Studio 2010 (${MSVC_VERSION}) build fix at play
(/FORCE:MULTIPLE))
set(CMAKE_SHARED_LINKER_FLAGS ${CMAKE_SHARED_LINKER_FLAGS}
/FORCE:MULTIPLE)
  endif()
endif()


sorry
Mattias

On Wed, Sep 7, 2011 at 9:51 PM, Mattias Helsing helsin...@gmail.com wrote:
 Hello Ethan

 I wonder if you have hit a problem reported earlier. see:

 http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/2010-August/044528.html

 It is reported as a bug in msvc, and I haven't tracked it for a while.
 Try and set /FORCE:MULTIPLE in the linker param section for the vpd
 library

 A more long lasting solution is to set this in a CMakeLists.txt:
 if(MSVC)
  if(${MSVC_VERSION} STREQUAL 1600)
    message(msvc2010 build fix /FORCE:MULTIPLE)
    set(CMAKE_SHARED_LINKER_FLAGS ${CMAKE_SHARED_LINKER_FLAGS} /FORCE:MULTIPLE)
  endif()
 endif()

 I don't have the sp1 for my msvc2010 so I don't know if it fixes this issue

 cheers
 Mattias

 On Wed, Sep 7, 2011 at 8:56 PM, Ethan Fahy ethanf...@gmail.com wrote:
 I am using the following:
 OSG debug from here:
 http://openscenegraph.alphapixel.com/sites/default/files/osgdownload/3.0.0/OpenSceneGraph-3.0.0-VS10.0.30319-x86-debug-12681.7z
 OSG release from here:
 http://openscenegraph.alphapixel.com/sites/default/files/osgdownload/3.0.0/OpenSceneGraph-3.0.0-VS10.0.30319-x86-release-12681.7z
 OSG 3ryparty from here:
 http://members.iinet.net.au/~bchrist/3rdParty_VC10_x86_x64.zip

 I am on Windows 7 Pro 32-bit.  CMake version 2.8.5.  Visual Studio 2010 w/ 
 all latest updates.

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





 ___
 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] Offscreen viewer maximum resolution problem

2011-09-09 Thread Robert Osfield
HI Macro,

The way to do what you want is to create a osg::Camera with a
FrameBufferObject (to render with the existing context) or a Pbuffer
and render your scene to this, then use the final draw callback on
this camera to capture the image.

Robert.

On Fri, Sep 9, 2011 at 12:49 PM, Marco Fiocco marco.fio...@gmail.com wrote:
 Hi, I need to render an offscreen image with a resolution of 2048x2048, and
 I'm sure that the graphics card can do that because the max framebuffer size
 is 8192x8192.
 I'm doing that by using a newly instanced CompositeViewer with Qt and by
 calling once frame(), then a screenshot callback captures the framebuffer.
 The problem is:
 if the current MONITOR screen has a resolution of 1024x768, the offscreen
 shot is rendered only in the 1024x768 corner of the whole buffer size
 (2048x2048), the rest is black. The aspect ratio of that piece is correct
 though, i.e. the projection matrix is correctly set to render the resolution
 of 2048x2048.
 You can see the problem in the attached shots, one is the fullscreen
 resolution, the other is the 2048x2048 offscreen shot.
 fullscreen: http://cl.ly/2s2M0D3Q090R2w1r2w44
 offscreen: http://cl.ly/390L1k2o2k1B2P1r312r
 Do you know what could be the problem?
 Thanks in advance
 Marco


 ___
 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] [vpb] Is the VPB 1.0.0 available?

2011-09-09 Thread Ethan Fahy
Set my paths correctly and made the CMake mod that Mattias mentioned and 
presto! everything's working like a charm.  My sincere thanks to everyone for 
their assistance, really saved my bacon!

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





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


Re: [osg-users] [vpb] Multiple maps in model with osgdem? (vpb)

2011-09-09 Thread Chris Ess
Thanks the responses everyone!  This is actually very exciting news, as I was 
getting ready to redesign some software I have been working on to try to force 
the same effect (and the deadline is in less than a week!).  

Now, I will have to ask that you excuse my ignorance, but I am very unfamiliar 
with the vpb tool and mapping tools in general to be honest.  The application I 
am using requires that I use VPB/osgdem 0.9.10 since we are using a third party 
library that runs on top of an older version of openscenegraph to display the 
maps.  The command that I have been using to generate maps from the GEOTIFF 
textures I have is something like the following:


Code:

osgdem -o MyMap.ive -l 15 --compressed --skirt-ratio 0.0 --levels 0 15 -t 
MyGeotiffTextureDir




I have looked up the command line options on the  Osgdem/vpbmaster Command 
Line Options page 
I noticed there is a list /w a small description but it didn't seem very 
helpful unless you already have some experience with how the application works. 
 I have geotiffs taken from a number of different scales (in separate 
directories) : 5M:1, 1M:1, 500K:1, 250K:1, 100K:1 ...etc

I guess where I am getting confused is how I specify what scale of textures I 
want to show at what levels.  Its my understanding that using the command 
above, I am currently generating 15 levels.  Any thoughts on how to specify 
textures at each of those levels? Can I specify each level with a different -t 
TextureDir argument?  Also, is osgdem smart enough to figure out when the 
best time to show the next level is based on scale?

As far as the popping effect mentioned earlier, that isn't a concern.  It may 
actually be better as our customers will be able to recognize when they are 
looking at different map data/scales.

Any quick responses are greatly appreciated as I am under a bit of a time 
crunch!

Thank you!

Chris

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





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


Re: [osg-users] Get euler angles from rotation matrix

2011-09-09 Thread Paul Martz

On 9/8/2011 5:19 AM, Alexey Petruchik wrote:

Hi, everyone

I have a rotation matrix, and I need to reconstruct yaw, pitch, roll angles 
from it. Is there any osg function to do this. I looked through 
MatrixDecomposition.cpp but didn't find any.



osgWorks (osgworks.googlecode.com) has code for computing yaw, pitch, and roll. 
But it doesn't take a matrix as input. It takes the original (world) up vector, 
the world north vector, and the current view direction. A matrix alone seems 
insufficient for computing yaw, pitch, and roll.


Assuming you have those vectors, you should be able to borrow and adapt the 
osgWorks code. See the file src/osgwMx/MxCore.cpp starting at line 388 (the 
getYawPitchRoll() function).


--
  -Paul Martz  Skew Matrix Software
   http://www.skew-matrix.com/

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


Re: [osg-users] OSG Collada plugin

2011-09-09 Thread Robert Milharcic

As Jean-Sebastien  already said, If the dae plugin is linked against, for 
example, msvcr90d.dll, then it is generally good idea to link all its dependant 
dlls to the same runtime (msvcr90d.dll). That usually means you will have to 
recompile collada and all its external libs from source. Of course, it is 
posible that the problem is elsewhere...

Robert Milharcic

 -Original Message-
 From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-
 boun...@lists.openscenegraph.org] On Behalf Of Héctor Martínez
 Sent: Friday, September 09, 2011 12:15 PM
 To: 'OpenSceneGraph Users'
 Subject: Re: [osg-users] OSG Collada plugin
 
 Hi,
 
 I am still having the same problem. Does somebody have any idea of what is
 happening?
 
 Thank you.
 
 Héctor
 
 -Original Message-
 From: osg-users-boun...@lists.openscenegraph.org
 [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Héctor
 Martínez
 Sent: miércoles, 24 de agosto de 2011 9:29
 To: 'OpenSceneGraph Users'
 Subject: Re: [osg-users] OSG Collada plugin
 
 Hi Jean-Sebastien,
 
 thank you for your response. It is possible that I am missing something, but
 it seems that every library is in debug mode. I have checked with
 Dependency Walker the libs and I have all the debug dependencies in the
 folder. I have exported one single cube with Blender, just to check that
 there are no problems with textures and the same problem is happening.
 
 If I try to run the application from command line instead of from Visual
 Studio, this is the error that I find:
 
   HEAP CORRUPTION DETECTED: after Normal block (#37612) at
 0x0047CF58.
   CRT detected that the application wrote to memory after end of
 heap buffer.
 
 And I have seen that the messages in the command line goes a bit further
 than in VS:
   ReaderWriterDAE( OSG/box.dae )
   URI loaded: OSG/box.dae
   Adding parent0039C498
   Adding parent0039C498
 
 Maybe those lines can be helpful to see where the problem is...
 
 Héctor
 
 
 -Original Message-
 From: osg-users-boun...@lists.openscenegraph.org
 [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Jean-
 Sébastien Guay
 Sent: martes, 23 de agosto de 2011 15:35
 To: OpenSceneGraph Users
 Subject: Re: [osg-users] OSG Collada plugin
 
 Hi Héctor,
 
  I am having some problems to load collada files into my project. I
  have used the collada dom lib (libcollada14dom21) to build the plugin.
 
  The line that is throwing the breakpoint is:
 
  osg::ref_ptrosg::Node model = osgDB::readNodeFile(modelFilePath);
 
 This line will be loading the collada plugin, as well as the collada DOM DLLs
 and others the plugin depends on. So if that line is making your app crash, I
 would suspect the common gotcha about linking debug and release
 together (or in general, different runtimes).
 
 So check your compile settings and make sure all your libs and DLLs (even
 the collada ones and its dependencies) are differentiated between debug
 and release, and that they all match in the linker settings.
 
 Hope this helps,
 
 J-S
 --
 __
 Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com
 http://www.cm-labs.com/
  http://whitestar02.dyndns-web.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
 
 ___
 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] [osgPlugins] OpenGLES2.0 plugins!?

2011-09-09 Thread Tobias Weißhaar
Hi,

Someone know which plugins and libraries I need to compile Shaders and so on 
with OpenGLES2.0 ???

Thank you!

Cheers,
Tobias

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





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


[osg-users] Laptop switchable graphics and OSG / OpenGL apps?

2011-09-09 Thread Jean-Sébastien Guay

Hi all,

We have recently bought a few good laptops (Lenovo W520) to be able to 
work at customers' sites, and these come equipped with Intel graphics 
AND an nVidia Quadro 2000M discrete card. They are supposed to use 
(buzzword alert) nVidia's Optimus technology to automatically switch 
between the two based on the app that's currently running.


This seems to work well for games I've tried (all based on DirectX). The 
games clearly don't use the integrated graphics, they run well on high 
settings (the same I use on my desktop that has a GTX470).


However, our own OSG-based apps seem to not be recognized as needing 
the discrete graphics, and even adding a profile for our app's 
executable in nVidia Control Panel, telling it to force using the 
discrete graphics for that app, doesn't work. Our app crashes when 
loading textures, somewhere in the Intel driver.


I haven't tested other OpenGL apps. I will soon.

As I see it I have 2 options:

1. Switch to discrete graphics only in the BIOS. I've tried this and it 
works, but I'd either have to accept the higher battery usage when I'm 
not using a graphics app, or have to reboot and switch back manually 
depending on the situation. So it's inconvenient.


2. Write to nVidia to see if they have any hints about how to make 
Optimus see that our app needs the discrete graphics. Maybe there's a 
call we can make at the start of our main() that would be a hint to the 
OpenGL driver? Actually I would have thought that any time OpenGL is 
used at all (context created, etc.) it would switch to discrete, so this 
may be a bug in the driver if it's not the case.


Has anyone had any experience with this technology? I think it's a good 
idea, if it worked well it would really be the best of both worlds - low 
battery usage when no 3D apps are running, and speed when you need it. 
But as it stands it's a bit inconvenient.


Thanks in advance,

J-S
--
__
Jean-Sébastien Guayjean-sebastien.g...@cm-labs.com
   http://www.cm-labs.com/
http://whitestar02.dyndns-web.com/
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Laptop switchable graphics and OSG / OpenGL apps?

2011-09-09 Thread Chris 'Xenon' Hanson
On 9/9/2011 10:29 AM, Jean-Sébastien Guay wrote:
 We have recently bought a few good laptops (Lenovo W520) to be able to work 
 at customers'
 sites, and these come equipped with Intel graphics AND an nVidia Quadro 2000M 
 discrete
 card. They are supposed to use (buzzword alert) nVidia's Optimus technology to
 automatically switch between the two based on the app that's currently 
 running.

  I just received one of these (not my laptop, but my wife's). I can try to 
poke at it
here as well.

-- 
Chris 'Xenon' Hanson, omo sanza lettere. xe...@alphapixel.com 
http://www.alphapixel.com/
  Digital Imaging. OpenGL. Scene Graphs. GIS. GPS. Training. Consulting. 
Contracting.
There is no Truth. There is only Perception. To Perceive is to Exist. - 
Xen
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Laptop switchable graphics and OSG / OpenGL apps?

2011-09-09 Thread Jean-Sébastien Guay

Replying to myself,


I haven't tested other OpenGL apps. I will soon.


I just tried Lightsmark 2008 [http://dee.cz/lightsmark/] and it wouldn't 
start, saying in its log file that Graphics card driver doesn't support 
OpenGL 2.0. So I guess that's the same result as our OSG app I tried 
before.


I got the same result (error saying my GPU doesn't support OpenGL 2.0) 
from FurMark [http://www.ozone3d.net/benchmarks/fur/].


I think I'll write to nVidia to see what they have to say.

J-S
--
__
Jean-Sébastien Guayjean-sebastien.g...@cm-labs.com
   http://www.cm-labs.com/
http://whitestar02.dyndns-web.com/
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Laptop switchable graphics and OSG / OpenGL apps?

2011-09-09 Thread Martins Innus

J-S,

On 9/9/11 12:29 PM, Jean-Sébastien Guay wrote:


However, our own OSG-based apps seem to not be recognized as needing 
the discrete graphics, and even adding a profile for our app's 
executable in nVidia Control Panel, telling it to force using the 
discrete graphics for that app, doesn't work. Our app crashes when 
loading textures, somewhere in the Intel driver.


Just this morning I started testing on one of these laptops (Dell 
XPS17).  By adding a profile for the specific .exe I wanted to run, I 
got the Nvidia graphics to kick in for our OSG application.  I have not 
yet found a way for that card to start automatically with OpenGL apps.


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


Re: [osg-users] Laptop switchable graphics and OSG / OpenGL apps?

2011-09-09 Thread Jean-Sébastien Guay

Hi Martins,


Just this morning I started testing on one of these laptops (Dell
XPS17). By adding a profile for the specific .exe I wanted to run, I got
the Nvidia graphics to kick in for our OSG application. I have not yet
found a way for that card to start automatically with OpenGL apps.


Which version of the drivers are you using?

I'm using 280.26 from nVidia's site, and even creating a profile and 
setting that profile to run on High-performance NVIDIA Processor 
didn't work for me. Even if I tried to force it to the discrete graphics 
globally (in the Global Settings instead of Program Settings where 
you create a profile) didn't work either. The only thing that worked for 
me was forcing it in the BIOS.


That's something that should work, and I guess it might be a bug in my 
version of the nVidia control panel. Still, if we could just have the 
app tell the driver that it needs discrete graphics, instead of having 
to make a profile for *each* app, on *each* laptop, that would be better.


I've written to nVidia to see if they have some more info about this.

Thanks,

J-S
--
__
Jean-Sébastien Guayjean-sebastien.g...@cm-labs.com
   http://www.cm-labs.com/
http://whitestar02.dyndns-web.com/
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Laptop switchable graphics and OSG / OpenGL apps?

2011-09-09 Thread Martins Innus

J-S,

Which version of the drivers are you using?



I'm using 268.30, the most recent as provided by Dell specifically for 
my laptop. I have not tried any of the drivers on Nvidia's site.


I'm using 280.26 from nVidia's site, and even creating a profile and 
setting that profile to run on High-performance NVIDIA Processor 
didn't work for me. Even if I tried to force it to the discrete 
graphics globally (in the Global Settings instead of Program 
Settings where you create a profile) didn't work either. The only 
thing that worked for me was forcing it in the BIOS.




My only option is to create a profile for each application as you 
described above, as Dell doesn't provide any option to force it from the 
Bios.  If I could, I would just disable it that way.


That's something that should work, and I guess it might be a bug in my 
version of the nVidia control panel. Still, if we could just have the 
app tell the driver that it needs discrete graphics, instead of having 
to make a profile for *each* app, on *each* laptop, that would be better.


I hope a better solution becomes available.  This could be a support 
nightmare when distributing applications.


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


Re: [osg-users] Laptop switchable graphics and OSG / OpenGL apps?

2011-09-09 Thread Jean-Sébastien Guay

Hi Martins,


I'm using 268.30, the most recent as provided by Dell specifically for
my laptop. I have not tried any of the drivers on Nvidia's site.


Well, I just reverted to the 268.71 version that is provided by Lenovo. 
On this version, selecting the discrete graphics in the Global Settings 
tab works, but profiles I add don't seem to be saved (I close and 
re-open the nVidia control panel and the profiles I added are gone).


So I guess I have a workaround to enable the nVidia graphics chip when I 
need it without rebooting and doing it in the BIOS, but I hope nVidia 
reply to my message and fix profiles, and possibly have a way for apps 
to tell it where to run. That would be the best.



I hope a better solution becomes available. This could be a support
nightmare when distributing applications.


Indeed.

J-S
--
__
Jean-Sébastien Guayjean-sebastien.g...@cm-labs.com
   http://www.cm-labs.com/
http://whitestar02.dyndns-web.com/
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Laptop switchable graphics and OSG / OpenGL apps?

2011-09-09 Thread Chris 'Xenon' Hanson
On 9/9/2011 1:01 PM, Martins Innus wrote:
 I'm using 268.30, the most recent as provided by Dell specifically for my 
 laptop.

  Reason number 1 why I have quit buying Dell.

-- 
Chris 'Xenon' Hanson, omo sanza lettere. xe...@alphapixel.com 
http://www.alphapixel.com/
  Digital Imaging. OpenGL. Scene Graphs. GIS. GPS. Training. Consulting. 
Contracting.
There is no Truth. There is only Perception. To Perceive is to Exist. - 
Xen
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Laptop switchable graphics and OSG / OpenGL apps?

2011-09-09 Thread Ryan Pavlik
The white paper on nvidia's site
http://www.nvidia.com/object/optimus_technology.html says these three
automatically power on the GPU:

DX Calls: Any 3D game engine or DirectX application will trigger these
calls
DXVA Calls: Video playback will trigger these calls (DXVA = DirectX
Video Acceleration)
CUDA Calls: CUDA applications will trigger these calls


The lack of working profiles and API seems pretty problematic.  One could
always run some CUDA code at startup, but it doesn't say how shutdown is
determined, and this really reeks of a kludge.

Ryan

On Fri, Sep 9, 2011 at 2:26 PM, Jean-Sébastien Guay 
jean-sebastien.g...@cm-labs.com wrote:

 Hi Martins,


  I'm using 268.30, the most recent as provided by Dell specifically for
 my laptop. I have not tried any of the drivers on Nvidia's site.


 Well, I just reverted to the 268.71 version that is provided by Lenovo. On
 this version, selecting the discrete graphics in the Global Settings tab
 works, but profiles I add don't seem to be saved (I close and re-open the
 nVidia control panel and the profiles I added are gone).

 So I guess I have a workaround to enable the nVidia graphics chip when I
 need it without rebooting and doing it in the BIOS, but I hope nVidia reply
 to my message and fix profiles, and possibly have a way for apps to tell it
 where to run. That would be the best.


  I hope a better solution becomes available. This could be a support
 nightmare when distributing applications.


 Indeed.


 J-S
 --
 __**
 Jean-Sébastien Guay
 jean-sebastien.guay@cm-labs.**comjean-sebastien.g...@cm-labs.com
   http://www.cm-labs.com/

 http://whitestar02.dyndns-web.**com/http://whitestar02.dyndns-web.com/
 __**_
 osg-users mailing list
 osg-users@lists.**openscenegraph.org osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.**org/listinfo.cgi/osg-users-**
 openscenegraph.orghttp://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] Laptop switchable graphics and OSG / OpenGL apps?

2011-09-09 Thread Jean-Sébastien Guay

Hi Ryan,


The white paper on nvidia's site
http://www.nvidia.com/object/optimus_technology.html says these three
automatically power on the GPU:

DX Calls: Any 3D game engine or DirectX application will trigger these
calls
DXVA Calls: Video playback will trigger these calls (DXVA = DirectX
Video Acceleration)
CUDA Calls: CUDA applications will trigger these calls



Hmm, interesting. Why didn't they include OpenGL calls in the list? 
Seems like a glaring oversight.



The lack of working profiles and API seems pretty problematic.  One
could always run some CUDA code at startup, but it doesn't say how
shutdown is determined, and this really reeks of a kludge.


I guess the switch persists until the running application ends...

About profiles, I guess the fact they don't persist must be a bug that 
might have been fixed in a later driver version. It would be nice to at 
least be able to programmatically add profiles, so users don't have to 
manually create them.


J-S
--
__
Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com
   http://www.cm-labs.com/
http://whitestar02.dyndns-web.com/
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org