Re: [osg-users] Drawing a simple sphere...

2012-04-10 Thread Mike Wozniewski
Thanks Ulrich,

I'm actually having a slightly different problem, which seems to using 
different compilers for OSG and my application. See: 
http://forum.openscenegraph.org/viewtopic.php?p=46918

I thought I'd try fooling around with optimization flags, since I've tried 
almost everything else.

Thanks for your reply though.

Cheers,
Mike

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





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


Re: [osg-users] Drawing a simple sphere...

2012-04-09 Thread Mike Wozniewski
Hi Ulrich (et al),

How did you change the optimization flags in your makefiles? Did you search and 
replace through them all? or is there a cmake variable / technique for doing 
this?

Thanks,
Mike

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





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


Re: [osg-users] Drawing a simple sphere...

2012-04-09 Thread Ulrich Hertlein
Hi Mike,

On 10/04/12 13:03 , Mike Wozniewski wrote:
 Hi Ulrich (et al),
 
 How did you change the optimization flags in your makefiles? Did you search 
 and replace
 through them all? or is there a cmake variable / technique for doing this?

These days (the original thread is from August 2011) the only things I have to 
modify in
the cmake settings (through ccmake) is the architecture (to x86_64 only, 
because of
dependencies) and the location of the freetype library (from MacPorts).

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


Re: [osg-users] Drawing a simple sphere...

2011-09-01 Thread Ulrich Hertlein
Hi Yann,

On 27/08/11 17:31 , Yann Blaudin de Thé wrote:
 I spent the last days trying to compile OSG and running my simple code, and 
 nothing
 works. When I compile my app from the Terminal, I get Bus error: 10
 
 The last options I used with cmake are:
 -DCMAKE_OSX_ARCHITECTURES=x86_64 \
 -DCMAKE_BUILD_TYPE=Release \
 -DOSG_BUILD_PLATFORM_IPHONE=0 \
 -DCMAKE_OSX_SYSROOT=/Developer/SDKs/MacOSX10.7.sdk \
 -DOSG_WINDOWING_SYSTEM=Cocoa \
 -DOSG_COMPILE_FRAMEWORKS=1

Did you try without the 'OSG_COMPILE_FRAMEWORKS'?  I seem to remember that 
there were
issues with cmake and frameworks and it works fine for me without them 
(building .dylib).

Also, you can definitively drop 'OSG_BUILD_PLATFORM_IPHONE'.
If you want I can send you my (working) CMakeCache.txt file.

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


Re: [osg-users] Drawing a simple sphere...

2011-08-31 Thread Stephan Maximilian Huber
Hi,

there seems to be a problem with the llvm-gcc compiler, osg and acosf,
see this thread for a possible solution:

http://forum.openscenegraph.org/viewtopic.php?t=8963highlight=llvm

If that doesn't help, can you post a stack-trace?

cheers,

Stephan


Am 30.08.11 20:16, schrieb Yann Blaudin de Thé:
 Can someone tell me what are the options to pass to cmake to
 compile OSG on OSX Lion? (either to a .framework form, or to a *nix
 form, like a .dylib) I definitely don't get it, and I'm not
 experienced enough to find it out by myself. As written in a
 previous mail, I used so far:
 
 OSG_WINDOWING_SYSTEM=Coca CMAKE_ARCHITECTURE='i386;x86_64' 
 OSG_DEFAULT_IMAGE_PLUGIN_FOR_OSX=imageio CMAKE_BUILD_TYPE=Release
 
 which seems quite relevant to me. The problem is that in this case,
 the program at the end of this mail crashes, with the error: Bus
 error: 10
 
 BTW, what you, Tony H., suggested doesn't work. Thank you anyway!
 
 Yann
 
 
 Le 29 août 2011 à 20:44, Tony Horrobin a écrit :
 
 Hi Yann,
 
 I have tried your code with osg trunk under Windows 7 32bit and
 can report that it does not crash.
 
 All I can suggest is to replace use of native pointers with
 osg::ref_ptr.
 
 So for example:
 
 Code: osg::Geode * geode = new osg::Geode();
 
 
 becomes
 
 
 Code: osg::ref_ptr Geode  geode = new osg::Geode();
 
 
 
 Cheers,
 
 -Tony
 
 -- Read this topic online here: 
 http://forum.openscenegraph.org/viewtopic.php?p=42293#42293
 
 
 
 
 
 ___ 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


Re: [osg-users] Drawing a simple sphere...

2011-08-30 Thread Yann Blaudin de Thé
Can someone tell me what are the options to pass to cmake to compile OSG on OSX 
Lion? (either to a .framework form, or to a *nix form, like a .dylib)
I definitely don't get it, and I'm not experienced enough to find it out by 
myself. As written in a previous mail, I used so far:

OSG_WINDOWING_SYSTEM=Coca
CMAKE_ARCHITECTURE='i386;x86_64'
OSG_DEFAULT_IMAGE_PLUGIN_FOR_OSX=imageio
CMAKE_BUILD_TYPE=Release 

which seems quite relevant to me.
The problem is that in this case, the program at the end of this mail crashes, 
with the error:
Bus error: 10

BTW, what you, Tony H., suggested doesn't work. Thank you anyway!

Yann


Le 29 août 2011 à 20:44, Tony Horrobin a écrit :

 Hi Yann,
 
 I have tried your code with osg trunk under Windows 7 32bit and can report 
 that it does not crash.
 
 All I can suggest is to replace use of native pointers with osg::ref_ptr.
 
 So for example:
 
 Code:
 osg::Geode * geode = new osg::Geode();
 
 
 becomes
 
 
 Code:
 osg::ref_ptr Geode  geode = new osg::Geode();
 
 
 
 Cheers,
 
 -Tony
 
 --
 Read this topic online here:
 http://forum.openscenegraph.org/viewtopic.php?p=42293#42293
 
 
 
 
 
 ___
 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] Drawing a simple sphere...

2011-08-29 Thread Tony Horrobin
Hi Yann,

I have tried your code with osg trunk under Windows 7 32bit and can report that 
it does not crash.

All I can suggest is to replace use of native pointers with osg::ref_ptr.

So for example:

Code:
osg::Geode * geode = new osg::Geode();


becomes


Code:
osg::ref_ptr Geode  geode = new osg::Geode();



Cheers,

-Tony

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





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


Re: [osg-users] Drawing a simple sphere...

2011-08-27 Thread Yann Blaudin de Thé
Hi again,

I spent the last days trying to compile OSG and running my simple code, and 
nothing works. When I compile my app from the Terminal, I get Bus error: 10

The last options I used with cmake are:
-DCMAKE_OSX_ARCHITECTURES=x86_64 \
-DCMAKE_BUILD_TYPE=Release \
-DOSG_BUILD_PLATFORM_IPHONE=0 \
-DCMAKE_OSX_SYSROOT=/Developer/SDKs/MacOSX10.7.sdk \
-DOSG_WINDOWING_SYSTEM=Cocoa \
-DOSG_COMPILE_FRAMEWORKS=1

which seems relevant to me :-)

What's wrong? ;(

Any help would be welcome

Le 26 août 2011 à 18:41, Ulrich Hertlein a écrit :

 On 26/08/11 16:39 , Ulrich Hertlein wrote:
 Currently my Lion build fails in DarwinUtils.mm
 /Users/uli/Projects/osg/OpenSceneGraph/src/osgViewer/DarwinUtils.mm: In 
 member function
 'virtual void 
 osgDarwin::DarwinWindowingSystemInterface::getScreenSettings(const
 osg::GraphicsContext::ScreenIdentifier, 
 osg::GraphicsContext::ScreenSettings)':
 /Users/uli/Projects/osg/OpenSceneGraph/src/osgViewer/DarwinUtils.mm:316: 
 error:
 'CGDisplayBitsPerPixel' was not declared in this scope
 
 Okay, I've found a work-around for the deprecated CGDisplayBitsPerPixel in 
 Lion SDK 10.7,
 cleaning that up now.
 
 /ulrich
 ___
 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] Drawing a simple sphere...

2011-08-27 Thread Paul Martz
Are you able to run the OSG apps and examples? If so, why not compare how they 
are built with how you are building yours.


IIRC, Bus errors are typically caused by a mismatch between the .lib stub 
libraries and the .so runtime libraries, so if you have been using multiple 
versions of OSG (or any other libraries that you link with), that's something 
you'll want to check.

   -Paul


On 8/27/2011 9:31 AM, Yann Blaudin de Thé wrote:

Hi again,

I spent the last days trying to compile OSG and running my simple code, and nothing 
works. When I compile my app from the Terminal, I get Bus error: 10

The last options I used with cmake are:
-DCMAKE_OSX_ARCHITECTURES=x86_64 \
-DCMAKE_BUILD_TYPE=Release \
-DOSG_BUILD_PLATFORM_IPHONE=0 \
-DCMAKE_OSX_SYSROOT=/Developer/SDKs/MacOSX10.7.sdk \
-DOSG_WINDOWING_SYSTEM=Cocoa \
-DOSG_COMPILE_FRAMEWORKS=1

which seems relevant to me :-)

What's wrong? ;(

Any help would be welcome

Le 26 août 2011 à 18:41, Ulrich Hertlein a écrit :


On 26/08/11 16:39 , Ulrich Hertlein wrote:

Currently my Lion build fails in DarwinUtils.mm
/Users/uli/Projects/osg/OpenSceneGraph/src/osgViewer/DarwinUtils.mm: In member 
function
'virtual void osgDarwin::DarwinWindowingSystemInterface::getScreenSettings(const
osg::GraphicsContext::ScreenIdentifier, 
osg::GraphicsContext::ScreenSettings)':
/Users/uli/Projects/osg/OpenSceneGraph/src/osgViewer/DarwinUtils.mm:316: error:
'CGDisplayBitsPerPixel' was not declared in this scope

Okay, I've found a work-around for the deprecated CGDisplayBitsPerPixel in Lion 
SDK 10.7,
cleaning that up now.

/ulrich
___
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





--
  -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] Drawing a simple sphere...

2011-08-26 Thread Stephan Huber
Hi,

I recall a post from some days ago, describing  problems with the
llvm-gcc compiler and osg on lion. The app hang/crash on a call to cosf.
The solution was to switch to the gcc compiler.

Perhaps the same issue as yours?

cheers,
Stephan

Am 26.08.11 01:07, schrieb Yann Blaudin de Thé:
 Hi Ulrich,
 
 It is through my own application. What did you pass as arguments to
 cmake? I used :
 OSG_WINDOWING_SYSTEM=Coca
 CMAKE_ARCHITECTURE='i386;x86_64'
 OSG_DEFAULT_IMAGE_PLUGIN_FOR_OSX=imageio
 CMAKE_BUILD_TYPE=Release
 
 Le 25 août 2011 à 09:50, Ulrich Hertlein a écrit :
 
 Hi Yann,

 On 24/08/11 23:17 , Yann Blaudin de Thé wrote:
 #include osg/Shape
 #include osg/ShapeDrawable
 #include osg/Geode
 #include osgViewer/Viewer

 int main(int argc, char *argv[]) {
osg::Group* root = new osg::Group;
osg::Geode* geode = new osg::Geode();

geode-addDrawable(new osg::ShapeDrawable(new 
 osg::Sphere(osg::Vec3(0.,0.,0.), 1.)));
root-addChild( geode );

osgViewer::Viewer viewer;
viewer.setSceneData( root );
viewer.realize();

while( !viewer.done() )
viewer.frame();

return 0;
 }

 No idea - it looks fine and works for me (also on Lion).
 Your best bet is probably to run it from gdb and see where it barfs.

 When you say loading a .3ds works fine, is that through osgviewer or your 
 own application?

 HTH,
 Cheers,
 /ulrich
 ___
 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


Re: [osg-users] Drawing a simple sphere...

2011-08-26 Thread Ulrich Hertlein
Hi Yann,

On 26/08/11 1:07 , Yann Blaudin de Thé wrote:
 Hi Ulrich,
 
 It is through my own application. What did you pass as arguments to
 cmake? I used :
 OSG_WINDOWING_SYSTEM=Coca
 CMAKE_ARCHITECTURE='i386;x86_64'
 OSG_DEFAULT_IMAGE_PLUGIN_FOR_OSX=imageio
 CMAKE_BUILD_TYPE=Release

Good point, I was actually using a CMakeCache from SnowLeopard and it's 
settings were the
same except: SDK=10.6, CMAKE_ARCHITECTURES=x86_64 (no i386)

Currently my Lion build fails in DarwinUtils.mm
/Users/uli/Projects/osg/OpenSceneGraph/src/osgViewer/DarwinUtils.mm: In member 
function
'virtual void osgDarwin::DarwinWindowingSystemInterface::getScreenSettings(const
osg::GraphicsContext::ScreenIdentifier, 
osg::GraphicsContext::ScreenSettings)':
/Users/uli/Projects/osg/OpenSceneGraph/src/osgViewer/DarwinUtils.mm:316: error:
'CGDisplayBitsPerPixel' was not declared in this scope

:-(

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


Re: [osg-users] Drawing a simple sphere...

2011-08-26 Thread Ulrich Hertlein
On 26/08/11 16:39 , Ulrich Hertlein wrote:
 Currently my Lion build fails in DarwinUtils.mm
 /Users/uli/Projects/osg/OpenSceneGraph/src/osgViewer/DarwinUtils.mm: In 
 member function
 'virtual void 
 osgDarwin::DarwinWindowingSystemInterface::getScreenSettings(const
 osg::GraphicsContext::ScreenIdentifier, 
 osg::GraphicsContext::ScreenSettings)':
 /Users/uli/Projects/osg/OpenSceneGraph/src/osgViewer/DarwinUtils.mm:316: 
 error:
 'CGDisplayBitsPerPixel' was not declared in this scope

Okay, I've found a work-around for the deprecated CGDisplayBitsPerPixel in Lion 
SDK 10.7,
cleaning that up now.

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


Re: [osg-users] Drawing a simple sphere...

2011-08-25 Thread Ulrich Hertlein
Hi Yann,

On 24/08/11 23:17 , Yann Blaudin de Thé wrote:
 #include osg/Shape
 #include osg/ShapeDrawable
 #include osg/Geode
 #include osgViewer/Viewer
 
 int main(int argc, char *argv[]) {
 osg::Group* root = new osg::Group;
 osg::Geode* geode = new osg::Geode();
 
 geode-addDrawable(new osg::ShapeDrawable(new 
 osg::Sphere(osg::Vec3(0.,0.,0.), 1.)));
 root-addChild( geode );
 
 osgViewer::Viewer viewer;
 viewer.setSceneData( root );
 viewer.realize();
 
 while( !viewer.done() )
 viewer.frame();
 
 return 0;
 }

No idea - it looks fine and works for me (also on Lion).
Your best bet is probably to run it from gdb and see where it barfs.

When you say loading a .3ds works fine, is that through osgviewer or your own 
application?

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


Re: [osg-users] Drawing a simple sphere...

2011-08-25 Thread Yann Blaudin de Thé
Hi Ulrich,

It is through my own application. What did you pass as arguments to
cmake? I used :
OSG_WINDOWING_SYSTEM=Coca
CMAKE_ARCHITECTURE='i386;x86_64'
OSG_DEFAULT_IMAGE_PLUGIN_FOR_OSX=imageio
CMAKE_BUILD_TYPE=Release

Le 25 août 2011 à 09:50, Ulrich Hertlein a écrit :

 Hi Yann,
 
 On 24/08/11 23:17 , Yann Blaudin de Thé wrote:
 #include osg/Shape
 #include osg/ShapeDrawable
 #include osg/Geode
 #include osgViewer/Viewer
 
 int main(int argc, char *argv[]) {
osg::Group* root = new osg::Group;
osg::Geode* geode = new osg::Geode();
 
geode-addDrawable(new osg::ShapeDrawable(new 
 osg::Sphere(osg::Vec3(0.,0.,0.), 1.)));
root-addChild( geode );
 
osgViewer::Viewer viewer;
viewer.setSceneData( root );
viewer.realize();
 
while( !viewer.done() )
viewer.frame();
 
return 0;
 }
 
 No idea - it looks fine and works for me (also on Lion).
 Your best bet is probably to run it from gdb and see where it barfs.
 
 When you say loading a .3ds works fine, is that through osgviewer or your own 
 application?
 
 HTH,
 Cheers,
 /ulrich
 ___
 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] Drawing a simple sphere...

2011-08-24 Thread Yann Blaudin de Thé
Hi,

I'm quite new to OSG, and I don't get why my (very (very)) simple code crashes :

[main.cpp]

#include osg/Shape
#include osg/ShapeDrawable
#include osg/Geode
#include osgViewer/Viewer


int main(int argc, char *argv[]) {
osg::Group* root = new osg::Group;

osg::Geode* geode = new osg::Geode();

geode-addDrawable(new osg::ShapeDrawable(new 
osg::Sphere(osg::Vec3(0.,0.,0.), 1.)));

root-addChild( geode );

osgViewer::Viewer viewer;

viewer.setSceneData( root );

viewer.realize();

while( !viewer.done() )
viewer.frame();

return 0;
}

I run :

g++ -c main.cpp

and then

g++ -o sphere main.o -losg -losgViewer

So far, everything goes well. Then, when I type :

./sphere

the app crashes without displaying any sphere, and yielding :

Bus error: 10

But when I want to display a .3ds mesh, it works perfectly well.

I am under Mac OS X Lion (10.7), and I compiled OSG myself.

What's wrong? ;(
Please help

Thank you

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