Re: [osg-users] Post-render Camera Reusing the Depth-buffer

2012-06-12 Thread Sebastian Messerschmidt

Hi,
Okay, my setup is different.
I might be wrong, but either you bind the depth buffer to a texture too, 
or read it to a texture after the first pass.
Binding it to the first frame is not a problem however. There no magic 
about it. Just be sure that you bind it to all passes that perform depth 
tests afterwards.

Maybe someone else has a better solution to your problem.

cheers
Sebastian

Hello Sebastian,

thanks for a quick reply. I wanted to do something like that, but I am missing the 
depth_tex part. The first camera doesn't render to texture, but to a 
classical frame buffer/depth_buffer. The second camera is then RTT, but it should be 
using the depth buffer from the first one.

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





___
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 error handling

2012-06-12 Thread michael kapelko
Hi.
I see that OSG does not use exceptions, instead it only notifies of
errors. Does it mean, that OSG encourages return-code error handling?
Currently I use exceptions (which are only thrown if application
cannot continue normal operation: invalid resource, invalid input
parameter, etc) and would like to continue to use them, but since
large part of my program (OSG) won't be using exceptions any more
(I've used OGRE before), I wonder if using exceptions is suitable at
all now.
What error handling approach do you recommend for OSG based applications?
Thanks.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Keyboard Event handler Problem

2012-06-12 Thread Koduri Lakshmi
Hi,

Can any one please help me what could be the mistake.


... 

Thank you!

Cheers,
Koduri

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




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


Re: [osg-users] Post-render Camera Reusing the Depth-buffer

2012-06-12 Thread Marko Srebre
I tried your suggestion and it works. I attached the depth texture to the first 
pass and reused it in the second. I guess the performance of RTT is just about 
the same as rendering to conventional buffer, so this should work pretty good. 
It also gives some more control over the situation. Thank you.

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





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


Re: [osg-users] server is down !

2012-06-12 Thread Jordi Torres
Hi,

Can you confirm you can reach the server now?

Cheers.

2012/6/11 Jordi Torres jtorresfa...@gmail.com

 Hi all,

 We are experiencing problems with the old server, it seems there is a
 problem with the university network, nothing related to the trac. Now I
 can't reach the server using ssh, so till tomorrow I won't be able to take
 a look. In the meanwhile you can use the github[1] or mercurial[2] mirror
 to get the code.

 Sorry for the inconvenience.

 [1]
 http://www.openscenegraph.com/index.php/downloads/code-repositories/31-git-mirror
 [2]
 http://www.openscenegraph.com/index.php/downloads/code-repositories/32-mercurial-mirror


 2012/6/11 Carlos Sanches ces...@gmail.com

 Hi .  I m trying to access the OSG website and download by svn the new
 version but looks like the that the site is down .
 Do you know how long to back on line ?


 --



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




 --
 Jordi Torres Fabra

 gvSIG 3D blog
 http://gvsig3d.blogspot.com
 Instituto de Automática e Informática Industrial
 http://www.ai2.upv.es




-- 
Jordi Torres Fabra

gvSIG 3D blog
http://gvsig3d.blogspot.com
Instituto de Automática e Informática Industrial
http://www.ai2.upv.es
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] OSG error handling

2012-06-12 Thread Robert Osfield
HI Michael,

On 12 June 2012 07:59, michael kapelko korn...@gmail.com wrote:
 I see that OSG does not use exceptions, instead it only notifies of
 errors.

The majority of the OSG doesn't use exception.  It used to use more
but I did a purge of use of exceptions in the core OSG to avoid
problems with embedded platforms that didn't support exceptions
properly.  The main place that exceptions remain in use is some of the
plugins which won't be compliable on platforms without exceptions.

 Does it mean, that OSG encourages return-code error handling?

The error states returned from function/method calls tend to be very
specific to the task in hand, much of the OSG will assume no error and
have no error handling/return codes, things like memory errors will
get passed back via the standard C++ exceptions.  Case like file
loading will have specific mechanism for giving feedback on errors.

 Currently I use exceptions (which are only thrown if application
 cannot continue normal operation: invalid resource, invalid input
 parameter, etc) and would like to continue to use them, but since
 large part of my program (OSG) won't be using exceptions any more
 (I've used OGRE before), I wonder if using exceptions is suitable at
 all now.

There is nothing wrong with using exceptions with the OSG in your
application.  The only limit would be if you want to target specific
embedded platforms that don't support exceptions.

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


Re: [osg-users] Keyboard Event handler Problem

2012-06-12 Thread Robert Osfield
On 12 June 2012 07:58, Koduri Lakshmi ankiredd...@gmail.com wrote:
 Hi,

 Can any one please help me what could be the mistake.

The code looks kinda messy but I can't really spot what might be the
mistake as there is clearly stuff missing, but can't say whether this
is because you simply didn't copy and paste it into the email or it's
missing.

Please have a look at the OSG examples, plenty of them have event
handlers and they work so use this as a base.

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


Re: [osg-users] server is down !

2012-06-12 Thread Robert Osfield
Hi Jordi,

On 12 June 2012 08:16, Jordi Torres jtorresfa...@gmail.com wrote:
 Can you confirm you can reach the server now?

I just tried openscenegraph.org but I've just got a:

Trac detected an internal error:

TimeoutError: Unable to get database connection within 20 seconds

Subversion looks to be working fine though.

Thanks for your efforts on try to keep the old server up.

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


Re: [osg-users] server is down !

2012-06-12 Thread Jordi Torres
Hi Robert,

This error is related to trac, and is intermitent, if you get this error
try to reload, at the end it tends to load. I will take a look to this, but
J.L. Hidalgo said me that the real solution for this is to not use trac,
that's the reason why we are migrating the web :(. I will report if I can
do something to fix it.

Cheers.

2012/6/12 Robert Osfield robert.osfi...@gmail.com

 Hi Jordi,

 On 12 June 2012 08:16, Jordi Torres jtorresfa...@gmail.com wrote:
  Can you confirm you can reach the server now?

 I just tried openscenegraph.org but I've just got a:

 Trac detected an internal error:

 TimeoutError: Unable to get database connection within 20 seconds

 Subversion looks to be working fine though.

 Thanks for your efforts on try to keep the old server up.

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




-- 
Jordi Torres Fabra

gvSIG 3D blog
http://gvsig3d.blogspot.com
Instituto de Automática e Informática Industrial
http://www.ai2.upv.es
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Keyboard Event handler Problem

2012-06-12 Thread Koduri Lakshmi
Hi,

This is my mistake. I am deactivating the render window and activating another 
window. I am getting messages when I selected the render window.

... 

Thank you!

Cheers,
Koduri

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




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


[osg-users] [osgPlugins] ffmpeg plugin

2012-06-12 Thread lucie lemonnier
Hi,

I wand to play video in my application but I don't have ffmpeg plugin dll.
I have OpenSceneGraph-3.0.1.
Could someone send me this dll?

Thank you!

Cheers,
lucie

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





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


Re: [osg-users] Instanced Arrays support

2012-06-12 Thread Riccardo Corsi
Hi guys,

anyone on this??
I have done some more digging in the code, but wasn't able to find support
for this feature...
Thanks!
Ricky

On Thu, Jun 7, 2012 at 11:48 AM, Riccardo Corsi
riccardo.co...@kairos3d.itwrote:

 Hi all,

 I'm about to implement some instanced rendering in my application and I
 was looking for the best way to pass
 per-instance data to the shaders.

 I've then discovered that besides the Draw Instaced ARB there is another
 extension called Instanced Arrays,
 which basically allows to bind vertex attributes per instance ( or per
 multiple instances, controlled by a divisor attribute)
 instead of per vertex.
 Here is the link to the specs:
 http://www.opengl.org/registry/specs/ARB/instanced_arrays.txt

 I couldn't find how to use this extension with osg. Is there support for
 this functionality?
 Thank you,
 Ricky




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


Re: [osg-users] set material basic question

2012-06-12 Thread Matthias Sattler
Hi folks,

I got a similar problem. Some parts of my model are always black. Despite 
setting the front and back color. 

@Shayne: I've enabled both ambient and diffuse color. And turning the model 
around (which changes the direction to the light source) doesn't change the 
color of the black faces.

A rework of the normals isn't easy, because I get them from an external system.

My Code looks like:

Code:

osg::Material* material = new osg::Material;
material-setColorMode(osg::Material::AMBIENT_AND_DIFFUSE);
material-setAmbient(osg::Material::FRONT_AND_BACK, osg::Vec4(1, 1, 1, 1));
material-setDiffuse(osg::Material::FRONT_AND_BACK, osg::Vec4(1, 1, 1, 1));
material-setSpecular(osg::Material::FRONT_AND_BACK, osg::Vec4(1, 1, 1, 1));
material-setShininess(osg::Material::FRONT_AND_BACK, 64.0f);

stateSet-setAttribute(material,osg::StateAttribute::ON | 
material,osg::StateAttribute::OVERRIDE);

currentFace-setStateSet(stateSet);

...
Add the primitives (triangles, strips, fans) below.
Each vertex has its own normal

currentFace-setNormalBinding(osg::Geometry::BIND_PER_VERTEX);





Thank you!

Cheers,
Matthias
[/img]

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




Attachments: 
http://forum.openscenegraph.org//files/whiteandblack_176.jpg


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


[osg-users] combine functionality my own shader with shadowmap shader

2012-06-12 Thread Umid Shahmaliyev
Hi ,

I want to combine custom shaders (normal map, reflection, specular lighting and 
ect) with osgShadow. I have my shader generator class which generates 
combination of shaders and gives only one faragment and one vertex shader.
Without osgShadow it works ok. But when i use osgShadow this disables my 
shaders because osgShadow class overrides my custom shaders. Who knows how to 
use custom shaders and osgShadow together? 

Thank you!

Cheers,
Umid

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





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


[osg-users] Why doesn't the viewer first destroy existing camera before assigning new camera?

2012-06-12 Thread Nav Joseph
First post in this forum. While trying to understand the viewer, I was going 
thru the OSG source code and saw that when a master camera is assigned to the 
viewer thru setCamera, OSG does not actually destroy the existing default 
master camera.
See...

Code:
void View::setCamera(osg::Camera* camera)
{
if (_camera.valid()) _camera-setView(0);

_camera = camera;

if (_camera.valid())
{
_camera-setView(this);
_camera-setRenderer(createRenderer(camera));
}
}



Why is it like this? Won't this result in a memory leak when I do: 
osg::ref_ptrosg::Camera camera = new osg::Camera;
osgViewer::Viewer viewer;
viewer.setCamera( camera.get() );

Thank you!

Cheers,
Nav

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





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


Re: [osg-users] Error while running the Sample program in book

2012-06-12 Thread Nav Joseph
Just copy and paste the DLL into the folder where your program's exe is located.
If you don't want to do that, then go to Visual Studio's project settings and 
set the value Working Directory to the same directory that the DLL is located 
in.

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





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


[osg-users] Headtracking (osg+vrpn)

2012-06-12 Thread David Hernández Delgado
hi all, am new to this world and i am trying to do a final project with GSO 
VRPN.

i'm trying to create a program with heatracking, well I got that when I move 
the image to move, just to prove that I do correctly, by VRPN.

Well when that happens, the next thing I'm trying to do is create a sphere in 
which it has a camera attached, so that when I move the sphere through 
nodetrackermanipulator, to continue, so that if an object in front and I move 
my head to get something like the following:

In youtube search: Head Tracking for Desktop VR Displays using the WiiRemote

Now my problem is this, do not get any of the ways that the camera following 
the ball in question was created, I tried the following:

osg :: ref_ptr osg::Node model = sphere ();

osg :: ref_ptr osg::MatrixTransform mt = new osg :: MatrixTransform;
mt- addChild (model.get ());

osg :: ref_ptr osg::Camera osg :: camera = new Camera;
camera- setClearMask (GL_DEPTH_BUFFER_BIT);
camera- setRenderOrder (osg :: Camera :: POST_RENDER);
camera- setReferenceFrame (osg :: Camera :: ABSOLUTE_RF);
camera- setViewMatrixAsLookAt (
 osg :: vec3 (0.0f, 0.0f, 0.0f),
 osg :: vec3 (),
 osg :: vec3 (0.0f, 0.0f, 0.0f)
);
camera- addChild (mt.get ());

osgGA :: NodeTrackerManipulator * tm = new osgGA :: NodeTrackerManipulator;
tm- setTrackerMode (osgGA :: NodeTrackerManipulator :: 
NODE_CENTER_AND_ROTATION);
tm- setRotationMode (osgGA :: NodeTrackerManipulator :: TRACKBALL);
tm- setTrackNode (Camera.get ());

viewer.setCameraManipulator (tm);

What you get with this through GUIEventHandler, is to move the sphere, without 
the camera to follow.

What am I doing wrong?

Not if you have something to do with the topic of coordinates and coordinate 
diferntes SYSTEMS has the object relative to the viewer, not that I am wrong.

really thank you, i hope you can help, cause im really lost, and i dont know 
what to do :(

Cheers,
David

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





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


[osg-users] Topic approval in this forum

2012-06-12 Thread Nav Joseph
Hi,

I'm glad to see an OSG forum which is very necessary, given that OSG is a bit 
tough to understand in the beginning.

I would like to urge the owner of the forum to not have a rule where the posts 
of newbies have to wait for approval. It has been more than a week since I've 
posted a question and answered somebody else's question, but my posts are still 
waiting for approval.
Internet forums manage this situation by giving administrator privileges to 
trusted forum users and by taking backups of the forum posts. 

Couldn't this forum do the same? This way, collaboration between osg users 
would improve and people would be happy to introduce themselves to osg, knowing 
there's a good forum that can help them.

Hoping that you'd consider improving the forum this way.

Thank you!

Cheers,
Nav

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





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


Re: [osg-users] Topic approval in this forum

2012-06-12 Thread Art Tevs
Hi Nav.

First of all, if you had followed the rules of the forum corresponding to your 
real name, your post would be approved much faster.

Second, there are not enough moderators available to take over the job about 
new user's post approval. I, as admin, don't have enough time to do this job. 
Unfortunately there are still nobody interested in this job :(

Hence, I am sorry for longer waiting times before new messages get approved, 
but this is the only way we currently have to have nice cooperation between the 
established osg community acting on the mailing list side with the new one from 
the forum side.

cheers,
art


Nav wrote:
 Hi,
 
 I'm glad to see an OSG forum which is very necessary, given that OSG is a bit 
 tough to understand in the beginning.
 
 I would like to urge the owner of the forum to not have a rule where the 
 posts of newbies have to wait for approval. It has been more than a week 
 since I've posted a question and answered somebody else's question, but my 
 posts are still waiting for approval.
 Internet forums manage this situation by giving administrator privileges to 
 trusted forum users and by taking backups of the forum posts. 
 
 Couldn't this forum do the same? This way, collaboration between osg users 
 would improve and people would be happy to introduce themselves to osg, 
 knowing there's a good forum that can help them.
 
 Hoping that you'd consider improving the forum this way.
 
 Thank you!
 
 Cheers,
 Nav


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





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


[osg-users] OSG Quick Start Picking Example - Why is DYNAMIC not used?

2012-06-12 Thread Dan Nash
Hello All,

New to OSG and just finished reading the OSG Quick Start guide.  I wanted to 
make sure I understood when it is necessary to set the data variance of a Node 
to DYNAMIC.  The OSG Quick Start Callback example set the rotation 
MatrixTransform node to DYNAMIC since it would be modifying the transform in 
each update callback and that made perfect sense.

However, the Picking example does not do this, even though it is essentially 
performing the same thing though with user interaction involved.  It's still 
modifying one of the MatrixTransform nodes as the Callback example did, but the 
node's data variance was specifically set to STATIC when it was created.  I 
thought maybe the data variance value would be changed to DYNAMIC after it was 
determine that it had been selected, but that doesn't appear to be the case.

So, my question is, why aren't the rotation MatrixTransform nodes in the 
Picking example set to DYNAMIC like the one MatrixTransform node in the 
Callback example was?  Wouldn't that leave the possibility of updating the 
scene graph during the cull and/or draw phases?

Thank you!

Cheers,
Dan

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





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


[osg-users] OpenGL ES 2.0 and LIGHTING

2012-06-12 Thread John Moore
Hi,

I am developing an application for iPhone and iPod touch using OpenSceneGraph. 
In origin I written my own shaders and I used to control light using a uniform. 
It was working. Now I wanted to switch to use osg::Light and osg::LightSource 
because I think it is more object-oriented, but when I run my code I obtain 
this warning:


Code:
Warning: Light::apply(State) - not supported.



Does this mean that I can't use this approach with OpenGL ES 2.0 ?


I post the code I use for managing light:


Code:

#define LIGHT_0 0
- (osg::ref_ptrosg::Light)createLight:(osg::Vec4)color 
atPosition:(osg::Vec4)position
{  
osg::ref_ptrosg::Light light = new osg::Light;
// each light must have a unique number
light-setLightNum(LIGHT_0);
// we set the light's position via a PositionAttitudeTransform object
light-setPosition(position);
light-setDiffuse(color);
light-setSpecular(osg::Vec4(1.0, 1.0, 1.0, 1.0));
light-setAmbient( osg::Vec4(0.0, 0.0, 0.0, 1.0));

return light;

}

- (void)setupLights
{

osg::StateSet* state = _root-getOrCreateStateSet(); 
state-setMode( GL_LIGHTING, osg::StateAttribute::ON ); 
state-setMode( GL_LIGHT0, osg::StateAttribute::ON ); 

// Create a MatrixTransform to position the Light. 
osg::ref_ptrosg::MatrixTransform mt = new osg::MatrixTransform; 
osg::Matrix m;
m.makeTranslate( osg::Vec3( -3.f, 2.f, 5.f ) );
mt-setMatrix( m );

osg::ref_ptrosg::Light light = [self 
createLight:osg::Vec4(1.0,0.0,0.0,1.0) atPosition:osg::Vec4(3.0,2.0,1.0,1.0)];

// Add the Light to a LightSource. Add the LightSource and 
// MatrixTransform to the scene graph. 
osg::ref_ptrosg::LightSource ls = new osg::LightSource; 
_root-addChild( mt.get() );
mt-addChild( ls.get() ); 
ls-setLight( light.get() );

}

- (void) viewDidLoad
{
//some other code

//initialize the model and attach it to _root
[self initModel];

//setup the lights
[self setupLights];

//initialize the shaders and attach them to _root
[self initShaders];


//create scene and attach it to _viewer
_viewer-setSceneData(_root.get());

//some other code
}





Thank you!

Cheers,
John

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





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


[osg-users] Improving performance of OBJ rendering by back face culling

2012-06-12 Thread John Moore
Hello, 
I am developing an application for iphone and ipod touch using openscenegraph. 
It is an augmented reality application and I have to load a very complex model. 
The original 3d model has 5 million vertices. 
Since I am using a mobile platform which is limited in computational power I 
simplified the model using 3d studio max. I reduced the size of the model from 
500Mb to 4.2 Mb using proOptimizer.
The model now has in total about 36,000 vertices and about 53,000 faces.

I am able to render it but frame rate is slow. I'd like to improve performance 
using back face culling. The point is I don't know how to activate it (if it is 
possible):
I tried with these lines of code but frame rate is still low:

Code:

osg::StateSet* ss = _root-getOrCreateStateSet();
osg::CullFace* cf = new osg::CullFace(osg::CullFace::BACK ); 
ss-setAttribute( cf );



I am using OpenGL ES 2.0 and shaders.

I setup the camera in this way:

Code:

//set the clear color of the camera to be transparent
_viewer-getCamera()-setClearColor(osg::Vec4(0.0f, 0.0f, 0.0f, 0.0f)); 
//set the clear mask for the camera
_viewer-getCamera()-setClearMask(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT);
_viewer-getCamera()-setRenderOrder(osg::CameraNode::PRE_RENDER);
_viewer-getCamera()-setComputeNearFarMode(osgUtil::CullVisitor::DO_NOT_COMPUTE_NEAR_FAR);




I use DO_NOT_COMPUTE_NEAR_FAR because I need to set manually projection and 
viewMatrix at every drawing cycle.

I also initially set viewport like this:

Code:

_viewer-getCamera()-setViewport(new osg::Viewport(0, 0, 
graphicsContext-getTraits()-width, graphicsContext-getTraits()-height));




The hierarchy of my object is structured as:
 
_root is a osg::MatrixTransform

my 3d model is divided in subparts.
all the subparts of my 3d model are direct child of _root and are of type 
osg::Node

I hope you can give me some tips to improve performance. If you need some other 
information about my setup I will be glad to give it.

Thank you.

Greetings,
John

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





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


Re: [osg-users] osgShadow and multitexturing

2012-06-12 Thread Sedov Dmitry
Hi, all

How i can apply shadow texture for object's native state? I don't want modify 
osg's sources (native shaders). I implement  shader for multitexture terrain + 
grass and other objects, and i want get shadow map and bind it to my shaders. 
Now i implement like this:

Code:

class TestDrawCallback: public osg::Drawable::DrawCallback
{
public:
TestDrawCallback()
{
isFirst = true;
}
virtual void drawImplementation(osg::RenderInfo renderInfo,const 
osg::Drawable* drawable) const
{
osg::State* state = renderInfo.getState();
const osg::StateSet* stateset = 
state-getStateSetStack().back();
osg::StateSet* ownStateSet = 
const_castosg::StateSet*(drawable-getStateSet());
osg::Texture2D* tex = 
const_castosg::Texture2D*(dynamic_castconst 
osg::Texture2D*(stateset-getTextureAttribute(1, 
osg::StateAttribute::TEXTURE)));
if(tex)
{
if(isFirst)
{
ownStateSet-setTextureAttributeAndModes(2, 
tex, osg::StateAttribute::ON);
isFirst = false;
}
state-pushStateSet(ownStateSet);
state-applyTextureAttribute(2, tex);
drawable-drawImplementation(renderInfo);
state-popStateSet();

}else
{
drawable-drawImplementation(renderInfo);
}

}
private:
mutable bool isFirst;
};



I tested this texture map as base texture. The object which I rendered was 
white, that is, texture is not passed on or something like that.
I 
Thank you!
e
Cheers,
Sedov[/code]

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





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


[osg-users] When I call the traverse method, my variables lose their values!

2012-06-12 Thread Tiago De Gaspari
Hi,

I have a class:


Code:
class Atualizador: public osg::NodeCallback 



The variables in this class, when I call the method traverse in the method 
operator(), lose their values. Why it's happen?

How can I call this method, but maintain my values?


Thank you!

Cheers,
Tiago

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





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


[osg-users] Change object in the scene

2012-06-12 Thread Tiago De Gaspari
Hi,

I'm a new openscenegraph developer from Brazil, and I have a doubt:

I'm trying to do a program in which I have an array of objects that have a path 
animation each.
When I perform an action (like pressing a key on the keyboard), I need the 
actual object is deleted from the scene and the next vector object, enters the 
scene.
How I do it?


Thank you!

Cheers,
Tiago

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





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


Re: [osg-users] osgEphemeris building errors

2012-06-12 Thread luke clemens
i fixed this problem by adding 

OSGEPHEMERIS_LIBRARY_STATIC

to the preprocessor defines in the project settings

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





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


[osg-users] creating widgets using osg

2012-06-12 Thread Siddharth Vaghela
Hi,

I am working on a HMI project for which I have to build screen widgets. How can 
we create widgets using openscenegraph nodes? The idea is basically this:
1. Create widgets as group nodes
2. Add/Remove widgets from the HMI scene on runtime

any suggestions/comments/feedback will be appreciated 

Thank you!

Cheers,
Siddharth

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





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


[osg-users] itk and openscenegraph

2012-06-12 Thread Antonio De Giorgio
Hi,

I'm new to openscenegraph development. Could anyone tell me how i could use itk 
with openscenegraph? Specifically, i would like to open some images with itk, 
process them in a particular way and than render them with openscenegraph, but 
i don't know how to integrate the itk result in the osg scene.

Thanks for your help

Antonio

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





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


[osg-users] [osgPlugins] DXF plugin : Test export

2012-06-12 Thread Mark Smith
Hi,

I am implementing DXF file output in my software and I was wondering if 
osgText::Text objects output is possible in DXF format. I can see that standard 
geometries output works well, but I could not find information regarding 
osgText::Text. DXF format seems to handle text entities, but so far I have not 
been able to export text in DXF format.

Thank you!

Cheers,
Mark

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





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


[osg-users] Two questions about surface normals and the SmoothingVisitor

2012-06-12 Thread Wolfgang von Hansen
Hi,

this is my first post to this forum and I am also quite new to OpenSceneGraph. 
My current project is to write a converter from an XML-based format to 
OpenFlight using OSGs OpenFlight plugin. In general, everything works nicely 
already but now I am diving into some remaining details.

1. I do not have any surface normals on input so I tried to generate them via 
the SmoothingVisitor. It seems to work but the normals are pointing the wrong 
way (to the inside of the objects). I would guess that my input polygons are 
oriented the wrong way. Is there a simple flag that I can set?

2. Out of curiosity I looked into the source and found something that might be 
a bug in SmoothingVisitor.cpp (SVN r13084) lines 655-663: A variable 'stif2' is 
instantiated but inside the if-block 'stif' is used. This looks wrong to me.


Thank you!

Cheers,
Wolfgang

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





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


[osg-users] [osgPlugins] Reader-Plugin Callbacks for unsupported data-types

2012-06-12 Thread We See
Hi,

When reading models in OpenFlight format, not all data will be read (i.e. 
surface material code or feature id will not be read). But some application 
need this data, therefore my idea is, there could be a callback-function, which 
the reader-plugin is calling when it reads an unsupported data-type (Similar to 
update-callbacks). So the application could solve the problem.

Are there any comments or drawbacks about this idea?

@Robert Osfield: Does such a solution have a change to come into the trunc of 
osg?

Thank you!

Cheers,
WeSee

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





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


[osg-users] [osgPlugins] Create osgVolume from a geode

2012-06-12 Thread Antonio De Giorgio
Hi,
i have a function that gives me back a osg geode with the rendering of a dicom 
volume..now i need to use osgVolume for some functionality..how can i pass from 
this geode to the osgVolume? what should i use?
Thank you very much


Cheers,
Antonio

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





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


Re: [osg-users] Comparison of open-source rendering libraries

2012-06-12 Thread Martin Záleta
Hi all,

I have recently started to work on a diploma thesis about open-source rendering 
libraries, which mostly should be about the comparison between each other and 
demonstration of the most notable characteristics on both indoor and outdoor 
scenes using some select few.

So far have I taken into account these: OpenSceneGraph (plain), OGRE, Delta3D, 
Irrlicht, Crystal Space, Visualization Library and OpenSG. Do you think there 
are any notable advantages/disadvantages of plain OpenSceneGraph I should 
definitely be aware of? Or do you have any other useful advice?

Also, if you could provide me any links to printable material, so I can go 
through it while afk, that would be quite helpful to me.

Any help would be greatly appreciated!

Cheers,
Marten

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





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


[osg-users] Inserting Alpha values in RGB textures

2012-06-12 Thread Abhishek Bansal
Hi,

I have just started with OpenSceneGraph. I am working on a project in which i 
need to capture frames from a video source and render them as texured quads. I 
need to enable transparency on these textures but my problem is that frames i 
am grabbing are in RGB format so need to add an alpha channel. My research told 
me if i set texture internal format to RGBA OSG will create an alpha channel 
for me. Now problem is how do i insert value in that alpha channel at runtime. 
I only need one alpha value that will apply to whole texture.

I cannot use shaders in this for some reasons.
Please Help !!

Thank you!

Cheers,
Abhishek

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





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


Re: [osg-users] Getting Webcam feed - From OpenCV to OSG

2012-06-12 Thread Praveena Sara
Hi, 

So far I've been successful in showing the first captured frame using OpenCV, 
in OSG. 



Code:
 // IplImage* cvImg is the webcam output image captured using 
cvQueryFrame(capture)
osg::ref_ptrosg::Image osgImage = new osg::Image;
osgImage-setImage(cvImg-width,cvImg-height, 3,
               GL_RGB, GL_RGB, GL_UNSIGNED_BYTE,
               (BYTE*)(cvImg-imageData),
               osg::Image::AllocationMode::NO_DELETE,1);
 
osg::ImageStream* imageStream = dynamic_castosg::ImageStream*( osgImage.get() 
);
if( imageStream ) imageStream-play();

osg::ref_ptrosg::Texture2D texture = new osg::Texture2D;
texture-setImage( osgImage.get() );

osg::ref_ptrosg::Drawable quad = osg::createTexturedQuadGeometry(
        osg::Vec3(), osg::Vec3(1.0f, 0.0f, 0.0f), osg::Vec3(0.0f, 0.0f, 1.0f) );
quad-getOrCreateStateSet()-setTextureAttributeAndModes(0,texture.get() );

osg::ref_ptrosg::Geode geode = new osg::Geode;
geode-addDrawable( quad.get() );





But I want the entire webcam stream in OSG, after preprocessing in OpenCV. 
After googling I found this answer as a guide:
http://markmail.org/message/txqiv4plykf3bm3r#query:+page:1+mid:txqiv4plykf3bm3r+state:results
 
(http://markmail.org/message/txqiv4plykf3bm3r#query:+page:1+mid:txqiv4plykf3bm3r+state:results)
 


According to that I made my Camera class inherit from osg::ImageStream and 
called dirty() whenever a new frame is captured. But when I run the program it 
crashes! How can I get this to work?



Code:
class Camera : public QObject, public osg::ImageStream
{
    Q_OBJECT
public:
    Camera();
    ~Camera();
    IplImage* getFrame();
private:
    CvCapture* capture;
    IplImage* frame;
    int timerId;
public slots:
    void timerEvent(QTimerEvent *);
private slots:
    void initialize();
};

Camera::Camera() : QObject(), osg::ImageStream()
{
    capture = cvCreateCameraCapture(0);
    frame = cvQueryFrame(capture);
    QTimer::singleShot(0,this,SLOT(initialize()));
}

void Camera::initialize(){
    frame = cvQueryFrame(capture);
    timerId = startTimer(10);
}
void Camera::timerEvent(QTimerEvent *){
   frame = cvQueryFrame(capture);
 
   dirty();
}




Thanks

 --
Post generated by Mail2Forum

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





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


[osg-users] Building OSG with FFMPEG

2012-06-12 Thread Praveena Sara
Hi,

I recently got hold of the book OpenSceneGraph 3 Cookbook. I want to show a 
live webcam feed in OSG like in the example given in the book (I'm working on 
an Augmented Reality project). In order to this, it says I need to have FFMPEG 
built with OSG.

So, I downloaded the 
 FFmpeg git-9c27f29 64-bit Static (Latest)
 under 64-bit Builds (Static)  from zeranoe site but I have no idea how to 
link these files in CMake, when Building OSG. 

File Structure:
+presets
+licenses
+doc
-bin
|__ffmpeg.exe
|__ffplay.exe
|__ffprobe.exe

According to this tutorial (**I'm not allowed to share a URL**) I'd only have 
to Set 
 “FFMPEG_ROOT” to: C:/Projects/3rdParty/ffmpeg
. Is this correct? Have I downloaded the correct FFMPEG build? Which values 
need to be entered into CMake when building OSG with FFMPEG?

My configuration:
Windows 7, 64-bit
OSG 3.0.1
Visual Studio 2008 (Professional Edition)

... 

Thank you!

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





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


Re: [osg-users] Error while running the Sample program in book

2012-06-12 Thread Praveena Sara
Hi guys,

Extremely sorry for the confusion caused. I figured out it's not the case with 
Environment variables but calling of Release version while having Debug 
versions built!

Calling 
Code:
osgviewerd 

instead of 
Code:
osgviewer 

 worked!

By the way, I still can't figure out what's the difference between 
OSG_FILE_PATH and OSG_SAMPLES_PATH? Documentation doesn't clearly describe the 
difference between those. Any help?

... 

Thank you!

Cheers,
Praveena

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





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


Re: [osg-users] OpenGL ES 2.0 and LIGHTING

2012-06-12 Thread Jordi Torres
Hi John,

You need use your own shaders as GLES2 does not support materials or OpenGL
lighting. AFAIK shader generator to emulate fixed pipeline is a work in
progress, but it's not completed yet.

Cheers.

2012/5/27 John Moore kahar...@gmail.com

 Hi,

 I am developing an application for iPhone and iPod touch using
 OpenSceneGraph. In origin I written my own shaders and I used to control
 light using a uniform. It was working. Now I wanted to switch to use
 osg::Light and osg::LightSource because I think it is more object-oriented,
 but when I run my code I obtain this warning:


 Code:
 Warning: Light::apply(State) - not supported.



 Does this mean that I can't use this approach with OpenGL ES 2.0 ?


 I post the code I use for managing light:


 Code:

 #define LIGHT_0 0
 - (osg::ref_ptrosg::Light)createLight:(osg::Vec4)color
 atPosition:(osg::Vec4)position
 {
osg::ref_ptrosg::Light light = new osg::Light;
// each light must have a unique number
light-setLightNum(LIGHT_0);
// we set the light's position via a PositionAttitudeTransform object
light-setPosition(position);
light-setDiffuse(color);
light-setSpecular(osg::Vec4(1.0, 1.0, 1.0, 1.0));
light-setAmbient( osg::Vec4(0.0, 0.0, 0.0, 1.0));

return light;

 }

 - (void)setupLights
 {

osg::StateSet* state = _root-getOrCreateStateSet();
state-setMode( GL_LIGHTING, osg::StateAttribute::ON );
state-setMode( GL_LIGHT0, osg::StateAttribute::ON );

// Create a MatrixTransform to position the Light.
osg::ref_ptrosg::MatrixTransform mt = new osg::MatrixTransform;
osg::Matrix m;
m.makeTranslate( osg::Vec3( -3.f, 2.f, 5.f ) );
mt-setMatrix( m );

osg::ref_ptrosg::Light light = [self
 createLight:osg::Vec4(1.0,0.0,0.0,1.0)
 atPosition:osg::Vec4(3.0,2.0,1.0,1.0)];

// Add the Light to a LightSource. Add the LightSource and
// MatrixTransform to the scene graph.
osg::ref_ptrosg::LightSource ls = new osg::LightSource;
_root-addChild( mt.get() );
mt-addChild( ls.get() );
ls-setLight( light.get() );

 }

 - (void) viewDidLoad
 {
//some other code

//initialize the model and attach it to _root
[self initModel];

//setup the lights
[self setupLights];

//initialize the shaders and attach them to _root
[self initShaders];


//create scene and attach it to _viewer
_viewer-setSceneData(_root.get());

//some other code
 }





 Thank you!

 Cheers,
 John

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





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




-- 
Jordi Torres Fabra

gvSIG 3D blog
http://gvsig3d.blogspot.com
Instituto de Automática e Informática Industrial
http://www.ai2.upv.es
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Change object in the scene

2012-06-12 Thread Alberto Luaces
Tiago De Gaspari writes:

 Hi,

 I'm a new openscenegraph developer from Brazil, and I have a doubt:

 I'm trying to do a program in which I have an array of objects that
 have a path animation each.  When I perform an action (like pressing a
 key on the keyboard), I need the actual object is deleted from the
 scene and the next vector object, enters the scene.  How I do it?

You can put all those nodes under a osg::Switch and activate or
deactivate them one by one as you wish.

-- 
Alberto

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


Re: [osg-users] [osgPPU] Problems installing osgPPU using cmake 2.8.4

2012-06-12 Thread Art Tevs
Hi Christian,

try to setup the paths manually. Just click on the paths which are marked as 
NOTFOUND and set there the path to your osg installation manually. This should 
solve the issue with FindOSG.cmake

Let us know if this helps or not.

art



Rumpfi wrote:
 I tried to install the latest osgPPU version I found today, using cmake 2.8.4 
 and Visual Studio 10, but when i started to configure the folder I got the 
 following cmake-error:
 
 
  Check for working C compiler using: Visual Studio 10
  Check for working C compiler using: Visual Studio 10 -- works
  Detecting C compiler ABI info
  Detecting C compiler ABI info - done
  Check for working CXX compiler using: Visual Studio 10
  Check for working CXX compiler using: Visual Studio 10 -- works
  Detecting CXX compiler ABI info
  Detecting CXX compiler ABI info - done
  Found OpenGL: opengl32 
  CUDA installation wasn't found
  Could not find nvcc, CUDA examples wouldn't be built
  Could not find cudart library (cudart)
  Could not find cuda libraries.
  CMake Warning (dev) at CMakeLists.txt:45 (INCLUDE):
Policy CMP0011 is not set: Included scripts do automatic cmake_policy PUSH
and POP.  Run cmake --help-policy CMP0011 for policy details.  Use the
cmake_policy command to set the policy and suppress this warning.
  
The included script
  
  C:/osgPPU-0.4.0/CMakeModules/cuda/FindCuda.cmake
  
affects policy settings.  CMake is implying the NO_POLICY_SCOPE option for
compatibility, so the effects are applied to the including context.
  This warning is for project developers.  Use -Wno-dev to suppress it.
  
  CMake Error: The following variables are used in this project, but they are 
  set to NOTFOUND.
  Please set them or make sure they are set and tested correctly in the CMake 
  files:
  OPENTHREADS_LIBRARY_RELEASE
  linked by target osgppu_hdr in directory 
  C:/osgPPU-0.4.0/src/example/hdr
  linked by target osgppu_viewer in directory 
  C:/osgPPU-0.4.0/src/example/viewer
  linked by target osgppu_dof in directory 
  C:/osgPPU-0.4.0/src/example/dof
  linked by target osgppu_cubemap in directory 
  C:/osgPPU-0.4.0/src/example/cubemap
  linked by target osgppu_texture3D in directory 
  C:/osgPPU-0.4.0/src/example/texture3D
  linked by target osgppu_video in directory 
  C:/osgPPU-0.4.0/src/example/video
  linked by target osgppu_ssao in directory 
  C:/osgPPU-0.4.0/src/example/ssao
  linked by target osgppu_glow in directory 
  C:/osgPPU-0.4.0/src/example/glow
  linked by target osgPPU in directory C:/osgPPU-0.4.0/src/osgPPU
  OSGDB_LIBRARY_RELEASE
  linked by target osgppu_hdr in directory 
  C:/osgPPU-0.4.0/src/example/hdr
  linked by target osgppu_viewer in directory 
  C:/osgPPU-0.4.0/src/example/viewer
  linked by target osgppu_dof in directory 
  C:/osgPPU-0.4.0/src/example/dof
  linked by target osgppu_cubemap in directory 
  C:/osgPPU-0.4.0/src/example/cubemap
  linked by target osgppu_texture3D in directory 
  C:/osgPPU-0.4.0/src/example/texture3D
  linked by target osgppu_video in directory 
  C:/osgPPU-0.4.0/src/example/video
  linked by target osgppu_ssao in directory 
  C:/osgPPU-0.4.0/src/example/ssao
  linked by target osgppu_glow in directory 
  C:/osgPPU-0.4.0/src/example/glow
  linked by target osgPPU in directory C:/osgPPU-0.4.0/src/osgPPU
  OSGGA_LIBRARY_RELEASE
  linked by target osgppu_hdr in directory 
  C:/osgPPU-0.4.0/src/example/hdr
  linked by target osgppu_viewer in directory 
  C:/osgPPU-0.4.0/src/example/viewer
  linked by target osgppu_dof in directory 
  C:/osgPPU-0.4.0/src/example/dof
  linked by target osgppu_cubemap in directory 
  C:/osgPPU-0.4.0/src/example/cubemap
  linked by target osgppu_texture3D in directory 
  C:/osgPPU-0.4.0/src/example/texture3D
  linked by target osgppu_video in directory 
  C:/osgPPU-0.4.0/src/example/video
  linked by target osgppu_ssao in directory 
  C:/osgPPU-0.4.0/src/example/ssao
  linked by target osgppu_glow in directory 
  C:/osgPPU-0.4.0/src/example/glow
  OSGTEXT_LIBRARY_RELEASE
  linked by target osgppu_hdr in directory 
  C:/osgPPU-0.4.0/src/example/hdr
  linked by target osgppu_viewer in directory 
  C:/osgPPU-0.4.0/src/example/viewer
  linked by target osgppu_dof in directory 
  C:/osgPPU-0.4.0/src/example/dof
  linked by target osgppu_cubemap in directory 
  C:/osgPPU-0.4.0/src/example/cubemap
  linked by target osgppu_texture3D in directory 
  C:/osgPPU-0.4.0/src/example/texture3D
  linked by target osgppu_video in directory 
  C:/osgPPU-0.4.0/src/example/video
  linked by target osgppu_ssao in directory 
  C:/osgPPU-0.4.0/src/example/ssao
  linked by target osgppu_glow in directory 
  C:/osgPPU-0.4.0/src/example/glow
  linked by target osgPPU in directory C:/osgPPU-0.4.0/src/osgPPU
  OSGUTIL_LIBRARY_RELEASE
  linked by target osgppu_hdr in directory 
  C:/osgPPU-0.4.0/src/example/hdr
  linked 

Re: [osg-users] When I call the traverse method, my variables lose their values!

2012-06-12 Thread Alberto Luaces
Tiago De Gaspari writes:

 Hi,

 I have a class:


 Code: class Atualizador: public osg::NodeCallback



 The variables in this class, when I call the method traverse in the
 method operator(), lose their values. Why it's happen?

 How can I call this method, but maintain my values?



Strange... can you provide a minimal test case? A little complete
program that shows your problem.

-- 
Alberto

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


[osg-users] Include Sub-camera in Near/Far Computation

2012-06-12 Thread Marko Srebre
Hi,

I have the main camera in my viewer and then there is a second (post-render) 
camera attached to the scene root. Both cameras have some geometry each in 
their own subgraph. When the first (main) camera computes near/far it ignores 
the geometry below the second camera. Is there a way to hint the first camera 
to include the geometry from the second camera when computing near/far plane? I 
need this since both cameras share the depth buffer.

Thanks,
Marko

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





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


Re: [osg-users] Inserting Alpha values in RGB textures

2012-06-12 Thread Abhishek Bansal
Hi,

Okay guys the problem has been solved !!

thanx for approving my post in just 5 days :(

Thank you!

Cheers,
Abhishek

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





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


[osg-users] osgAnimation::UpdateBone, forcing to calculate bones matrixs

2012-06-12 Thread Aitor Ardanza
Hi,

I want to update bones matrix and instantly calculate new bones skeleton 
matrix, this is...

Code:

void OSGAnimationManager::manualBonesRotate(std::string boneName, osg::Matrix 
mat)
{
for(int i = 0; i_bones.size();i++)
{   
if(!_bones.at(i)-getName().compare(boneName))
{

_pBoneUpdate.at(i)-getStackedTransforms().push_back(new 
osgAnimation::StackedQuaternionElement(
ManualUpdates,mat.getRotate()));
}
}
}




With this funcion I add new rotation to stacked transforms, but after do it, in 
the same frame, I need to know the new bones skeleton matrix. How could I force 
it to calculate it?

Thank you!

Cheers,
Aitor

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





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


[osg-users] building osgdem

2012-06-12 Thread Frédéric Trastour
Hi all,

 

I would like to build osgdem.

 

I have downloaded the most recent release  (0.9.7) from here :
http://www.openscenegraph.org/projects/VirtualPlanetBuilder
http://www.openscenegraph.org/projects/VirtualPlanetBuilder

It seems that this release is not compatible with OSG 3.0.0 (I got a lot of
compilation errors).

 

Is there a newer version of osggem/virtual planet builder ? Should I use a
newer/older release of OSG ?

 

Best regards,

 

Frédéric.

 

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


Re: [osg-users] Why doesn't the viewer first destroy existing camera before assigning new camera?

2012-06-12 Thread Robert Osfield
Hi Joseph,

The OSG uses smart pointers (ref_ptr/observer_ptr) coupled with
reference counting to prevent memory leaks/dangling pointers.  So the
example you provide is prefectly safe, as soon as you assign the new
Camera to the internal ref_ptrCamera the ref_ptr will call unref()
on the old Camera and ref() on the new Camera.

Lots has been written on ref_ptr usage over years on the mailing
list/forum and the books contain information on it as well so I would
recommend having look at these to understand about smart pointer
usage.

Robert.

On 15 May 2012 10:43, Nav Joseph nk...@tatapowersed.com wrote:
 First post in this forum. While trying to understand the viewer, I was going 
 thru the OSG source code and saw that when a master camera is assigned to the 
 viewer thru setCamera, OSG does not actually destroy the existing default 
 master camera.
 See...

 Code:
 void View::setCamera(osg::Camera* camera)
 {
    if (_camera.valid()) _camera-setView(0);

    _camera = camera;

    if (_camera.valid())
    {
        _camera-setView(this);
        _camera-setRenderer(createRenderer(camera));
    }
 }



 Why is it like this? Won't this result in a memory leak when I do:
 osg::ref_ptrosg::Camera camera = new osg::Camera;
 osgViewer::Viewer viewer;
 viewer.setCamera( camera.get() );

 Thank you!

 Cheers,
 Nav

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





 ___
 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] Improving performance of OBJ rendering by back face culling

2012-06-12 Thread Robert Osfield
Hi John,

Back face culling will only be effective at improving performance on
applications that are fill limited, if the bottleneck is elsewhere
then you won't see an improvement in performance.

I cannot say whether you are fill limited or not, the way to check it
is to change the size of the viewport and then look at the performance
- if performance goes up as you reduce the viewport size then you are
fill limited.

Robert.

On 27 May 2012 19:12, John Moore kahar...@gmail.com wrote:
 Hello,
 I am developing an application for iphone and ipod touch using 
 openscenegraph. It is an augmented reality application and I have to load a 
 very complex model. The original 3d model has 5 million vertices.
 Since I am using a mobile platform which is limited in computational power I 
 simplified the model using 3d studio max. I reduced the size of the model 
 from 500Mb to 4.2 Mb using proOptimizer.
 The model now has in total about 36,000 vertices and about 53,000 faces.

 I am able to render it but frame rate is slow. I'd like to improve 
 performance using back face culling. The point is I don't know how to 
 activate it (if it is possible):
 I tried with these lines of code but frame rate is still low:

 Code:

 osg::StateSet* ss = _root-getOrCreateStateSet();
 osg::CullFace* cf = new osg::CullFace(osg::CullFace::BACK );
 ss-setAttribute( cf );



 I am using OpenGL ES 2.0 and shaders.

 I setup the camera in this way:

 Code:

 //set the clear color of the camera to be transparent
 _viewer-getCamera()-setClearColor(osg::Vec4(0.0f, 0.0f, 0.0f, 0.0f));
 //set the clear mask for the camera
 _viewer-getCamera()-setClearMask(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT);
 _viewer-getCamera()-setRenderOrder(osg::CameraNode::PRE_RENDER);
 _viewer-getCamera()-setComputeNearFarMode(osgUtil::CullVisitor::DO_NOT_COMPUTE_NEAR_FAR);




 I use DO_NOT_COMPUTE_NEAR_FAR because I need to set manually projection and 
 viewMatrix at every drawing cycle.

 I also initially set viewport like this:

 Code:

 _viewer-getCamera()-setViewport(new osg::Viewport(0, 0, 
 graphicsContext-getTraits()-width, graphicsContext-getTraits()-height));




 The hierarchy of my object is structured as:

 _root is a osg::MatrixTransform

 my 3d model is divided in subparts.
 all the subparts of my 3d model are direct child of _root and are of type 
 osg::Node

 I hope you can give me some tips to improve performance. If you need some 
 other information about my setup I will be glad to give it.

 Thank you.

 Greetings,
 John

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





 ___
 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] Reader-Plugin Callbacks for unsupported data-types

2012-06-12 Thread Robert Osfield
On 4 June 2012 14:06, We See alois.wis...@swiss-simtec.ch wrote:
 Hi,

 When reading models in OpenFlight format, not all data will be read (i.e. 
 surface material code or feature id will not be read). But some application 
 need this data, therefore my idea is, there could be a callback-function, 
 which the reader-plugin is calling when it reads an unsupported data-type 
 (Similar to update-callbacks). So the application could solve the problem.

 Are there any comments or drawbacks about this idea?

 @Robert Osfield: Does such a solution have a change to come into the trunc of 
 osg?

I don't have any opinions on OpenFlight as it's not my area of
expertise - I'm not the plugin author so I'd defer to others about
OpenFlight format specifics.   The possibility of adding custom
handling of reading/writing I'm open to, but I'll defer to others with
a bit more experience with coding on the OpenFlight plugin to provide
their more learned opinions.

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


Re: [osg-users] [osgPlugins] Create osgVolume from a geode

2012-06-12 Thread Robert Osfield
Hi Antonio,

osgVolume doesn't handle Geode's, it just handles 3D imagery packed
into osg::Image.  See the osgvolume example or the dicom plugin so see
how the imagery is setup.

As I don't know what form the data you have in your Geode takes I can
provide absolutely no guidance on this except that osgVolume just take
osg::Image so you'll need to extract these if you have them.

Robert.

On 5 June 2012 17:00, Antonio De Giorgio antonio.degior...@cetma.it wrote:
 Hi,
 i have a function that gives me back a osg geode with the rendering of a 
 dicom volume..now i need to use osgVolume for some functionality..how can i 
 pass from this geode to the osgVolume? what should i use?
 Thank you very much


 Cheers,
 Antonio

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





 ___
 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] Create osgVolume from a geode

2012-06-12 Thread Antonio De Giorgio
Thanks for your helpfull advice..I'll se better these examples and the 
documentation, in order to understand better the osgVolume 
specifications..Thank you very much
cheers
Antonio

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





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


Re: [osg-users] building osgdem

2012-06-12 Thread Umid Shahmaliyev
Hi,

I had the same problem with VirtualPlanetBuilder. I did same changes in source 
and it worked. But for me VirtualPlanetBuilder-2.9.10 which needs OSG-2.8.3 is 
the best because i think that this version is optimal than others. You can use 
VPB-2.9.10 for creating mesh and then you can use this mesh in OSG-3.0.0. 
Strange but i test that osgGis dont work with other versions of VTB..
... 

Thank you!

Cheers,
Umid

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





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


Re: [osg-users] Change object in the scene

2012-06-12 Thread Umid Shahmaliyev
Hi,

There is some ways to do this.. You can use osg:Switch.. Another way you can 
add to root node only which node you want to use, then remove it from root by 
*node-removeChild(childNode) method and then add another one...
Another  way you can do it by nodemask. nodes are dont need to you simple set 
their nodemask 0x0...
... 

Thank you!

Cheers,
Umid

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





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


Re: [osg-users] building osgdem

2012-06-12 Thread Frédéric Trastour
Hi,

I finally found a recent version here :

svn checkout http://www.openscenegraph.org/svn/VirtualPlanetBuilder/trunk
VirtualPlanetBuilder

This version has compiled fine with OSG 3.0.0.

The content of this page :

http://www.openscenegraph.org/projects/VirtualPlanetBuilder/

is quite confusing and IMHO should be deleted.

Best regards,

Frédéric Trastour


 -Message d'origine-
 De : osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-
 boun...@lists.openscenegraph.org] De la part de Umid Shahmaliyev
 Envoyé : mardi 12 juin 2012 14:45
 À : osg-users@lists.openscenegraph.org
 Objet : Re: [osg-users] building osgdem
 
 Hi,
 
 I had the same problem with VirtualPlanetBuilder. I did same changes in
 source and it worked. But for me VirtualPlanetBuilder-2.9.10 which needs
 OSG-2.8.3 is the best because i think that this version is optimal than
 others. You can use VPB-2.9.10 for creating mesh and then you can use this
 mesh in OSG-3.0.0. Strange but i test that osgGis dont work with other
 versions of VTB..
 ...
 
 Thank you!
 
 Cheers,
 Umid
 
 --
 Read this topic online here:
 http://forum.openscenegraph.org/viewtopic.php?p=48232#48232
 
 
 
 
 
 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

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


Re: [osg-users] OSG error handling

2012-06-12 Thread michael kapelko
I've come up with 3 types of errors:
1) constructor failure;
2) missing resource file;
3) invalid function parameter.

How does OSG handle all these cases exactly? You mentioned a feedback
on errors in file loading case, is it about 2)? Can you please
summarize techniques for each of the errors?
Thanks.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Topic approval in this forum

2012-06-12 Thread Conan Doyle
As Art said, it is very important to use your real name... they are sticklers 
regarding this issue...

v/r 
Conan Doyle
Sir Arty




Nav wrote:
 Hi,
 
 I'm glad to see an OSG forum which is very necessary, given that OSG is a bit 
 tough to understand in the beginning.
 
 I would like to urge the owner of the forum to not have a rule where the 
 posts of newbies have to wait for approval. It has been more than a week 
 since I've posted a question and answered somebody else's question, but my 
 posts are still waiting for approval.
 Internet forums manage this situation by giving administrator privileges to 
 trusted forum users and by taking backups of the forum posts. 
 
 Couldn't this forum do the same? This way, collaboration between osg users 
 would improve and people would be happy to introduce themselves to osg, 
 knowing there's a good forum that can help them.
 
 Hoping that you'd consider improving the forum this way.
 
 Thank you!
 
 Cheers,
 Nav
 
 --
 Read this topic online here:
 http://forum.openscenegraph.org/viewtopic.php?p=47816#47816
 
 
 
 
 
 ___
 osg-users mailing list
 
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
 
  --
 Post generated by Mail2Forum


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





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


Re: [osg-users] Monitoring time elapsed

2012-06-12 Thread Maia Randria
Hi Robert,

Sorry for bothering you with this but I think I don't really understand how to 
use viewer.advance() with viewer.getFrameStamp()-getReferenceTime(). Could you 
give an example, please ?

In fact, what I would want to do is to compute and record the elapsed time 
between the time a scene is rendered on the screen ( i.e., the time at which 
the user is viewing the scene) and an event (e.g. the user is clicking on an 
object on the viewport).

Thank you,

Maia

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





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


Re: [osg-users] OSG error handling

2012-06-12 Thread Robert Osfield
On 12 June 2012 14:46, michael kapelko korn...@gmail.com wrote:
 I've come up with 3 types of errors:
 1) constructor failure;
 2) missing resource file;
 3) invalid function parameter.

 How does OSG handle all these cases exactly? You mentioned a feedback
 on errors in file loading case, is it about 2)? Can you please
 summarize techniques for each of the errors?

I can't summarize as I said what is done is class and method specific.

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


Re: [osg-users] Monitoring time elapsed

2012-06-12 Thread Robert Osfield
Hi Maia,

On 12 June 2012 15:50, Maia Randria
veneree.randrianari...@crulrg.ulaval.ca wrote:
 Sorry for bothering you with this but I think I don't really understand how 
 to use viewer.advance() with viewer.getFrameStamp()-getReferenceTime(). 
 Could you give an example, please ?

Go have a look at the source code in the examples and the OSG code
base, use a search on FrameStamp.

 In fact, what I would want to do is to compute and record the elapsed time 
 between the time a scene is rendered on the screen ( i.e., the time at which 
 the user is viewing the scene) and an event (e.g. the user is clicking on an 
 object on the viewport).

The events have a time stamp, as does the event visitors and viewer.

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


[osg-users] Metaflight pager code

2012-06-12 Thread Terry Welsh
Hi,
Some parties have asked about using the MetaFlight terrain
loader/pager I wrote years ago.  My employer says that it would be
alright to opensource this piece of software.  Does anyone have any
suggestions for good places online to opensource a project like this?
It's likely that this software satisfies too small of a niche to be
included anywhere in OSG, but that would be fine by me.

For some background, I wrote this software so that I could page in
MetaFlight terrain databases without processing them to add PagedLOD
nodes.  It uses libxml2 to parse a MetaFlight file (.mft) which
contains a description of the terrain layout.  Then you updated it
with one or more eyepoints each frame and it continuously loads and
unloads the appropriate tiles.  It does not support the entire
MetaFlight spec, just common functionality that I use; maybe the
opensource community will improve it.
--
Terry Welsh
mogumbo 'at' gmail.com
www.reallyslick.com
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] building osgdem

2012-06-12 Thread Chris Hanson
  I also have binary builds of VPB (and osgEarth, osgEphemeris, osgOcean,
etc) available for my paying clients, typically on all 3 major platforms,
both Windows compilers, 32 and 64-bit.

-- 
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] Metaflight pager code

2012-06-12 Thread Chris Hanson

 It's likely that this software satisfies too small of a niche to be
 included anywhere in OSG, but that would be fine by me.


  It's Robert's call, but I wouldn't be opposed to seeing it integrated
into OSG somehow. I don't know how it operates, so I don't know if it's a
OSG-style loader plugin, or somethign different.

  If it doesn't belong in OSG core, I would recommend Google Code. I've
used it for several F/OSS projects of mine, and it is functional and
reliable in my experience.

-- 
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] [osgPlugins] Create osgVolume from a geode

2012-06-12 Thread Chris Hanson
  It sounds like Antonio might be using some VTK code that is converting
volume data, perhaps by marching cubes or the like, into renderable
polygonal geometry.

  In which case, to use osgVolume, you want to feed it the original DICOM
data you passed to VTK, not the data VTK produced for you. In fact, you
REALLY want OSG to load the DICOM data for you so it produces an osg::Image
that can be put into an osg::Texture3D and passed to osgVolume.


-- 
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] Improving performance of OBJ rendering by back face culling

2012-06-12 Thread Chris Hanson

 I am able to render it but frame rate is slow. I'd like to improve
 performance using back face culling. The point is I don't know how to
 activate it (if it is possible):
 I tried with these lines of code but frame rate is still low:
 osg::StateSet* ss = _root-getOrCreateStateSet();
 osg::CullFace* cf = new osg::CullFace(osg::CullFace::BACK );
 ss-setAttribute( cf );


  That should do it.


 I am using OpenGL ES 2.0 and shaders.

 I setup the camera in this way:

 Code:

 //set the clear mask for the camera

 _viewer-getCamera()-setClearMask(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT);


  I've been told secondhand that on some
tiled-renderer mobile platforms, not clearing all buffers (including the
stencil buffer) can put you onto a slow path. I don't know if you need to
be USING stencil buffers in order for this to be relevant or not. Try it
and see.



 I hope you can give me some tips to improve performance. If you need some
 other information about my setup I will be glad to give it.


  Unfortunately, I don't think you can display the osgViewer Stats on an
GLES2 platform, but it would be very useful to be able to gather those
statistics and dump them out some other way, as this would tell you
something about your scene's performance. Though, it won't tell you if you
are fill limited or not. However, you could consider adding the discard
statement to the end of your shader(s) -- this will cut out one step of the
fill operation and might tell you if memory writes are the bottleneck.

  Similarly, you could replace your real shaders with trivial do-nothing
shaders and see if shader execution is your problem.

-- 
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] OpenGL ES 2.0 and LIGHTING

2012-06-12 Thread Chris Hanson
On Sun, May 27, 2012 at 10:45 AM, John Moore kahar...@gmail.com wrote:

 Hi,
  I am developing an application for iPhone and iPod touch using
 OpenSceneGraph. In origin I written my own shaders and I used to control
 light using a uniform. It was working. Now I wanted to switch to use
 osg::Light and osg::LightSource because I think it is more object-oriented,
 but when I run my code I obtain this warning:
 Code:
 Warning: Light::apply(State) - not supported.
 Does this mean that I can't use this approach with OpenGL ES 2.0 ?



  Correct.

  There is some interest from several people in having this work. If you
decide you want to extend the osg::Light code to make it setup new, custom
uniforms to replicate the legacy GLSL Uniforms. Refer to the quick
reference chart here:

http://mew.cx/glsl_quickref.pdf

See gl_LightSourceParameters and gl_LightSource[gl_MaxLights];

  In the Good Old Days, OpenGL pre-loaded all interesting light values
here. You will need to add code to the osg::Light::apply() to create and
populate new osg_ uniforms to replace the legacy GLSL
uniform gl_LightSource, and then your code will have access to the info it
needs to re-create the lighting defined by osg::Light. Refer to some of the
other apply() methods for parts of OSG that already support GLSL uniforms
(maybe Texture) to see how and when to perform this uniform setup, as many
people (not using GLES2 or GL3/GL4) may NOT want these uniforms pre-loaded
for them.


-- 
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] Monitoring time elapsed

2012-06-12 Thread Maia Randria
OK, I will do so, thank you very  much.
Maia


robertosfield wrote:
 Hi Maia,
 
 On 12 June 2012 15:50, Maia Randria
  wrote:
 
  Sorry for bothering you with this but I think I don't really understand how 
  to use viewer.advance() with viewer.getFrameStamp()-getReferenceTime(). 
  Could you give an example, please ?
  
 
 Go have a look at the source code in the examples and the OSG code
 base, use a search on FrameStamp.
 
 
  In fact, what I would want to do is to compute and record the elapsed time 
  between the time a scene is rendered on the screen ( i.e., the time at 
  which the user is viewing the scene) and an event (e.g. the user is 
  clicking on an object on the viewport).
  
 
 The events have a time stamp, as does the event visitors and viewer.
 
 Robert.
 ___
 osg-users mailing list
 
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
 
  --
 Post generated by Mail2Forum


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





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


Re: [osg-users] Possibility of an OSG bot

2012-06-12 Thread Sterling Somers
I have had a look at occlusion example and have been trying to hack it some and 
maybe get some understanding. At the same time I also tried using the 
PolytopeIntersector with the camera.  To that end, I think I can use the 
intersections iterator to find all the nodes that intersect (though, that looks 
like it might  be a very slow way of doing things). 

What I cannot even begin to fathom is how I can actually use occlusion nodes . 
I can see from the statistics in the viewer that it does not draw objects that 
are occluded (frame rates change, triangle count changes, etc). 

Any insight would be helpful.

Thanks,

Sterling

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





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


Re: [osg-users] [3rdparty] Installing osg for Android on Windows (Eclipse)

2012-06-12 Thread Ou Yang
Hi, Jorge 

Thanks for your advice! After learning all the basic thing about linux and 
android programming, I successed in building osg for android and tested the 
sample with my android phone. As an absolute novice, it's really a long 
journey. For other newbies like me, i have found a easy to follow tutorial:
http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/2012-March/057074.html

Another problem: if i want to develope some big project just like 
osgVirtualPlanet or osgEarth for android, what is the best IDE for this task? 
Since the only IDE i'm familiar with is visual studio, i have searched 
something similiar with it but couldn't find any useful info. Maybe eclipse cdt?


Thank you!

Cheers,
Ou :)

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





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


Re: [osg-users] Metaflight pager code

2012-06-12 Thread Robert Osfield
Hi Terry,

I'm open to a MetaFlight support being integrated into core
OpenSceneGraph release.  I know very little about your code so can't
comment on how easily it'd fit within the OSG codebase.  I know of
others that are interested in MetaFlight support so I'm sure there is
scope for others helping out.

For me the first step would be to publish the code.  github,
googlecode or some other repository would be fine, but if it does look
appropriate for merging with the OpenSceneGraph mainline it might be
best to post the code informally and then let the discussion about it
begin.  Potentially we can add you as a wriiter for the directories
within the OSG that it'd need.

Robert.

On 12 June 2012 17:03, Terry Welsh mogu...@gmail.com wrote:
 Hi,
 Some parties have asked about using the MetaFlight terrain
 loader/pager I wrote years ago.  My employer says that it would be
 alright to opensource this piece of software.  Does anyone have any
 suggestions for good places online to opensource a project like this?
 It's likely that this software satisfies too small of a niche to be
 included anywhere in OSG, but that would be fine by me.

 For some background, I wrote this software so that I could page in
 MetaFlight terrain databases without processing them to add PagedLOD
 nodes.  It uses libxml2 to parse a MetaFlight file (.mft) which
 contains a description of the terrain layout.  Then you updated it
 with one or more eyepoints each frame and it continuously loads and
 unloads the appropriate tiles.  It does not support the entire
 MetaFlight spec, just common functionality that I use; maybe the
 opensource community will improve it.
 --
 Terry Welsh
 mogumbo 'at' gmail.com
 www.reallyslick.com
 ___
 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] [vpb] osgdem, any way to disable all texture compression?

2012-06-12 Thread Ethan Fahy
Hello all,

Is there any way to disable all texture compression when using osgdem?  I 
realize this in an unusual request and that my frames per second and model size 
would go way up, but I was hoping to retrieve the exact original texel values 
from the textures for lookup table purposes.  I thought that the -RGBA flag 
might do the trick but when I zoom in on the output terrain database and 
compare it to my source texture I can still see compression artifacts that 
would prevent me from using a lookup table in my shaders.

Thanks,

-Ethan

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





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


Re: [osg-users] Custom Camera and Multi-stage Rendering (RenderStage)

2012-06-12 Thread Paul Leopard
I'm almost there, just can't seem to figure out how to attach the 
osg::FrameBufferObject instances to the camera in a way that they will be 
recorded in the buffer attachment map. I've summarized the process below, 
replacing some variables with uppercase descriptions of what they represent. 
Anyone have an idea of how to fill in the TODO tags below?


Code:

void IRCamera::initBuffers( osg::GraphicsContext* pGfxContext )
{
// Get graphics context state and ID and the FBO extensions
osg::State* pGfxContextState = pGfxContext-getState();

unsigned int gfxContextID = pGfxContextState-getContextID();

osg::FBOExtensions* pFBOExtensions = osg::FBOExtensions::instance( 
gfxContextID, true );

// Extract some info ...
bool isMultiSample = N_COLOR_SAMPLES  0;
bool isCSAA = N_COVERAGE_SAMPLES  N_COLOR_SAMPLES;
size_t texWidth = COLOR_TEXTURE-getTextureWidth();
size_t texHeight = COLOR_TEXTURE-getTextureHeight();

// Create the framebuffer objects and apply the graphics context state to them

m_RenderFBO = new osg::FrameBufferObject();
m_RenderFBO-apply( *pGfxContextState );

m_ResolveFBO = new osg::FrameBufferObject();
m_ResolveFBO-apply( *pGfxContextState );

// Non-multisample setup just attaches textures directly to the FBO's
if ( !isMultiSample )
{
// Attach color texture to the render FBO
m_RenderFBO-setAttachment(
osg::Camera::COLOR_BUFFER,
osg::FrameBufferAttachment( COLOR_TEXTURE )
);

// Attach depth texture to the render FBO
m_RenderFBO-setAttachment(
osg::Camera::DEPTH_BUFFER,
osg::FrameBufferAttachment( DEPTH_TEXTURE )
);

// @TODO@: ATTACH THE RENDER FBO SOMEHOW SO THAT IT IS REGISTERED 
// IN THE BUFFER ATTACHMENT MAP
}

// Multisample setup
else
{
// Create and attach a color renderbuffer to the RENDER FBO
osg::RenderBuffer* pColorRB =
new osg::RenderBuffer( 
texWidth,
texHeight,
COLOR_BUFFER_FORMAT,
N_COVERAGE_SAMPLES,
N_COLOR_SAMPLES
);
m_RenderFBO-setAttachment(
osg::Camera::COLOR_BUFFER,
osg::FrameBufferAttachment( pColorRB )
);

// Create and attach a depth renderbuffer to the RENDER FBO
osg::RenderBuffer* pDepthRB =
new osg::RenderBuffer( 
texWidth,
texHeight,
DEPTH_BUFFER_FORMAT,
N_COVERAGE_SAMPLES,
N_COLOR_SAMPLES
);
m_RenderFBO-setAttachment(
osg::Camera::DEPTH_BUFFER,
osg::FrameBufferAttachment( pDepthRB )
);

// @TODO@: ATTACH THE RENDER FBO SOMEHOW SO THAT IT IS REGISTERED 
// IN THE BUFFER ATTACHMENT MAP

// Attach color texture to RESOLVE FBO
m_ResolveFBO-setAttachment( 
osg::Camera::COLOR_BUFFER,
osg::FrameBufferAttachment( COLOR_TEXTURE )
);

// Attach depth texture to RESOLVE FBO
m_ResolveFBO-setAttachment( 
osg::Camera::DEPTH_BUFFER,
osg::FrameBufferAttachment( DEPTH_TEXTURE )
);

// @TODO@: ATTACH THE RESOLVE FBO SOMEHOW SO THAT IT IS REGISTERED 
// IN THE BUFFER ATTACHMENT MAP
}

// Double check everything
size_t nBuffers = this-getBufferAttachmentMap().size();
cout  BUFFER ATTACHMENT MAP SIZE :   nBuffers  endl;

sgp_core::String errorMsg;
try
{
sgp_osg::CheckFramebufferStatus( pGfxContext );
}
catch( ... )
{
pFBOExtensions-glBindFramebuffer( GL_FRAMEBUFFER_EXT, 0 );
SGP_RETHROW;
}




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





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


Re: [osg-users] [vpb] osgdem, any way to disable all texture compression?

2012-06-12 Thread Robert Osfield
Hi Ethan,

You'll need to use one of:

  --RGB-16  Use 16bit RGB destination imagery.
  --RGB-24  Use 24bit RGB destination imagery.
  --RGB32F  Use 3 channel, 32bit per channel destination imagery.
  --RGBAUse 32bit RGBA destination imagery.
  --RGBA-16 Use 16bit RGBA destination imagery.

Use osgdem -h to list all the options. Note, -RGBA won't be recognized
as --RGBA.

Robert.

On 12 June 2012 19:58, Ethan Fahy ethanf...@gmail.com wrote:
 Hello all,

 Is there any way to disable all texture compression when using osgdem?  I 
 realize this in an unusual request and that my frames per second and model 
 size would go way up, but I was hoping to retrieve the exact original texel 
 values from the textures for lookup table purposes.  I thought that the -RGBA 
 flag might do the trick but when I zoom in on the output terrain database and 
 compare it to my source texture I can still see compression artifacts that 
 would prevent me from using a lookup table in my shaders.

 Thanks,

 -Ethan

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





 ___
 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] Custom Camera and Multi-stage Rendering (RenderStage)

2012-06-12 Thread Paul Leopard
I guess what I am asking is this ...

I have attached render buffers and textures to the two FrameBufferObject 
instances m_ResolveFBO and m_RenderFBO ...

Now, how do I attach the two FrameBufferObject instances to a Camera's buffer 
attachment map?

I see two Camera 'attach(...)' methods and neither deals with a 
FrameBufferObject ...


Thanks,
Paul

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





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


Re: [osg-users] zoom to object with camera

2012-06-12 Thread Jason Anderssen
Torben,

Thanks for reply, and it works perfectly.  However is there a way to make it 
animate to the zoom points.

I have a Nodetracker-Manipulator set as my default manipulator, and I change 
the node path as the user selects objects from the scene, it would be nice if I 
could animate the zoom to the object?
I know I could do it all manually, but I am assuming that OSG would probably 
provide some easy mechanism maybe ?

Thanks in advance.

Cheers
Jason
On 06/06/2012, at 3:50 PM, Torben Dannhauer wrote:

 Hi,
 
 yes this function is called node tracking. You can track a node and configure 
 which degrees of freedom your camera should provide.
 
 There is a default Nodetracker-Manipulator in OSG. You just have to set the 
 Node you want to track.
 
 
 
 Cheers,
 Torben
 
 --
 Read this topic online here:
 http://forum.openscenegraph.org/viewtopic.php?p=48067#48067
 
 
 
 
 
 ___
 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] Scene graph construction advice

2012-06-12 Thread Jason Anderssen
Hi all,

Working with OSG, and all is going well.  But would like to know would be the 
recommended way to do the following:

User picks an object.  Turn off the rest of the scene so only the single object 
they selected is displayed?
 
also 

User picks an object, depth peal the entire scene to the single object selected?

Thank you in advance for any help

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


Re: [osg-users] 139.com Spam

2012-06-12 Thread David Glenn

kcbale wrote:
 Is anyone else getting these Chinese emails quoting the subject of a post 
 made to osg-users? 
 
 I've had a few now and I have no idea where they're coming from. 
 
 
 K.
 
  --
 Post generated by Mail2Forum


I've been getting them as resently as yesterday it seems to apper after they 
send out the list of forum subbitions to e-mail and it targets, prople that 
post messages on the boards - that's the only time I've been hit. 

I've reported it to my handlers and took other corrective action.
That's all I can do! 

You might consiter adding this guy to your spam filter - if you have one!


David Glenn
---
D Glenn 3D Computer Graphics amp; Media Systems.
www.dglenn.com

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





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


Re: [osg-users] Building OSG with FFMPEG

2012-06-12 Thread zy liu
hi,I think the FFEMPG config is the same as other project, Include Bin and
so on . you can specific the path in CMake.

2012/5/30 Praveena Sara pravee...@gmail.com

 Hi,

 I recently got hold of the book OpenSceneGraph 3 Cookbook. I want to
 show a live webcam feed in OSG like in the example given in the book (I'm
 working on an Augmented Reality project). In order to this, it says I need
 to have FFMPEG built with OSG.

 So, I downloaded the
  FFmpeg git-9c27f29 64-bit Static (Latest)
  under 64-bit Builds (Static)  from zeranoe site but I have no idea how
 to link these files in CMake, when Building OSG.

 File Structure:
 +presets
 +licenses
 +doc
 -bin
 |__ffmpeg.exe
 |__ffplay.exe
 |__ffprobe.exe

 According to this tutorial (**I'm not allowed to share a URL**) I'd only
 have to Set
  “FFMPEG_ROOT” to: C:/Projects/3rdParty/ffmpeg
 . Is this correct? Have I downloaded the correct FFMPEG build? Which
 values need to be entered into CMake when building OSG with FFMPEG?

 My configuration:
 Windows 7, 64-bit
 OSG 3.0.1
 Visual Studio 2008 (Professional Edition)

 ...

 Thank you!

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





 ___
 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] Building OSG with FFMPEG

2012-06-12 Thread Roland Hill
Hi,

There have been a few API changes in ffmpeg and the latest ones don't link with 
OSG. I use a snapshot (part of ffmpeg 0.11 branch I think) from a few months 
ago (not using it through OSG) and have to disable ffmpeg in my OSG build. OSG 
will build with the version in the Ubuntu repositories, part of the 0.8 branch, 
so you might need to get something from 0.8.x.

Cheers,
Roland

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





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


Re: [osg-users] Error while running the Sample program in book

2012-06-12 Thread Nav Joseph

praveenaj wrote:
 
 By the way, I still can't figure out what's the difference between 
 OSG_FILE_PATH and OSG_SAMPLES_PATH? Documentation doesn't clearly describe 
 the difference between those. Any help?
 

There's no difference between those environment variables. Both aren't standard 
OSG variables, so you can even have ABC_DEF as an environment variable to point 
to the OSG path. Someone probably decided that they wanted a variable to hold 
the path to OSG code samples, so they created OSG_SAMPLES_PATH.
In my system, I've created only OSG_FILE_PATH which points to 
F:\ProgramFiles\OSG\OpenSceneGraph-Data-3.0.0, and this folder is where I've 
stored all the cessna.osg files and the image files etc.

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





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


Re: [osg-users] [osgPlugins] Reader-Plugin Callbacks for unsupported data-types

2012-06-12 Thread We See

robertosfield wrote:
 On 4 June 2012 14:06, We See  wrote:
 
  Hi,
  
  When reading models in OpenFlight format, not all data will be read (i.e. 
  surface material code or feature id will not be read). But some application 
  need this data, therefore my idea is, there could be a callback-function, 
  which the reader-plugin is calling when it reads an unsupported data-type 
  (Similar to update-callbacks). So the application could solve the problem.
  
  Are there any comments or drawbacks about this idea?
  
  @Robert Osfield: Does such a solution have a change to come into the trunc 
  of osg?
  
 
 I don't have any opinions on OpenFlight as it's not my area of
 expertise - I'm not the plugin author so I'd defer to others about
 OpenFlight format specifics.   The possibility of adding custom
 handling of reading/writing I'm open to, but I'll defer to others with
 a bit more experience with coding on the OpenFlight plugin to provide
 their more learned opinions.
 
 Robert.
 ___
 osg-users mailing list
 
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
 
  --
 Post generated by Mail2Forum


Hi Robert,
My suggestion would be common for all plugins. Is there a person responsible 
for all plug-ins?

WeSee

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





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


Re: [osg-users] Topic approval in this forum

2012-06-12 Thread Nav Joseph
Hi Art and sholmes:

Thanks for approving me into the community. Sorry, but it's because I'm so 
accustomed to a much-less-strict registration process on other forums, that I 
thought that even here, the rules would be the same.

I don't mean any offence...just trying to suggest alternatives, that if 
moderation is slowly becoming a problem, would it be possible to gradually 
start asking and answering OSG questions on StackOverflow.com? Or to start a 
new forum on http://area51.stackexchange.com/

I understand there may be ownership issues and the very sentiment of having 
ones own forum to be discussed, but if there's the slightest chance that the 
users of osg can benefit from the questions being asked on StackOverflow (which 
is an excellent forum), and the moderators can be spared of the arduous 
moderation task, so that they can focus on what they like (programming), then 
it's a win-win for everyone.

Meanwhile, I'm happy to be here, and glad to contribute to the community (which 
I already have started doing :-) ).
Thanks :)

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





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


Re: [osg-users] Error while running the Sample program in book

2012-06-12 Thread Praveena Sara
Thanks guys for the input.

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





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


Re: [osg-users] rotate an osg object with two fingers on a touch screen (Android)

2012-06-12 Thread Nav Joseph
Sounds more like an algorithm solution than an osg solution.
The below algo isn't perfect, but it'll give you an idea.

finger1=false;
finger2=false;

while(checkForFingerPressRelease)
{
if (finger1pressed) finger1=true;
if (finger2pressed) finger2=true;
if (finger1released) finger1=false;
if (finger2released) finger2=false;

if (finger1  finger2)
{
  check for dragging of finger2 and rotate
  else
  check for dragging of finger1 and rotate
}

}//while

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





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