[osg-users] [osgPlugins] Visual C++ Runtime Error in osg 2.9.9 ive uncompress

2010-09-23 Thread Florian Kolbe
Hi,

 I got a (sporadic) MS VC Runtime Error (MS VS 2008, Config RelWithDebInfo) in 
OSG 2.9.9 as follows. The file was created with:


Code:
osgconv abc.dae abc.ive -O compressed



Callstack of the runtime error:


Code:

   
 osgdb_iverd.dll!ive::DataInputStream::DataInputStream(std::basic_istreamchar,std::char_traitschar
   * istream=0x0030da6c, const osgDB::Options * options=0x35106238)  Line 196 
   C++

osgdb_iverd.dll!ReaderWriterIVE::readNode(std::basic_istreamchar,std::char_traitschar
   fin={...}, const osgDB::Options * options=0x35106238)  Line 97 C++
osgdb_iverd.dll!ReaderWriterIVE::readNode(const 
std::basic_stringchar,std::char_traitschar,std::allocatorchar   
file=abc.ive, const osgDB::Options * options=0x)  Line 74 + 0x18 
bytes C++

osg66-osgDBrd.dll!osgDB::Registry::ReadNodeFunctor::doRead(osgDB::ReaderWriter 
 rw={...})  Line 791 + 0x24 bytes   C++
osg66-osgDBrd.dll!osgDB::Registry::read(const 
osgDB::Registry::ReadFunctor  readFunctor={...})  Line 964   C++
osg66-osgDBrd.dll!osgDB::Registry::readImplementation(const 
osgDB::Registry::ReadFunctor  readFunctor={...}, 
osgDB::Options::CacheHintOptions cacheHint=CACHE_NODES)  Line 1128C++



The line in question is:


Code:
if (!uncompress(*istream, data))



Cheers,
Florian

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





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


[osg-users] osgWidget

2010-09-23 Thread lucie lemonnier
Hi,

I use VRJuggler and OSG to create an application on a VR system and I want to 
use osgWidget. But VRJuggler uses osgUtil::SceneView instead of osgViewer, I 
wanted to know if it is possible to use osgWidget with osgUtil::SceneView?

Thank you!

Cheers,
lucie

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





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


Re: [osg-users] Load texture in *.obj

2010-09-23 Thread John Kush
Thank very much!

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





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


[osg-users] [osgPPU] CubeMap reflection

2010-09-23 Thread Vincent Honnet
Hi,


I'm not very experienced with shaders and I'm trying to write a reflection 
shader for the cubemap exemple.
I tried to compute the normals and so on, but I don't get the result I'm 
expecting.
Do have someone a shader (and the modified c++ source code) that is working in 
this demo ?

Thanks a lot in advance,
Vincent

... 


Thank you!

Cheers,
Vincent

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





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


Re: [osg-users] Load texture in *.obj

2010-09-23 Thread John Kush
Thank very much!

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





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


Re: [osg-users] Load texture in *.obj

2010-09-23 Thread Javier Taibo
  If you build your models in Maya, you can try the Maya2OSG exporter in
http://maya2osg.sourceforge.net

  Texture coordinates and texture transformations are exported to OSG file.


  Best regards,
  Javier Taibo.


On Thu, Sep 23, 2010 at 12:10 AM, John Kush dfoo...@gmail.com wrote:

 Hi,

 I'm loading a sphere with texture that was created in Maya. In osg only a
 black sphere. Why?

 Code for laoding texture:

 Code:
osg::Image* image = osgDB::readImageFile( neptune2.jpg );
if ( image )
{

osg::Texture2D* tex2d = new osg::Texture2D;//( image );
tex2d-setImage(image);
tex2d-setDataVariance(osg::Object::DYNAMIC);
   ballNode-getOrCreateStateSet()-setTextureAttributeAndModes( 0,
 tex2d, osg::StateAttribute::ON);
}
if (!image)
{
std::cout  Couldn't load texture.  std::endl;
return NULL;
}





 Thank you!

 Cheers,
 John

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




 ___
 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] Remove textures and texture coorindates.

2010-09-23 Thread Joakim Simonsson


Hi,

Is this the correct way to do it?

Remove all textures from a StateSet:

ss-getTextureAttributeList().clear();
ss-getTextureModeList().clear();

Remove all texture coordinates from a Geometry:

geometry-getTexCoordArrayList().clear();


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


Re: [osg-users] Efficient representation of triangulation.

2010-09-23 Thread Robert Osfield
Hi Giulio,

On Wed, Sep 22, 2010 at 5:41 PM, Giulio De Vecchi
giulio.devec...@libero.it wrote:
 Hi,
  in my application I have a numerical module that create 3d objects and their 
 meshing (triangulation). What I would like to do is to render these objects 
 in the fastest possible way. Something like:
  - write in a raw array the list of the vertex of the triangles
  - tell to OSG to read (and render) that memory area
 Is this possible? Where could I find documentation about this?
 (I searched in the forum, but I didn't find anything useful).

The OSG has several ways to optimize the rendering of sets of
triangles, whether you need to put much processing into this to
optimize anything is debatable though - there is a reasonable chance
that just passing vertex data and triangles primitives is a relatively
unconditioned way will be efficient enough.  I simply don't buy you
assumption that you need to do it in the fastest possible way.

What I'd recommend is start with the most straight-forward geometry
set up can, in you case it's likely to be a single osg::Geometry, with
a Vec3Array packed with your vertex data then a DrawArrays or
DrawElementsUShort/UInt primitive set to pass how OpenGL should
process the vertex data to generate the triangles.  See osggeometry
and OpenGL documentation on glDrawArrays and glDrawElements to see
where this in action.

Once you are rendering your mesh benchmark it, if it hits the required
performance that you need i.e. your app hits the same frame rate as
your screen refresh then your job is done move on.  If you don't
achieve the required performance then let us know some of the metrics
you are working with i..e number vertices, number of triangles, frame
rate you need to hit and why, and type of hardware you are targettng.
Once we know this we can start introducing various techniques for
improving performance.  It's pointless pre-emptying this though - you
need to go do the basics first.

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


Re: [osg-users] [osgPlugins] Visual C++ Runtime Error in osg 2.9.9 ive uncompress

2010-09-23 Thread Robert Osfield
Hi Florian,

Does the problem exist when using models form the standard
OpenSceneGraph-Data set? i.e.

osgconv cow.osg cow.ive -O compressed

I have just done this test on my Linux system and it works fine, and
I'm able to run osgviewer cow.ive just fine.

FYI, very little has changed with the .ive plugin in recent times, so
if a problem does exist in 2.9.9 then it's likely to occur in prior
versions of the OSG.  Not that this really helps us too much, but
might gives some clues to what might be amiss.  At your end I'd
recommend double checking that the build when fine, perhaps trying
other build combinations and other models.

Robert.

On Thu, Sep 23, 2010 at 8:15 AM, Florian Kolbe florian.ko...@in-gmbh.de wrote:
 Hi,

  I got a (sporadic) MS VC Runtime Error (MS VS 2008, Config RelWithDebInfo) 
 in OSG 2.9.9 as follows. The file was created with:


 Code:
 osgconv abc.dae abc.ive -O compressed



 Callstack of the runtime error:


 Code:

       
 osgdb_iverd.dll!ive::DataInputStream::DataInputStream(std::basic_istreamchar,std::char_traitschar
   * istream=0x0030da6c, const osgDB::Options * options=0x35106238)  Line 
 196       C++
        
 osgdb_iverd.dll!ReaderWriterIVE::readNode(std::basic_istreamchar,std::char_traitschar
fin={...}, const osgDB::Options * options=0x35106238)  Line 97     C++
        osgdb_iverd.dll!ReaderWriterIVE::readNode(const 
 std::basic_stringchar,std::char_traitschar,std::allocatorchar   
 file=abc.ive, const osgDB::Options * options=0x)  Line 74 + 0x18 
 bytes C++
        
 osg66-osgDBrd.dll!osgDB::Registry::ReadNodeFunctor::doRead(osgDB::ReaderWriter
   rw={...})  Line 791 + 0x24 bytes       C++
        osg66-osgDBrd.dll!osgDB::Registry::read(const 
 osgDB::Registry::ReadFunctor  readFunctor={...})  Line 964       C++
        osg66-osgDBrd.dll!osgDB::Registry::readImplementation(const 
 osgDB::Registry::ReadFunctor  readFunctor={...}, 
 osgDB::Options::CacheHintOptions cacheHint=CACHE_NODES)  Line 1128        C++



 The line in question is:


 Code:
 if (!uncompress(*istream, data))



 Cheers,
 Florian

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





 ___
 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] Efficient representation of triangulation.

2010-09-23 Thread Alberto Luaces
Giulio De Vecchi writes:

 Hi,
   in my application I have a numerical module that create 3d objects and 
 their meshing (triangulation). What I would like to do is to render these 
 objects in the fastest possible way. Something like:
  - write in a raw array the list of the vertex of the triangles
  - tell to OSG to read (and render) that memory area
 Is this possible? Where could I find documentation about this?
 (I searched in the forum, but I didn't find anything useful).

Giulio,

the osggeometry example addresses how to create your own geometry from
vertex data. Please check it.

-- 
Alberto

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


Re: [osg-users] Remove textures and texture coorindates.

2010-09-23 Thread Robert Osfield
Hi Joakim,

I have never personally attempted to do these specific steps, but I
guess it should work if non const get methods for the containers are
available.  Have you tried it?

Robert.

On Thu, Sep 23, 2010 at 9:04 AM, Joakim Simonsson joa...@autosim.no wrote:

 Hi,

 Is this the correct way to do it?

 Remove all textures from a StateSet:

    ss-getTextureAttributeList().clear();
    ss-getTextureModeList().clear();

 Remove all texture coordinates from a Geometry:

    geometry-getTexCoordArrayList().clear();


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

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


Re: [osg-users] [osgPlugins] Collada Plugin problem with SketchUp exported models...

2010-09-23 Thread Florian Kolbe
Hi,

   the current Code 2.9.9 uses daeReader::findInvertTransparency to determine 
transparency inversion. I am currently facing issues with missing transparancy 
on some of the objects I am exporting from SketchUp. Though I dought this is 
the issue, I was wondering if daeReader::findInvertTransparency is still the 
right approach. Or maybe strictTransparency should override invertTransparency?

Now (2.9.9) the code in daeReader::processTransparencySettings reads:


Code:
_invertTransparency = findInvertTransparency(database);



But maybe it should read?:


Code:
if (_strictTransparency) {
  _invertTransparency = false; // already the default, but hey...
} else {
  _invertTransparency = findInvertTransparency(database);
}



Hope this helps!

Cheers,
Florian

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





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


[osg-users] OpenSceneGraph 2.9.9 problem with *.osgb

2010-09-23 Thread John Ivar Haugland
I compiled OpensceneGraph 2.9.9 (Visual Studio 2010, x64), and tried the
following command

osgconv cow.osg cow.osgb
osgviewer cow.osgb

The cow.osgb file is created but it is not possible to read it in again. The
error message is
InputStream: Failed to read from stream. At osg::Group osg::Group osg::Geode
osg::Geometry osg::Drawable osg::StateSet osg::StateSet
osgviewer: No data loaded


I also have OpenSceneGraph trunk Revision 11729 compiled (Visual Studio
2010, x64). In this version osgviewer can write and read the cow.osgb file
without problems.

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


Re: [osg-users] Remove textures and texture coorindates.

2010-09-23 Thread Joakim Simonsson


On Thu, 23 Sep 2010 10:22:30 +0200, Robert Osfield  
robert.osfi...@gmail.com wrote:



Hi Joakim,

I have never personally attempted to do these specific steps, but I
guess it should work if non const get methods for the containers are
available.  Have you tried it?


Yes, it is the non-const get methods. It seems to work. The reason I asked  
was to be sure that I didn't forget something...


Thanks.



Robert.

On Thu, Sep 23, 2010 at 9:04 AM, Joakim Simonsson joa...@autosim.no  
wrote:


Hi,

Is this the correct way to do it?

Remove all textures from a StateSet:

   ss-getTextureAttributeList().clear();
   ss-getTextureModeList().clear();

Remove all texture coordinates from a Geometry:

   geometry-getTexCoordArrayList().clear();


--
Joakim Simonsson
___
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



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


Re: [osg-users] OpenSceneGraph 2.9.9 problem with *.osgb

2010-09-23 Thread Robert Osfield
Hi John,

Thanks for the testing, I've just reproduced this regression.  I will
dig into see where things went wrong.

Robert.

On Thu, Sep 23, 2010 at 9:49 AM, John Ivar Haugland
john.haugl...@gmail.com wrote:
 I compiled OpensceneGraph 2.9.9 (Visual Studio 2010, x64), and tried the
 following command

 osgconv cow.osg cow.osgb
 osgviewer cow.osgb

 The cow.osgb file is created but it is not possible to read it in again. The
 error message is
 InputStream: Failed to read from stream. At osg::Group osg::Group osg::Geode
 osg::Geometry osg::Drawable osg::StateSet osg::StateSet
 osgviewer: No data loaded


 I also have OpenSceneGraph trunk Revision 11729 compiled (Visual Studio
 2010, x64). In this version osgviewer can write and read the cow.osgb file
 without problems.

 John Ivar Haugland
 ___
 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] Instanced geometry using a (non power of two)texture1D like a vertex buffer.

2010-09-23 Thread Juan Hernando

Hi Jordi,
I think the problem is in this line of code in your vertex shader:

vec4 pos= gl_Vertex+ 
vec4(texture1D(texturePos,(float(gl_InstanceID)/nInstances)).xyz,0.);


I think that texels are placed in the [0..1] range using their centers 
and not the left edge as your code assumes. That means that if you have 
to texels they are not placed at 0 and 0.5 or 0 and 1 but 0.25 and 0.75. 
It's difficut to assure what happens in 0.5. In short, the nearest texel 
may not be the one you are expecting (only with two images, my guess is 
that the 9th square overdraws the 8th). If your hardware supports it, 
use texelFetch1D, which admits integer coordinates. Maybe adding 0.5 to 
gl_InstanceID can also do the job.


Finally, remember that 1D textures are limited to 8192 texels in current 
hardware (at least mine). You'll need a Texture Buffer Object if you 
need more.


Regards,
Juan
Jordi Torres wrote:

Hi all,

I am trying to show instanced geometry using a texture1D like a vertex
buffer. In fact I have it working more or less... but if my Texture 1D is
non power of two then my shader does not render some of the instances.
Attached is the code and two images, one with a non power of two texture(9
elements) that fails to draw last element, and other with 256 elements that
is drawn correctly.

I am using TransferFunction1D to pass my geometry array to a texture1D.
Anybody knows what I'm doing wrong? Of course I have set
texture-setResizeNonPowerOfTwoHint(false);

Thank you in advance!

Jordi.



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


Re: [osg-users] Instanced geometry using a (non power of two)texture1D like a vertex buffer.

2010-09-23 Thread Jordi Torres
Hi Juan,

+0.5 did the trick! Anyway I will make tests with texelFetch1D and TBO's
looking for a better performance. Thank you for the tips.

Muchas gracias!!

2010/9/23 Juan Hernando jherna...@fi.upm.es

 Hi Jordi,
 I think the problem is in this line of code in your vertex shader:

 vec4 pos= gl_Vertex+
 vec4(texture1D(texturePos,(float(gl_InstanceID)/nInstances)).xyz,0.);

 I think that texels are placed in the [0..1] range using their centers and
 not the left edge as your code assumes. That means that if you have to
 texels they are not placed at 0 and 0.5 or 0 and 1 but 0.25 and 0.75. It's
 difficut to assure what happens in 0.5. In short, the nearest texel may not
 be the one you are expecting (only with two images, my guess is that the 9th
 square overdraws the 8th). If your hardware supports it, use texelFetch1D,
 which admits integer coordinates. Maybe adding 0.5 to gl_InstanceID can also
 do the job.

 Finally, remember that 1D textures are limited to 8192 texels in current
 hardware (at least mine). You'll need a Texture Buffer Object if you need
 more.

 Regards,
 Juan

 Jordi Torres wrote:

 Hi all,

 I am trying to show instanced geometry using a texture1D like a vertex
 buffer. In fact I have it working more or less... but if my Texture 1D is
 non power of two then my shader does not render some of the instances.
 Attached is the code and two images, one with a non power of two texture(9
 elements) that fails to draw last element, and other with 256 elements
 that
 is drawn correctly.

 I am using TransferFunction1D to pass my geometry array to a texture1D.
 Anybody knows what I'm doing wrong? Of course I have set
 texture-setResizeNonPowerOfTwoHint(false);

 Thank you in advance!

 Jordi.


 ___
 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] Efficient representation of triangulation.

2010-09-23 Thread Giulio De Vecchi
Thanks a lot!

Giulio

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





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


Re: [osg-users] [osgPlugins] Visual C++ Runtime Error in osg 2.9.9 ive uncompress

2010-09-23 Thread Florian Kolbe
Hi Robert,

  thanks for the quick reply.

For now, I am suspecting memory exhaustion since I just got the following crash 
as well (call stack does not seem to be very complete any more...).
What speaks for this, it doesn't happen alle of the time...

The scene graph has 7e6 vertices, Physical RAM usage was at 3.6 GB, and the 
process was holding 1.2 GB RAM at the time of the crash...


Code:

   osg66-osgDBrd.dll!osgDB::Registry::readImage(const 
 std::basic_stringchar,std::char_traitschar,std::allocatorchar   
 fileName=...\texture6.jpg, const osgDB::Options * options=0x)  Line 
 213 + 0x5 bytes C++
osg66-osgDBrd.dll!osgDB::readRefImageFile(const 
std::basic_stringchar,std::char_traitschar,std::allocatorchar   
filename=...\texture6.jpg, const osgDB::Options * options=0x)  Line 
264C++
osgdb_daerd.dll!osgDB::readRefImageFile(const 
std::basic_stringchar,std::char_traitschar,std::allocatorchar   
filename=üDp)  Line 218 + 0x2c bytes   C++

osgdb_daerd.dll!osgDAE::daeReader::processTexture(domCommon_color_or_texture_type_complexType::domTexture
 * tex=0x750f3a58, const osg::StateSet * ss=0x19002f00, 
osgDAE::daeReader::TextureUnitUsage tuu=406192626, domFx_opaque_enum 
opaque=-2122200076, float transparency=2.6826877e+030)  Line 1112 + 0x12 bytes  
  C++



Cheers,
Florian

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





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


Re: [osg-users] Rotate camera around the scene in osgViewer - simple way?

2010-09-23 Thread Werner Modenbach
Hi Dženan,

I don't know if it is still of interest for you. If not, maybe someone else 
can profit. Here is my solution for turning the camera arround the scene:

osg::Vec3 achse;
   osg::Matrix rotation_matrix(view-trackball-getRotation());
   if (orientation == Horizontal) {
achse = osg::Vec3(0.0, 1.0, 0.0);
} else {
achse = osg::Vec3(1.0, 0.0, 0.0);
}
achse = achse * rotation_matrix;

osg::Quat myRotationMatrix;
myRotationMatrix.makeRotate(osg::DegreesToRadians((float)newValue),
achse);
view-trackball-setRotation(trackballMatrix * myRotationMatrix);

This works excellent for me.

- Werner -

On Monday 30 August 2010 13:22:08 DXXenan ZukiXX wrote:
 Hi,
 
 I can tell you immediately that I gave up on this :D
 
 Cheers,
 Dženan
 
 --
 Read this topic online here:
 http://forum.openscenegraph.org/viewtopic.php?p=31152#31152
 
 
 
 
 
 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

-- 
TEXION Software Solutions

TEXION GmbH -  Rotter Bruch 26a  -  D 52068 Aachen - HRB 14999 Aachen
Fon: +49 241 475757-0, Fax: +49 241 475757-29, web: http://www.texion.eu

Geschäftsführer/Managing Director: Werner Modenbach
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] osgWidget

2010-09-23 Thread Jean-Sébastien Guay

Hello Lucie,


I use VRJuggler and OSG to create an application on a VR system and I want to 
use osgWidget. But VRJuggler uses osgUtil::SceneView instead of osgViewer, I 
wanted to know if it is possible to use osgWidget with osgUtil::SceneView?


I don't think anyone has done it yet. osgWidget::WindowManager does its 
setup using an osgViewer::View, but I guess you should be able to derive 
a class that would do the same thing given an osgUtil::SceneView 
instead. Have a look at what osgWidget::WindowManager does in its code.


Once you have osgWidget::WindowManager working with osgUtil::SceneView, 
everything else should work, since from there Widgets and Windows are 
just scene graph classes (Group, Transform, Geode) specialized to do 
things in 2D and in a widget-toolkit-like way.


Hope this helps,

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


Re: [osg-users] [osgPlugins] Collada Plugin problem with SketchUp exported models...

2010-09-23 Thread Florian Kolbe
Hi,

OK, this works for me, I could do a submission at some point.
My knowledge is:
1. invert for Google SketchUp = 7.0
2. don't invert for Google SketchUp = 7.1
3. findInvertTransparency does not always yield correct results

Something along the lines (code for determining version not included):


Code:
// _strictTransparency overrides determining _invertTransparency
if (_strictTransparency)
{
_invertTransparency = false; // already the default, 
but hey...
} else
{
// determine by authoring tool if known, otherwise use 
findInvertTransparency
if (_authoringTool == GOOGLE_SKETCHUP)
{
// Google SketchUp  7.1 is known to require 
inversion
if ((_authoringToolVersionMajor = 7)  
(_authoringToolVersionMinor  1))
{
_invertTransparency = true;
} else
{
// Google SketchUp = 7.1 is known to 
be fixed (7.1.6860 to be exact)
_invertTransparency = false;
}
} else
{
_invertTransparency = findInvertTransparency(database);
}
}




Let me know what you think.

Cheers,
Florian

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





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


Re: [osg-users] osgWidget

2010-09-23 Thread Jean-Sébastien Guay

Hello Lucie,


In fact, I succeed to display widgets with osgUtil::SceneView replacing the first 
parameter osgViewer::View by 0 in osgWidget::WindowManager. I use my 
application in an immersive system (two screens) but my problem is that the widgets 
appears in each window representing each screen of my immersive system. I want to display 
widgets in a particular window but not all windows. I don't know how to do this.
Do you have an idea?


There are a few ways to do this. I assume you are currently adding the 
WindowManager's ortho camera under the root of your scene graph?


1. You could add the WindowManager's ortho camera directly under one 
camera (the one for the view you want to see your widgets in). Since 
it's not under your scene root, other cameras won't see it.


2. You could still add the ortho camera where you do now, and use node 
and traversal masks so that only one camera will see the widgets.


3. You could add a cull callback to the ortho camera, in which you would 
check the current camera (in the osgUtil::CullVisitor that is passed to 
the callback) and only call the traverse() method if it's the camera you 
want (by name, by pointer, or whatever test you want).


There may be other ways. I would generally either do 1 or 3, I wouldn't 
use node masks, because you only have 32 bits in a node mask and if you 
use them for other things you may run out of bits quickly. But whenever 
you want to see some things in one view (screen, window, camera) but not 
the other one(s), it's the same thing.


Hope this helps,

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


Re: [osg-users] Application Verifier failure (on Windows) with getSampleOpenGLContext(...)

2010-09-23 Thread Jesper D. Thomsen
I did a further bit of testing, and it seems to be a driver-related problem.
On the single ATI machine (winXP) I have available osgviewer runs fine under 
application verifier. On my main development machine (Vista64, FX2700M) I am 
able to get osgviewerd.exe to pass Application Verifier if I drop the Nvidia 
driver down to 179.76 (Dell ISV certified), but any driver after that (tested 
with 186.03 and up) seems to give the error in AppVerifier. As far as I can 
tell, there's no way to use OSG without calling ::ChoosePixelFormat and 
::SetPixelFormat, which are the two specific calls in getSampleOpenGLContext 
which are failing. If anyone has tried running AppVerifier successfully with a 
later nvidia driver revision, I would really like to hear about it.

Regards,

Jesper D. Thomsen
AnyBody Technology A/S
Denmark

From: osg-users-boun...@lists.openscenegraph.org 
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Jesper D. 
Thomsen
Sent: 21. september 2010 16:12
To: OpenSceneGraph Users (osg-users@lists.openscenegraph.org)
Subject: [osg-users] Application Verifier failure (on Windows) with 
getSampleOpenGLContext(...)

Hi all, I've just updated our OSG usage from 2.6.1 to 2.8.3 in the hopes of 
getting application verifier to accept our OSG usage. We previously had a 
problem with Application Verifier and OpenThreads in 2.6.1 but this has been 
fixed in 2.8.3, but we now experience a new problem.
Luckily it seems to happen with all OSG examples and not just our own 
application.

The setup:
I'm using Application Verifier (which we need our application to pass) on 
Windows Vista 64 SP2, Dell M6500 workstation with Quadro FX2700M graphics and 
driver revision 258.96. OSG has been built from source with Visual studio 2005 
SP1.
I'm testing osgviewerd.exe with Application Verifier default basic settings.

Observed problem:
Application Verifier breaks into the debugger during the call of 
CreateGraphicsContext() with last function call in OSG being
int pixelFormatIndex = ::ChoosePixelFormat(hdc, pixelFormat);
in osgViewer::Win32WindowingSystem::getSampleOpenGLContext().

All the OSG applications I have tested with Application Verifier breaks in 
ChoosePixelFormat, but I don't know if this could be an OSG problem, a hdc 
usage problem or an Nvidia driver problem.
I have also tried Application Verifier with osgviewerd.exe in OSG 2.9.8 with 
the same behavior.

The complete callstack for the breakpoint is:

 ntdll.dll!773a0004()
 [Frames below may be incorrect and/or missing, no 
symbols loaded for ntdll.dll]
ntdll.dll!77407c5c()
 
vfbasics.dll!AVrfpVectoredExceptionHandler(_EXCEPTION_POINTERS * 
ExceptionPointers=0x00dad994)  Line 460
ntdll.dll!773ea4df()
 ntdll.dll!773d4461()
 ntdll.dll!773d4505()
 ntdll.dll!773ae49f()
 nvoglv32.dll!69d786c1()
 nvoglv32.dll!69d786c1()
 ntdll.dll!773ba957()
 ntdll.dll!773baaad()
 ntdll.dll!774319fe()
 osgviewerd.exe!mainCRTStartup()  Line 414  
 C
ntdll.dll!7741c1da()
 ntdll.dll!7741c20b()
 ntdll.dll!7741c20b()
 ntdll.dll!7741c449()
 vfbasics.dll!AVrfLogInTracker(_AVRF_TRACKER * 
Tracker=0x, unsigned short EntryType=1, void * EntryParam1=0x04ba6d40, 
void * EntryParam2=0x0080, void * EntryParam3=0x04ba, void * 
EntryParam4=0x6935bd2e, void * ReturnAddress=0x69351556)  Line 300 + 0x10 bytes
vfbasics.dll!AVrfpRtlAllocateHeap(void * 
Heap=0x69351137, unsigned long Flags=1765138528, unsigned long Size=769)  Line 
256
00dadf98()
vfbasics.dll!AVrfpTlsGetValue(unsigned long 
dwTlsIndex=4294967295)  Line 426
nvoglv32.dll!69b2561d()
 nvoglv32.dll!69b2a5e0()
 nvoglv32.dll!69d42336()
 verifier.dll!6bd559c9()
 
vrfcore.dll!VfCoreStandardDllEntryPointRoutine(void * DllHandle=0x6950, 
unsigned long Reason=1, _CONTEXT * Context=0x)  Line 558 + 0xc bytes
vfbasics.dll!AVrfpStandardDllEntryPointRoutine(void 
* DllHandle=0x6950, unsigned long Reason=1, _CONTEXT * Context=0x)  
Line 787 + 0xa bytes
ntdll.dll!773d919c()
 ntdll.dll!773c48e7()
 ntdll.dll!773ef7eb()
 ntdll.dll!773c446d()
 ntdll.dll!773c3f00()
  

Re: [osg-users] osgWidget

2010-09-23 Thread Jeremy Moles
9On Thu, 2010-09-23 at 09:30 +0200, lucie lemonnier wrote:
 Hi,
 
 I use VRJuggler and OSG to create an application on a VR system and I want to 
 use osgWidget. But VRJuggler uses osgUtil::SceneView instead of osgViewer, I 
 wanted to know if it is possible to use osgWidget with osgUtil::SceneView?
 
 Thank you!

osgWidget uses osgViewer::View::computeIntersections() to do picking. I
don't think it will be possible to use SceneView in it's place without
overcoming this dependency.

In fact, I had always lamented the WindowManager's need for a View
pointer, but I needed to use it for picking and so it developed thusly.

 Cheers,
 lucie
 
 --
 Read this topic online here:
 http://forum.openscenegraph.org/viewtopic.php?p=31957#31957
 
 
 
 
 
 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
 

-- 
Follow us on Twitter! http://twitter.com/emperorlinux

EmperorLinux, Inc.
http://www.emperorlinux.com
1-888-651-6686

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


Re: [osg-users] osgWidget

2010-09-23 Thread Jean-Sébastien Guay

Hi Jeremy,


In fact, I had always lamented the WindowManager's need for a View
pointer, but I needed to use it for picking and so it developed thusly.


I can look at replacing this dependency with manually running an 
intersector from the camera. If this is the only need for a View, it 
should be easy to overcome. I'll put this on my Todo list :-)


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


Re: [osg-users] osgWidget

2010-09-23 Thread Jeremy Moles
On Thu, 2010-09-23 at 10:32 -0400, Jean-Sébastien Guay wrote:
 Hi Jeremy,
 
  In fact, I had always lamented the WindowManager's need for a View
  pointer, but I needed to use it for picking and so it developed thusly.
 
 I can look at replacing this dependency with manually running an 
 intersector from the camera. If this is the only need for a View, it 
 should be easy to overcome. I'll put this on my Todo list :-)

Yep, this is the only thing the View is used for...

 J-S

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


[osg-users] [osgPlugins] How to use PlugIns

2010-09-23 Thread Tomas Longo
Hi @ all,

i have a question about the use of a plugin after it was build.
Do I have to rebuild OSG in some manner or how do I notify
OSG that there´s a plugin?

In my case I need the collada PlugIn.

Thanks in advance.

Cheers,
Tomas

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





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


Re: [osg-users] OpenFlight: Reading the Extension Record

2010-09-23 Thread Brad Colbert
Paul,

Thanks so much.  That helps point me in the right direction.  Hopefully
adding the code will be straight forward.

-B
 
 -Original Message-
 From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-
 boun...@lists.openscenegraph.org] On Behalf Of Paul Martz
 Sent: Wednesday, September 22, 2010 1:02 PM
 To: OpenSceneGraph Users
 Subject: Re: [osg-users] OpenFlight: Reading the Extension Record
 
 Hi Brad -- The original author of the importer isn't around these
days,
 though
 he does make an occasional rare appearance. I wrote the exporter half
 of the plugin.
 
 Looks like PrimaryRecords.cpp has a class, Extension, for processing
an
 Extension record, but it doesn't appear to parse/save any of the data.
 Looks
 like it just creates a Group node and assigns it the name from the
 extension
 record, then returns. You would probably want to add some code here to
 handle
 the extension record contents the way that you require.
 
 The code you quoted below pertains to handling the PushExtension and
 PopExtension control records, which is only tangentially related to
 Extension
 records themselves.
 -Paul
 
 
 
 Brad Colbert wrote:
  Paul,
 
  Thanks for the quick reply.
 
  I've looked through the source and find a lot of references to
  Extension but doubt that is what it's for.
 
  I was hoping to catch the eye of the author here.
 
  -B
 
  P.S.
 
  One example, I think may or may not be close:
 
  Document.cpp:void Document::pushExtension()
  Document.cpp:OSG_WARN  No current primary in
  Document::pushExtension().  std::endl;
  Document.cpp:void Document::popExtension()
  Document.cpp:OSG_WARN  Can't decide primary in
  Document::popExtension().  std::endl;
  Document.h:// Extension stack
  Document.h:void pushExtension();
  Document.h:void popExtension();
 
 
  -Original Message-
  From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-
  boun...@lists.openscenegraph.org] On Behalf Of Paul Martz
  Sent: Wednesday, September 22, 2010 10:35 AM
  To: OpenSceneGraph Users
  Subject: Re: [osg-users] OpenFlight: Reading the Extension Record
 
  Check the source code. If I recall correctly, the loader reads in
  comment
  records and stores them as UserData in the scene graph, but I'm not
  sure about
  extension records. The only way to know for certain is to check the
  source.
  -Paul
 
 
  Brad Colbert wrote:
  Hello all,
 
  We would like to store some extra meta-data along with (embedded)
 in
  our
  OpenFlight models.  Looking at the OpenFlight spec, there appears
 to
  be
  this thing called an Extension Record that can contain many
  things,
  even XML which is what we are interested in.
 
  To cut-to-the-chase, does the OpenFlight loader in OSG read in any
  way
  these Extension Records or, worse, preclude the reading of the
  record?
  I know this is a pretty open question but I'm just starting to dig
  into
  this.
 
  Any information will be more than I have now, thanks!
 
 ___
 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] osgWidget

2010-09-23 Thread lucie lemonnier
Hi,
Thank you Jean-Sébastien for your devices.
Indeed, I put the WindowManager's ortho camera under the root of my scene 
graph. With VRJuggler, I can't access to the cameras because the cameras aren't 
included in the scene graph. So I don't know how to do this.
Would you have other suggestions?

Thank you!

Cheers,
lucie

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





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


Re: [osg-users] [osgPlugins] How to use PlugIns

2010-09-23 Thread Gordon Tomlinson
You have to build and its dependencies

http://www.openscenegraph.org/projects/osg/wiki/Support/KnowledgeBase/Collada


__
Gordon Tomlinson 

gor...@gordontomlinson.com IM: gordon3db...@3dscenegraph.com 
www.vis-sim.com
www.gordontomlinson.com
www.PhotographyByGordon.com
__

-Original Message-
From: osg-users-boun...@lists.openscenegraph.org 
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Tomas Longo
Sent: Thursday, September 23, 2010 4:03 PM
To: osg-users@lists.openscenegraph.org
Subject: [osg-users] [osgPlugins] How to use PlugIns

Hi @ all,

i have a question about the use of a plugin after it was build.
Do I have to rebuild OSG in some manner or how do I notify
OSG that there´s a plugin?

In my case I need the collada PlugIn.

Thanks in advance.

Cheers,
Tomas

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





___
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] OpenSceneGraph 2.9.9 problem with *.osgb

2010-09-23 Thread Robert Osfield
Hi John, et. al,

On Thu, Sep 23, 2010 at 10:11 AM, Robert Osfield
robert.osfi...@gmail.com wrote:
 Thanks for the testing, I've just reproduced this regression.  I will
 dig into see where things went wrong.

I've spent the whole day chasing this problem down.  Turned out to be
an issue of double setting of an id map when writing out images.  To
fix this I've re-factored the way that images are read/written and how
the object related fields are read/written.

An svn update will get these fixes.  The change will break the
.osgb/.osgt format unfortunately so you'll need to re-create these
files.

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


Re: [osg-users] [osgPlugins] How to use PlugIns

2010-09-23 Thread Tomas Longo
hhh, thank you very much for your ultra lightspeed fast reply :D

This is what I was looking for!!!


Thanks.

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





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


[osg-users] Creating a Visible Pivoting Vector/Cylinder

2010-09-23 Thread Richard Redding
Hi,

I'm looking to write the code for a vector/a small diameter cylinder to pivot 
from the bottom, and traces to different points at the top with relation to 
data collected by a user interface device. Specifically I am tracking an IR LED 
with OSG in a cubic set space and would like a visible vector/cylinder to point 
to the LED's point in space. 

The vectors/cylinders are only for aesthetic purposes to get more of a feel of 
where the LED is in relation to the cubic defined space.

Any/all help is greatly appreciated. I've been just learning this on my own and 
am new to OSG's specific operation! :-D 
... 

Thank you!

Cheers,
Richard

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





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


Re: [osg-users] osgWidget

2010-09-23 Thread Jean-Sébastien Guay

Hello Lucie,


Indeed, I put the WindowManager's ortho camera under the root of my scene 
graph. With VRJuggler, I can't access to the cameras because the cameras aren't 
included in the scene graph. So I don't know how to do this.
Would you have other suggestions?


The SceneView has a getCamera() method. That's what I meant. In OSG 
rendering, the rendering always starts at a camera. If you do 
viewer-setSceneData(root) or sceneView-setSceneData(root), your root 
node is being added as child of that camera, which is thus called the 
viewer's main camera. You may have other cameras in the scene graph 
(like osgWidget's ortho camera, or HUD cameras, etc.).


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


Re: [osg-users] Creating a Visible Pivoting Vector/Cylinder

2010-09-23 Thread Tom Pearce
Hi Richard,

Here's what I would do to start:

0) Read the QuickStartGuide if you haven't already.

1) Make two Geodes, one with a Cylinder as the Drawable, and the other with a 
Cone, (these are convenience classes which the osg provides) and add each Geode 
as the child of a MatrixTransform or PositionAttitudeTransform node.  

2) Derive a class(es) from NodeCallback, overriding the operator()(Node*, 
NodeVisitor*) method with the behavior you want for each component of your 
arrow (setting the orientation or scaling or whatever you want) based on the 
interface device data.  Matrix::rotate(Vec3 from, Vec3 to) will create a 
rotation matrix which rotates your objects from some starting orientation - the 
original axis of your arrow - to another orientation - the desired axis of your 
arrow.

3) Attach the callback(s) to the appropriate transform node(s) using 
Node-addUpdateCallback(derivedCallbackClass)

4) Add your root node as the scene data of an osgViewer::Viewer, and either do 
a frame() loop or viewer.run().  The QuickStartGuide will have everything you 
need to know about that.

Hopefully that'll get you started...

Cheers,
Tom

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





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


Re: [osg-users] CompositeViewer issues

2010-09-23 Thread Brad Huber
Robert,

Attached is a simple stripped down app that demonstrates the problem.

The program creates two windows (2 views total).  The 1st has a HUD and the
2nd doesn't.  Resizing the 2nd window causes the HUD in the first window to
resize (it shouldn't).  I am reliably producing this bug on my Win7 machine.
I'm quite confident that this bug will be reproducible on all Windows.  I am
a little bit less sure of Linux/Mac, etc.

I've included a Visual Studio 2005 project but since there is only one
source file it should be easy to get it building under Linux.

Thanks
-Brad

-Original Message-
From: osg-users-boun...@lists.openscenegraph.org
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Robert
Osfield
Sent: Wednesday, September 22, 2010 2:25 AM
To: OpenSceneGraph Users
Subject: Re: [osg-users] CompositeViewer issues

Hi Brad,

Could you see if you can reproduce this problem with the one of the
OSG examples, or a small tweak of one to reproduce this problem.  If I
can reproduce it reliably then there is a much better chance of
spotting the culprit and finding a solution.

Cheers,
Robert.

On Tue, Sep 21, 2010 at 10:27 PM, Brad Huber br...@procerusuav.com wrote:
 Hello,



 I recently converted our osg based application over to use Composite
Viewer
 because we need multiple Views on the same scene graph.  I’m running in to
a
 little snag which appears to be a bug in CompositeViewer.



 Simple way of explaining the manifestation of the issue is that I have two
 Windows and two Views (one view per window) and they both have event
 handlers attached to the views which react to the
 osgGA::GUIEventAdapter::RESIZE event.  Resizing works hunky dory for view
0
 but it does not work correctly for view 1.  I believe the culprit is
related
 to these lines of code found in CompositeViewer::eventTraversal().



 osgViewer::View* masterView = getViewWithFocus() ? getViewWithFocus() :
 _views[0].get();

 .

 .

 .

 viewEventsMap[masterView].insert( viewEventsMap[masterView].end(),
 gw_events.begin(), gw_events.end() );



 The problem is that when resizing, apparently getViewWithFocus() returns
 NULL (I guess because the mouse is over the window frame and not the view
 within the window.  Therefore a resize event is taken out of the graphics
 window queue for the 2nd window and stuck into the event queue for the 0
 view (a mismatch).  The effect for me is that the when I resize one window
 the HUD I have set up in the other window receives the resize event and
 changes which obviously isn’t what I want J.



 This does seem to be somewhat intermittent and may be related to whether
 your mouse tends to fall off the window frame towards the view or away
from
 the view…



 PS I don’t have a solution in hand yet.  I thought I would throw this out
 there in case it’s a known issue or something.



 Thanks

 -Brad

 ___
 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


CompositeViewer_Playground.zi_
Description: Binary data
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] OSG 2.9.9 - Problem building osgSim

2010-09-23 Thread Erin Morrow
Hi,

When building 2.9.9 the following warnings/errors are generated:

1SphereSegment.cpp
1.\SphereSegment.cpp(1368) : warning C4091: '' : ignored on left of 'double' 
when no variable is declared
1.\SphereSegment.cpp(1368) : error C2143: syntax error : missing ';' before 
'constant'
1.\SphereSegment.cpp(1368) : error C2106: '=' : left operand must be l-value

Build environment is Windows 7, VS2008 SP1, 64bit release with QT. Does the 
variable rad2 in line 1368 of SphereSegment.cpp redefine a macro or typedef? 
Renaming this variable eliminates the compile error.

Thank you!

Cheers,
Erin

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





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


Re: [osg-users] OSX Install Locations

2010-09-23 Thread David Guthrie
2.8.3 and older use.

/Library/Application Support/OpenSceneGraph/PlugIns/osgPlugins-{version}/

In your case {version} will be 2.9.9.

I'm not sure that changed in 2.9.x, but I would try that.
... 

Thank you!

Cheers,
David

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





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


[osg-users] isCurrent() doesn't really work.

2010-09-23 Thread David Guthrie
I was looking at the isCurrent call and way contexts and made current and 
released.

isCurrent is not virtual, and simply checks to see if the thread on which the 
context was made current matches the current thread.

Every OpenGL api I've looked at provides a way to get a handle to the active 
context, which could be compared to the handle of the context in the 
GraphicsContext implementation.  That would mean the isContext would always 
work.

Currently something like 

A-makeCurrent();
B-makeCurrent();
A-isCurrent();

won't work, but it could be fixed pretty easily.

At the same time, releaseContext() could check to see if the context is 
actually the active context and do nothing if it isn't.

In wgl, glx, agl, and cgl you can call GetCurrentContext with the respective 
prefix to accomplish this.  Even Qt has QGLContext::currentContext().

I'll be happy to implement it in some cases, although I am still working with 
2.8.3 and the changes will have to be ported to the trunk.

Thanks,
David Guthrie

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





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


Re: [osg-users] OpenSceneGraph 2.9.9 problem with *.osgb

2010-09-23 Thread John Ivar Haugland
Robert,

I did an svn update. Yes, this did indeed fix the problem! Excellent!! Good
to have a working binary file format again :) Thanks a lot for a very nice
visualization library and all the hard work!

John Ivar Haugland



On Thu, Sep 23, 2010 at 6:15 PM, Robert Osfield robert.osfi...@gmail.comwrote:

 Hi John, et. al,

 On Thu, Sep 23, 2010 at 10:11 AM, Robert Osfield
 robert.osfi...@gmail.com wrote:
  Thanks for the testing, I've just reproduced this regression.  I will
  dig into see where things went wrong.

 I've spent the whole day chasing this problem down.  Turned out to be
 an issue of double setting of an id map when writing out images.  To
 fix this I've re-factored the way that images are read/written and how
 the object related fields are read/written.

 An svn update will get these fixes.  The change will break the
 .osgb/.osgt format unfortunately so you'll need to re-create these
 files.

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

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


Re: [osg-users] OSG 2.9.9 - Problem building osgSim

2010-09-23 Thread Erin Morrow
Hi,

So this issue (and many others) arises from the GL.h file that QT installs in 
place of the default windows version. Reverting to the vanilla GL.h file 
fixes it. Does anyone understand why QT does this and are there any tips for 
making QT play nice with OSG?

Thank you!

Cheers,
Erin

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





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


[osg-users] Build error on OS X in examples_osgviewerCocoa

2010-09-23 Thread Eduardo Poyart
Hello,

I've sent this e-mail to osg-users@lists.openscenegraph.org but I didn't
receive it on the list. I'm re-sending it just in case.

Here is my problem:

When building OpenSceneGraph on OS X 10.6.4 and creating application
bundles, I have the error below, on the examples_osgviewerCocoa target. It
happened on OSG 2.9.8 and it's still happening on 2.9.9.

This only happens when I set cmake to build application bundles, and only
on examples_osgviewerCocoa. A Copy Files step is set up with a path of ../.,
which Xcode doesn't like.

I think recreating the examples_osgviewerCocoa target should fix it for me,
but there must be a way to fix it in the cmake configuration files... or is
no one else getting this?

Thanks
Eduardo

--

PBXCp
/Users/epoyart/OpenSceneGraph-2.9.9-build/bin/Debug/osgviewerCocoad.app/Contents/MacOS/.././Info.plist
examples/osgviewerCocoa/Info.plist

cd /Users/epoyart/OpenSceneGraph-2.9.9

/Developer/Library/PrivateFrameworks/DevToolsCore.framework/Resources/pbxcp
-exclude .DS_Store -exclude CVS -exclude .svn -strip-debug-symbols
-resolve-src-symlinks
/Users/epoyart/OpenSceneGraph-2.9.9/examples/osgviewerCocoa/Info.plist
/Users/epoyart/OpenSceneGraph-2.9.9-build/bin/Debug/osgviewerCocoad.app/Contents/MacOS/../.

pbxcp: error: open():
/Users/epoyart/OpenSceneGraph-2.9.9-build/bin/Debug/osgviewerCocoad.app/Contents/MacOS/.././Info.plist
[/SourceCache/pbx_tools/pbx_tools-1706/pbxcp/file_utils.m:420]: No such file
or directory

Command
/Developer/Library/PrivateFrameworks/DevToolsCore.framework/Resources/pbxcp
failed with exit code 1

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


Re: [osg-users] Problem with samples

2010-09-23 Thread Farshid Lashkari
Hi,

I've also been experiencing the fullscreen issue with nVidia cards on
Windows 7. Just wanted to let you know that I found a workaround.

When creating the OpenGL context, I changed the swap method
from WGL_SWAP_EXCHANGE_ARB to WGL_SWAP_COPY_ARB. This completely solved the
issue for me.

Hopefully nVidia will fix their drivers in a future release.

Cheers,
Farshid

On Thu, Sep 2, 2010 at 7:00 AM, Martin Anderson poet_mar...@yahoo.co.ukwrote:

 Hi,

 Thanks for all your responses guys - that seems to answer the problem !

 Will try the offered fixes when I get home from work

 Thank you!

 Cheers,
 Martin

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





 ___
 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] Windows 7 Aero Color Scheme issue

2010-09-23 Thread Magnus Kessler
On Thursday 08 July 2010, Martin Naylor wrote:
 Hi,
 Yeah its certainly Aero...
 I two have the same issue, disabling Aero sorts its out, but mine is on a
 single screen.
 Alt-Tab will make it work as well.
 Have a look here http://www.opengl.org/pipeline/article/vol003_7/
 
 Are we using GDI? I don't understand the viewer code, I might have
 another attempt later...
 http://bugreports.qt.nokia.com/browse/QTBUG-6988 might of interest.
 
 This what I posted a while back:
 I did mention this a while back about osgShadow.
 All my are examples do this now after installing a new Nvidia GTX 480
 card(from a gtx 9800), with the latest drivers from Nvidia.
 My guess you are running Windows Vista/7, try alt tab?
 For a permanent fix disable the pesky Aero desktop!
 I tried looking for a fix last night and its something to do with
 swapbuffers either being called or not, I cannot remember it was late and
 the viewer code was baffling me!
 Ok it might be
 
 Never found a fix, i have looked into the viewer code, but never got to
 the bottom of it.
 
 
 Martin.
 
 

I made an interesting observation recently. One and the same code 
(essentially osgviewer) showed the black screen when starting up in the 
automatically chosen DrawThreadPerContext threading mode, but worked fine 
when SingleThreaded was forced. What is different in the way the OpenGL 
context is created in these two cases?

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