[osg-users] OSG static linking

2014-03-07 Thread Paul Martz
If OSG is linked statically, obviously I need to reference a plugin with
the USE_OSGPLUGIN macro.

Is there any way I can determine at compile time whether the OSG I'm
linking against was built as static or dynamic? I want to use USE_OSGPLUGIN
if OSG was built static, and not use it otherwise, right?

Should USE_OSGPLUGIN be defined as a no-op if OSG is built dynamic?

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


Re: [osg-users] osg::ref_ptr thread safety

2014-03-07 Thread Ulrich Hertlein
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Hi Robert,

On 6/03/2014 12:48, Robert Osfield wrote:
> Hi Ulrich,
> 
> If you get a C pointer from a ref_ptr<> you are explicitly moving outside the 
> scope
> of automatic reference counting.  It's only safe to get and use a C pointer 
> from a
> ref_ptr<> if you know the object being referenced will not get unreferenced 
> during
> the lifetime of the C pointer.  If you don't feel comfortable with this
> responsibility then simply don't get a C pointer, just pass around 
> ref_ptr<>'s, the
> availability of get() method is to allow power users to use the speed and 
> flexibility
> of the C pointer when they know it's safe.

Yes, that was my understanding too.
I was just advocating this procedure since it's sort of most-common practice in 
OSG to
return raw pointers and the question came up.

Thanks,
/ulrich

- -- 
Fingerprint 0227 8EE1 2C64 8EF4 DA11 9864 FF16 0114 B9DA 3318
-BEGIN PGP SIGNATURE-
Version: GnuPG v1

iQEcBAEBCAAGBQJTGiILAAoJEP8WARS52jMYSHQH/RTfB/So+bUHblOEnpC8UUqU
G8EYyOzPejeo7kDAGN8fPegSVYQLrkkZGSIGOjOnivl7PSUH92UChzvMGSf8s8XX
gG29Sa0vSiWPaTn6O7+6dSu16x2PxYlXSPcWIvk1pTJSFMpNofVS/xAQuqaUqzaw
8iTs9a49mkm69PNH5JzmzSDzeXDvxYwLJ4AdlO+YkSJDI3lych3cb8Qhx75cMyWW
pkQpa8pXTQXgBgFE3njfWQFaUDyzjkj2Ms3lkNgJtuXfyTa7zKU2fNDM3RyZ5JXr
q6txWStp+gnqUwdw6nGCY6D2t/2SoiVUVXWgJgK9uql8uEJ3v5kbJoGSzKqe9ME=
=AgNn
-END PGP SIGNATURE-
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] osg::ref_ptr thread safety

2014-03-07 Thread Ulrich Hertlein
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

On 6/03/2014 20:09, ttaw wrote:
> From: Ulrich Hertlein mailto:u.hertl...@sandbox.de>> 
> try
> m_resource.release().

Thanks, whoever you are.

But that moves the ownership from the class to the caller and is not what I'm 
after.
Plus it doesn't solve the potential problem of thread-safety.

Cheers,
/ulrich

> Hi guys,
> 
> during a recent discussion at the office the question was raised whether or 
> not
> there's anything architectural that's stopping the owner of a ref-counted 
> resource to
> return it via a raw pointer and dereference (and hence delete it) before it's
> assigned to a receiving ref_ptr.
> 
> Along these lines: caller: Resource* r = foo(); owner: return 
> m_resource.get() 
> (separate thread does m_resource.reset() or similar) caller: ref_ptr p(r);
> 
> ref_ptr is assigned return value of 'foo()' which is now a dangling pointer. 
> (Yes,
> you would usually do 'ref_ptr p(foo())' but that's not fundamentally 
> different from
> the above sequence.)
> 
> To the best of my knowledge there's nothing in the design of ref_ptr that 
> stops
> this, but then again I don't believe it's an issue because otherwise we'd 
> surely have
> heard.
> 
> Can anyone think of something (in the ABI, or elsewhere) that would prevent 
> this?
> 
> Cheers, /ulrich

- -- 
Fingerprint 0227 8EE1 2C64 8EF4 DA11 9864 FF16 0114 B9DA 3318
-BEGIN PGP SIGNATURE-
Version: GnuPG v1

iQEcBAEBCAAGBQJTGiHVAAoJEP8WARS52jMYpzAH/0GSSjBnQzV1+rQc2Y7/GXtU
5jLJxSurSdezv1bMJ8WylB4L8td2LD2vGEd5nKFNVF7hZHaNIGkXDzA5qEb1MfaW
OXwxFu+yVzScxolJx+PT/stZRxsBXocr7X2lJJ1zYdFsWV+QCzN8r+301vcqYqih
dToKEA2p4c+a0D3lPla4XvTHkmm1ZK1XQF3iIwxfQucA9UQpKxBC3AVdyxSuwDPG
Klqfa0lFXo8OmRrtPHXL3ExPEwwFHAcZQHugwxvxWqI+rICZGQoffpDfs8Nf58JK
WNcBIdw4qg2Y9Cc9X4kfimsY7eYyaQ3ihWHLHpYAMUT2+igg92WaZHJ5rpw3L0o=
=VwT/
-END PGP SIGNATURE-
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Openscenegraph iOS Development

2014-03-07 Thread Sebastian Messerschmidt

Hi,

I indeed ran into troubles trying to compile osg 3.2.0 using MacOS 10.8 
for iOS.
I followed the tutorial on the OpenSceneGraph website. Unfortunately 
various attempts failed with IPhoneSDK 7.0
Either there are problems with "stat64" used inside osgDB or there are 
problems inside _types.h saying "architecture not supported"


Since this are my first steps in MacOs I'm quite clueless here ;-)

Anyone having any hints?

Hi folks,

I've been requested to explore the options of OpenSceneGraph 
development under iOS.
There are some starter tutorials, but I still have some questions 
(without having touched the toolchain right now)


1. Depending on the device I guess I'm bound to OpenGL ES 1 and 2?
2. What about external dependencies, are there all available resource 
to get my favourites like curl, tif, freetype going?
3. How are plugins handled? Is there some delay load mechanism, or do 
they have to be compiled statically into the application?
4. Last of all: How well does it work? Is the setup/building/deploy 
working smoothly?



Cheers
Sebastian




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


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


Re: [osg-users] [build] osgbullet asking for version 80 of libraries when having 110

2014-03-07 Thread Alberto Luaces
"Ramon Talavera Suarez" writes:

> Hello,
>
> After building osg (v 3.3) and osgbullet from sources under Windows
> and visual studio 2010, osgbullet examples are asking for
> 80-osgGA.dll. Osg ALL-BUILD compilation generated 110-osgGA.dll. Where
> should I change VS2010 options so that the newer dll is searched? Any
> other way to fix this?

Once osgbullet is compiled, there is no way.  You must make sure that
the build process for osgbullet finds the newer version of OSG before
starting.

-- 
Alberto

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


[osg-users] osgViewer::View::computeIntersections non-virtual?

2014-03-07 Thread Clay Alberty
My main View class (extending osgViewer::View indirectly) uses a custom 
ordering to determine how objects in the scene are selected when a user 
e.g. clicks a mouse button.  I'm using one of the osg Draggers in a 
scene, and in its handle method it invokes View::computeIntersections to 
determine which node was clicked first, but this does not always agree 
with the custom selection routine.  As a result, clicking on the dragger 
when it is behind an object with a lower-priority selection order does 
not select the dragger and so does not work as intended.


My first thought was to override the base View::computeIntersections 
method to reflect the custom logic elsewhere in the View class, but it 
is a non-virtual method.  Is there a particular reason this is so?  As a 
work-around, I overrode the handle method in the dragger, copied most of 
the code from the original implementation, and changed the selection 
order there to reflect the custom View logic, but this feels like an 
ugly solution.  Is there a better way of approaching a universal 
implementation of a custom selection order, or can 
View::computeIntersections be marked virtual?


I'm using osg version 2.9.7, but I see the method is still non-virtual 
in the 3.3.0 branch.


Thanks!

--
Clay Alberty
Stellar Science
443-550-1151


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


Re: [osg-users] [build] Error Building with minGW

2014-03-07 Thread michael kapelko
As you see, they don't have underscores. I have a suspicion you didn't
compile zlib with MinGW. I compiled all dependencies myself with MinGW.


2014-03-07 3:55 GMT+07:00 Josh Manz :

> Hi,
>
> First of all, thank you for replying.  I agree that the inflate/deflate
> functions cannot be located however I don't know why zlib would have them.
> I did nm on the zlib and here is the result:
>
> $ nm libz.a | grep deflate
>  U _deflate
>  U _deflateEnd
>  U _deflateInit_
>  U _deflate
>  U _deflateEnd
>  U _deflateInit2_
>  U _deflateParams
> deflate.o:
> 1570 T _deflate
> 0080 R _deflate_copyright
> 07f0 t _deflate_fast
> 0c60 t _deflate_slow
> 0590 t _deflate_stored
> 1530 T _deflateBound
> 29d0 T _deflateCopy
> 23a0 T _deflateEnd
> 2790 T _deflateInit_
> 24a0 T _deflateInit2_
> 22b0 T _deflateParams
> 14b0 T _deflatePrime
> 12f0 T _deflateReset
> 1190 T _deflateSetDictionary
> 1480 T _deflateSetHeader
> 14f0 T _deflateTune
>
>
> Correct me if i'm wrong but it seems like the inflate/deflate functions
> are there.   I'm using zlib 1.2.3 and have previously tried zlib 1.2.5 with
> no luck.  If you have been successful with other versions of zlib please
> let me know which one it is and I will give that a try.
>
> Thanks,
>
> ...
>
>
> Thank you!
>
> Cheers,
> Josh
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=58508#58508
>
>
>
>
>
> ___
> 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] CompositeViewer regression between OSG 3.1.4 and 3.2

2014-03-07 Thread Robert Osfield
Hi Remo,

On 7 March 2014 07:30, Remo Eichenberger  wrote:

> I also run into this issue. Does anyone has found a solution for it?
>

I haven't had a chance to look deeply into the issue yet.

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


Re: [osg-users] osgconv

2014-03-07 Thread Alberto Luaces
"Ekaterina Fokina" writes:

> Yes, exactly nothing. Attached there is an image.

Can you donwload/compile a different version of OSG?  That one seems to
be completely broken.

-- 
Alberto

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


[osg-users] Official issues list of OSG?

2014-03-07 Thread Remo Eichenberger
Hi

Is there any official issues list of OpenSceneGraph? I only found this:
https://github.com/openscenegraph/osg/issues

But this is not supported.

Cheers
Remo

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





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