Re: [osg-users] FFmpeg and sound

2010-01-20 Thread Robert Osfield
Hi Jason,

On Tue, Jan 19, 2010 at 8:43 PM, Jason Daly jd...@ist.ucf.edu wrote:
 If I were to implement an OpenAL AudioSink, I'd imagine you'd want it to be
 a plugin (so the OSG can still be compiled without OpenAL).  How would you
 envision this plugin being tied in to the core?    I started on an OpenAL
 plugin last week, but I hit a wall when trying to figure out how to do this.

 The ReaderWriter interface works great for file-based plugins, but the
 AudioSink seems like it's different enough that a new kind of interface is
 needed.  Do you agree?  If so, would this interface also live in osgDB?
  Would it be part of Registry, like ReaderWriter, DotOsgWrapper, etc.?

 Any other thoughts?

I have been thinking about the potential of an osgAudio library that
abstracts away from the implementation details of OpenAL and keeps the
door open to multiple implementations, and then within this have some
form of registration of the audio implementation, then the audio
implementations would plugin in to this, or like osgViewer just be
built into the osgAudio library.  osgViewer and it's handling of
GraphicsWindow implementation might be a reasonable model for this.

An straight audio sink is rather more straight forward than this
though... so perhaps one could just have a slimline
AudioSystemInterface/Factory class a bit like
osg::GraphicsContext::WindowingSystemInterface singleton and then have
this be where you register your scheme for implementing the AudioSink.
 Then in the plugins that need an audio sink it can go to this
singleton and grab and implementation.  The plugin might also use
osgDB to load a plugin to force the registration of a implementation
of a AudioSystemInterface.  Such an approach would be easier to graft
on than writing a full blown osgAudio library.

Robert.



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


Re: [osg-users] [vpb] Problems using SSI Cluster Example

2010-01-20 Thread Samuel Jarque
Hi,

J.P. Delport, yes, on node 2 run osgviewer. I've run osgdem with strace on node 
2 and segfault happens because some files don't exist ( these files are 
build_master.source and tasks files) on node 2.
I test osgdem copying these files from node 1 to node 2 with scp, and it works, 
but I think this is a shoddy piece of work.

Thank you!

Cheers,
Samuel

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





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


Re: [osg-users] [vpb] Problems using SSI Cluster Example

2010-01-20 Thread Robert Osfield
Hi Samuel,

On Wed, Jan 20, 2010 at 9:09 AM, Samuel Jarque osgfo...@tevs.eu wrote:
 J.P. Delport, yes, on node 2 run osgviewer. I've run osgdem with strace on 
 node 2 and segfault happens because some files don't exist ( these files are 
 build_master.source and tasks files) on node 2.

Missing files shouldn't cause osgdem to segfault.  Could you get a
strack trace of when it happens then we can start tracking down the
bug.  Emitting a useful warning and then exiting is what should be
happening.

 I test osgdem copying these files from node 1 to node 2 with scp, and it 
 works,

You shouldn't need to copy files, but you should have the disks
accessible from the slaves so they can read/write to them.

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


Re: [osg-users] [vpb] Problems using SSI Cluster Example

2010-01-20 Thread J.P. Delport

Hi,

Samuel Jarque wrote:

Hi,

J.P. Delport, yes, on node 2 run osgviewer. I've run osgdem with strace on node 
2 and segfault happens because some files don't exist ( these files are 
build_master.source and tasks files) on node 2.
I test osgdem copying these files from node 1 to node 2 with scp, and it works, 
but I think this is a shoddy piece of work.


the example assumes that there is a shared directory visible from all 
nodes. Therefore, if node1 creates the build_master.source and tasks 
files they are automatically visible to node2. In the example glusterfs 
is used for this purpose. You could try nfs or something else.


rgds
jp



Thank you!

Cheers,
Samuel

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





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


--
This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard. 
The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html.


This message has been scanned for viruses and dangerous content by MailScanner, 
and is believed to be clean.  MailScanner thanks Transtec Computers for their support.


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


Re: [osg-users] Saving Screenshot

2010-01-20 Thread Danny Lesnik
Hi,

Does anybody have any clue? how to solve this problem?

Thank you!

Cheers,
Danny

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





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


[osg-users] FBX plugin issues...

2010-01-20 Thread alessandro terenzi
I'm trying the FBX plugin but I'm experiencing a couple of problems:

1) the model is not correctly oriented (no matter if I export using Y-UP or
Z-UP options within 3dsmax)

2) aniamtions don't start (I also tried to export using the 'bake animation'
option)

Are these features currently supported/implemented?

By the way, I'm using the latest development release (2.9.6) and in
particular the latest submission for the FBX plugin. I tried with models
exported from 3dsmax 2010 (FBX file format FBX200900 - binary).

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


Re: [osg-users] Saving Screenshot

2010-01-20 Thread J.P. Delport

See osgscreencapture example or search for screencapturehandler.

jp

Danny Lesnik wrote:

Hi,

Does anybody have any clue? how to solve this problem?

Thank you!

Cheers,
Danny

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





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


--
This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard. 
The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html.


This message has been scanned for viruses and dangerous content by MailScanner, 
and is believed to be clean.  MailScanner thanks Transtec Computers for their support.


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


Re: [osg-users] FBX plugin issues...

2010-01-20 Thread alessandro terenzi
Another thing I also noted is related to transparency: I reduced the opacity
value inside 3dsmax material editor, but the model is always 100% opaque.

Is transparency currently supported?
Regards.
Alessandro

On Wed, Jan 20, 2010 at 10:36 AM, alessandro terenzi a.tere...@gmail.comwrote:

 I'm trying the FBX plugin but I'm experiencing a couple of problems:

 1) the model is not correctly oriented (no matter if I export using Y-UP or
 Z-UP options within 3dsmax)

 2) aniamtions don't start (I also tried to export using the 'bake
 animation' option)

 Are these features currently supported/implemented?

 By the way, I'm using the latest development release (2.9.6) and in
 particular the latest submission for the FBX plugin. I tried with models
 exported from 3dsmax 2010 (FBX file format FBX200900 - binary).

 Thank  you. Kind regards.
 Alessandro

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


Re: [osg-users] [vpb] Problems using SSI Cluster Example

2010-01-20 Thread Samuel Jarque
Hi,

Sorry, I wasn't understanding the example. Well, now I'm going to configure my 
system with nfs. When I finish to configure it I will write again.

Thank you very much Robert and J.P. Delport

Cheers,
Samuel

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





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


[osg-users] clipping problem with displacement shader

2010-01-20 Thread Martin Großer

Hello,

yesterday i wrote a glsl displacement shader:

uniform sampler2D displMap;

void main()
{
  gl_TexCoord[0] = gl_MultiTexCoord0;
  vec4 tex = texture2D(displMap, gl_TexCoord[0].st);
  float displ = 0.3 * tex.r + 0.59 * tex.g + 0.11 * tex.b;
  vec4 vertex = vec4(gl_Normal * displ * 5.0 , 0.0) + gl_Vertex;
  gl_Position = gl_ModelViewProjectionMatrix * vertex;
}

Now my problem is the clipping. When I start the application and I turn 
around the objekt the displaced vertices and faces disappear. It seems 
to me that the vertices clipped in the front of the near plane.


Is the displacement of the vertices a problem relating to the clipping 
planes?


Cheers

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


Re: [osg-users] clipping problem with displacement shader

2010-01-20 Thread Robert Osfield
Hi Martin,

You'll need to set the bounding volume of the osg::Geometry to
encompass the displacement by using the Geometry::setInitialBound(..)
method.

Robert.

2010/1/20 Martin Großer grosser.mar...@gmx.de:
 Hello,

 yesterday i wrote a glsl displacement shader:

 uniform sampler2D displMap;

 void main()
 {
   gl_TexCoord[0] = gl_MultiTexCoord0;
   vec4 tex = texture2D(displMap, gl_TexCoord[0].st);
   float displ = 0.3 * tex.r + 0.59 * tex.g + 0.11 * tex.b;
   vec4 vertex = vec4(gl_Normal * displ * 5.0 , 0.0) + gl_Vertex;
   gl_Position = gl_ModelViewProjectionMatrix * vertex;
 }

 Now my problem is the clipping. When I start the application and I turn
 around the objekt the displaced vertices and faces disappear. It seems to me
 that the vertices clipped in the front of the near plane.

 Is the displacement of the vertices a problem relating to the clipping
 planes?

 Cheers

 Martin

 ___
 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::StateAttribute::PROTECTED meanings

2010-01-20 Thread Trajce Nikolov
is this meaning the attribute can not be overwritten from the top of the
hierarchy?

is so, does not work for me

Nick

http://www.linkedin.com/in/tnick
Sent from Izmit, 41, Turkey
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] QT GL widget: switch to full screen vanishes scene graph parts

2010-01-20 Thread Maurice Moss
Hi,

quite not sure what happens to gl objects when switching QT widget to 
fullscreen, I found a solution.
A node visitor calling releaseGLObjects() on drawables does the trick.

Thank you!

Cheers,
Maurice

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





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


Re: [osg-users] [vpb] Problems using SSI Cluster Example

2010-01-20 Thread Samuel Jarque
Hi,

The problem have been solved. I only had to configure nfs. I must read more 
carefully.

Thank you so much!

Cheers,
Samuel

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





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


Re: [osg-users] [vpb] Problems using SSI Cluster Example

2010-01-20 Thread J.P. Delport

Hi,

Samuel Jarque wrote:

Hi,

The problem have been solved. I only had to configure nfs. I must read more 
carefully.


great to know that it works. If you have some time, please add a page to 
the vpb wiki detailing your setup. I'm sure someone will find it useful 
later.


rgds
jp



Thank you so much!

Cheers,
Samuel

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





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


--
This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard. 
The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html.


This message has been scanned for viruses and dangerous content by MailScanner, 
and is believed to be clean.  MailScanner thanks Transtec Computers for their support.


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


[osg-users] Usage of osg::Node clone methode.

2010-01-20 Thread Guillaume Saby
Hi,

I'm actually in my second year for a diploma in IT. We curreently work on a 
group project using OpenSceneGraph.

We're making a turn by turn tactical game. On our map, we want to load some 
trees. We have a .obj model (soon .osg) and use osgDB::ReadNodeFile to load it, 
and put it in a PositionAttituteTransform with the good pos.

The problem is that it took some time to load the model (around a second)...I 
try to avoid it by copying the already loaded model, using the clone function 
of osg::Node in a for loop, and puting the cloned node inside a newly created 
PositionAttituteTransform ...

But only one tree apears on the map. 
If i use each time osgDB::ReadNodeFile in the loop, it works, i've got my tree, 
but it took ~ 5 second for 5 trees

Here's my code, maybe more clear than my english...


Code:

//Loading of the model
osg::ref_ptrosg::Node Arbre = osgDB::readNodeFile(modeles/arbre.obj);

osg::ref_ptrosg::PositionAttitudeTransform temp;

for(int i = 0 ; i  5; i++)
{
temp = new osg::PositionAttitudeTransform;

osg::Node* copy = dynamic_castosg::Node*(Arbre-clone(osg::CopyOp()));
temp-addChild(copy);
temp-setPosition(myPos);
this-addChild(temp.get());
}




this is my class which inherit from osg::Group.

Did i use it wrong? Is it not possible to copy a node loaded byt 
osg::ReadNodeFile?

Thank you![/code]

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





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


Re: [osg-users] Usage of osg::Node clone methode.

2010-01-20 Thread Trajce Nikolov
Hi,

you dont need to clone the model for this purpose. Use the one loaded with
different MatrixTransforms on top

osg::ref_ptrosg::Node Arbre = osgDB::readNodeFile(modeles/arbre.obj);


for(int i = 0 ; i  5; i++)
{
osg::PositionAttitudeTransform* temp = new osg::PositionAttitudeTransform;

temp-addChild(Abre.get());
temp-setPosition(myPos);
this-addChild(temp.get());
}

Also use osgconv to convert it into ive (osgconvert model.obj model.ive). It
will load much faster


Nick

http://www.linkedin.com/in/tnick
Sent from Izmit, 41, Turkey

On Wed, Jan 20, 2010 at 3:32 PM, Guillaume Saby luckybo...@hotmail.frwrote:

 Hi,

 I'm actually in my second year for a diploma in IT. We curreently work on a
 group project using OpenSceneGraph.

 We're making a turn by turn tactical game. On our map, we want to load some
 trees. We have a .obj model (soon .osg) and use osgDB::ReadNodeFile to load
 it, and put it in a PositionAttituteTransform with the good pos.

 The problem is that it took some time to load the model (around a
 second)...I try to avoid it by copying the already loaded model, using the
 clone function of osg::Node in a for loop, and puting the cloned node inside
 a newly created PositionAttituteTransform ...

 But only one tree apears on the map.
 If i use each time osgDB::ReadNodeFile in the loop, it works, i've got my
 tree, but it took ~ 5 second for 5 trees

 Here's my code, maybe more clear than my english...


 Code:

 //Loading of the model
 osg::ref_ptrosg::Node Arbre = osgDB::readNodeFile(modeles/arbre.obj);

 osg::ref_ptrosg::PositionAttitudeTransform temp;

 for(int i = 0 ; i  5; i++)
 {
 temp = new osg::PositionAttitudeTransform;

 osg::Node* copy = dynamic_castosg::Node*(Arbre-clone(osg::CopyOp()));
 temp-addChild(copy);
 temp-setPosition(myPos);
 this-addChild(temp.get());
 }




 this is my class which inherit from osg::Group.

 Did i use it wrong? Is it not possible to copy a node loaded byt
 osg::ReadNodeFile?

 Thank you![/code]

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





 ___
 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] Vertex Buffer Objects and Transform Feedback

2010-01-20 Thread Mattias Thell
Hello,

I am trying to implement a particle system residing on the GPU using vertex 
buffer objects and transform feedback. Currently, my plan for achieving this 
looks like this:

1 - Define two VBOs

2 - Render vertex buffer 1 and let a geometry shader update vertex (particle) 
positions, size, and whatnot.
3 - Store the updated vertices in vertex buffer 2 using transform feedback
4 - Render VB 2 using a second geometry shader, creating billboards out of the 
points in the buffer.
5 - Swap buffers 1 and 2.

However, I am not sure how exactly to go about this using OSG. It turns out 
this was much harder to do than I anticipated :)

For starters, I extended osg::Drawable, which seemed like to the most 
straightforward approach. Instead of using DrawElement/DrawArrays (for which I 
didn't find a way to swap buffers) I figured I'd create two seperate 
osg::VertexBufferObject fields and use them by manually binding the buffers 
and drawing them. Like so: 


Code:

// Init

mVertices = new osg::Vec4Array(); // A couple of vertices for testing purposes
mVertices-push_back(osg::Vec4(0.0f, 0.0f, 0.0f, 1.0f));
mVertices-push_back(osg::Vec4(2.0f, 0.0f, 0.0f, 1.0f));

// Just showing one VBO for clarity
mVbo1 = new osg::VertexBufferObject();
mVbo1-addArray(mVertices.get());
mVbo1-getOrCreateGLBufferObject(state.getContextID())-compileBuffer();





Code:

// Render

/* snip */

state.setVertexPointer(mVertices.get());

state.bindVertexBufferObject(mVbo1-getGLBufferObject(state.getContextID()) );

glDrawArrays(GL_POINTS, 0, mVertices-size());





Unfortunately, this resulted in the following error messages


Code:

Error: glGenBuffers not supported by OpenGL driver
Error: glBindBuffer not supported by OpenGL driver
Error: glBufferData not supported by OpenGL driver
Error: glBufferData not supported by OpenGL driver




which, after a quick look at the source, seems to have something do with the 
proper extensions not being initialized... Any ideas?

Secondly, as OSG to my knowledge doesn't have native support for transform 
feedback, I figured to use Glew to access the needed functions 
(glBeginTransformFeedback, glEndTransformFeedback, etc). However, glewInit() 
fails to initialize properly and the basic gist of [another thread] is that you 
shouldn't use glew. 8) So what options do I have?

I realize that I am quite vague in my description but I'm just fishing for a 
bit of information on how to do these things the OSG way. If there is a better 
way, please let me know! :)

As for version, I am using OSG 2.9.6

Thanks!

Regards,
Mattias

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





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


Re: [osg-users] [vpb] Problems using SSI Cluster Example

2010-01-20 Thread Torben Dannhauer
Hi,

I use sshf for the shared working directory. It is'nt the fastet solution I 
suppose, but its easy to setup.


Cheers,
Torben

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





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


Re: [osg-users] osg::StateAttribute::PROTECTED meanings

2010-01-20 Thread Thrall, Bryan
Trajce Nikolov wrote on 2010-01-20: 
 is this meaning the attribute can not be overwritten from the top of
 the hierarchy?
 
 is so, does not work for me

Yes, that is the meaning. However, the top of the hierarchy can use OVERRIDE to 
override the PROTECTED state, IIRC.

Can you give an example of how you trying to use PROTECTED? Perhaps something 
else is going wrong...

--
Bryan Thrall
FlightSafety International
bryan.thr...@flightsafety.com
  


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


Re: [osg-users] osg::StateAttribute::PROTECTED meanings

2010-01-20 Thread Trajce Nikolov
well, I fixed it with a shader. But, if this is meant to be protected, then
it shouldnt be overriden I think

Nick

http://www.linkedin.com/in/tnick
Sent from Izmit, 41, Turkey

On Wed, Jan 20, 2010 at 4:50 PM, Thrall, Bryan 
bryan.thr...@flightsafety.com wrote:

 Trajce Nikolov wrote on 2010-01-20:
  is this meaning the attribute can not be overwritten from the top of
  the hierarchy?
 
  is so, does not work for me

 Yes, that is the meaning. However, the top of the hierarchy can use
 OVERRIDE to override the PROTECTED state, IIRC.

 Can you give an example of how you trying to use PROTECTED? Perhaps
 something else is going wrong...

 --
 Bryan Thrall
 FlightSafety International
 bryan.thr...@flightsafety.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


Re: [osg-users] osg::StateAttribute::PROTECTED meanings

2010-01-20 Thread Paul Martz

Thrall, Bryan wrote:

Yes, that is the meaning. However, the top of the hierarchy can use OVERRIDE to 
override the PROTECTED state, IIRC.


Actually, PROTECTED keeps the state from being overridden.

The default inheritance is INHERIT, which means that state inherits down 
the scene graph unless a child node sets the same state to a different 
value. In that case, it doesn't actually inherit at all, and the child 
state takes effect.


OVERRIDE, when set on a parent state mode or attribute, means that the 
parent's state will override a child's state. If forces parent state to 
always be inherited by children, even if they specify the same state 
with different values.


Finally, a child has the option of setting state with the PROTECTED mode 
bit, which means that even if a parent node sets the same state with 
OVERRIDE, the child's state will take effect.


On a tangent... These really seem like misnomers. INHERIT really 
_doesn't_ inherit when the child sets the same state, and OVERRIDE 
actually forces inheritance to happen. So if I were going to rename 
them, I'd have something like this:


old namenew name
INHERIT DEFAULT
OVERRIDEINHERIT
PROTECTED   PROTECTED

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


[osg-users] dynamic changes problem

2010-01-20 Thread fausto
Hi All,
I have a scene whose nodes are set with a DYNAMIC dataVariance, because they
need to be dynamically modified.

When I first create the scene, it shows up OK in the viewer.
The problem occurs when I remove all drawables from a Geode and try to add
new drawables to the same Geode.
The viewer properly removes all Geode's drawables, but doesn't show up the
new ones.

While debugging, I can see that the new added drawbles are in the geode
drawbles list.
I can also view them properly if I save the scene in an .osg and launch it
with osgViewer.exe

The problem only occurs in the same viewer.

I've tried to set the display list OFF in each node of the scene, and also
using dirtyBound() to the modified Geode, but it didn't change anything.

Thanks in advance for your help.
F.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] osg::StateAttribute::PROTECTED meanings

2010-01-20 Thread Jason Daly

Paul Martz wrote:


On a tangent... These really seem like misnomers. INHERIT really 
_doesn't_ inherit when the child sets the same state, and OVERRIDE 
actually forces inheritance to happen. So if I were going to rename 
them, I'd have something like this:


old namenew name
INHERIT DEFAULT
OVERRIDEINHERIT
PROTECTED   PROTECTED
  


Continuing the tangent a bit...

Renaming OVERRIDE to INHERIT would be rather confusing to me.  When you 
set the state on a node, to me the mode should be named from the point 
of view of the node, not the children of that node.  OVERRIDE makes 
sense, as the state on this node will be overriding the state settings 
of its children.  INHERIT would make sense if you're considering it from 
the point of view of the children.  However, when you're making a 
setAttributeAndModes() call, your point of view is with the overriding 
node, not with its children.


I'm a little more indifferent wrt INHERIT vs. DEFAULT.  I'd just as soon 
leave that one alone as well.


--J

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


Re: [osg-users] osg::StateAttribute::PROTECTED meanings

2010-01-20 Thread Trajce Nikolov
here was my case. and also this might have something to do with lazy state
update

the top node has 3 textures assigned
the children only one with setting 0 and protected

I was expecting the child to have only one texture, but it inherits the
additional textures from the top node as well. So I fixed it with
VirtualProgram for this case

Nick

http://www.linkedin.com/in/tnick
Sent from Izmit, 41, Turkey

On Wed, Jan 20, 2010 at 6:10 PM, Jason Daly jd...@ist.ucf.edu wrote:

 Paul Martz wrote:


 On a tangent... These really seem like misnomers. INHERIT really _doesn't_
 inherit when the child sets the same state, and OVERRIDE actually forces
 inheritance to happen. So if I were going to rename them, I'd have something
 like this:

 old namenew name
 INHERIT DEFAULT
 OVERRIDEINHERIT
 PROTECTED   PROTECTED



 Continuing the tangent a bit...

 Renaming OVERRIDE to INHERIT would be rather confusing to me.  When you set
 the state on a node, to me the mode should be named from the point of view
 of the node, not the children of that node.  OVERRIDE makes sense, as the
 state on this node will be overriding the state settings of its children.
  INHERIT would make sense if you're considering it from the point of view of
 the children.  However, when you're making a setAttributeAndModes() call,
 your point of view is with the overriding node, not with its children.

 I'm a little more indifferent wrt INHERIT vs. DEFAULT.  I'd just as soon
 leave that one alone as well.

 --J


 ___
 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::StateAttribute::PROTECTED meanings

2010-01-20 Thread Jason Daly

Trajce Nikolov wrote:
here was my case. and also this might have something to do with lazy 
state update
 
the top node has 3 textures assigned

the children only one with setting 0 and protected
 
I was expecting the child to have only one texture, but it inherits 
the additional textures from the top node as well. So I fixed it with 
VirtualProgram for this case


Hi, Trajce,

Each texture unit is effectively a different state attribute/mode.  
You'd have to set all three textures on the child's state to show only 
the one...


childState-setTextureAttributeAndModes(0, childTex, 
osg::StateAttribute::ON);

childState-setTextureMode(1, GL_TEXTURE_2D, osg::StateAttribute::OFF);
childState-setTextureMode(2, GL_TEXTURE_2D, osg::StateAttribute::OFF);

There shouldn't be any need for PROTECTED (unless the parent has 
OVERRIDE turned on).


--J

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


Re: [osg-users] FFmpeg and sound

2010-01-20 Thread Jason Daly

Robert Osfield wrote:

I have been thinking about the potential of an osgAudio library that
abstracts away from the implementation details of OpenAL and keeps the
door open to multiple implementations, and then within this have some
form of registration of the audio implementation, then the audio
implementations would plugin in to this, or like osgViewer just be
built into the osgAudio library.  osgViewer and it's handling of
GraphicsWindow implementation might be a reasonable model for this.

An straight audio sink is rather more straight forward than this
though... so perhaps one could just have a slimline
AudioSystemInterface/Factory class a bit like
osg::GraphicsContext::WindowingSystemInterface singleton and then have
this be where you register your scheme for implementing the AudioSink.
 Then in the plugins that need an audio sink it can go to this
singleton and grab and implementation.  The plugin might also use
osgDB to load a plugin to force the registration of a implementation
of a AudioSystemInterface.  Such an approach would be easier to graft
on than writing a full blown osgAudio library.
  


Thanks, that helps a lot.  I'll keep that in mind if I find myself with 
more free time anytime soon  :-)


--J

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


Re: [osg-users] osg::StateAttribute::PROTECTED meanings

2010-01-20 Thread Trajce Nikolov
Hi Jason,

that is what I exactly did. I put the PROTECTED there becaouse the parent
has OVERRIDE set on it. Did not worked :-) ...


Nick

http://www.linkedin.com/in/tnick
Sent from Izmit, 41, Turkey

On Wed, Jan 20, 2010 at 6:23 PM, Jason Daly jd...@ist.ucf.edu wrote:

 Trajce Nikolov wrote:

 here was my case. and also this might have something to do with lazy state
 update
  the top node has 3 textures assigned
 the children only one with setting 0 and protected
  I was expecting the child to have only one texture, but it inherits the
 additional textures from the top node as well. So I fixed it with
 VirtualProgram for this case


 Hi, Trajce,

 Each texture unit is effectively a different state attribute/mode.  You'd
 have to set all three textures on the child's state to show only the one...

 childState-setTextureAttributeAndModes(0, childTex,
 osg::StateAttribute::ON);
 childState-setTextureMode(1, GL_TEXTURE_2D, osg::StateAttribute::OFF);
 childState-setTextureMode(2, GL_TEXTURE_2D, osg::StateAttribute::OFF);

 There shouldn't be any need for PROTECTED (unless the parent has OVERRIDE
 turned on).


 --J

 ___
 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] Usage of osg::Node clone methode.

2010-01-20 Thread Guillaume Saby
Hi,


Well this doesn't work ^^...


I tried, and only one tree appears, but if a do :

for(int i = 0 ; i  5; i++)
{

osg::PositionAttitudeTransform* temp = new osg::PositionAttitudeTransform;

temp-addChild(osgDB::readNodeFile(modeles/arbre.obj));
temp-setPosition(myPos);
this-addChild(temp);

}

This work, i got all my trees

But thanks for your help anyways.

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





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


Re: [osg-users] Usage of osg::Node clone methode.

2010-01-20 Thread Trajce Nikolov
well, I can not see why it shouldnt work. Are you setting different
positions in the loop ?

Nick

http://www.linkedin.com/in/tnick
Sent from Izmit, 41, Turkey

On Wed, Jan 20, 2010 at 7:02 PM, Guillaume Saby luckybo...@hotmail.frwrote:

 Hi,


 Well this doesn't work ^^...


 I tried, and only one tree appears, but if a do :

 for(int i = 0 ; i  5; i++)
 {

 osg::PositionAttitudeTransform* temp = new osg::PositionAttitudeTransform;

  temp-addChild(osgDB::readNodeFile(modeles/arbre.obj));
 temp-setPosition(myPos);
 this-addChild(temp);

 }

 This work, i got all my trees

 But thanks for your help anyways.

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





 ___
 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] PagedLOD DatabasePager crash

2010-01-20 Thread Brett Wiesner

Robert,

Here is a sample program that crashes when loading earth.ive the second 
time. I'm using OSG 2.8.2.


Thanks,
Brett

  main()
  {

 std::string modelPath = earth.ive;

 // create a scene graph (and keep it around).
 osg::ref_ptrosg::Node modelNode = osgDB::readNodeFile(modelPath);

 // create viewer1 and set the scene graph data.
 osgViewer::Viewer* viewer1 = new osgViewer::Viewer;
 viewer1-setUpViewOnSingleScreen(0);
 viewer1-setSceneData(modelNode.get());
 viewer1-setCameraManipulator(new osgGA::TrackballManipulator());

 // render a frame
 viewer1-realize();
 while(!viewer1-done())
 {
viewer1-frame();
 }

 // delete viewer1.
 delete viewer1;
 viewer1 = 0;

 // create viewer2 and set the scene graph data.

 osgViewer::Viewer* viewer2 = new osgViewer::Viewer;
 viewer2-setUpViewOnSingleScreen(0);
 viewer2-setSceneData(modelNode.get());
 viewer2-setCameraManipulator(new osgGA::TrackballManipulator());

 // render a frame
 viewer2-realize();

 while(!viewer2-done())
 {
viewer2-frame();
 }

 // check that it has textures.

 // delete viewer2.
 delete viewer2;
 viewer2 = 0;

  }

Robert Osfield wrote:

Hi Colin,

You make no mention of which version of the OSG you are using.  The
DatabasePager and manage of GL objects when destroying contexts has
improved significantly over the past year so the problems you are
seeing may well be already resolved.

Robert.

On Thu, Jan 14, 2010 at 5:00 PM, Colin Branch cbra...@mak.com wrote:
  

Greetings,

Here's my steps:
I'm creating a compositeViewer with one or more views.
I'm loading a paged database.
While the database is paging, I delete the compositeViewer (thus taking the
context down with it as well as the database pager).
I then create a new compositeViewer and attempt to render the sane database
(same nodes).
I'm getting a crash in the database pager, specifically it crash in the
requestNodeFile function due to crashing on accessing invalid memory.

The problem seems to step from the PagedLOD having a ref_ptr to a
DatabasePager::DatabaseRequest.
The databaseRequest has a raw pointer to a RequestQueue.
The RequestQueue is invalid (as it is a referenced member of the original
database pager, and thus is already deleted, but the DB request stayed
alive).
There appears to be no way of clearing the databaseRequest which is
referenced in the PagedLOD node.

This appears to be a problem with how OSG handles database paging, probably
a bug. No obvious solution pops out, mainly due to the low level nature of
the problem.
This is an important issue since it affects one of our customers.
I welcome any comments/suggestions/workarounds.

Thank you and best regards,
Colin Branch

--
Colin Branch
VT MAK
work: (617) 876-8085 Ext. 159
email: cbra...@mak.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 mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] PagedLOD DatabasePager crash

2010-01-20 Thread Robert Osfield
Hi Brett,

You really should learn to use ref_ptr's, manually deleting ref
counting objects is dangerous and only possible Viewer as I haven't
put the destructor private to allow one to construct the Viewer on the
stack for convenience, not to allow delete...

That sermon aside, could you please try your example with svn/trunk or 2.9.6.

Thanks,
Robert.



On Wed, Jan 20, 2010 at 8:25 PM, Brett Wiesner brettwies...@gmail.com wrote:
 Robert,

 Here is a sample program that crashes when loading earth.ive the second
 time. I'm using OSG 2.8.2.

 Thanks,
 Brett

  main()
  {

     std::string modelPath = earth.ive;

     // create a scene graph (and keep it around).
     osg::ref_ptrosg::Node modelNode = osgDB::readNodeFile(modelPath);

     // create viewer1 and set the scene graph data.
     osgViewer::Viewer* viewer1 = new osgViewer::Viewer;
     viewer1-setUpViewOnSingleScreen(0);
     viewer1-setSceneData(modelNode.get());
     viewer1-setCameraManipulator(new osgGA::TrackballManipulator());

     // render a frame
     viewer1-realize();
     while(!viewer1-done())
     {
        viewer1-frame();
     }

     // delete viewer1.
     delete viewer1;
     viewer1 = 0;

     // create viewer2 and set the scene graph data.

     osgViewer::Viewer* viewer2 = new osgViewer::Viewer;
     viewer2-setUpViewOnSingleScreen(0);
     viewer2-setSceneData(modelNode.get());
     viewer2-setCameraManipulator(new osgGA::TrackballManipulator());

     // render a frame
     viewer2-realize();

     while(!viewer2-done())
     {
        viewer2-frame();
     }

     // check that it has textures.

     // delete viewer2.
     delete viewer2;
     viewer2 = 0;

  }

 Robert Osfield wrote:

 Hi Colin,

 You make no mention of which version of the OSG you are using.  The
 DatabasePager and manage of GL objects when destroying contexts has
 improved significantly over the past year so the problems you are
 seeing may well be already resolved.

 Robert.

 On Thu, Jan 14, 2010 at 5:00 PM, Colin Branch cbra...@mak.com wrote:


 Greetings,

 Here's my steps:
 I'm creating a compositeViewer with one or more views.
 I'm loading a paged database.
 While the database is paging, I delete the compositeViewer (thus taking
 the
 context down with it as well as the database pager).
 I then create a new compositeViewer and attempt to render the sane
 database
 (same nodes).
 I'm getting a crash in the database pager, specifically it crash in the
 requestNodeFile function due to crashing on accessing invalid memory.

 The problem seems to step from the PagedLOD having a ref_ptr to a
 DatabasePager::DatabaseRequest.
 The databaseRequest has a raw pointer to a RequestQueue.
 The RequestQueue is invalid (as it is a referenced member of the original
 database pager, and thus is already deleted, but the DB request stayed
 alive).
 There appears to be no way of clearing the databaseRequest which is
 referenced in the PagedLOD node.

 This appears to be a problem with how OSG handles database paging,
 probably
 a bug. No obvious solution pops out, mainly due to the low level nature
 of
 the problem.
 This is an important issue since it affects one of our customers.
 I welcome any comments/suggestions/workarounds.

 Thank you and best regards,
 Colin Branch

 --
 Colin Branch
 VT MAK
 work: (617) 876-8085 Ext. 159
 email: cbra...@mak.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 mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

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


[osg-users] Drawing around screen selection

2010-01-20 Thread Martin Beckett
Does anyone have any suggestions for showing a live mouse selected region on 
screen?

Currenlty for selecting areas near the ground I create a transparent plane just 
below ground level, do a linesegment intersect and then draw a polygon on the 
plane at the intersection points.

But I now need to be able to select areas of points to delete from any angle 
with a polytope. 

One solution would be to generate a large invisible plane parralel to the 
screen at some distance and draw a polygon onto this (while locking rotations).
Is there a better approach?


Martin

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





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


Re: [osg-users] Drawing around screen selection

2010-01-20 Thread Trajce Nikolov
I have done this before with selection buffer
Nick

http://www.linkedin.com/in/tnick


On Wed, Jan 20, 2010 at 10:47 PM, Martin Beckett m...@mgbeckett.com wrote:

 Does anyone have any suggestions for showing a live mouse selected region
 on screen?

 Currenlty for selecting areas near the ground I create a transparent plane
 just below ground level, do a linesegment intersect and then draw a polygon
 on the plane at the intersection points.

 But I now need to be able to select areas of points to delete from any
 angle with a polytope.

 One solution would be to generate a large invisible plane parralel to the
 screen at some distance and draw a polygon onto this (while locking
 rotations).
 Is there a better approach?


 Martin

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





 ___
 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] Uniform per slave Camera

2010-01-20 Thread Paul Martz
Hi all -- I'm trying to find a way to set a Uniform to a different value 
depending on the display. In a multi-display environment, this uniform 
variable would have a different value depending on which display is 
being rendered to. Ideally, this should support osgViewer as well as 
other viewer models (direct SceneView usage, osgProducer, VR-Juggler, etc).


I've already looked at supporting this for osgViewer apps by using slave 
Cameras to hold the Uniforms. If the slave Cameras were actually nodes 
in the scene graph, this would be pretty easy. For a dual monitor 
system, the scene graph would be multi-parented to the two slave 
Cameras, and the slave Camera StateSets would each contain their Uniform 
with the same uniform variable name but with different values. 
Unfortunately, slave Cameras are not nodes in the scene graph and don't 
have StateSets (as far as I know -- someone correct me if slave Cameras 
actually do have StateSets that affect rendering).


So I looked at how OSG sets the osg_ViewMatrix Uniform for inspiration, 
because the uniform value could potentially be different for each 
display. Turns out this is stored in the local StateSet of the 
SceneView, and there is one SceneView per slave Camera. I imagine I 
could code a solution like this, but with the SceneView class marked 
deprecated, I'm reluctant to code a solution that depends on its existence.


Alternatively, it seems like I could use a cull callback to set the 
Uniform directly in osg::State. But there doesn't appear to be a public 
method for this. Am I missing something? This would certainly be the 
easiest and most efficient solution, and would work for any viewer 
usage, as long as there is a cull traversal per display (a pretty safe bet).


Thanks for any ideas.

(Not that it matters, but the Uniform is a 4x4 matrix, and is a 
concatenation of the view orientation and the projection with tweaked 
near/far values. It's derived from the actual view and projection 
matrices in use per display, so in theory I could derive this matrix in 
the vertex shader, but it would be redundant to do this work for every 
vertex.)

--
Paul Martz
Skew Matrix Software LLC
_http://www.skew-matrix.com_ http://www.skew-matrix.com/
+1 303 859 9466

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


[osg-users] osg::DrawPixels bounding box and picking (2.8.2)

2010-01-20 Thread Andrew Cunningham
Hi,
 - The boundingBox() method of the osg::DrawPixels is implemented, but a bit 
wacky as it is based purely on pixel dimensions and will in general be 
completely wrong. This throws off camera bounding box calculations badly. For 
example a 200x200 pixel image is given a BB of 200x200x200 units

- Picking of a osg::DrawPixels()  is not implemented.

does anyone have a working implementation for these functions?

Basically I am drawing small 2D images at points on my 3D model and need to be 
able to pick them. 


Thanks.
Andrew

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





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


Re: [osg-users] Changing the window of a Viewer

2010-01-20 Thread Christiansen, Brad
Hi,

I forgot to mention that I am also calling releaseGLObjects on the
viewer.

i.e. When I show the window, if I already have a GraphicsWindows I call:

if(m_gw.valid()) {
  m_viewer-releaseGLObjects();
  m_gw-close();
}

I then create a new graphics window and set it on the viewer:

osg::ref_ptrosg::Referenced windata = new
osgViewer::GraphicsWindowWin32::WindowData(hwnd, true);
osg::ref_ptrosg::GraphicsContext::Traits traits = new
osg::GraphicsContext::Traits;
traits-inheritedWindowData = windata;
//.. all the other traits setting here

osg::ref_ptrosgViewer::GraphicsWindowWin32 window = new
osgViewer::GraphicsWindowWin32(traits);
m_gw = window;
window-realize();  
osg::GraphicsContext* gc = window;  
m_viewer-getCamera()-setGraphicsContext(gc);

Cheers,

Brad

-Original Message-
From: osg-users-boun...@lists.openscenegraph.org
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of
Christiansen, Brad
Sent: Thursday, 21 January 2010 9:30 AM
To: OpenSceneGraph Users
Subject: [osg-users] Changing the window of a Viewer

Hi,

I have setup a viewer using an existing window (supplying the HWND to a
GraphicsWindowWin32). In my application, this window can be toggled on
and off. If I do nothing when this happens the GraphicsWindowWin32
complains of an invalid handle when swapping buffers. 

As such, I wish to recreate the context when the window is displayed. I
have tried simply calling close on the on the old GraphicsWindowWin32
and then creating a new instance with the new window handle and setting
this on the viewer (osgViewer::Viewer). When I do this, sometimes my
model displays with corrupt textures, but in all cases I get a 'GL is
out of memory' error. I am guessing that I am not cleaning up the old
context and its associated Texture Objects etc correctly.

My question is, what is the correct way of doing this? What methods do I
need to call to clean up all the old GL objects and make sure new ones
are created? Also, do I need to call these methods while the windows
handle is still valid, and do I need to do this on the rendering thread.

Cheers,

Brad



DISCLAIMER:-
--
This e-mail transmission and any documents, files and previous e-mail
messages
attached to it are private and confidential. They may contain
proprietary or copyright
material or information that is subject to legal professional privilege.
They are for
the use of the intended recipient only.  Any unauthorised viewing, use,
disclosure,
copying, alteration, storage or distribution of, or reliance on, this
message is
strictly prohibited. No part may be reproduced, adapted or transmitted
without the
written permission of the owner. If you have received this transmission
in error, or
are not an authorised recipient, please immediately notify the sender by
return email,
delete this message and all copies from your e-mail system, and destroy
any printed
copies. Receipt by anyone other than the intended recipient should not
be deemed a
waiver of any privilege or protection. Thales Australia does not warrant
or represent
that this e-mail or any documents, files and previous e-mail messages
attached are
error or virus free.

--

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



DISCLAIMER:---
This e-mail transmission and any documents, files and previous e-mail messages
attached to it are private and confidential. They may contain proprietary or 
copyright
material or information that is subject to legal professional privilege. They 
are for
the use of the intended recipient only.  Any unauthorised viewing, use, 
disclosure,
copying, alteration, storage or distribution of, or reliance on, this message is
strictly prohibited. No part may be reproduced, adapted or transmitted without 
the
written permission of the owner. If you have received this transmission in 
error, or
are not an authorised recipient, please immediately notify the sender by return 
email,
delete this message and all copies from your e-mail system, and destroy any 
printed
copies. Receipt by anyone other than the intended recipient should not be 
deemed a
waiver of any privilege or protection. Thales Australia does not warrant or 
represent
that this e-mail or any documents, files and previous e-mail messages attached 
are
error or virus free.
--

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


[osg-users] Vista/Windows 7 visual problems on resize

2010-01-20 Thread Andrew Cunningham
When running on Windows 7/Vista using accelerated graphics, and when resizing a 
window, an  MFC OSG window flashes a lot and phantom bits of the window frame 
are left behind while resizing. The same is seen when using an MFC CRectTracker 
and TrackRubberBand on the OSG 3D window, the old Rect is not properly erased 
and the tracks of the box are left behind.

None of this is seen on XP/XP64 and is not specific to a particular graphics 
card vendor. If you log onto the Windows 7 machine via RDC ( which causes a 
default OpenGL software driver to be used) these issues are not visible.

This is , I am sure , and old Vista issue , but in our field (CAE) not a single 
user 'upgraded' to Vista - they are upgrading to W7...

Thanks for any ideas

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





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


Re: [osg-users] Vista/Windows 7 visual problems on resize

2010-01-20 Thread Jean-Sébastien Guay

Hello Andrew,


When running on Windows 7/Vista using accelerated graphics, and when resizing a window, 
an  MFC OSG window flashes a lot and phantom bits of the window frame are 
left behind while resizing. The same is seen when using an MFC CRectTracker and 
TrackRubberBand on the OSG 3D window, the old Rect is not properly erased and the tracks 
of the box are left behind.


This won't help you much, but we haven't seen these kinds of issues with 
OSG either running its own window or embedded in a QWidget on Windows 
Vista/7. So perhaps it's a problem with the MFC part of your app. I 
can't be sure of course, never having used OSG with MFC myself.


I hope this additional data point will help...

J-S
--
__
Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com
   http://www.cm-labs.com/
http://whitestar02.webhop.org/
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Vista/Windows 7 visual problems on resize

2010-01-20 Thread Andrew Cunningham
I think this answers my question , at least regarding trying to use 
CRectTracker.

From http://www.opengl.org/pipeline/article/vol003_7/

GDI is no longer hardware-accelerated, but instead rendered to system memory 
using the CPU. That rendering is later composed on a 3D surface in order to be 
shown on the desktop. The graphics hardware video driver is no longer involved 
in GDI rendering, which means that mixing GDI and accelerated 3D rendering in 
the same window is likely to produce corruption like stale or blanked 3D 
rendering, trails, etc. Using Microsoft's OpenGL software rendering (the first 
item in the four OpenGL implementations) will achieve GDI compatibility, but at 
the expense of rendering speed and lack of modern features.

So no mixing of GDI and accelerated 3D into the same window...

The problem with resizing is obviously related.

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





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


Re: [osg-users] Vista/Windows 7 visual problems on resize

2010-01-20 Thread Andrew Cunningham
So this now begs the question.. how to draw a nice zoom box using 'pure' 
OpenGL/OSG since I can't use CRectTracker/GDI

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





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


[osg-users] Disney open source 3D stuff....

2010-01-20 Thread Andrew Lowe

Hi all,
	Disney has released some of their tools as opensource. No idea if it's 
relevant here but the slashdot article,


http://tinyurl.com/ydctxqd

seems to be fully buzzword compliant:

3D
texture mapping
BSD licence
open source 3D graphics


Now back to lurking.

Andrew




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


Re: [osg-users] Drawing around screen selection

2010-01-20 Thread Martin Beckett

Trajce Nikolov wrote:
 I have done this before with selection bufferNick

Erm - can you elaborate a little?

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





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


Re: [osg-users] Uniform per slave Camera

2010-01-20 Thread Paul Martz

Paul Martz wrote:
Alternatively, it seems like I could use a cull callback to set the 
Uniform directly in osg::State. But there doesn't appear to be a public 
method for this. Am I missing something? This would certainly be the 
easiest and most efficient solution, and would work for any viewer 
usage, as long as there is a cull traversal per display (a pretty safe 
bet).


No help needed; Something quite like this is currently working for me. 
For the archives...


My cull callback class keeps a std::map CullVisitor*, osg::StateSet* , 
basically a StateSet per CullVisitor. In the StateSet, I have just the 
one Uniform I need to set. When my cull callback is executed, it gets 
the StateSet for the current CullVisitor (thread safe), updates the 
Uniform to the value appropriate for this display, and calls 
osgUtil::CullVisitor::pushStateSet(), then traverse(), then the 
corresponding popStateSet().


This allows me to have the same shader uniform variable set to different 
values depending on the CullVisitor, essentially, per display or per 
slave Camera. This approach should work regardless of the viewer used by 
the app.


If anyone has better ideas for how to do this, feel free to post.
   -Paul
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org