Re: [osg-users] incomplete type in gdb

2009-12-15 Thread Alberto Luaces
You are welcome :)

--

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


Re: [osg-users] file extension alias

2009-12-15 Thread Jan Pečiva

Paul Martz wrote:

Thrall, Bryan wrote:
When you add an alias, though, aren't you saying to the plugin, 
Trust me, even though you don't recognize the file extension, handle 
it?
Hi Bryan - Exactly! This is what I had on mind. If I tell the plugin: 
This is MY alias, it should take my word and start to accept my 
extension. This would be a very logical behaviour.
Hi Bryan -- That might be what you're saying, but that's not how 
osgDB::Registry is interpreting it. :-)


Without aliases at all, Registry forms plugin names from the file 
extension. If an app tries to load a *.gif file, Registry creates a 
plugin named osgdb_gif.xx, tries to load it, then calls into it to 
load the *.gif file.


Aliases tell Registry how to form the plugin name when an extension is 
in the alias list. A concrete example is OpenFlight. The Registry 
constructor registers flt as an alias to OpenFlight. If the app 
tries to open a *.flt file, Registry finds flt in the alias list and 
knows that the plugin name is osgdb_openflight.xx.


Bottom line: When you register an alias, you're not talking to the 
plugin at all. You're talking to the Registry.

Yes, Registry interprets it currently in a different way.
It would make sense, IMHO, for osgDB::Registry to add aliases to each 
plugin's list of handled extensions, and I don't think that would 
take too much work to do (make ReaderWriter::supportsExtension() 
public and call it in getReaderWriterForExtension() when it gets to 
the loaded library).


Many plugins check the extension directly in ReadNode and return 
FILE_NOT_SUPPORTED if it doesn't match what they expect. What you 
suggest is possible, but would require you to check and possibly 
modify every single plugin, and every single read and write entry 
point in the plugin, to conform to the new behavior.
I think, the extension should be simple. The loading process needs just 
one new step (step 3):

1. form plugin name from extension (using aliases as well)
2. load the plugin
3. append new extensions to the plugin (taken from aliases)
4. load the model

Just step 3 is the new one. By using ReaderWriter::supportsExtension, we 
should be able to tell plugin, accept even these extensions, because 
these are your aliases.
All the rest of the loading process stays untouched. This way, we should 
be able to achieve the extension overriding/aliasing without changes to 
all the plugins.


If this will be agreed that it is an interesting idea, I am going to 
take a closer look on possibilities of implementing it.

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


Re: [osg-users] file extension alias

2009-12-15 Thread Trajce Nikolov
I think there is no need to do any work in the plugins.
Registry::createLibraryNameForExtension(const
std::string ext) gives you the name of the library (plugin) you have to
load having in mind all the aliases. And I like this design and I think it
is ok

Nick

http://www.linkedin.com/in/tnick
Sent from Gümüşsuyu, İstanbul, Turkey

On Tue, Dec 15, 2009 at 11:04 AM, Jan Pečiva pec...@fit.vutbr.cz wrote:

 Paul Martz wrote:

 Thrall, Bryan wrote:

 When you add an alias, though, aren't you saying to the plugin, Trust
 me, even though you don't recognize the file extension, handle it?

 Hi Bryan - Exactly! This is what I had on mind. If I tell the plugin: This
 is MY alias, it should take my word and start to accept my extension. This
 would be a very logical behaviour.

  Hi Bryan -- That might be what you're saying, but that's not how
 osgDB::Registry is interpreting it. :-)

 Without aliases at all, Registry forms plugin names from the file
 extension. If an app tries to load a *.gif file, Registry creates a plugin
 named osgdb_gif.xx, tries to load it, then calls into it to load the *.gif
 file.

 Aliases tell Registry how to form the plugin name when an extension is in
 the alias list. A concrete example is OpenFlight. The Registry constructor
 registers flt as an alias to OpenFlight. If the app tries to open a
 *.flt file, Registry finds flt in the alias list and knows that the plugin
 name is osgdb_openflight.xx.

 Bottom line: When you register an alias, you're not talking to the plugin
 at all. You're talking to the Registry.

 Yes, Registry interprets it currently in a different way.

  It would make sense, IMHO, for osgDB::Registry to add aliases to each
 plugin's list of handled extensions, and I don't think that would take too
 much work to do (make ReaderWriter::supportsExtension() public and call it
 in getReaderWriterForExtension() when it gets to the loaded library).


 Many plugins check the extension directly in ReadNode and return
 FILE_NOT_SUPPORTED if it doesn't match what they expect. What you suggest is
 possible, but would require you to check and possibly modify every single
 plugin, and every single read and write entry point in the plugin, to
 conform to the new behavior.

 I think, the extension should be simple. The loading process needs just one
 new step (step 3):
 1. form plugin name from extension (using aliases as well)
 2. load the plugin
 3. append new extensions to the plugin (taken from aliases)
 4. load the model

 Just step 3 is the new one. By using ReaderWriter::supportsExtension, we
 should be able to tell plugin, accept even these extensions, because these
 are your aliases.
 All the rest of the loading process stays untouched. This way, we should be
 able to achieve the extension overriding/aliasing without changes to all the
 plugins.

 If this will be agreed that it is an interesting idea, I am going to take a
 closer look on possibilities of implementing it.
 John

 ___
 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] OpenSceneGraph-2.9.6 developer release tagged

2009-12-15 Thread Robert Osfield
HI Markus,

I've just checked in a fix for this, I can't compile the quicktime
pluign myself so could you try out the latest in svn/trunk to see if
it's now compiling cleanly for you.

Cheers,
Robert.

On Mon, Dec 14, 2009 at 5:23 PM, Markus Lacay markus.la...@gmail.com wrote:
 Hey, I would also like to add that I couldn't compile against OpenGL 3 
 without changing Plugins qt references to GL_BGRA_EXT to GL_BGRA. It seems 
 GL_BGRA_EXT has been removed completely from the latest GL3.h header.

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





 ___
 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] osgText::Text Drawing order

2009-12-15 Thread Robert Osfield
Hi Andre,

Text by default will drop into the transparent bin so this is likely
the reason why it's ordering is not exactly what you expect it.  Text
has to be in the transparent bin to ensure correct blending.

Also I don't of if you are aware but rendering order only controls
which item depends upon the current setting of the depth buffer - i.e.
is depth test on, and what is rejected (normally more distance
fragements are discarded) and the depth of the object.  If you switch
off depth test or the fragments have the same depth and fragements of
the same depth pass the depth test will rendering order make a
difference.

In you case you don't specify what you are doing with the depth test
or depth buffer, it's also difficult to guess at what level of
understanding you have about depth buffers and depth test.

Robert.

On Mon, Dec 14, 2009 at 7:48 PM, Andre Simoes andrersim...@gmail.com wrote:
 Hello Robert.
 Sorry about the bad explanation of my problem.
 I think is better to start from scratch and just explain the problem to you.
 I'm making a widget system, on Ortho2D,  that separates levels of parents
 from childs by osg::Groups ( osg::PositionAttitudeTransform, osg::Switch ...
 )
 - The children  position is always related to the bottom top vertex of the
 parent ( i.e,  a text inside a box ).
           -
           |                    |
           |                    |
           |text (at 0,0)   |
           --
   box at (20,20)
 - Children have to be drawn on top of the parent ( the parent area can be
 hidden by the child but the child cannot be hidden by the parent drawing ).
 ( i.e white child text on a black box )
 |--- |
 ||
 ||
 |---WHITE TEXT--|
 ||
 
  My problem is to always make all kinds of Geometries that are on the leafs
 of my tree as the top most visible.
 For example: If i have a tree in the following sequence
 root - Rectangle1
         child - Rectangle2
                  child -  Triangle3
 OpenGL should draw Rectangle1 than Rectangle2 and on the end Triangle3 to
 the FrameBuffer.
 On the monitor:  Triangle2 will be above Triangle1 and Triangle3 will be
 above Triangle2  (in case those are being drawn at the same place ).
 -
 |            |
 |     |         / \        |     |
 |     |        /   \       |     |
 |     |       /      \     |     |
 |     |       -    |     |
 |     |     Triangle3  |     |
 |     -     |
 |   Rectangle2            |
 |     (below triangle3)   |
 
 Rectangle1 ( goes below everyone )
 I've made some separate tests and noticed that if my geometries have just
 the same StateSet configuration ( i.e all geometries with
 StateSet::setGlobalDefault )  I can make this result on the frame buffer.
 But when i add a osgText::Text element for example as:
 root - Rectangle1
         child - Rectangle2
                       child- osgText::Text
 -
 |        |
 |     |   no osgText::Text |   |
 |     |          inside            |   |
 |     |_ |   |
 |                                        |
 |___|
 The text will only appear if i make
 _child_text-getOrCreateStateSet()-setGlobalDefaults(); that makes me to
 loose transparency and other configurations for the osgText::Text component.
 Screen shots from my current diagram block configuration and my scene
 http://yfrog.com/6eosgproblemp
 http://yfrog.com/catextdefaultp
 I've already tried to use setRenderBinDetails  ( version 2.9.5 ) and
 worked... But if  I simply use setRenderBinDetails i will have to rebuild
 all the binNum for every visual on my graph after a simply insertChild
 because they will be not in the right draw order.
 For our system this is not good. Because the number of components that my
 co-workers generally draw are very large and it would take very long to
 rebuild the number for the graphs just because of a removal or an insertion
 of component.
 Is there anything that i could use to ensure that they will always be
 processed in the order that they are being added as child bypassing the
 state set configuration ?
 Regards
 Andre
 2009/12/14 Robert Osfield robert.osfi...@gmail.com

 Hi Andre,

 I'm finding it difficult to guess what your after/what problems your
 seeing.  The best I can do is say as a general note, one would
 typically use control the rendering order via
 StateSet::setRenderingDetails(..) from within the scene graph rather
 attempting to set globals.

 Robert.

 On Mon, Dec 14, 2009 at 2:06 PM, Andre Simoes andrersim...@gmail.com
 wrote:
  Hello There.
 
  I've been reading alot of e-mails regarding drawing of objects in
  sequence,
  like a simple OpenGL program that draws each Geometry independently of
  

Re: [osg-users] file extension alias

2009-12-15 Thread Ulrich Hertlein
On 14/12/09 9:27 PM, Paul Martz wrote:
 I have always been able to register an extension alias by calling
 addFileExtensionAlias directly from my code, the calling readNodeFile
 passing in a file name using the alias.

What extension/plugin did you use it with?

As I understand it 'addFileExtensionAlias' really only works with plugins that 
don't check
the extension name.

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


Re: [osg-users] file extension alias

2009-12-15 Thread Robert Osfield
Hi John,

On Mon, Dec 14, 2009 at 10:21 PM, Jan Pečiva pec...@fit.vutbr.cz wrote:
 OSG plugin takes one look at the foo extension and returns an error.
 (This is correct behavior; the .osg plugin doesn't support the foo
 extension.)

 This is exactly the point I am trying to point out! The plugin reports that
 it does not support the extension!

 I am telling that this is NOT a good idea. And finally, the discussion about
 design ideas can start.

For your it's NOT a good idea.  So please couch it without the
capitals and within the context of your opinion, and please don't
telling us, we aren't children.

The alias scheme in osgDB has been a good idea for the majority for
over a decade.  Rejecting extensions that aren't supported by the
plugin is a good idea - it leaves the plugin with a complete
responsibility for what it can handle.

What you are asking is not what osgDB alias does at present, nor what
the plugins do.  The aliases at present are based around the idea that
plugins with a different name can handle extensions that are named
different from the plugin.  This allows a tif plugin to handle tiff
files, or the quicktime to handle .mov, .mpg etc. etc.

The osgDB alias is not a scheme for co-opting an existing plugin to
handle a file extensions that isn't a recognized one.  One might
propose an additional scheme for doing this, and we might debate the
merits of this, personally I'm rather dubious that it's that a great
thing to do, and given we've gone a decade without needing this I
would suggest that it's not at all a common requirement.

I don't know if you are aware but one way of tackling what you are
trying might simply have your own plugin as your were originally
talking about and have it open the file you want with whatever
extensions you have as an istream and then load the plugin you want to
do the actual loaded and pass this to it.  Given what you after is
such a niche requirement then I would think this is a sensible route
to take rather than expect intrusive changes to the OSG to achieve
what you specifically want.

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


Re: [osg-users] file extension alias

2009-12-15 Thread Ulrich Hertlein
On 15/12/09 10:29 AM, Ulrich Hertlein wrote:
 As I understand it 'addFileExtensionAlias' really only works with plugins 
 that don't check
 the extension name.

I should add: ... or that have the extension in their supportsExtension list.

From a software engineering p.o.v I'd say this isn't optimal, because it means 
both places
(the plugin and Registry.cpp) need to be kept in sync.

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


Re: [osg-users] file extension alias

2009-12-15 Thread Jan Pečiva

Ulrich Hertlein wrote:

On 15/12/09 10:29 AM, Ulrich Hertlein wrote:
  

As I understand it 'addFileExtensionAlias' really only works with plugins that 
don't check
the extension name.



I should add: ... or that have the extension in their supportsExtension list.
  

Exactly.
It will not load your file unless ... as you wrote.
Now, it seems, I will need to write my own version of plugin to go around.
JP

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


Re: [osg-users] osgText::Text Drawing order

2009-12-15 Thread Robert Osfield
Hi Andre,

Block diagrams won't help as that most likely not at issue.  What are
you doing with the depth buffer/depth test?  What you are doing the
with the depth of each of the objects?

Robert.

On Mon, Dec 14, 2009 at 6:17 PM, Andre Simoes andrersim...@gmail.com wrote:
 Hello Robert.
 Sorry about the bad explanation of my problem.
 I think is better to start from scratch and just explain the problem to you.
 I'm making a widget system, on Ortho2D,  that separates levels of parents
 from childs by osg::Groups ( osg::PositionAttitudeTransform, osg::Switch ...
 )
 There are two png files attached (a block diagram and its osg scene ) that
 gives a better idea of this groups
 - The children  position is always related to the bottom top vertex of the
 parent ( i.e,  a text inside a box ).
           -
           |                    |
           |                    |
           |text (at 0,0)   |
           --
   box at (20,20)
 - Children have to be drawn on top of the parent ( the parent area can be
 hidden by the child but the child cannot be hidden by the parent drawing ).
 ( i.e white child text on a black box )
 |--- |
 ||
 ||
 |---WHITE TEXT--|
 ||
 
  My problem is to always make all kinds of Geometries that are on the leafs
 of my tree as the top most visible.
 For example: If i have a tree in the following sequence
 root - Rectangle1
         child - Rectangle2
                  child -  Triangle3
 OpenGL should draw Rectangle1 than Rectangle2 and on the end Triangle3 to
 the FrameBuffer.
 On the monitor:  Triangle2 will be above Triangle1 and Triangle3 will be
 above Triangle2  (in case those are being drawn at the same place ).
 -
 |            |
 |     |         / \        |     |
 |     |        /   \       |     |
 |     |       /      \     |     |
 |     |       -    |     |
 |     |     Triangle3  |     |
 |     -     |
 |   Rectangle2            |
 |     (below triangle3)   |
 
 Rectangle1 ( goes below everyone )
 I've made some separate tests and noticed that if my geometries have just
 the same StateSet configuration ( i.e all geometries with
 StateSet::setGlobalDefault )  I can make this result on the frame buffer.
 But when i add a osgText::Text element for example as:
 root - Rectangle1
         child - Rectangle2
                       child- osgText::Text
 -
 |        |
 |     |   no osgText::Text |   |
 |     |          inside            |   |
 |     |_ |   |
 |                                        |
 |___|
 The text will only appear if i make
 _child_text-getOrCreateStateSet()-setGlobalDefaults(); that makes me to
 loose transparency and other configurations for the osgText::Text component.
 I've already tried to use setRenderBinDetails  ( version 2.9.5 ) and
 worked... But if  I simply use setRenderBinDetails i will have to rebuild
 all the binNum for every visual on my graph after a simply insertChild
 because they will be not in the right draw order.
 For our system this is not good. Because the number of components that my
 co-workers generally draw are very large and it would take very long to
 rebuild the number for the graphs just because of a removal or an insertion
 of component.
 Is there anything that i could use to ensure that they will always be
 processed in the order that they are being added as child bypassing the
 state set configuration ?
 Regards
 Andre
 2009/12/14 Robert Osfield robert.osfi...@gmail.com

 Hi Andre,

 I'm finding it difficult to guess what your after/what problems your
 seeing.  The best I can do is say as a general note, one would
 typically use control the rendering order via
 StateSet::setRenderingDetails(..) from within the scene graph rather
 attempting to set globals.

 Robert.

 On Mon, Dec 14, 2009 at 2:06 PM, Andre Simoes andrersim...@gmail.com
 wrote:
  Hello There.
 
  I've been reading alot of e-mails regarding drawing of objects in
  sequence,
  like a simple OpenGL program that draws each Geometry independently of
  its
  complexibility and cost to the GPU.
 
  And for now I'm working in an OSG scenario in which I'm doing a toolkit
  that
  generates widgets in 2D Orthographic mode. Almost all of the components
  are
  being drawn with LIGHTING disabled because they are unecessary for the
  case.
  And with or without RenderBin::TRAVERSAL_ORDER option enabled I can add
  a
  widget as a child of other widget without problems by using
  osg::Group::insertChild( 0, child ).
 
  The problem is when I try to draw osgText::Texts inside components as
  children. They simply not appear on the screen.
  - if i create them and set their StateSet as 

Re: [osg-users] file extension alias

2009-12-15 Thread Robert Osfield
Hi Ulrich,

On Tue, Dec 15, 2009 at 9:43 AM, Ulrich Hertlein u.hertl...@sandbox.de wrote:
 On 15/12/09 10:29 AM, Ulrich Hertlein wrote:
 As I understand it 'addFileExtensionAlias' really only works with plugins 
 that don't check
 the extension name.

 I should add: ... or that have the extension in their supportsExtension list.

No this isn't a correct understanding.  The file extension alias for
for plugins that handle a wider range of file extensions that just the
extension component of the name of the plugin, or for where the file
extension doesn't match the name of the plugin, the quicktime time is
a case in point.

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


Re: [osg-users] file extension alias

2009-12-15 Thread Jan Pečiva

Robert Osfield wrote:

Hi John,

On Mon, Dec 14, 2009 at 10:21 PM, Jan Pečiva pec...@fit.vutbr.cz wrote:
  

OSG plugin takes one look at the foo extension and returns an error.
(This is correct behavior; the .osg plugin doesn't support the foo
extension.)
  

This is exactly the point I am trying to point out! The plugin reports that
it does not support the extension!

I am telling that this is NOT a good idea. And finally, the discussion about
design ideas can start.



For your it's NOT a good idea.  So please couch it without the
capitals and within the context of your opinion, and please don't
telling us, we aren't children.
  
I am sorry. I started to be nervous because I had to repeat the same 
thing few times in the discussion. Anyway, OSG is very good and well 
designed system. I was just trying to point on a speck that can be 
improved in my opinion. Sorry for a strong words.

[...]
The osgDB alias is not a scheme for co-opting an existing plugin to
handle a file extensions that isn't a recognized one.  One might
propose an additional scheme for doing this, and we might debate the
merits of this, personally I'm rather dubious that it's that a great
thing to do, and given we've gone a decade without needing this I
would suggest that it's not at all a common requirement.
  
Thanks. This is an answer in this discussion. So, you prefer not to 
change the design idea and meaning of alias. Let's close the 
discussion with this conclusion. I am not planning to reopen it unless 
other people come up with the same topic / the same problem.

I don't know if you are aware but one way of tackling what you are
trying might simply have your own plugin as your were originally
talking about and have it open the file you want with whatever
extensions you have as an istream and then load the plugin you want to
do the actual loaded and pass this to it.  Given what you after is
such a niche requirement then I would think this is a sensible route
to take rather than expect intrusive changes to the OSG to achieve
what you specifically want.
  
I will do, although it is nearly more work than to, say, improve these 
aliases. Inventor plugin (ReaderWriterIV) does not have istream methods 
implemented. I will consider to implement them and submit them (together 
with bunch of fixes I have done in plugin past month, including shader 
support...).


Anyway, why these aliases should not be automatically in plugin's 
extension support list? Non-supported alias is non-sence - why to create 
alias to plugin that refuses it to load? It is just confusing in my 
eyes... and it is few lines of code.


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


Re: [osg-users] fatal error on simple programm

2009-12-15 Thread Anthony Face
Hi, thanks for triing to help me, i found i was not due to OSG but to my visual 
config witch failed.

Realy sorry for post this.

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





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


Re: [osg-users] osgText::Text Drawing order

2009-12-15 Thread Trajce Nikolov
Andre,

could you send some test code so we can do some tests and help you ?

Nick

http://www.linkedin.com/in/tnick
Sent from Gümüşsuyu, İstanbul, Turkey

On Tue, Dec 15, 2009 at 12:27 PM, Robert Osfield
robert.osfi...@gmail.comwrote:

 Hi Andre,

 Block diagrams won't help as that most likely not at issue.  What are
 you doing with the depth buffer/depth test?  What you are doing the
 with the depth of each of the objects?

 Robert.

 On Mon, Dec 14, 2009 at 6:17 PM, Andre Simoes andrersim...@gmail.com
 wrote:
  Hello Robert.
  Sorry about the bad explanation of my problem.
  I think is better to start from scratch and just explain the problem to
 you.
  I'm making a widget system, on Ortho2D,  that separates levels of parents
  from childs by osg::Groups ( osg::PositionAttitudeTransform, osg::Switch
 ...
  )
  There are two png files attached (a block diagram and its osg scene )
 that
  gives a better idea of this groups
  - The children  position is always related to the bottom top vertex of
 the
  parent ( i.e,  a text inside a box ).
-
||
||
|text (at 0,0)   |
--
box at (20,20)
  - Children have to be drawn on top of the parent ( the parent area can be
  hidden by the child but the child cannot be hidden by the parent drawing
 ).
  ( i.e white child text on a black box )
  |--- |
  ||
  ||
  |---WHITE TEXT--|
  ||
  
   My problem is to always make all kinds of Geometries that are on the
 leafs
  of my tree as the top most visible.
  For example: If i have a tree in the following sequence
  root - Rectangle1
  child - Rectangle2
   child -  Triangle3
  OpenGL should draw Rectangle1 than Rectangle2 and on the end Triangle3 to
  the FrameBuffer.
  On the monitor:  Triangle2 will be above Triangle1 and Triangle3 will be
  above Triangle2  (in case those are being drawn at the same place ).
  -
  |    |
  | | / \| |
  | |/   \   | |
  | |   /  \ | |
  | |   -| |
  | | Triangle3  | |
  | - |
  |   Rectangle2|
  | (below triangle3)   |
  
  Rectangle1 ( goes below everyone )
  I've made some separate tests and noticed that if my geometries have just
  the same StateSet configuration ( i.e all geometries with
  StateSet::setGlobalDefault )  I can make this result on the frame buffer.
  But when i add a osgText::Text element for example as:
  root - Rectangle1
  child - Rectangle2
child- osgText::Text
  -
  |    |
  | |   no osgText::Text |   |
  | |  inside|   |
  | |_ |   |
  ||
  |___|
  The text will only appear if i make
  _child_text-getOrCreateStateSet()-setGlobalDefaults(); that makes me to
  loose transparency and other configurations for the osgText::Text
 component.
  I've already tried to use setRenderBinDetails  ( version 2.9.5 ) and
  worked... But if  I simply use setRenderBinDetails i will have to rebuild
  all the binNum for every visual on my graph after a simply insertChild
  because they will be not in the right draw order.
  For our system this is not good. Because the number of components that my
  co-workers generally draw are very large and it would take very long to
  rebuild the number for the graphs just because of a removal or an
 insertion
  of component.
  Is there anything that i could use to ensure that they will always be
  processed in the order that they are being added as child bypassing the
  state set configuration ?
  Regards
  Andre
  2009/12/14 Robert Osfield robert.osfi...@gmail.com
 
  Hi Andre,
 
  I'm finding it difficult to guess what your after/what problems your
  seeing.  The best I can do is say as a general note, one would
  typically use control the rendering order via
  StateSet::setRenderingDetails(..) from within the scene graph rather
  attempting to set globals.
 
  Robert.
 
  On Mon, Dec 14, 2009 at 2:06 PM, Andre Simoes andrersim...@gmail.com
  wrote:
   Hello There.
  
   I've been reading alot of e-mails regarding drawing of objects in
   sequence,
   like a simple OpenGL program that draws each Geometry independently of
   its
   complexibility and cost to the GPU.
  
   And for now I'm working in an OSG scenario in which I'm doing a
 toolkit
   that
   generates widgets in 2D Orthographic mode. Almost all of the
 components
   are
   being drawn with LIGHTING disabled because they are unecessary for the
   case.
   And 

Re: [osg-users] file extension alias

2009-12-15 Thread Robert Osfield
Hi John,

On Tue, Dec 15, 2009 at 10:49 AM, Jan Pečiva pec...@fit.vutbr.cz wrote:
 I will do, although it is nearly more work than to, say, improve these
 aliases. Inventor plugin (ReaderWriterIV) does not have istream methods
 implemented. I will consider to implement them and submit them (together
 with bunch of fixes I have done in plugin past month, including shader
 support...).

istream support in the iv plugin would be useful for it's own purpose
as it'll open the door to http and compression support out of the box.

 Anyway, why these aliases should not be automatically in plugin's extension
 support list? Non-supported alias is non-sence - why to create alias to
 plugin that refuses it to load? It is just confusing in my eyes... and it is
 few lines of code.

It's you proposing to use an alias for an non supported extension...

The OSG itself is maintained to keep the the Registry inbuilt aliases
and the plugins consistent.  If you add extra aliases then for own
plugins then it's your responsibility to keep the consistent.

FYI, if you really want to try forcing a plugin to handle extensions
it was never designed to handle you could try loading the plugin and
then calling supportsExtension on it.

Robert.



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


Re: [osg-users] osgText::Text Drawing order

2009-12-15 Thread Robert Osfield
Hi Andre,

On Tue, Dec 15, 2009 at 11:11 AM, Andre Simoes andrersim...@gmail.com wrote:
 Hi Robert.

 In reality I'm not doing anything with the depth buffer since i never used
 depth for a 2D projection in pure OpenGL programs.

So you disable depth test?

If you have depth test on then you will be using the depth buffer even
with 2D projections.. as 2D projections are really no different rather
3D projections in OpenGL, everything in reality is 3D, everything has
depth even it's flat and depth value of 0, and if depth test is on
then each fragment will be tested against the depth buffer.

 For a simple OpenGL program I just draw components in sequence. As an
 example like this:

Again as I've been saying for the last three emails, depth test is the
key and still you haven't provide any information about it.

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


Re: [osg-users] [osgPPU] no results with osgPPU

2009-12-15 Thread Sebastien Nerig
Hi Art,

I will try to add a camera node as a child of the main camera.
I will also try to disable the main camera callback

Thank you!

Cheers,
Sebastien

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





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


[osg-users] ReflectionMapGenerator

2009-12-15 Thread Sebastien Nerig
Hi,

What is the use of ReflectionMapGenerator class ?
I didn't find any example.
How can we use it ? What is this class for ?

Thank you!

Cheers,
Sebastien

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





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


Re: [osg-users] file extension alias

2009-12-15 Thread Ulrich Hertlein
Hi Robert,

On 15/12/09 11:33 AM, Robert Osfield wrote:
 On Tue, Dec 15, 2009 at 9:43 AM, Ulrich Hertlein u.hertl...@sandbox.de 
 wrote:
 On 15/12/09 10:29 AM, Ulrich Hertlein wrote:
 As I understand it 'addFileExtensionAlias' really only works with plugins 
 that don't check
 the extension name.

 I should add: ... or that have the extension in their supportsExtension list.
 
 No this isn't a correct understanding.  The file extension alias for
 for plugins that handle a wider range of file extensions that just the
 extension component of the name of the plugin, or for where the file
 extension doesn't match the name of the plugin, the quicktime time is
 a case in point.

Hm, I'm afraid I don't quite understand.

Isn't the following the case?
- plugin X will automatically be associated with extension 'X'.
- to support more extensions the plugin must say that it supports 'Y' *and*
  the Registry must map extension 'Y' to 'X', because otherwise plugin 'X' 
won't be
  considered/loaded for extension 'Y'.

(I'm not trying to argue what should be done to have an application tell a 
plugin to
handle another extension, or if that's even a case that needs to be supported.)

Cheers,
/ulrich


PS: The Qt plugin might be a bad example because in addition to 
supportsExtension() in the
ctor it explicitly checks the extensions in accepts*Extension(), so to support 
a new
extension one would need to add this in three places.

PPS: And it *also* calls addFileExtensionAlias() from the ctor.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] 3ds animations

2009-12-15 Thread Federico Costa
Thanks for your reply! 
The problem using blender is that the model i have is in .3ds format and when i 
try to load it with blender it has no animations!

I dont know the name of the kind of animation but it is based on objects moving 
around.

Cheers,
Federico

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





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


Re: [osg-users] problem with quadro cards database pager / terrapage terrains = black tiles

2009-12-15 Thread Ryan H. Kawicki
I was just wondering if there was any new information on this.  Out of 8 PCs, 
we are experiencing the same problem on only 1 of them.

Quadro FX 3700 (157.08)

Thanks,
Ryan

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





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


Re: [osg-users] 3ds animations

2009-12-15 Thread Cedric Pinson
Hi
I have never used import of 3ds file in blender so i can't answer if
it's path that works or not.

Cheers,
Cedric

-- 
Provide OpenGL services around OpenSceneGraph and more
+33 659 598 614 Cedric Pinson mailto:cedric.pin...@plopbyte.net
http://www.plopbyte.net


On Tue, 2009-12-15 at 12:51 +, Federico Costa wrote:
 Thanks for your reply! 
 The problem using blender is that the model i have is in .3ds format and when 
 i try to load it with blender it has no animations!
 
 I dont know the name of the kind of animation but it is based on objects 
 moving around.
 
 Cheers,
 Federico
 
 --
 Read this topic online here:
 http://forum.openscenegraph.org/viewtopic.php?p=21498#21498
 
 
 
 
 
 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
 


signature.asc
Description: This is a digitally signed message part
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] 3ds animations

2009-12-15 Thread Trajce Nikolov
I might be in the same park.  Which ones uses osgAnimation? Blender is one?
Anything else?

Nick

http://www.linkedin.com/in/tnick
Sent from Gümüşsuyu, İstanbul, Turkey

On Tue, Dec 15, 2009 at 4:09 PM, Cedric Pinson
cedric.pin...@plopbyte.netwrote:

 Hi
 I have never used import of 3ds file in blender so i can't answer if
 it's path that works or not.

 Cheers,
 Cedric

 --
 Provide OpenGL services around OpenSceneGraph and more
 +33 659 598 614 Cedric Pinson mailto:cedric.pin...@plopbyte.net
 http://www.plopbyte.net


 On Tue, 2009-12-15 at 12:51 +, Federico Costa wrote:
  Thanks for your reply!
  The problem using blender is that the model i have is in .3ds format and
 when i try to load it with blender it has no animations!
 
  I dont know the name of the kind of animation but it is based on objects
 moving around.
 
  Cheers,
  Federico
 
  --
  Read this topic online here:
  http://forum.openscenegraph.org/viewtopic.php?p=21498#21498
 
 
 
 
 
  ___
  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] osgOcean synced thru multiple machines

2009-12-15 Thread Trajce Nikolov
Hi,

I just got osgOcean compiled and running and it looks great !!!

One question. Is there a way to sync the waves on multiple machines ?

Nick

http://www.linkedin.com/in/tnick
Sent from Gümüşsuyu, İstanbul, Turkey
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] 3ds animations

2009-12-15 Thread Cedric Pinson
I use it for this project http://pok.me/ with blender

Cheers,
Cedric

-- 
Provide OpenGL services around OpenSceneGraph and more
+33 659 598 614 Cedric Pinson mailto:cedric.pin...@plopbyte.net
http://www.plopbyte.net


On Tue, 2009-12-15 at 16:32 +0200, Trajce Nikolov wrote:
 I might be in the same park.  Which ones uses osgAnimation? Blender is
 one? Anything else?
 
 Nick
 
 http://www.linkedin.com/in/tnick
 Sent from Gümüşsuyu, İstanbul, Turkey 
 
 On Tue, Dec 15, 2009 at 4:09 PM, Cedric Pinson
 cedric.pin...@plopbyte.net wrote:
 Hi
 I have never used import of 3ds file in blender so i can't
 answer if
 it's path that works or not.
 
 Cheers,
 Cedric
 
 --
 Provide OpenGL services around OpenSceneGraph and more
 +33 659 598 614 Cedric Pinson
 mailto:cedric.pin...@plopbyte.net
 http://www.plopbyte.net
 
 
 
 
 On Tue, 2009-12-15 at 12:51 +, Federico Costa wrote:
  Thanks for your reply!
  The problem using blender is that the model i have is
 in .3ds format and when i try to load it with blender it has
 no animations!
 
  I dont know the name of the kind of animation but it is
 based on objects moving around.
 
  Cheers,
  Federico
 
  --
  Read this topic online here:
  http://forum.openscenegraph.org/viewtopic.php?p=21498#21498
 
 
 
 
 
  ___
  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
 
 
 


signature.asc
Description: This is a digitally signed message part
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] file extension alias

2009-12-15 Thread Thrall, Bryan
Paul Martz wrote on 2009-12-14: 
 Thrall, Bryan wrote:
 When you add an alias, though, aren't you saying to the plugin,
 Trust me, even though you don't recognize the file extension, handle
 it?
 
 Hi Bryan -- That might be what you're saying, but that's not how
 osgDB::Registry is interpreting it. :-)

Yep, I was proposing that users of the Registry could interpret adding an alias 
differently than is currently implemented (exactly as Jan did).

But it sounds like Robert isn't open to changing the meaning like that, so 
people who want to add unsupported extensions will have to write their own 
pseudoloaders.

At least in the future, people who are confused about aliases will have this 
conversation to refer to! 

--
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] osgOcean synced thru multiple machines

2009-12-15 Thread Jean-Sébastien Guay

Hi Nick,


I just got osgOcean compiled and running and it looks great !!!


It does, doesn't it! Thanks to Kim Bale for all his hard work!


One question. Is there a way to sync the waves on multiple machines ?


Not in osgOcean itself, no. You'd have to come up with your own way. I 
guess you could add a setFrameNumber() method to FFTOceanSurface that 
would tell the object to set itself to a given frame number in its 
animation, and then add a boolean flag that would allow you to control 
the animation through setFrameNumber() instead of FFTOceanSurface 
controlling it itself in its traverse() method.


If you do code up something please post it, we can integrate it into the 
mainline code.


Hope this helps,

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] osgOcean synced thru multiple machines

2009-12-15 Thread Kim Bale
haha I thought I had this one.. but you beat me to it!

Lightning fast response.

Cheers.

Kim.


2009/12/15 Jean-Sébastien Guay jean-sebastien.g...@cm-labs.com:
 Hi Nick,

 I just got osgOcean compiled and running and it looks great !!!

 It does, doesn't it! Thanks to Kim Bale for all his hard work!

 One question. Is there a way to sync the waves on multiple machines ?

 Not in osgOcean itself, no. You'd have to come up with your own way. I guess
 you could add a setFrameNumber() method to FFTOceanSurface that would tell
 the object to set itself to a given frame number in its animation, and then
 add a boolean flag that would allow you to control the animation through
 setFrameNumber() instead of FFTOceanSurface controlling it itself in its
 traverse() method.

 If you do code up something please post it, we can integrate it into the
 mainline code.

 Hope this helps,

 J-S
 --
 __
 Jean-Sebastien Guay    jean-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

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


Re: [osg-users] file extension alias

2009-12-15 Thread Paul Martz

Ulrich Hertlein wrote:

Isn't the following the case?
- plugin X will automatically be associated with extension 'X'.
- to support more extensions the plugin must say that it supports 'Y' *and*
  the Registry must map extension 'Y' to 'X', because otherwise plugin 'X' 
won't be
  considered/loaded for extension 'Y'.


Not really, the plugin doesn't need to say that it supports Y. But the 
extension alias does need to be registered. Once it's registered, the 
Registry will load the plugin and try to read Y with it.


Do a search on the OSG source for supportsExtension and you will see 
that OSG calls it only rarely. I forget the circumstances, but it 
certainly doesn't bother to call supportsExtension before initial load 
and calling in to read a file for the first time.

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


Re: [osg-users] file extension alias

2009-12-15 Thread Thrall, Bryan
Robert Osfield wrote on 2009-12-15: 
 FYI, if you really want to try forcing a plugin to handle extensions
 it was never designed to handle you could try loading the plugin and
 then calling supportsExtension on it.

Just to be pedantic, supportsExtension() is protected, so you'd need to:

1) create a subclass of the plugin's ReaderWriter (which would pull in the 
plugin DLL, registering the plugin with the Registry) that calls 
supportsExtension()
2) Remove the plugin's ReaderWriter from the Registry
3) Register your subclass with the Registry

I'd guess that's about as much work as writing a pseudoloader :)
--
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] file extension alias

2009-12-15 Thread Paul Martz

Ulrich Hertlein wrote:

What extension/plugin did you use it with?


I've used this with proprietary plugins that support multiple different 
extensions for the same file type.



As I understand it 'addFileExtensionAlias' really only works with plugins that 
don't check
the extension name.


I only register aliases that the plugin supports. The plugin still 
checks the extension. I think most all plugins check the extension.


The osgDB::Registry constructor does the same thing. Consider the 
QuickTime plugin, the RGB plugin, etc.


On a related note, I also have a proprietary plugin that supports 
possibly dozens of different file types. The actual formats supported 
are determined by a third party library loaded by the plugin, so there's 
no way to know what is supported before loading the plugin, and 
therefore no way to register any aliases. In this case, the client app 
simply does an explicit load on the plugin library at init time. Once 
loaded, the plugin is invoked for every read/write regardless of 
extension, so the plugin itself determines which files it supports 
whenever a read/write is invoked, by interacting with its third party 
library.

   -Paul


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


Re: [osg-users] file extension alias

2009-12-15 Thread Paul Martz
I think we've all been saying supportsExtension when we meant to say 
axxeptsExtension (which is public). I know I always get them confused.


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



Thrall, Bryan wrote:
Robert Osfield wrote on 2009-12-15: 

FYI, if you really want to try forcing a plugin to handle extensions
it was never designed to handle you could try loading the plugin and
then calling supportsExtension on it.


Just to be pedantic, supportsExtension() is protected, so you'd need to:

1) create a subclass of the plugin's ReaderWriter (which would pull in the 
plugin DLL, registering the plugin with the Registry) that calls 
supportsExtension()
2) Remove the plugin's ReaderWriter from the Registry
3) Register your subclass with the Registry

I'd guess that's about as much work as writing a pseudoloader :)
--
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] osgText::Text Drawing order

2009-12-15 Thread Andre Simoes
Hello Robert.

I never thought of  the Depth buffer application under a 2D orthographic
mode.

After adding
osg::StateSet *ss = getOrCreateStateSet();
ss-setRenderingHint( osg::StateSet::TRANSPARENT_BIN );
ss-setMode( GL_DEPTH_TEST, osg::StateAttribute::ON );

 to all my geometries osgText::Texts are being correctly displayed.

Thanks
Andre

2009/12/15 Robert Osfield robert.osfi...@gmail.com

 Hi Andre,

 On Tue, Dec 15, 2009 at 11:11 AM, Andre Simoes andrersim...@gmail.com
 wrote:
  Hi Robert.
 
  In reality I'm not doing anything with the depth buffer since i never
 used
  depth for a 2D projection in pure OpenGL programs.

 So you disable depth test?

 If you have depth test on then you will be using the depth buffer even
 with 2D projections.. as 2D projections are really no different rather
 3D projections in OpenGL, everything in reality is 3D, everything has
 depth even it's flat and depth value of 0, and if depth test is on
 then each fragment will be tested against the depth buffer.

  For a simple OpenGL program I just draw components in sequence. As an
  example like this:

 Again as I've been saying for the last three emails, depth test is the
 key and still you haven't provide any information about it.

 Robert.
 ___
 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] file extension alias

2009-12-15 Thread Ulrich Hertlein
On 15/12/09 3:57 PM, Paul Martz wrote:
 Ulrich Hertlein wrote:
 Isn't the following the case?
 - plugin X will automatically be associated with extension 'X'.
 - to support more extensions the plugin must say that it supports 'Y'
 *and*
   the Registry must map extension 'Y' to 'X', because otherwise plugin
 'X' won't be
   considered/loaded for extension 'Y'.
 
 Not really, the plugin doesn't need to say that it supports Y. But the
 extension alias does need to be registered. Once it's registered, the
 Registry will load the plugin and try to read Y with it.
 
 Do a search on the OSG source for supportsExtension and you will see
 that OSG calls it only rarely. I forget the circumstances, but it
 certainly doesn't bother to call supportsExtension before initial load
 and calling in to read a file for the first time.

Most of the plugins have something like:
   if (!acceptsExtension(ext)) return ReadResult::FILE_NOT_HANDLED;

'ReaderWriter::acceptsExtension()' checks the _supportedExtensions list, so if 
extension
'Y' isn't in there then the plugin won't handle the file.

Of course, if the plugin doesn't use acceptsExtension (or overloads it) then 
everything
works fine.

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


Re: [osg-users] file extension alias

2009-12-15 Thread Thrall, Bryan
Paul Martz wrote on 2009-12-15: 
 I think we've all been saying supportsExtension when we meant to say
 axxeptsExtension (which is public). I know I always get them confused.

acceptsExtension() checks if the plugin handles that extension; if you want to 
add an extension so the plugin handles it, you need to call supportsExtension().

 Thrall, Bryan wrote:
 Robert Osfield wrote on 2009-12-15:
 FYI, if you really want to try forcing a plugin to handle extensions
 it was never designed to handle you could try loading the plugin and
 then calling supportsExtension on it.
 
 Just to be pedantic, supportsExtension() is protected, so you'd need to:
 
 1) create a subclass of the plugin's ReaderWriter (which would pull
 in the plugin DLL, registering the plugin with the Registry) that calls
 supportsExtension()
 2) Remove the plugin's ReaderWriter from the Registry
 3) Register your subclass with the Registry
 
 I'd guess that's about as much work as writing a pseudoloader :)

--
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] file extension alias

2009-12-15 Thread Robert Osfield
Hi Bryan,

On Tue, Dec 15, 2009 at 2:49 PM, Thrall, Bryan
bryan.thr...@flightsafety.com wrote:
 Yep, I was proposing that users of the Registry could interpret adding an 
 alias differently than is currently implemented (exactly as Jan did).

 But it sounds like Robert isn't open to changing the meaning like that, so 
 people who want to add unsupported extensions will have to write their own 
 pseudoloaders.

To be clear, I'm not open to breaking an existing feature for the
specific purpose of one user, for something that can easily be
achieved with other means without breaking anything.

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


Re: [osg-users] osgOcean synced thru multiple machines

2009-12-15 Thread Trajce Nikolov
Thanks  !

Nick

http://www.linkedin.com/in/tnick
Sent from Gümüşsuyu, İstanbul, Turkey

On Tue, Dec 15, 2009 at 4:53 PM, Kim Bale kcb...@googlemail.com wrote:

 haha I thought I had this one.. but you beat me to it!

 Lightning fast response.

 Cheers.

 Kim.


 2009/12/15 Jean-Sébastien Guay jean-sebastien.g...@cm-labs.com:
  Hi Nick,
 
  I just got osgOcean compiled and running and it looks great !!!
 
  It does, doesn't it! Thanks to Kim Bale for all his hard work!
 
  One question. Is there a way to sync the waves on multiple machines ?
 
  Not in osgOcean itself, no. You'd have to come up with your own way. I
 guess
  you could add a setFrameNumber() method to FFTOceanSurface that would
 tell
  the object to set itself to a given frame number in its animation, and
 then
  add a boolean flag that would allow you to control the animation through
  setFrameNumber() instead of FFTOceanSurface controlling it itself in its
  traverse() method.
 
  If you do code up something please post it, we can integrate it into the
  mainline code.
 
  Hope this helps,
 
  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
 
 ___
 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] file extension alias

2009-12-15 Thread Trajce Nikolov
why not using Registry::createLibraryNameForExtension or
Registry::getReaderWriterForExtension  it checks the aliases and returns
the right thing

Nick

http://www.linkedin.com/in/tnick
Sent from Gümüşsuyu, İstanbul, Turkey

On Tue, Dec 15, 2009 at 5:34 PM, Robert Osfield robert.osfi...@gmail.comwrote:

 Hi Bryan,

 On Tue, Dec 15, 2009 at 2:49 PM, Thrall, Bryan
 bryan.thr...@flightsafety.com wrote:
  Yep, I was proposing that users of the Registry could interpret adding an
 alias differently than is currently implemented (exactly as Jan did).
 
  But it sounds like Robert isn't open to changing the meaning like that,
 so people who want to add unsupported extensions will have to write their
 own pseudoloaders.

 To be clear, I'm not open to breaking an existing feature for the
 specific purpose of one user, for something that can easily be
 achieved with other means without breaking anything.

 Robert.
 ___
 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] osgText::Text Drawing order

2009-12-15 Thread Andre Simoes
Hi Robert.

Sorry to post again.

But even using the ss-setRenderingHint( osg::StateSet::TRANSPARENT_BIN )
for all geometries a cannot guarantee that the Texts will be on screen.

- When I add to much components (nothing more than rects with texts inside)
on the screen my texts just simply fade away.
- If i add a small quantity widgets with texts inside and one widget with
LineStipple, all Texts fade away too.

As a test,  just to see the osgText::Texts,  i've made a second
configuration that looses the transparency of them but at least they are
showing on screen if their respective colors:
   _text-getOrCreateStateSet()-setMode( GL_DEPTH,
osg::StateAttribute::OFF );
   _text-getOrCreateStateSet()-setRenderingHint(
osg::StateSet::DEFAULT_BIN );

I'll restart to create the widget System using your first hint as base (
setRenderBinDetails( number_as_draw_order,  )  ).

Scene results together with code:
Text without GL_DEPTH -
http://img215.imageshack.us/img215/2913/textwithoutgldepth.png
Text with GL_DEPTH -
http://img222.imageshack.us/img222/9679/textwithdepth.png

Regards
Andre

2009/12/15 Andre Simoes andrersim...@gmail.com

 Hello Robert.

 I never thought of  the Depth buffer application under a 2D orthographic
 mode.

 After adding
 osg::StateSet *ss = getOrCreateStateSet();
 ss-setRenderingHint( osg::StateSet::TRANSPARENT_BIN );
 ss-setMode( GL_DEPTH_TEST, osg::StateAttribute::ON );

  to all my geometries osgText::Texts are being correctly displayed.

 Thanks
 Andre

 2009/12/15 Robert Osfield robert.osfi...@gmail.com

 Hi Andre,


 On Tue, Dec 15, 2009 at 11:11 AM, Andre Simoes andrersim...@gmail.com
 wrote:
  Hi Robert.
 
  In reality I'm not doing anything with the depth buffer since i never
 used
  depth for a 2D projection in pure OpenGL programs.

 So you disable depth test?

 If you have depth test on then you will be using the depth buffer even
 with 2D projections.. as 2D projections are really no different rather
 3D projections in OpenGL, everything in reality is 3D, everything has
 depth even it's flat and depth value of 0, and if depth test is on
 then each fragment will be tested against the depth buffer.

  For a simple OpenGL program I just draw components in sequence. As an
  example like this:

 Again as I've been saying for the last three emails, depth test is the
 key and still you haven't provide any information about it.

 Robert.
 ___
 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] Python users

2009-12-15 Thread Massimo Di Stefano
Hi,

Thanks to make the osgboostpython code!
 
i'm running osgboostpython on mac osx 10.6 (osg svn, 64-bit)
boost+python support from source (1.41)

now i'm tring to runs some examles, 
but i have problems using the code from the main page :

In [12]: s.setTextureAttributeAndModes(0, t, osg.StateAttribute.Values.ON)

Traceback (most recent call last):
  File ipython console, line 1, in module
AttributeError: type object 'Values' has no attribute 'ON'


any clue on what's wrong?


p.s.

... tring to build osgboostpython , seems that it don't recognize the .dylb 
files
so i had to simlink *.dylb to *.so.

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


Re: [osg-users] osgText::Text Drawing order

2009-12-15 Thread Robert Osfield
Hi Andre,

I'm afraid I can't dedicate all my support time to just understanding
what you are doing wrong and trying to help you - I have other work to
do.  What you want to do is possible.  osgWidget does it, why not go
look at it.  I have tried by best to point you in the right direction,
but this is as far as I can go.

Perhaps others can help you.

Robert.

On Tue, Dec 15, 2009 at 5:00 PM, Andre Simoes andrersim...@gmail.com wrote:
 Hi Robert.
 Sorry to post again.
 But even using the ss-setRenderingHint( osg::StateSet::TRANSPARENT_BIN )
 for all geometries a cannot guarantee that the Texts will be on screen.
 - When I add to much components (nothing more than rects with texts inside)
 on the screen my texts just simply fade away.
 - If i add a small quantity widgets with texts inside and one widget with
 LineStipple, all Texts fade away too.
 As a test,  just to see the osgText::Texts,  i've made a second
 configuration that looses the transparency of them but at least they are
 showing on screen if their respective colors:
        _text-getOrCreateStateSet()-setMode( GL_DEPTH,
 osg::StateAttribute::OFF );
        _text-getOrCreateStateSet()-setRenderingHint(
 osg::StateSet::DEFAULT_BIN );
 I'll restart to create the widget System using your first hint as base (
 setRenderBinDetails( number_as_draw_order,  )  ).
 Scene results together with code:
 Text without GL_DEPTH
 - http://img215.imageshack.us/img215/2913/textwithoutgldepth.png
 Text with GL_DEPTH -
 http://img222.imageshack.us/img222/9679/textwithdepth.png
 Regards
 Andre
 2009/12/15 Andre Simoes andrersim...@gmail.com

 Hello Robert.

 I never thought of  the Depth buffer application under a 2D orthographic
 mode.

 After adding
     osg::StateSet *ss = getOrCreateStateSet();
     ss-setRenderingHint( osg::StateSet::TRANSPARENT_BIN );
     ss-setMode( GL_DEPTH_TEST, osg::StateAttribute::ON );

  to all my geometries osgText::Texts are being correctly
 displayed.

 Thanks
 Andre

 2009/12/15 Robert Osfield robert.osfi...@gmail.com

 Hi Andre,

 On Tue, Dec 15, 2009 at 11:11 AM, Andre Simoes andrersim...@gmail.com
 wrote:
  Hi Robert.
 
  In reality I'm not doing anything with the depth buffer since i never
  used
  depth for a 2D projection in pure OpenGL programs.

 So you disable depth test?

 If you have depth test on then you will be using the depth buffer even
 with 2D projections.. as 2D projections are really no different rather
 3D projections in OpenGL, everything in reality is 3D, everything has
 depth even it's flat and depth value of 0, and if depth test is on
 then each fragment will be tested against the depth buffer.

  For a simple OpenGL program I just draw components in sequence. As an
  example like this:

 Again as I've been saying for the last three emails, depth test is the
 key and still you haven't provide any information about it.

 Robert.
 ___
 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] osgCal2 flipped textures

2009-12-15 Thread Trajce Nikolov
Hi,

I am having a model exported from 3d studio and I see the textures flipped
on the mesh. Any solution for this?

p.s. On the osgCal project page it is stated that this issue has been
resolved. I am missing somthing? The max exporter and osgCal are built on
top of cal3d 0.11.0
Nick

http://www.linkedin.com/in/tnick
Sent from Gümüşsuyu, İstanbul, Turkey
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Python users

2009-12-15 Thread Jean-Sébastien Guay

Hi Massimo,

Sorry, my first reply went to you directly... I don't know why, 
sometimes reply replies straight to the sender, even though the 
mailing list should be changing the headers so that replies go back to 
the mailing list...


i'm running osgboostpython http://code.google.com/p/osgboostpython/ on 
mac osx 10.6 (osg svn, 64-bit)

boost+python support from source (1.41)


Please note that I've never tried to build it on Mac OS X, so your input 
will be valuable (as below).


now i'm tring to runs some examles, 
but i have problems using the code from the main page :


In [12]: s.setTextureAttributeAndModes(0, t, osg.StateAttribute.Values.ON)

Traceback (most recent call last):
  File ipython console, line 1, in module
AttributeError: type object 'Values' has no attribute 'ON'

any clue on what's wrong?


Yes, the enums were changed to const members to fit better with the C++ 
style but I didn't change the code on the front page  :-(


Try to use osg.StateAttribute.ON instead (without the .Values)...

See 
http://code.google.com/p/osgboostpython/source/browse/trunk/osgBoostPython/lib/osg/__init__.py


I've updated the front page now. Sorry about that.

... tring to build osgboostpython 
http://code.google.com/p/osgboostpython/ , seems that it don't 
recognize the .dylb files

so i had to simlink *.dylb to *.so.


You could possibly change the jam files so that it uses .dylib files 
instead, but I have no clue how to do that. Perhaps the bjam / jam / 
boost.build documentation can help you.


Thanks,

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] osgText::Text Drawing order

2009-12-15 Thread Trajce Nikolov
Andre,

can you post some code samples?

Nick

http://www.linkedin.com/in/tnick
Sent from Gümüşsuyu, İstanbul, Turkey

On Tue, Dec 15, 2009 at 7:31 PM, Robert Osfield robert.osfi...@gmail.comwrote:

 Hi Andre,

 I'm afraid I can't dedicate all my support time to just understanding
 what you are doing wrong and trying to help you - I have other work to
 do.  What you want to do is possible.  osgWidget does it, why not go
 look at it.  I have tried by best to point you in the right direction,
 but this is as far as I can go.

 Perhaps others can help you.

 Robert.

 On Tue, Dec 15, 2009 at 5:00 PM, Andre Simoes andrersim...@gmail.com
 wrote:
  Hi Robert.
  Sorry to post again.
  But even using the ss-setRenderingHint( osg::StateSet::TRANSPARENT_BIN )
  for all geometries a cannot guarantee that the Texts will be on screen.
  - When I add to much components (nothing more than rects with texts
 inside)
  on the screen my texts just simply fade away.
  - If i add a small quantity widgets with texts inside and one widget with
  LineStipple, all Texts fade away too.
  As a test,  just to see the osgText::Texts,  i've made a second
  configuration that looses the transparency of them but at least they are
  showing on screen if their respective colors:
 _text-getOrCreateStateSet()-setMode( GL_DEPTH,
  osg::StateAttribute::OFF );
 _text-getOrCreateStateSet()-setRenderingHint(
  osg::StateSet::DEFAULT_BIN );
  I'll restart to create the widget System using your first hint as base (
  setRenderBinDetails( number_as_draw_order,  )  ).
  Scene results together with code:
  Text without GL_DEPTH
  - http://img215.imageshack.us/img215/2913/textwithoutgldepth.png
  Text with GL_DEPTH -
  http://img222.imageshack.us/img222/9679/textwithdepth.png
  Regards
  Andre
  2009/12/15 Andre Simoes andrersim...@gmail.com
 
  Hello Robert.
 
  I never thought of  the Depth buffer application under a 2D orthographic
  mode.
 
  After adding
  osg::StateSet *ss = getOrCreateStateSet();
  ss-setRenderingHint( osg::StateSet::TRANSPARENT_BIN );
  ss-setMode( GL_DEPTH_TEST, osg::StateAttribute::ON );
 
   to all my geometries osgText::Texts are being correctly
  displayed.
 
  Thanks
  Andre
 
  2009/12/15 Robert Osfield robert.osfi...@gmail.com
 
  Hi Andre,
 
  On Tue, Dec 15, 2009 at 11:11 AM, Andre Simoes andrersim...@gmail.com
 
  wrote:
   Hi Robert.
  
   In reality I'm not doing anything with the depth buffer since i never
   used
   depth for a 2D projection in pure OpenGL programs.
 
  So you disable depth test?
 
  If you have depth test on then you will be using the depth buffer even
  with 2D projections.. as 2D projections are really no different rather
  3D projections in OpenGL, everything in reality is 3D, everything has
  depth even it's flat and depth value of 0, and if depth test is on
  then each fragment will be tested against the depth buffer.
 
   For a simple OpenGL program I just draw components in sequence. As an
   example like this:
 
  Again as I've been saying for the last three emails, depth test is the
  key and still you haven't provide any information about it.
 
  Robert.
  ___
  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] OpenThreads/Atomic patch for OSX

2009-12-15 Thread Chuck Seberino
I have a patch to submit that fixes the following error when building against 
OSX 10.6.2.  I am building the 2.9.6 dev tag, but I also checked it against 
trunk.  I am building fat binaries (i386 and x86_64):

/OpenSceneGraph-2.9.6/include/OpenThreads/Atomic:70: error: 'int32_t' does not 
name a type
/OpenSceneGraph-2.9.6/include/OpenThreads/Atomic: In constructor 
'OpenThreads::Atomic::Atomic(unsigned int)':
/OpenSceneGraph-2.9.6/include/OpenThreads/Atomic:50: error: class 
'OpenThreads::Atomic' does not have any field named '_value'

--- Atomic.orig 2009-12-15 09:53:51.0 -0800
+++ Atomic  2009-12-15 09:55:02.0 -0800
@@ -17,17 +17,17 @@
 #include OpenThreads/Config
 #include OpenThreads/Exports
 
-#if defined(_OPENTHREADS_ATOMIC_USE_GCC_BUILTINS)  defined(__i386__)
-#define _OPENTHREADS_ATOMIC_USE_LIBRARY_ROUTINES
+#if defined(_OPENTHREADS_ATOMIC_USE_BSD_ATOMIC)
+# include libkern/OSAtomic.h
+# define _OPENTHREADS_ATOMIC_USE_LIBRARY_ROUTINES
+#elif defined(_OPENTHREADS_ATOMIC_USE_GCC_BUILTINS)  defined(__i386__)
+# define _OPENTHREADS_ATOMIC_USE_LIBRARY_ROUTINES
 #elif defined(_OPENTHREADS_ATOMIC_USE_WIN32_INTERLOCKED)
-#define _OPENTHREADS_ATOMIC_USE_LIBRARY_ROUTINES
+# define _OPENTHREADS_ATOMIC_USE_LIBRARY_ROUTINES
 #elif defined(_OPENTHREADS_ATOMIC_USE_SUN)
 # include atomic.h
 # include Mutex
 # include ScopedLock
-#elif defined(_OPENTHREADS_ATOMIC_USE_BSD_ATOMIC)
-# include libkern/OSAtomic.h
-# define _OPENTHREADS_ATOMIC_USE_LIBRARY_ROUTINES
 #elif defined(_OPENTHREADS_ATOMIC_USE_MUTEX)
 # include Mutex
 # include ScopedLock

The problem is that there were two clauses in these conditionals that applied 
to my configuration.  I moved the more-specific case, 
_OPENTHREADS_ATOMIC_USE_BSD_ATOMIC, ahead of the more general 
_OPENTHREADS_ATOMIC_USE_GCC_BUILTINS  __i386__.  This allowed it to correctly 
pull in libkern/OSAtomic.h which subsequently pulled in stdint.h to define 
int32_t.

I don't know for sure, but I guess there might be a case where a similar 
situation could happen with the *_USE_SUN clause where a Sun system might also 
take the GCC/i386 path instead.

Thanks
Chuck Seberino___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Question regarding Culling issue in the SceneView

2009-12-15 Thread Colin Branch

Greetings All,

I added a CullCallback to the camera of a view. I found it was not 
getting hit. After much searching I believe it is due to the 
implementation in the SceneView:


Specifically at line 957:

// traverse the scene graph to generate the rendergraph.
for(unsigned int childNo=0;
childNo_camera-getNumChildren();
++childNo)
{
_camera-getChild(childNo)-accept(*cullVisitor);
}

Is there a reason that it is simply not replace that whole section of 
code with the following?


_camera-accept(*cullVisitor);

Shouldn't the main camera be culled?
I'm somewhat inclined to think so.

I'd appreciate any feedback on why this may not be the case.

-Regards,
Colin Branch

--
Colin Branch
VT MAK
work: (617) 876-8085 Ext. 159
email: cbra...@mak.com

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


Re: [osg-users] Question regarding Culling issue in the SceneView

2009-12-15 Thread Paul Martz

Colin Branch wrote:

// traverse the scene graph to generate the rendergraph.
for(unsigned int childNo=0;
childNo_camera-getNumChildren();
++childNo)
{
_camera-getChild(childNo)-accept(*cullVisitor);
}

Is there a reason that it is simply not replace that whole section of 
code with the following?


_camera-accept(*cullVisitor);


That's interesting. CullVisitor::apply(Camera) is the place where the 
RenderStage for the Camera is created/inserted into the render graph, so 
I'm not sure how that works if the SceneView is explicitly skipping the 
top level Camera. Maybe Robert can elaborate. Perhaps the Renderer does 
this automatically (for osgViewer based apps).

   -Paul



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


Re: [osg-users] Question regarding Culling issue in the SceneView

2009-12-15 Thread Robert Osfield
Hi Colin,

As Paul suggests CullVisitor::apply(osg::Camera) handles in scene
graph camera's, so will not handle the viewer level scene graph
correctly so _camera-accept(*cullVisitor) won't behave correctly.

Perhaps you could try replacing the for loop with
_camera-traverse(*cullVisitor) as this will call the cull callback
and avoid the CullVisitor::applyOsg::Camera) method.   If this works
fine let me know as I can make this change to SceneView.cpp.

Robert.

On Tue, Dec 15, 2009 at 6:22 PM, Colin Branch cbra...@mak.com wrote:
 Greetings All,

 I added a CullCallback to the camera of a view. I found it was not getting
 hit. After much searching I believe it is due to the implementation in the
 SceneView:

 Specifically at line 957:

    // traverse the scene graph to generate the rendergraph.
    for(unsigned int childNo=0;
        childNo_camera-getNumChildren();
        ++childNo)
    {
        _camera-getChild(childNo)-accept(*cullVisitor);
    }

 Is there a reason that it is simply not replace that whole section of code
 with the following?

    _camera-accept(*cullVisitor);

 Shouldn't the main camera be culled?
 I'm somewhat inclined to think so.

 I'd appreciate any feedback on why this may not be the case.

 -Regards,
 Colin Branch

 --
 Colin Branch
 VT MAK
 work: (617) 876-8085 Ext. 159
 email: cbra...@mak.com

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


Re: [osg-users] Question regarding Culling issue in the SceneView

2009-12-15 Thread Jean-Sébastien Guay

Hi Robert,


As Paul suggests CullVisitor::apply(osg::Camera) handles in scene
graph camera's, so will not handle the viewer level scene graph
correctly so _camera-accept(*cullVisitor) won't behave correctly.

Perhaps you could try replacing the for loop with
_camera-traverse(*cullVisitor) as this will call the cull callback
and avoid the CullVisitor::applyOsg::Camera) method.   If this works
fine let me know as I can make this change to SceneView.cpp.


I had a similar question about update callbacks. Reading the code (can't 
recall where, but I suspect it's in SceneView.cpp as well) the update 
visitor is being passed to the Scene objects, and not to the cameras. 
The effect of this is that update callbacks on cameras are not called, 
and more importantly, update callbacks on nodes that are children of the 
camera but not part of the view's SceneData will not be called either.


We frequently add nodes directly under a camera (instead of under a 
scene root that's the scene data of a given view) so that the nodes are 
only visible to that camera. But with the present behavior, update 
callbacks on those nodes are never called.


If, instead of passing the update visitor to the scene data's root, we 
passed it to the camera's children, then we're sure all visible nodes 
would be visited, even those in the scene data...


Thanks,

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] Question regarding Culling issue in the SceneView

2009-12-15 Thread Colin Branch

J-S,
I tried adding an update callback to the top level camera and that did 
work. I checked the code and it does call accept:

346:
_camera-accept(*_updateVisitor.get());
So it should work correctly (as of 2.8.2)

-Colin


On 12/15/2009 2:10 PM, Jean-Sébastien Guay wrote:

Hi Robert,


As Paul suggests CullVisitor::apply(osg::Camera) handles in scene
graph camera's, so will not handle the viewer level scene graph
correctly so _camera-accept(*cullVisitor) won't behave correctly.

Perhaps you could try replacing the for loop with
_camera-traverse(*cullVisitor) as this will call the cull callback
and avoid the CullVisitor::applyOsg::Camera) method.   If this works
fine let me know as I can make this change to SceneView.cpp.


I had a similar question about update callbacks. Reading the code 
(can't recall where, but I suspect it's in SceneView.cpp as well) the 
update visitor is being passed to the Scene objects, and not to the 
cameras. The effect of this is that update callbacks on cameras are 
not called, and more importantly, update callbacks on nodes that are 
children of the camera but not part of the view's SceneData will not 
be called either.


We frequently add nodes directly under a camera (instead of under a 
scene root that's the scene data of a given view) so that the nodes 
are only visible to that camera. But with the present behavior, update 
callbacks on those nodes are never called.


If, instead of passing the update visitor to the scene data's root, we 
passed it to the camera's children, then we're sure all visible nodes 
would be visited, even those in the scene data...


Thanks,

J-S


--
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] [vpb] What can I do with an ive file?

2009-12-15 Thread Nick Schultz
Hi OSGers,

So I just got done creating the Pugent Sound example given from the vpb 
website.  The coloring didn't turn out right, but the elevation map worked. 
(only the bottom left hand corner is colored with the texture).  

Now I am left with the .ive file that has a great looking 3D terrain.  What i 
would like to do is to apply my own textures on the 3D terrain on the fly. The 
texturing would look similar to this:

envision.bioe.orst.edu/StudyAreas/Bainbridge/bainbridgeContextMap.jpg  

I have access to the data represented by map, so I'm assuming I will just need 
to rasterize it to a texture and then apply it to the terrain.  

Can I quickly do this interactively(ie not waiting 3hr for it to process)?  I 
would need to use different textures on the fly as the data can change based on 
the user's input.  

Also, later requirements request for me to add more detail to the terrain ( 
such as forests, neighborhoods, cities, water, etc), they want the landscape to 
be photo-realistic.  I would assume instead of painting on colors, I would 
instead paint forests, neighborhoods, rivers, etc..

FYI, I am a complete newbie to OSG(first post!) and hopefully I have not bitten 
off more than I can chew  :?.  Is what I'm trying to do feasible( well I'm sure 
it is, but is it realisticly doable?)

Thank you!

Cheers,
Nick

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





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


[osg-users] OSG QT

2009-12-15 Thread Samuel Grant
Hi,

Getting unresolved reference errors when trying to build OSG into QT. All 
stemming from the OSG libs?

Any thoughts?

QT 4.5.3, using the mingw32-g++ compiler.

Thank you!

Cheers,
Samuel

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





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


Re: [osg-users] Loading mesh without textures

2009-12-15 Thread Michael Day
Hi,

Choco does it again!  Thanks for posting that solution in code!  In my app, all 
I was missing was the removeTextureAttribute.

Thank you again!

Cheers,
Michael

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





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


[osg-users] [3rdparty] OSG Volume / Transfer Function

2009-12-15 Thread Thomas Canipel
Hi,

I am actually trying to understand the OSG Volume Example, The alpha 
coefficient allow me to play with the extinction coefficient, but have problem 
to use the transfer function. What does represent the first parameter when we 
set a new Color ?


transferFunction-setColor(value, osg::Vec4(1.0,1.0,1.0,apha));

this line permit normally to set a transferControl point I think... in this 
case does the function will color all the vortex between ? and my value with 
this color and the opacity in parameter ?


Thank you!

Cheers,
thomas

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





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


Re: [osg-users] [vpb] What can I do with an ive file?

2009-12-15 Thread Glenn Waldron
Hi Nick,

Try osgEarth (http://osgearth.org).
With it you can take a VPB terrain and add and remove imagery or vector
layers on the fly without having to rebuild it.

Specifically:
http://wush.net/trac/osgearth/wiki/TileSourcePluginVPB

There are examples of this in the distribution as well.


Glenn Waldron : Pelican Mapping : http://pelicanmapping.com :
+1.703.652.4791


On Tue, Dec 15, 2009 at 3:37 PM, Nick Schultz schul...@engr.orst.eduwrote:

 Hi OSGers,

 So I just got done creating the Pugent Sound example given from the vpb
 website.  The coloring didn't turn out right, but the elevation map worked.
 (only the bottom left hand corner is colored with the texture).

 Now I am left with the .ive file that has a great looking 3D terrain.  What
 i would like to do is to apply my own textures on the 3D terrain on the fly.
 The texturing would look similar to this:

 envision.bioe.orst.edu/StudyAreas/Bainbridge/bainbridgeContextMap.jpg

 I have access to the data represented by map, so I'm assuming I will just
 need to rasterize it to a texture and then apply it to the terrain.

 Can I quickly do this interactively(ie not waiting 3hr for it to process)?
  I would need to use different textures on the fly as the data can change
 based on the user's input.

 Also, later requirements request for me to add more detail to the terrain (
 such as forests, neighborhoods, cities, water, etc), they want the landscape
 to be photo-realistic.  I would assume instead of painting on colors, I
 would instead paint forests, neighborhoods, rivers, etc..

 FYI, I am a complete newbie to OSG(first post!) and hopefully I have not
 bitten off more than I can chew  :?.  Is what I'm trying to do feasible(
 well I'm sure it is, but is it realisticly doable?)

 Thank you!

 Cheers,
 Nick

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





 ___
 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] QUAD_BUFFER Stereo on Vista

2009-12-15 Thread Teodor Hanchevici
Hi,

I have a 3D stereo application that runs fine in anaglyph mode on Windows XP, 
however when changing the mode to QUAD_BUFFER and switching to Windows Vista it 
stops working. Basically using the NVIDIA vision glasses and a Quadro FX 3700, 
the stereo effect is not present. 

I am using driver 191.66 for Windows Vista, and the operating system is 32 bit 
ultimate.

The application is a QT application using the QOSGWidget and the composite 
viewer classes provided as example.

the OSG example (osgstereoimage) works fine, so I wonder if anyone has 
experienced such problems.



Thank you!

Cheers,
Teodor

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





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


Re: [osg-users] file extension alias

2009-12-15 Thread Jan Pečiva

Robert Osfield wrote:

Hi Bryan,

On Tue, Dec 15, 2009 at 2:49 PM, Thrall, Bryan
bryan.thr...@flightsafety.com wrote:
  

Yep, I was proposing that users of the Registry could interpret adding an alias 
differently than is currently implemented (exactly as Jan did).


I like Coin (Open Inventor clone, OSG competitor) since:
1. it has intuitive consistent API and excellent design
2. if there is something where SGI experts failed the design, the place 
is well documented with examples and explanations of specialties of the 
design
I wish OSG to constantly improve and to become even better with powerful 
and intuitive API.

To name the strengths of OSG:
- it follows the latest technology and design patterns
- there is a working mailing list, patches and discussions

[...] for the specific purpose of one user [...]
  

Maybe two?
But we understand, you are the authority deciding how it will be...
Reference for other people: By the alias extension, people would not 
lose anything of the current plugin features - all the current extension 
protection would still work as well as it is working just now. They 
would just get one additional feature for OSG.

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


[osg-users] [3rdparty] osg::image / Create a 3d image

2009-12-15 Thread Thomas Canipel
Hi,

With osg::image normally you can setup a 3d image , but there is a problem for 
the length  someone know what is wrong with these declaration :

I want to create an image of 100x100x100


Code:

//creation of the data 
int height=100;
int width=100;
int length=100;
const long size = width*height*length;
unsigned short* data = (unsigned short*)calloc(size, sizeof(unsigned short));

for(long i=0; i  size ; i+= 3)
{
data[i]=255;//red
data[i+1]=0;//green
data[i+2]=0;//blue
}



// declaration and allocation of the 3d image (size : 100,100,100)
osg::ref_ptrosg::Image image = new osg::Image;
image-allocateImage(width, height, length, GL_RGB, GL_UNSIGNED_SHORT);
image-setOrigin(osg::Image::BOTTOM_LEFT);
image-setImage(width, height, length,GL_RGB,GL_RGB,GL_UNSIGNED_SHORT, 
(unsigned char*)data,osg::Image::NO_DELETE);





Thank you!

Cheers,
Thomas[/code]

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





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