[osg-users] [OsgQT] How to use this

2014-03-05 Thread TORRALVO Mickaël
Hi guys,

 I'm currently trying to integrate OSG in a QT environnement. I'm working with 
QT 4.8 32bit and OSG 3.2.1 32 bit. When I create a project and configure it, 
all is ok. My problem is that i don't know how to use the osgQt package. I 
really need help to do this, how to use the package osgQt to add an osgViewer 
into my qt window.

Thank you!

Cheers,
TORRALVO

Ps : Sorry for my English I'm a french student and my english should be bad.

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





___
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-05 Thread Stephan Maximilian Huber
Hi Sebastian,

Am 05.03.2014 um 08:42 schrieb Sebastian Messerschmidt 
sebastian.messerschm...@gmx.de:

 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?

You are bound to ES1 OR ES2. It depends on the context you create. And you’ll 
have to setup cmake accordingly. 

 2. What about external dependencies, are there all available resource to get 
 my favourites like curl, tif, freetype going?

It’s hard to find the dependencies, I have some precompiled libs for curl and 
freetype. The hard part is to compile them for both the devices and the 
simulator.

 3. How are plugins handled? Is there some delay load mechanism, or do they 
 have to be compiled statically into the application?

iOS require static linking.

 4. Last of all: How well does it work? Is the setup/building/deploy working 
 smoothly?

If you master the hurdle of setup and compilation of osg and its dependencies 
its working w/o problems. The linking times are relatively high because of the 
static linking requirements.

One major annoyance is cmake’s inability to compile socalled universal libs. 
These libs contain code for the simulator and the devices (arm6, arm7, arm64). 
I can open source my build-scripts which creates 2 cmake-projects in different 
folders, compile osg and afterwards create universal libs. If there’s any 
interest I can setup a git repository.

Here’s an example of a working ios-app, which may guide as a blueprint: 

https://github.com/Present3D/present3d-control (it contains also freetype + 
curl 3rdparty-libs)

cheers,

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


Re: [osg-users] OSG save scene to an image file

2014-03-05 Thread Robert Osfield
Hi Aviral,

It could be, thanks to the default multi-threading of the viewer, you are
detaching the callback before it's being called by the draw thread.  The
way I usually tackle tasks like this is to attach the callback at setup and
leave it there, but have a flag on the callback to say whether it is active
or not.  Your event handler would then just toggle on flag to tell it to
capture an image, then it you just one frame captured have the callback
reset it's flag after capture.

Robert.


On 28 February 2014 09:36, Aviral Goel aviral.g...@outlook.com wrote:

 Hi,

 In my application I want to save the current scene as an image every time
 the user presses 's'.

 I have the basic framework to detect the keypress and it works fine. I am
 facing issues in saving the scene.

 I wrote the following callback -


 Code:
 class SnapshotCallback : public Camera::DrawCallback
 {
 public:
 SnapshotCallback()
 {

 }

 void
 operator() (osg::RenderInfo renderInfo) const
 {
 int width;
 int height;

 Camera * camera = renderInfo.getCurrentCamera();

 width  = camera - getViewport() - width();
 height = camera - getViewport() - height();
 cerr  W :  width H :  height;
 osg::ref_ptr ::osg::Image image = new ::osg::Image();
 image-readPixels(0,0,width,height,GL_RGB,GL_UNSIGNED_BYTE);
 if (osgDB::writeImageFile(*image, ./saved_image.bmp))
 {
 std::cout  Saved screen image to '  std::endl;
 }
 else
 {
 cerr  Could not save image!;
 }
 }
 };




 Now in my osgGA::GUIEventHandler derived class i execute the following
 function every time the user presses 's' -


 Code:
 void
 snapshot( const osgGA::GUIEventAdapter ea
, osgGA::GUIActionAdapter aa
)
 {
   osgViewer::Viewer* viewer = dynamic_castosgViewer::Viewer*(aa);
   viewer - getCamera() - setFinalDrawCallback(new SnapshotCallback());
   viewer - renderingTraversals();
   viewer - getCamera() - setFinalDrawCallback(NULL);
 }




 But the callback doesn't get executed.

 I have 2 questions -

 1) what am I doing wrong
 2) Is this the preferred way to get the snapshot of the scene

 Thank you!

 Cheers,
 Aviral Goel

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





 ___
 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] perhaps a bug in osg::impostor

2014-03-05 Thread Robert Osfield
Hi?  Could you sign with a name to make it easier for other to know how to
address you :-)


On 4 March 2014 12:17, ttaw wattha...@qq.com wrote:

 hello, everyone.
 I am an osg learner in China.Recently, when I read the source code of
 osg::Impostor class, something about multi-threading confused me a lot.That
 is, in the  case of CULL_VISITOR of osg::Impostor::traverse,  no mutex is
 used to protect the function createImpostorSprite which changes the sprite
 list. Doesn't it result in a potential crash when multi-cameras are active
 and CullThreadPerCameraDrawThreadPerContext model is used?
 Any discussion is welcome.Thanks.


Internally osgSim::Impostor uses a buffer with one entry per cull visitor
so that each cull thread doesn't overlap and contend on the same data.

Robert.
___
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-05 Thread Sebastian Messerschmidt

Hi Stephan,

Thank you for you insights.
If you don't mind I would message you if I have further questions. 
Simply tell me when I start to annoy you.


Cheers
Sebastian

Hi Sebastian,

Am 05.03.2014 um 08:42 schrieb Sebastian Messerschmidt 
sebastian.messerschm...@gmx.de:


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?

You are bound to ES1 OR ES2. It depends on the context you create. And you’ll 
have to setup cmake accordingly.


2. What about external dependencies, are there all available resource to get my 
favourites like curl, tif, freetype going?

It’s hard to find the dependencies, I have some precompiled libs for curl and 
freetype. The hard part is to compile them for both the devices and the 
simulator.


3. How are plugins handled? Is there some delay load mechanism, or do they have 
to be compiled statically into the application?

iOS require static linking.


4. Last of all: How well does it work? Is the setup/building/deploy working 
smoothly?

If you master the hurdle of setup and compilation of osg and its dependencies 
its working w/o problems. The linking times are relatively high because of the 
static linking requirements.

One major annoyance is cmake’s inability to compile socalled universal libs. 
These libs contain code for the simulator and the devices (arm6, arm7, arm64). 
I can open source my build-scripts which creates 2 cmake-projects in different 
folders, compile osg and afterwards create universal libs. If there’s any 
interest I can setup a git repository.

Here’s an example of a working ios-app, which may guide as a blueprint:

https://github.com/Present3D/present3d-control (it contains also freetype + 
curl 3rdparty-libs)

cheers,

Stephan
___
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] Wireframe rendering on Android

2014-03-05 Thread Dever
Hi guys,

I am now working on a project using OSG in Android App development. Everything 
runs very well until now I need render 3D models in wireframe.

Since the OSG is built from source for OpenGL ES 1.x, and it is known that 
OpenGL ES does NOT  support wireframe rendering using glPolygonMode , I wonder 
if there is any other solution that can enable wireframe rendering for my 
legacy models. Any ideas are appreciated!

Thank you!

Cheers,
Dever

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





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


Re: [osg-users] Wireframe rendering on Android

2014-03-05 Thread Sebastian Messerschmidt

Hi Dever,

In theory you can use barycentric coordinates from you geometry:

http://codeflow.org/entries/2012/aug/02/easy-wireframe-display-with-barycentric-coordinates/

In order to get them you will have to write a visitor which generates 
them from your geometry or use a geometry shader to do so.
The first option won't work very well with indexed geometry and I don't 
know if geometry shaders are supported on OpenGL ES


cheers
Sebastian

Hi guys,

I am now working on a project using OSG in Android App development. Everything 
runs very well until now I need render 3D models in wireframe.

Since the OSG is built from source for OpenGL ES 1.x, and it is known that 
OpenGL ES does NOT  support wireframe rendering using glPolygonMode , I wonder 
if there is any other solution that can enable wireframe rendering for my 
legacy models. Any ideas are appreciated!

Thank you!

Cheers,
Dever

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





___
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] [OsgQT] How to use this

2014-03-05 Thread 马国财
Hi, I got a file maybe helpful to you. There's a .h file that defines an class 
of an osgView. In your project, there should be a ui, and add the code bottom.
#include Viewer.h
...
ViewerWidget *osgview;
 osgview = new ViewerWidget;
ui.horizontalLayout-addWidget(osgview);


The .h file:

#ifndef _SATLITEVIEWER_H_
#define _SATLITEVIEWER_H_
#include osg/Node
#include QtCore/QTimer
#include QtGui/QApplication
#include QtGui/QGridLayout
#include osgViewer/CompositeViewer
#include osgViewer/ViewerEventHandlers
#include osgGA/TrackballManipulator
#include osgDB/ReadFile
#include osgQt/GraphicsWindowQt
#include iostream

class ViewerWidget : public QWidget, public osgViewer::CompositeViewer
{
public:
ViewerWidget(osgViewer::ViewerBase::ThreadingModel 
threadingModel=osgViewer::CompositeViewer::SingleThreaded)
{
setThreadingModel(threadingModel);
osg::Group *root = new osg::Group;
osg::Node *satNode = osgDB::readNodeFile(cow.osg);
root-addChild(satNode);

QWidget* widget1 = addViewWidget( createCamera(0,0,100,100), 
root );
/*
QWidget* widget2 = addViewWidget( createCamera(0,0,100,100), 
osgDB::readNodeFile(glider.osg) );
QWidget* widget3 = addViewWidget( createCamera(0,0,100,100), 
osgDB::readNodeFile(axes.osg) );
QWidget* widget4 = addViewWidget( createCamera(0,0,100,100), 
osgDB::readNodeFile(fountain.osg) );
QWidget* popupWidget = addViewWidget( 
createCamera(900,100,320,240,Popup window,true),
osgDB::readNodeFile(dumptruck.osg) );
popupWidget-show();
*/
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::Group* group )
{
StartNetwork();
osgViewer::Viewer* viewer = new osgViewer::Viewer;
viewer-setCamera( camera );
addView( viewer );
viewer-setSceneData( group );
viewer-addEventHandler( new osgViewer::StatsHandler );
viewer-setCameraManipulator( new osgGA::TrackballManipulator );

osgQt::GraphicsWindowQt* gw = 
dynamic_castosgQt::GraphicsWindowQt*( camera-getGraphicsContext() );
return gw ? gw-getGraphWidget() : NULL;
}
osg::Camera* createCamera( int x, int y, int w, int h, const 
std::string name=, bool windowDecoration=false )
{
osg::DisplaySettings* ds = 
osg::DisplaySettings::instance().get();
osg::ref_ptrosg::GraphicsContext::Traits traits = new 
osg::GraphicsContext::Traits;
traits-windowName = name;
traits-windowDecoration = windowDecoration;
traits-x = x;
traits-y = y;
traits-width = w;
traits-height = h;
traits-doubleBuffer = true;
traits-alpha = ds-getMinimumNumAlphaBits();
traits-stencil = ds-getMinimumNumStencilBits();
traits-sampleBuffers = ds-getMultiSamples();
traits-samples = ds-getNumMultiSamples();

osg::ref_ptrosg::Camera camera = new osg::Camera;
camera-setGraphicsContext( new 
osgQt::GraphicsWindowQt(traits.get()) );

camera-setClearColor( osg::Vec4(0.2, 0.2, 0.6, 1.0) );
camera-setViewport( new osg::Viewport(0, 0, traits-width, 
traits-height) );
camera-setProjectionMatrixAsPerspective(
30.0f, 
static_castdouble(traits-width)/static_castdouble(traits-height), 1.0f, 
1.0f );
return camera.release();
}

virtual void paintEvent( QPaintEvent* event )
{ frame(); }

protected:

QTimer _timer;
};
#endif

At 2014-03-05 17:07:15,TORRALVO Mickaël torralvo.mick...@gmail.com wrote:
Hi guys,

 I'm currently trying to integrate OSG in a QT environnement. I'm working with 
 QT 4.8 32bit and OSG 3.2.1 32 bit. When I create a project and configure it, 
 all is ok. My problem is that i don't know how to use the osgQt package. I 
 really need help to do this, how to use the package osgQt to add an osgViewer 
 into my qt window.

Thank you!

Cheers,
TORRALVO

Ps : Sorry for my English I'm a french student and my english should be bad.

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





___
osg-users mailing list
osg-users@lists.openscenegraph.org

Re: [osg-users] OT: Windows GDI/GDI++ Alternative

2014-03-05 Thread Wang Rui
Hi Gordon,

You may have a look at my latest submission to osgRecipes:
https://github.com/xarray/osgRecipes/tree/master/integrations/osgagg

I've jusst updated my work on integrating OSG and AGG (Anti-Grain Geometry)
after several silent months working for clients and my first baby. It
provides almost all graphics interfaces I think useful. Hope it will be of
help to you, too. :-)

Will be back to regular OSG developments soon.

Cheers,

Wang Rui



2014-03-05 12:34 GMT+08:00 Gordon Tomlinson gor...@gordon-tomlinson.com:

 Hi Folks



 This question is a little of topic but  thought this group might be a good
 group to ask, I have a windows application ( that has an OSG component)
 that it looks like I have to port to Linux (Redhat), this application makes
 a lot of use of the  Windows GDI/GDI++ library (Windows graphics device
 interface) and my current Linux knowledge is 9 years stale



 Can anyone recommend a good Linux alternative to the Windows GDI/GDI++
 that offers comparable functionality





 Thanks





 Gordon






 _

 *Gordon Tomlinson *Self defence is not a function of learning tricks but
 is a function of how quickly and  intensely one can arouse one's instinct
 for survival
 -*Master Tambo Tetsura*



 ___
 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] bug stl pugin?

2014-03-05 Thread Ulrich Hertlein

Hi Anneke,

Quoting Anneke Sicherer-Roetman letter...@hotmail.com:
I just installed version 3.2.0. Now, when reading an .stl file with  
the pretaining plugin, I get vector subscript out of range in the  
readNode function. I temporarily reverted to 3.0.1 to bve able to  
continue my work, but what can I do about this??


Could you post a file that exhibits this behaviour?

Cheers,
/ulrich


pgp4F0ES6O3cU.pgp
Description: PGP Digital Signature
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] osg::Sequence and reversing direction

2014-03-05 Thread Sebastian Messerschmidt

Hi,

After searching the forum and mailing list someone advised to use the 
setDuration with negative speed to revert the animation.
Unfortunately this doesn't work for me. Anyone that knows osg::Sequence 
a bit better than me, who could give me an advise how to play a sequence 
reverted.


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


Re: [osg-users] [build] ld: symbol(s) not found for architecture x86_64

2014-03-05 Thread Ulrich Hertlein

Hi Michael,

Quoting Michael Zurek michael.zu...@gmail.com:
I downloaded the stable release 3.2.0 which I am able to build  
(without libc++) but whenever I compile an application I'm getting  
ld: symbol(s) not found for architecture x86_64. I don't use xcode  
though. I'm using clang++ from Apple and libc++ that comes with the  
developer tools but I'm using Code::Blocks for my programming. I  
have compiled OSG with the dependencies package that can be  
downloaded from the website. Somewhere on the forum I found a thread  
talking about this error and libc++. So I checked out the svn last  
night ...

michaels-mbp:build michael$ make
Scanning dependencies of target OpenThreads
[  0%] Building CXX object  
src/OpenThreads/pthreads/CMakeFiles/OpenThreads.dir/PThread.cpp.o

g++-4.8: error: unrecognized command line option '-stdlib=libstdc++'


How did you configure cmake?
From the output it looks like it's using g++-4.8 but with clang options.

Maybe you could explain your setup again, because I'm slightly confused:
at one point you're saying that you *ARE* able to compile OSG (without  
libc++, with what compiler), but you're getting errors linking an  
application (which C++ lib, which compiler?); then you're saying  
you're only using clang and libc++?


Please rephrase ;-)

Cheers,
/ulrich


pgpADuZYtakmj.pgp
Description: PGP Digital Signature
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] osg::Sequence and reversing direction

2014-03-05 Thread Ulrich Hertlein

Hi Sebastian,

did you try setBegin()/setEnd() with the last and the first child  
respectively?

(But I'm not claiming to know Sequence any better.)

/ulrich



pgpdaG3yglw1Z.pgp
Description: PGP Digital Signature
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] osg::Sequence and reversing direction

2014-03-05 Thread Sebastian Messerschmidt

Hello Ulrich,

No I didn't try. But I guess than won't really fit my needs.
I use the sequence to animate tracks of a tank and therefore need to 
change the animation direction and speed dynamically in every frame.

I'll give it a try, but it doesn't seem very natural.
Looking at the code it seems, this pattern is not really supported. 
While the _step being handled for postive and negative values, it seems 
it never gets set to negative values except for the SWING case.



cheers
Sebastian

Hi Sebastian,

did you try setBegin()/setEnd() with the last and the first child 
respectively?

(But I'm not claiming to know Sequence any better.)

/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] OT: Windows GDI/GDI++ Alternative

2014-03-05 Thread Chris Hanson
I would second the motion on Cairo, via osgCairo by Jeremy Moles. I've been
using it in some apps recently with lovely results.


On Wed, Mar 5, 2014 at 6:40 AM, Wang Rui wangra...@gmail.com wrote:

 Hi Gordon,

 You may have a look at my latest submission to osgRecipes:
 https://github.com/xarray/osgRecipes/tree/master/integrations/osgagg

 I've jusst updated my work on integrating OSG and AGG (Anti-Grain
 Geometry) after several silent months working for clients and my first
 baby. It provides almost all graphics interfaces I think useful. Hope it
 will be of help to you, too. :-)

 Will be back to regular OSG developments soon.

 Cheers,

 Wang Rui



 2014-03-05 12:34 GMT+08:00 Gordon Tomlinson gor...@gordon-tomlinson.com:

 Hi Folks



 This question is a little of topic but  thought this group might be a
 good group to ask, I have a windows application ( that has an OSG
 component) that it looks like I have to port to Linux (Redhat), this
 application makes a lot of use of the  Windows GDI/GDI++ library (Windows
 graphics device interface) and my current Linux knowledge is 9 years stale



 Can anyone recommend a good Linux alternative to the Windows GDI/GDI++
 that offers comparable functionality





 Thanks





 Gordon






 _

 *Gordon Tomlinson *Self defence is not a function of learning tricks
 but is a function of how quickly and  intensely one can arouse one's
 instinct for survival
 -*Master Tambo Tetsura*



 ___
 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




-- 
Chris 'Xenon' Hanson, omo sanza lettere. xe...@alphapixel.com
http://www.alphapixel.com/
Training * Consulting * Contracting
3D * Scene Graphs (Open Scene Graph/OSG) * OpenGL 2 * OpenGL 3 * OpenGL 4 *
GLSL * OpenGL ES 1 * OpenGL ES 2 * OpenCL
Digital Imaging * GIS * GPS * osgEarth * Terrain * Telemetry * Cryptography
* Digital Audio * LIDAR * Kinect * Embedded * Mobile * iPhone/iPad/iOS *
Android
@alphapixel https://twitter.com/alphapixel facebook.com/alphapixel (775)
623-PIXL [7495]
___
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-05 Thread Chris Hanson
We do quite a bit of iOS OSG (and osgEarth) development too, shout if you
have problems.


On Wed, Mar 5, 2014 at 3:52 AM, Sebastian Messerschmidt 
sebastian.messerschm...@gmx.de wrote:

 Hi Stephan,

 Thank you for you insights.
 If you don't mind I would message you if I have further questions. Simply
 tell me when I start to annoy you.

 Cheers
 Sebastian

  Hi Sebastian,

 Am 05.03.2014 um 08:42 schrieb Sebastian Messerschmidt 
 sebastian.messerschm...@gmx.de:

  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?

 You are bound to ES1 OR ES2. It depends on the context you create. And
 you'll have to setup cmake accordingly.

  2. What about external dependencies, are there all available resource to
 get my favourites like curl, tif, freetype going?

 It's hard to find the dependencies, I have some precompiled libs for curl
 and freetype. The hard part is to compile them for both the devices and the
 simulator.

  3. How are plugins handled? Is there some delay load mechanism, or do
 they have to be compiled statically into the application?

 iOS require static linking.

  4. Last of all: How well does it work? Is the setup/building/deploy
 working smoothly?

 If you master the hurdle of setup and compilation of osg and its
 dependencies its working w/o problems. The linking times are relatively
 high because of the static linking requirements.

 One major annoyance is cmake's inability to compile socalled universal
 libs. These libs contain code for the simulator and the devices (arm6,
 arm7, arm64). I can open source my build-scripts which creates 2
 cmake-projects in different folders, compile osg and afterwards create
 universal libs. If there's any interest I can setup a git repository.

 Here's an example of a working ios-app, which may guide as a blueprint:

 https://github.com/Present3D/present3d-control (it contains also
 freetype + curl 3rdparty-libs)

 cheers,

 Stephan
 ___
 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




-- 
Chris 'Xenon' Hanson, omo sanza lettere. xe...@alphapixel.com
http://www.alphapixel.com/
Training * Consulting * Contracting
3D * Scene Graphs (Open Scene Graph/OSG) * OpenGL 2 * OpenGL 3 * OpenGL 4 *
GLSL * OpenGL ES 1 * OpenGL ES 2 * OpenCL
Digital Imaging * GIS * GPS * osgEarth * Terrain * Telemetry * Cryptography
* Digital Audio * LIDAR * Kinect * Embedded * Mobile * iPhone/iPad/iOS *
Android
@alphapixel https://twitter.com/alphapixel facebook.com/alphapixel (775)
623-PIXL [7495]
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Does OSG support to export 3D models to 3D PDF format?

2014-03-05 Thread Chris Hanson
It is not F/OSS:
http://www.pdf3d.com/why_pdf3d_sdk.php#Licenses

The work I'm expecting to be doing in the next couple months will be F/OSS.


On Tue, Mar 4, 2014 at 8:02 PM, Bruce graysky...@hotmail.com wrote:

 Hi ,

 Is the PDF3D SDK free or open source? we would use it in education and
 research job.

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





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




-- 
Chris 'Xenon' Hanson, omo sanza lettere. xe...@alphapixel.com
http://www.alphapixel.com/
Training * Consulting * Contracting
3D * Scene Graphs (Open Scene Graph/OSG) * OpenGL 2 * OpenGL 3 * OpenGL 4 *
GLSL * OpenGL ES 1 * OpenGL ES 2 * OpenCL
Digital Imaging * GIS * GPS * osgEarth * Terrain * Telemetry * Cryptography
* Digital Audio * LIDAR * Kinect * Embedded * Mobile * iPhone/iPad/iOS *
Android
@alphapixel https://twitter.com/alphapixel facebook.com/alphapixel (775)
623-PIXL [7495]
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Does OSG support to export 3D models to 3D PDF format?

2014-03-05 Thread Tomlinson, Gordon
HI 

No PDF3D SDK is a commercial product , but I can highly recommend it and I can 
highly recommend the company and the people they are highly  responsive and 
receptive to improvements and want to help you succeed with their products

While PDF3D SDK is commercial you might want to contact them, they may be 
willing to work with you in the educational environment...  
(We also found their price/terms very competitive compared to a lot of other 
SDk's we use)



Gordon Tomlinson - TeamRV
Sustainment Manager/Chief Engineer(RemoteView)
Overwatch
An Operating Unit of Textron Systems
 
__


-Original Message-
From: osg-users-boun...@lists.openscenegraph.org 
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Bruce
Sent: Tuesday, March 04, 2014 10:03 PM
To: osg-users@lists.openscenegraph.org
Subject: Re: [osg-users] Does OSG support to export 3D models to 3D PDF format?

Hi ,

Is the PDF3D SDK free or open source? we would use it in education and research 
job.

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





___
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] osg::ref_ptr thread safety

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

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

iQEcBAEBCAAGBQJTF5BRAAoJEP8WARS52jMYaHcH/igaGEoeexD1kdO2c3KNER/N
VCeLvswEvoWqTV6Q9legodZgGUgeAXClx8p+lZcM8uizTLy5LknDkRn87It58vF8
cJfZLcgbwuw/8BA3qF/iURn8taAgqBYM97t1tWPuLnoshnW1WU0C6G5Q8uJuWRUR
TfqVxCvcllXLOZPefOeS3cLI4YUgxIRywUGNTW5A+4/vNa2kJAvVr1ZDnuT8/fjg
vpYiV761iR+TM/bKPTS1+wsC723iYFSYl/7WL1Sgy/NevB/BUz9H75wtkyCXib3J
APlweXbYZF2RH20Mu/3hO59SLrOZ8wefEOtc2fXjNn2URAfzVmr9mPRtphJTCUE=
=YK8M
-END PGP SIGNATURE-
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] osg_Color

2014-03-05 Thread Conan Doyle
Hi,

I am trying to mod the shaders in osgsimplegl3 so that the color is passed 
through using osg_Color... My code is as follows:


Code:


// VERTEX SHADER
#version 140
uniform mat4 osg_ModelViewProjectionMatrix;
in vec4 osg_Color;
in vec4 osg_Vertex; 
out vec4 color;
void main() 
{ 
color = osg_Color;
gl_Position = osg_ModelViewProjectionMatrix * osg_Vertex;
} 

// FRAGMENT SHADER
#version 140
in vec4 color;
out vec4 fragData;
void main()
{ 
fragData = color;
} 




All I see is a black screen though.  What is the proper use of osg_Color?

... 

Thank you!

Cheers,
Conan

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





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


Re: [osg-users] osg-users Digest, Vol 81, Issue 5

2014-03-05 Thread ttaw
--

 On 4 March 2014 12:17, ttaw wattha...@qq.com wrote:
 
  hello, everyone.
 I am an osg learner in China.Recently, when I read the source code of
  osg::Impostor class, something about multi-threading confused me a lot.That
 is, in the  case of CULL_VISITOR of osg::Impostor::traverse,  no mutex is
 used to protect the function createImpostorSprite which changes the sprite
 list. Doesn't it result in a potential crash when multi-cameras are active
 and CullThreadPerCameraDrawThreadPerContext model is used?
 Any discussion is welcome.Thanks.


Internally osgSim::Impostor uses a buffer with one entry per cull visitor
so that each cull thread doesn't overlap and contend on the same data.

 Do you mean _impostorSpriteListBuffer? As I know, it's a buffer per GC rather 
than one per cull visitor. As there may be multi-cameras linked to a single GC, 
contention may happen. I found no buffer  with one entry per cull visitor in 
Impostor except for that. Could you show me the variable you mentioned like 
this: Class::variablename?Thanks a lot.
  
  --
  Failure is the mother of success.
 Wu Zhicheng___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Must I call setDataVariance(DYNAMIC) to a group node?

2014-03-05 Thread ttaw
There's a saying on internet that setDataVariance(DYNAMIC) must be called to a 
group node which is to be changed while updating. But in my opinion, it's 
unnecessary because the child drawable pointers and stateset pointers are saved 
in ReaderLeaf as a ref_ptr if OSGUTIL_RENDERBACKEND_USE_REF_PTR is defined. In 
fact, this macro is defined in the begining of the file RenderLeaf.Even if 
one or more child nodes were removed while updating, the drawables wouldn't be 
deleted and no crash would happen. We must set a node dynamic only when its 
stateset is to be changed or its drawables are to be changed. But I'm not sure 
of this and want to know if I'm right.Could anybody tell me the truth?Thanks.
  --
  Failure is the mother of success.
 Wu Zhicheng___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org