Re: [osg-users] CompositeViewer multiple windows, same scene problem

2012-10-09 Thread Wang Rui
Hi Alvaro,

I just did a quick test under Windows 7, with OSG 3.0.1 and Qt 4.8.2.
Two views (created from GraphicsWindowQt) of a CompositeViewer in two
windows can render the same node (lz.osg for my case) smoothly. Could
you please provide more information about your implementation?

If you are going to render textures of view 1 directly in view 2,
maybe you have to enable OpenGL's shared context feature. You may
specify camera 1's graphics context to Traits::sharedContext in such
case.

Wang Rui


2012/10/4 Alvaro Segura aseg...@vicomtech.org:
 Hi,

 We are having trouble using a CompositeViewer with 2 views in 2 windows, 
 showing the same scene (same Node*).

 The first view (in addView order) is rendered correctly, but the second view 
 is badly rendered with some missing or garbled geometries.

 If only one view is added, its rendering is fine. If instead of 2 windows, we 
 use only one window with two contiguous viewports, rendering is fine.

 Each view has its own Camera and GraphicsContext. We use GraphicsWindowQt 
 with or without the shareWidget argument. Using setUpViewInWindow() instead 
 does the same.

 Seems that the first render is misusing the GL context or something so that 
 the other has trouble. Threading is set to SingleThreaded to avoid potential 
 sharing problems (but the TaskManager is showing many running threads (?)).

 The problematic models are FBX exported from 3ds Max, BTW.

 Is there any setting that has to be set in OSG/CompositeViewer to tell it 
 that the scene is shared? Does anyone have an idea what can be wrong in such 
 a setup?

 Thank you!

 Alvaro

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





 ___
 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] kd tree ray tracing performance

2012-10-09 Thread Lionel Lagarde
O_o

The tables look messy.

reposting

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





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


Re: [osg-users] Building on Android

2012-10-09 Thread Jan Ciger
On Tue, Oct 9, 2012 at 7:01 AM, Eduardo Poyart poy...@gmail.com wrote:

 The error happens with the default order. I tried changing it, with no
 success.

 In case you want to look into this further, you may want to refer to
 my version that successfully builds with the latest SDK and NDK and
 with dynamic runtime: https://github.com/Eduardop/osg/tree/osg-android

 Eduardo


That's odd - I have managed to build OSG with the r8b release of NDK, just
by making sure that gnustl_static is used. I have seen similar problem
before, typically either updating the NDK or adding explicit
-lgnustl_static to the linker flags fixed it.

Unfortunately Google's NDK is a rather non-deterministic fragile mess that
often breaks in random ways. Add an absolute lack of any documentation for
it and it is really a pleasure to use it :(

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


Re: [osg-users] Difference between osgFX and osgPPU

2012-10-09 Thread Sergey Polischuk
Hi They are completely different. osgFX have support for multipass rendering of geometry, osgPPU purpuse is to do postprocessing on camera output. Cheers.08.10.2012, 22:01, "Peterakos" hay...@gmail.com:Hello.Is there any difference between these 2 or are they different implementations for the same purpose ?For someone who wants to support multi passes (using shaders) on model nodes which is better ?thnx.,___osg-users mailing listosg-users@lists.openscenegraph.orghttp://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] Memory issues when using uniform shader variables on Intel HD graphics

2012-10-09 Thread Sergey Polischuk
Hi

What exactly makes memory usage increase? What if you attach shader without 
uniform, or without adding uniform to stateset? Try to add #version 110 
directive as first line of your shaders, does it make any difference?
I think you'd better send bugreport to intel, best if you can reproduce this 
with pure opengl.

Cheers.

09.10.2012, 09:28, Clemens Spencer clemens-m...@gmx.de:
 Hi,

 I'm trying to use shaders on an Intel HD 3000 graphics chip (Windows7 x64, 
 latest graphics driver).

 As soon as I pass a uniform variable to the shader (regardless of the type), 
 the memory of my process increases by about 400MB. Other than that, the 
 shader works fine.
 The size of the object the shader is attached to or the complexity of the 
 shader do not make a difference. Every additional shader (containing at least 
 one uniform variable) I use, increases the memory usage by another 400MB.

 The problem does not occur on another machine with some NVidia graphics card.

 Has anyone encountered a similar problem or does someone have an idea what 
 could cause a problem like this?

 Code:

 osg::Program *program = new osg::Program;
 osg::Shader *frag = new osg::Shader( osg::Shader::FRAGMENT, fragSource.str() 
 );
 osg::Shader *vert = new osg::Shader( osg::Shader::VERTEX, vertSource.str() );
 program-addShader( frag );
 program-addShader( vert );
 // add shader to stateSet
 sset-setAttributeAndModes( program, osg::StateAttribute::ON );
 // add uniform variable
 osg::Uniform *var = new osg::Uniform(MATERIAL_COLOR, 
 osg::Vec4(1.0f,1.0f,0.0f,1.0f));
 sset-addUniform(var);

 Code:

 // Vertex Shader

 void main()
 {
 gl_Position = ftransform();
 gl_ClipVertex = gl_ModelViewMatrix * gl_Vertex;
 }

 // Fragment Shader

 uniform vec4 MATERIAL_COLOR;

 void main()
 {
 gl_FragColor = MATERIAL_COLOR;
 }

 By the way, I know I'm not using reference pointers :? but this shouldn't be 
 a problem in this little example.

 ...

 Thank you!

 Cheers,
 Clemens[/code]

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

 ___
 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] Cyrillic (russian) in Qt inside OSG

2012-10-09 Thread Max Sergeev
Hello!

Got another question about Qt and OSG :)

There is project where Qt controls are used inside OSG scene (creating camera 
for each of them and stuff), and the next problem is that I need cyrillic 
symbols (russian language). Using wstring works using OSG HUD, but in Qt the 
symbols are shown wrong.
 
I've kinda no idea on how to work it out, so would appreciate if you point me 
in the right direction.

Thank you in advance!

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





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


Re: [osg-users] multipass transparency

2012-10-09 Thread Sergey Polischuk
Hi

If you need to blend all visible layers - try to change order of passes, and 
set colormask to all false's (so first will be only color, second only depth). 
If you dont need depth from transparent geometry - you can get by with only 
first pass.
If you need only closest single layer - you draw first pass depth only (with 
colormask set to false's), second pass with depth test set to lequal.

Cheers.

09.10.2012, 09:33, Tina Guo guoyiting1...@gmail.com:
 Hi,

 In open inventor, there is a transparency mode called: delayed blend

 Transparent objects are rendered using multiplicative alpha blending, in a 
 second rendering pass with depth buffer updates disabled. And I want to get 
 the same effect.

 here's what I am trying to do

 transparency-setRenderingHint(osg::StateSet::TRANSPARENT_BIN);
 transparency-setAttributeAndModes(new osg::BlendFunc(GL_SRC_ALPHA 
 ,GL_ONE_MINUS_SRC_ALPHA), osg::StateAttribute::ON);
 _geom_solid-setStateSet(transparency);

 class TransparencyTechnique : public osgFX::Technique
 {
 public:
 TransparencyTechnique() : osgFX::Technique() {}
 virtual bool validate( osg::State ss ) const { return true; }

 protected:
 virtual void define_passes()
 {
 osg::ref_ptrosg::StateSet ss = new osg::StateSet;
 ss-setAttributeAndModes( new osg::ColorMask(true, true, true, true) 
 );
 addPass( ss.get() );

 ss = new osg::StateSet;
 osg::Depth* depth = new osg::Depth;
 depth-setWriteMask( false );
 ss-setAttributeAndModes( depth, osg::StateAttribute::ON );
 addPass( ss.get() );
 }
 };

 The result is not right. how should define_passes() be defined?

 ...

 Thank you!

 Cheers,
 Tina

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

 ___
 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] Cyrillic (russian) in Qt inside OSG

2012-10-09 Thread michael kapelko
Have you tried const char* (string) and UTF-8 instead of wide ones?
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Design consideration using OSG

2012-10-09 Thread Robert Osfield
Hi Faizol,

On 1 October 2012 13:16, Faizol Abd.Halim faizol@gmail.com wrote:
 From a design perspective, what should I take into considerations to achieve 
 high frame rates and interactivity needed by CAD/CAM solution using OSG?

Getting models into your application will likely be one of the biggest
challenges.  There is a good chance the models will contain parametric
data, if so you'll need to consider how to tessellate the parametric
surfaces into triangle meshes so that they can be rendered by the
graphics hardware.  You can tessellate data on the CPU and this in the
past was traditional way to do it, but these days the GPU should be
able to take on some of this work.  This area is a big topic.

As for performance optimization, the OSG has lots of support for
various features for getting the best performance out of scene graph,
but in the end it's how you construct your scene graph that will
determine how well it will perform.  Performance optimization is
another huge topic that I can't sumerise in book let alone a single
email so I would suggest breaking the task down it smaller elements
that focus on your specific needs and ask specific questions here in
the community and we'll have a better chance of answering them.

So take a step back, tell us what type of data you have to work with,
what number of objects is likely to be, how complex in geometry are
these objects likely to be, do you have meshes or parametric surfaces
etc.

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


Re: [osg-users] Difficulty Positioning Camera Manipulator in Geocentric Database

2012-10-09 Thread Robert Osfield
Hi Rob,

I would suggest writing your own custom camera manipulator which
address the specific usage model that you have in mind rather than
trying to reuse general purpose camera manipulators that don't know
about the specific needs of your application.

Robert.

On 1 October 2012 15:03, Rob Dougan rdou...@tti-ecm.com wrote:
 Hi,

 ... Problem is the camera manipulator rotates but doesn't translate.

 The desired gaming area consists of a geocentric terrain with a sky dome.
 Using the osg::viewer and trackball camera manipulator (default view) i can 
 move around the scene, go underneath the dome, look at the terrain etc.

 fine. now  move the action under the dome.

 I set the intial position of the camera as the center of the terrain at an 
 altitude within the dome using a view matrix.
 I get the view matrix from the camera and compute the eye, center and up 
 vectors and use these to set the home position of the camera manipulator.

 ...
 osg::Vec3 eye,center,up;
 _viewer-getCamera()-getViewMatrixAsLookAt(eye,center,up);
 osg::ref_ptrosgGA::TrackballManipulator trackBall = new 
 osgGA::TrackballManipulator;
 _viewer-setCameraManipulator( trackBall );
 viewer-getCameraManipulator()-setHomePosition(eye,center,up,false);
 ...
 _viewer-setSceneData(root)
 ...

 The starting scene viewpoint is displayed correctly and i can rotate the 
 camera to view everything under the dome,

 BUT the camera is FIXED in position and i can't move around. ( same behaviour 
 with Flight Manipulator).

 I was hoping to be able to navigate with the default camera manipulator 
 initially and then add a callback to keep the camera in the gaming area 
 (coordinate frame callback?).

 Thank you!

 Cheers,
 Rob

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





 ___
 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] Render passes and stereo handling

2012-10-09 Thread Robert Osfield
Hi Gaurav,

The DrawCallback gets passed the RenderInfo which has a
getCurrentCamera() that you might be able to use.

Robert.

On 2 October 2012 14:07, Gaurav Chaurasia gaurav.chaura...@inria.fr wrote:
 Hi,
 Is there a way to know which eye (left/right) is currently being drawn inside 
 osg::Camera::DrawCallback. There is the UserData field in RenderInfo, but I 
 don't think I can use it for my purpose without having to patch 
 osgUtil::SceneView.cpp - the patch being that I update UserData before 
 drawing each eye.

 Actually, I am doing render passes with render targets for a stereo 
 application. So I need to switch shader inputs like textures,uniforms for 
 each eye just before the draw call. I figured I can use the PreDrawCallback 
 for the purpose because it is called inside RenderStage::draw just before the 
 actual rendering happens. If someone has a cleaner solution, I would be most 
 grateful.

 Thank you!

 Cheers,
 Gaurav

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





 ___
 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] Cyrillic (russian) in Qt inside OSG

2012-10-09 Thread Maxim Gammer
hi.
example -

bool BaseTextObject::SetText(std::string Value, bool UTF_Encoding)
{
if (UTF_Encoding == true)
{
osgText::String textstr;
textstr.set(Value, osgText::String::ENCODING_UTF8);
text-setText(textstr);
}
else
{
text-setText(Value);
}
return true;
}

2012/10/9 michael kapelko korn...@gmail.com

 Have you tried const char* (string) and UTF-8 instead of wide ones?
 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org




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


Re: [osg-users] Help:How many frames at most can be achieved within OSG framework?

2012-10-09 Thread Torben Dannhauer
Hi,

it depends entirely on the scene, it can be thousands of frames or just 1 frame 
per second.
Generally OSG scales very well with large scenes, but finally it depends on 
your scene and how effective are you using the available hardware.

Cheers,
Torben

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





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


[osg-users] Normalmap with osgPPU

2012-10-09 Thread Peterakos
Hello.

Is it possible to retrieve the normal map using osgPPU ?
I have used the following shaders and a blue screen appears.

Vert
---
varying vec3 normal;
void main(void){
gl_Position = ftransform();
normal =  gl_NormalMatrix * gl_Normal;
}

Frag
---
varying vec3 normal;
void main(){
gl_FragColor = vec4(normal,1);
}


I guess the blue color means that the normal.z is always 1.


In some examples in osgPPU solution, i have noticed that vertex shaders are
used.
Which vertices are passed through these shaders ? All of the scene's
vertices or just the ones that are visible ?

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


Re: [osg-users] Texture don't display on Android With GLES1 ?

2012-10-09 Thread Jan Ciger
On Fri, Sep 28, 2012 at 9:37 AM, Mu Xing szzx...@gmail.com wrote:

 Hi,

 I build OSG3.0.0 on android with OpenGLES1.
 I red that Environmental mapping is not working on Android.
 So I convert model to earth.ive with embedded textures.(the convert tool
 is VPB,on windows the earth.ive texture display no problem)

  On android ,these are the things what I did

 1) I added -losgdb_jpeg -ljpeg -lpng -ltiff under LOCAL_LDFLAGS in
 Android.mk file
 2) I added USE_OSGPLUGIN(jpeg) to OsgMainApp.hpp file.
 3) The earth.ive is in Image folder only. The Image directory is in my
 mobile SD card (/mnt/sdcard/OSG/images).
 4) The libosgdb_jpeg.a libjpeg.a libpng.a libtiff.a file is located in
 both /home/xing/android/obj/local/armeabi and
 /home/xing/android/obj/local/armeabi-v7a directories.

 Why the texture is not displaying.


I have this problem on an older HTC Desire HD phone which has Adreno 205
GPU. Make sure you don't use texture compression when converting your model
to .ive. At least that was the issue for me. The same model displays fine
on a Tegra 3 tablet, but on the phone only without texture compression.

Different hardware has different capabilities and what we take as granted
on desktop is often far from granted on a mobile GPU :(

Regards,

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


Re: [osg-users] Normalmap with osgPPU

2012-10-09 Thread Sergey Polischuk
Hi osgppu drawing screen aligned quad with each pass, using texture data you've provided as input. It does not have access to your scene in any way except of mentioned textures.vertex shader process vertices of this quadnormals you are getting is normals of this quad (so they are all the same, and facing to camera with value vec3(0,0,1)), and not those of your scene. Cheers.09.10.2012, 16:46, "Peterakos" hay...@gmail.com:Hello.Is it possible to retrieve the normal map using osgPPU ?I have used the following shaders and a blue screen appears.Vert---varying vec3 normal;void main(void){gl_Position = ftransform();normal =  gl_NormalMatrix * gl_Normal;}Frag---varying vec3 normal;void main(){gl_FragColor = vec4(normal,1);}I guess the blue color means that the normal.z is always 1.In some examples in osgPPU solution, i have noticed that vertex shaders are used.Which vertices are passed through these shaders ? All of the scene's vertices or just the ones that are visible ?Thank you.,___osg-users mailing listosg-users@lists.openscenegraph.orghttp://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] Cyrillic (russian) in Qt inside OSG

2012-10-09 Thread michael kapelko
Can you provide some simple test case of what you want (which anyone
can 'make')? It's hard to conclude anything from what you've posted.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Cyrillic (russian) in Qt inside OSG

2012-10-09 Thread michael kapelko
E.g., I've had problems with Qt (not OSG) with UTF-8 russian text. I
recall there were some problems with QTextCodec as well. So more
context is required. And test case would be the best.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Cyrillic (russian) in Qt inside OSG

2012-10-09 Thread Maxim Gammer
I do not know very well English. I can help in Russian language (my email -
maxgam...@gmail.com)

2012/10/9 michael kapelko korn...@gmail.com

 Can you provide some simple test case of what you want (which anyone
 can 'make')? It's hard to conclude anything from what you've posted.
 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org




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


Re: [osg-users] X11 Trouble, Building OSG with OpenGL ES 2.0

2012-10-09 Thread Chris Hanson
On Mon, Oct 8, 2012 at 10:49 AM, Marius Noller 
fixed-term.marius.nol...@de.bosch.com wrote:

 XScreenOfDisplay


  This is from XLib. Are you linking with XLib? I did OSG / OGLES2
development on the iMX51 platform. We were running without X, so we had to
take other difficult measures. Do you have X11 available in your
environment? I'm going to guess not...


-- 
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 • Telemetry • Cryptography • Digital Audio •
LIDAR • Kinect • Embedded • Mobile • iPhone/iPad/iOS • Android
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Build osgEarth for android?

2012-10-09 Thread Chris Hanson
  We are working on this right now. You may want to just wait a few weeks,
as there will likely be a number of changes to assist the build process
shortly.

-- 
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 • Telemetry • Cryptography • Digital Audio •
LIDAR • Kinect • Embedded • Mobile • iPhone/iPad/iOS • Android
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Difficulty Positioning Camera Manipulator in Geocentric Database

2012-10-09 Thread Shayne Tueller
Hi Rob,

In my app, I have an option to navigate on a geocentric database using the 
standard Flight Manipulator. Below is the code snippet to do this...

Before you enter the render loop (i.e. viewer.run()), do the following to 
configure and set the initial position of your ownship using lat, lon, altitude 
with a heading, pitch, roll of 0.0...

view-setCameraManipulator(new osgGA::FlightManipulator());
osg::Matrixd position;
earth-computeLocalToWorldTransformFromLatLongHeight(
osg::DegreesToRadians(lat), osg::DegreesToRadians(lon), 
altitude, position);
osg::Matrixd rotation2YUp;
rotation2YUp.makeRotate(M_PI_2, osg::Vec3d(1.0, 0.0, 0.0));
position = rotation2YUp * position;
view-getCameraManipulator()-setByMatrix(position);

After you do this, the Flight Manipulator will move your ownship along like 
usual. 

If you need to extract positional info from the manipulator, you can get it 
from the ownship update callback. For example, in your callback, you can 
extract out the ownship position in geocentric coordinates from the flight 
manipulator by doing the following...

osg::Vec3d geocentric_eye = 
view-getCamera()-getInverseViewMatrix().getTrans();

Hope this helps...
Shayne

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





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


Re: [osg-users] [build] pdb install

2012-10-09 Thread Mathieu MARACHE
We have some simple modifications at work, I can provide them on
thursday if you still need them ?
--
Mathieu


On 8 October 2012 09:37, Gianni Ambrosio ga...@vi-grade.com wrote:
 Hi All,
 is there a way to install pdb files in the same directory of the dlls? if 
 not, could you please help me in finding the right cmake file to modify?

 Regards,
 Gianni

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





 ___
 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] multipass transparency

2012-10-09 Thread Tina Guo
Hi,

Thanks for reply. Now the code is like

virtual void define_passes()
{
osg::ref_ptrosg::StateSet ss = new osg::StateSet;
ss-setAttributeAndModes( new osg::ColorMask(true, true, true, true) );
osg::Depth* depth = new osg::Depth;
depth-setWriteMask( false );
ss-setAttributeAndModes( depth, osg::StateAttribute::ON );
addPass( ss.get() );


ss = new osg::StateSet;
ss-setAttributeAndModes( new osg::ColorMask(false, false, 
false, false) );
depth-setWriteMask( true );
ss-setAttributeAndModes( depth, osg::StateAttribute::ON );
addPass( ss.get() );
}

However, it could not handle sel-intersection(the picture in the attached doc)

Using: 
transparency-setRenderingHint(osg::StateSet::TRANSPARENT_BIN);
transparency-setAttributeAndModes(new osg::BlendFunc(GL_SRC_ALPHA 
,GL_ONE_MINUS_SRC_ALPHA), osg::StateAttribute:ShockedN);
osg::Depth* depth = new osg::Depth;
depth-setWriteMask( false );
transparency-setAttributeAndModes( depth, osg::StateAttribute::ON );
_geom_solid-setStateSet(transparency); 

instead of 

transparency-setRenderingHint(osg::StateSet::TRANSPARENT_BIN);
transparency-setAttributeAndModes(new osg::BlendFunc(GL_SRC_ALPHA 
,GL_ONE_MINUS_SRC_ALPHA), osg::StateAttribute:ShockedN);
_geom_solid-setStateSet(transparency); 

self-intersection is correct. However, some transparent parts will disappear, 
like the wheels of the car in the picture in the doc, the color seems to be 
blended after the inner parts. 

... 

Thank you!

Cheers,
Tina[/img]

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




Attachments: 
http://forum.openscenegraph.org//files/test_152.pdf


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


[osg-users] recipe for target `Android-OpenSceneGraph' failed

2012-10-09 Thread Ariel Hutterer
Hi All:
I try to build osg to Android but i have a error.
Some one can help me Please!!!
Thanks
Ariel

D:\projects\OpenSceneGraph-3.1.3\OpenSceneGraph-3.1.3make
[100%] Generating Android-OpenSceneGraph
HOST_OS=cygwin
HOST_ARCH=x86
HOST_TAG=cygwin-x86
GNUMAKE=/usr/bin/make (system path)
Cygwin-compatible GNU make detected
Android NDK: NDK installation path auto-detected:
'/cygdrive/d/NVPACK/android-ndk-r8'
Android NDK: GNU Make version 3.82.90 detected
Android NDK: Host OS was auto-detected: windows
Android NDK: Found /bin/uname.exe on Windows host
Android NDK: uname -s returned: CYGWIN_NT-6.1-WOW64
Android NDK: Cygwin detected: CYGWIN_NT-6.1-WOW64 ariel-PC
1.7.16(0.262/5/3) 2012-07-20 22:55 i686 Cygwin
Android NDK:  Host operating system detected: cygwin
Android NDK: Host CPU was auto-detected: x86
Android NDK: HOST_TAG set to windows
Android NDK: Host tools prebuilt directory:
/cygdrive/d/NVPACK/android-ndk-r8/prebuilt/windows/bin
Android NDK: Host 'echo' tool:
/cygdrive/d/NVPACK/android-ndk-r8/prebuilt/windows/bin/echo
Android NDK: Host 'awk' tool: awk
Android NDK: Host 'awk' test returned: Pass
Android NDK:  Probing for 'cygpath' program
Android NDK:  'cygpath' found as: /usr/bin/cygpath
Using cygwin substitution rules:
/cygdrive/r = R:
/cygdrive/f = F:
/cygdrive/d = D:
/cygdrive/c = C:
/cygdrive/R = R:
/cygdrive/F = F:
/cygdrive/D = D:
/cygdrive/C = C:
/usr/lib = D:/NVPACK/cygwin/lib
/usr/bin = D:/NVPACK/cygwin/bin
/ = D:/NVPACK/cygwin
Android NDK:  This NDK supports the following target architectures and ABIS:
Android NDK:arm: armeabi armeabi-v7a
Android NDK:mips: mips
Android NDK:x86: x86
Android NDK:  This NDK supports the following toolchains and target ABIs:
Android NDK:arm-linux-androideabi-4.4.3:  armeabi armeabi-v7a
Android NDK:mipsel-linux-android-4.4.3:  mips
Android NDK:x86-4.4.3:  x86
Android NDK: Found platform root directory:
/cygdrive/d/NVPACK/android-ndk-r8/platforms
Android NDK: Found supported platforms: android-4 android-3 android-14
android-8 android-9 android-5
Android NDK: PLATFORM android-4 supports: x86 arm mips
Android NDK:   ABI x86 sysroot is:
/cygdrive/d/NVPACK/android-ndk-r8/platforms/android-4/arch-x86
Android NDK:   ABI arm sysroot is:
/cygdrive/d/NVPACK/android-ndk-r8/platforms/android-4/arch-arm
Android NDK:   ABI mips sysroot is:
/cygdrive/d/NVPACK/android-ndk-r8/platforms/android-4/arch-mips
Android NDK: PLATFORM android-3 supports: x86 arm mips
Android NDK:   ABI x86 sysroot is:
/cygdrive/d/NVPACK/android-ndk-r8/platforms/android-3/arch-x86
Android NDK:   ABI arm sysroot is:
/cygdrive/d/NVPACK/android-ndk-r8/platforms/android-3/arch-arm
Android NDK:   ABI mips sysroot is:
/cygdrive/d/NVPACK/android-ndk-r8/platforms/android-3/arch-mips
Android NDK: PLATFORM android-14 supports: x86 arm mips
Android NDK:   ABI x86 sysroot is:
/cygdrive/d/NVPACK/android-ndk-r8/platforms/android-14/arch-x86
Android NDK:   ABI arm sysroot is:
/cygdrive/d/NVPACK/android-ndk-r8/platforms/android-14/arch-arm
Android NDK:   ABI mips sysroot is:
/cygdrive/d/NVPACK/android-ndk-r8/platforms/android-14/arch-mips
Android NDK: PLATFORM android-8 supports: x86 arm mips
Android NDK:   ABI x86 sysroot is:
/cygdrive/d/NVPACK/android-ndk-r8/platforms/android-8/arch-x86
Android NDK:   ABI arm sysroot is:
/cygdrive/d/NVPACK/android-ndk-r8/platforms/android-8/arch-arm
Android NDK:   ABI mips sysroot is:
/cygdrive/d/NVPACK/android-ndk-r8/platforms/android-8/arch-mips
Android NDK: PLATFORM android-9 supports: x86 arm mips
Android NDK:   ABI x86 sysroot is:
/cygdrive/d/NVPACK/android-ndk-r8/platforms/android-9/arch-x86
Android NDK:   ABI arm sysroot is:
/cygdrive/d/NVPACK/android-ndk-r8/platforms/android-9/arch-arm
Android NDK:   ABI mips sysroot is:
/cygdrive/d/NVPACK/android-ndk-r8/platforms/android-9/arch-mips
Android NDK: PLATFORM android-5 supports: x86 arm mips
Android NDK:   ABI x86 sysroot is:
/cygdrive/d/NVPACK/android-ndk-r8/platforms/android-5/arch-x86
Android NDK:   ABI arm sysroot is:
/cygdrive/d/NVPACK/android-ndk-r8/platforms/android-5/arch-arm
Android NDK:   ABI mips sysroot is:
/cygdrive/d/NVPACK/android-ndk-r8/platforms/android-5/arch-mips
Android NDK: Found stable platform levels: 4 3 14 8 9 5
Android NDK: Found max platform level: 14
Android NDK: Found project path: .
Android NDK: Ouput path: ./obj
Android NDK: Parsing Application.mk
Android NDK: Application local targets unknown platform '8'
Android NDK: Switching to android-14
Android NDK:   Using build script ./Android.mk
Android NDK: Application 'local' is not debuggable
Android NDK: Selecting optimization mode through Application.mk: debug
Android NDK: Adding import directory:
/cygdrive/d/NVPACK/android-ndk-r8/sources
Android NDK: Building application 'local' for ABI 'armeabi-v7a'
Android NDK: Using target toolchain 'arm-linux-androideabi-4.4.3' for
'armeabi-v7a' ABI
Android NDK: Looking for imported module with tag 'cxx-stl/gnu-libstdc++'
Android NDK:   Probing