Re: [osg-users] osgDB::writeNodeFile and node types without wrappers/serializers

2010-12-01 Thread Robert Osfield
Hi J-S,

The serializers uses the library name and the class name to look up
the wrappers to read and write the objects.  If the library name and
class name are different from osg and Group then it won't invoke the
Group wrappers.  To have .osg support for them you'll need to provide
a wrapper, or modify the names so that they aren't modified locally.

Robert.

On Tue, Nov 30, 2010 at 8:06 PM, Jean-Sébastien Guay
jean-sebastien.g...@cm-labs.com wrote:
 Hello all,

 I noticed when doing osgDB::writeNodeFile to .osg file with an
 osgOcean::OceanScene in the graph, the written graph stops at that node,
 i.e. that node and all its children (it is a subclass of osg::Group) are not
 in the file.

 I would think that even if no wrapper / serializer exists for this node
 type, it should be writable as its base class type (osg::Group)... Is this
 not what's supposed to happen?

 Initially, the OceanScene class didn't use the META_Node(library, class)
 macro, and I thought that was why it couldn't be saved even as its base
 class type (or any node type). But I changed the header to use the macro,
 and it still isn't written.

 I know the best thing would be to provide a serializer / osgdb_osgOcean
 plugin to be able to write and read the exact type and its members from .osg
 files (and other types). But what is the minimum I need to do so that at
 least, the writeNodeFile() traversal will traverse it as an osg::Group and
 write its children?

 Is there a way to write a callback that would be called for unknown node
 types, and from which I could static_castosg::Group* and then traverse
 that, which would resolve the base class type correctly?

 I even checked the OceanScene::traverse() method, and it is written as:

 void OceanScene::traverse( osg::NodeVisitor nv )
 {
    if( nv.getVisitorType() == osg::NodeVisitor::UPDATE_VISITOR )
    {
        //...
    }
    else if (nv.getVisitorType() == osg::NodeVisitor::CULL_VISITOR)
    {
        //...
    }
    else
        osg::Group::traverse(nv);
 }

 So I would have thought that would let the writeNodeFile() do its work as if
 it were an osg::Group...

 Thanks in advance,

 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] How can I change the colour of the model?

2010-12-01 Thread Robert Osfield
Hi Duan,

On Tue, Nov 30, 2010 at 3:55 PM, Duan Linghao linghaod...@gmail.com wrote:
 I'm not so familiar with that,I want to have a single colour for the whole 
 model.Someone told me to use setState,but I have no idea how to use that.Can 
 you say it more specificly,I'm a beginner on OSG.Thanks a lot!

Are you a beginner at OpenGL as well?  Are you familiar with
glMaterial?  The osg::Material StateAttribute is a wrapper around
this, and provide the ability to set the colour of objects.  You can
attach a Material to a StateSet and attach the StateSet at the top
node of your subgraph.

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


Re: [osg-users] osgDB::writeNodeFile and node types without wrappers/serializers

2010-12-01 Thread Wang Rui
Hi J-S,

The dotosg wrapper / serializer recognizes classes from there class
names. These should be defined with the className() method (or
META_Node macro) and the writing processor in osgDB will try to find a
wrapper corresponding to the name. If found, the node will be written
to files; otherwise the unknown node and its subgraph will be skipped.
It can't decide if the OceanScene is derived from osg::Group without a
name-wrapper map recorded in the Registry object.

The ive plugin is not limited in this way, because it implements
read()/write() virtual functions for all common scene elements, but it
must have all the libraries as dependencies and is hard to extend.

Adding and implementing read()/write() virtual methods for all OSG
classes may be better for serialization IO, but it will certainly
cause changes to almost all source files and be completely a pain for
future debugging and compatibility tests.

Do you mind if I could have time to help finish the serializers of the
osgOcean project someday? :-)

Cheers,

Wang Rui


2010/12/1 Jean-Sébastien Guay jean-sebastien.g...@cm-labs.com:
 Hello all,

 I noticed when doing osgDB::writeNodeFile to .osg file with an
 osgOcean::OceanScene in the graph, the written graph stops at that node,
 i.e. that node and all its children (it is a subclass of osg::Group) are not
 in the file.

 I would think that even if no wrapper / serializer exists for this node
 type, it should be writable as its base class type (osg::Group)... Is this
 not what's supposed to happen?

 Initially, the OceanScene class didn't use the META_Node(library, class)
 macro, and I thought that was why it couldn't be saved even as its base
 class type (or any node type). But I changed the header to use the macro,
 and it still isn't written.

 I know the best thing would be to provide a serializer / osgdb_osgOcean
 plugin to be able to write and read the exact type and its members from .osg
 files (and other types). But what is the minimum I need to do so that at
 least, the writeNodeFile() traversal will traverse it as an osg::Group and
 write its children?

 Is there a way to write a callback that would be called for unknown node
 types, and from which I could static_castosg::Group* and then traverse
 that, which would resolve the base class type correctly?

 I even checked the OceanScene::traverse() method, and it is written as:

 void OceanScene::traverse( osg::NodeVisitor nv )
 {
    if( nv.getVisitorType() == osg::NodeVisitor::UPDATE_VISITOR )
    {
        //...
    }
    else if (nv.getVisitorType() == osg::NodeVisitor::CULL_VISITOR)
    {
        //...
    }
    else
        osg::Group::traverse(nv);
 }

 So I would have thought that would let the writeNodeFile() do its work as if
 it were an osg::Group...

 Thanks in advance,

 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] [vpb] How to debug VPB step by step

2010-12-01 Thread Robert Osfield
Hi Wang,

On Wed, Dec 1, 2010 at 1:58 AM, wang junchao wangjuncha...@126.com wrote:
 Thank you for your reply. But maybe I didn't make myself understood. As you 
 know, reading source code is a very complex and boring work.

If you a programmer reading source is the single most important
activity you'll ever do.  Yes it's complex, but that's our lot.  If we
wanted an easy life we'd stack shelves at the local shop ;-)

So my question is that : can I input a commandline like osgdem -t -.. d.. - o 
output.ive and trace the execution of the program step by step like the 
Visual Studio's debug mode ?

I haven't used VisualStudio for a decade but I'd guess it still allows
you to specify command line options when running apps.  You should
look at the docs of VisualStudio as this really isn't an OSG/VPB
question.

As a general note I'd add that the OSG/VPB build system names debug
builds of libs and executables with a d postfix, so you'd use osgdemd
when debugging.

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


Re: [osg-users] Hidden Viewer

2010-12-01 Thread Oliver Neumann
Hi Juan,

Thanks for your insight,

 
 As Robert already answered, it should be possible.
 The best explanation that I have for your problem is that some thread 
 fails to do wglMakeCurrent (after that call fails anything that follows 
 is just garbage) beacuse another thread is holding the context 
 (according to 
 http://www.opengl.org/sdk/docs/man/xhtml/glXMakeCurrent.xml, that's a 
 programming error in GLX, so I guess the same applies in WGL). All 
 OpenGL calls from that thread are going to fail after that.
 
 If the sample code that I sent you also complains with the error message:
 PixelBufferWin32::makeCurrentImplementation, wglMakeCurrent error: Die 
 angeforderte Ressource wird bereits verwendet
 then, there is a threading error somewhere. However I can't spot it the 
 code I sent you and I'm afraid that's beyond my knowledge of OSG's guts. 
 Robert may be more insightful here.
 
 You can try commenting the line that changes the threading model and 
 replacing frame() by run() to see if it also fails.
 


It results in the same error if I comment out the setThreadingModel call, no 
matter if I use frame() or run(). Btw, I'm using osg v2.8.3.
I compile Juan's code using the official libraries from 
http://www.openscenegraph.org/downloads/stable_releases/OpenSceneGraph-2.8.3/binaries/Windows/VisualStudio8/
and as Robert said, it's working thread safe in a standard graphics window.

If Robert is still reading this thread, is this a known issue with a solution 
or do I have to write a bug report?

Greetings,
Oliver

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





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


Re: [osg-users] Hidden Viewer

2010-12-01 Thread Robert Osfield
Hi Oliver,

On Wed, Dec 1, 2010 at 8:57 AM, Oliver Neumann z0...@yahoo.com wrote:
 It results in the same error if I comment out the setThreadingModel call, no 
 matter if I use frame() or run(). Btw, I'm using osg v2.8.3.
 I compile Juan's code using the official libraries from 
 http://www.openscenegraph.org/downloads/stable_releases/OpenSceneGraph-2.8.3/binaries/Windows/VisualStudio8/
 and as Robert said, it's working thread safe in a standard graphics window.

I would suggest that perhaps it might appear to be working safe with a
standard graphics window, but could still be thread unsafe, you just
haven't hit the problem timing.

 If Robert is still reading this thread, is this a known issue with a solution 
 or do I have to write a bug report?

Well the problem is most likely in the way you are using the OSG, or
perhaps using an OpenGL driver that doesn't support pbuffers, if you
want to write a bug report for your own app for you own purposes then
fine.  As things stand it doesn't sound likely that it's an OSG bug.

If you really do think you've come across an OSG bug then the thing to
do is to write a small example, or modify one of the existing OSG
examples to reproduce the problem then post this.  Then others can
test the problem out first hand.  It could still be a bug in the what
you are trying to do, but others will be able to spot this and point
you at the problem.

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


Re: [osg-users] Hidden Viewer

2010-12-01 Thread Juan Hernando

Hi Robert,

If Robert is still reading this thread, is this a known issue with a solution 
or do I have to write a bug report?


Well the problem is most likely in the way you are using the OSG, or
perhaps using an OpenGL driver that doesn't support pbuffers, if you
want to write a bug report for your own app for you own purposes then
fine.  As things stand it doesn't sound likely that it's an OSG bug.
I agree that a probable cause is that his driver or hardware does not 
support pbuffers. However, what is a bit odd to me is this message in 
his trace:
PixelBufferWin32::makeCurrentImplementation, wglMakeCurrent error: Die 
angeforderte Ressource wird bereits verwendet.
In english (using an on-line german to english translator) the message 
is: The requested resource is already in use which seems to be related 
to a threading issue.



If you really do think you've come across an OSG bug then the thing to
do is to write a small example, or modify one of the existing OSG
examples to reproduce the problem then post this.  Then others can
test the problem out first hand.  It could still be a bug in the what
you are trying to do, but others will be able to spot this and point
you at the problem.

As Oliver said, he has the same problem using the very simple an 
self-contained example program that I sent him in my second mail. I 
can't figure out where the problem is, overall considering that this 
type of code hasn't ever failed to me (now I'm curious to know if I've 
being doing something wrong for a long time). The program is very short, 
so you may want to take a look.
For your convenience, I reproduce the code here with the modifications 
that reproduce his problem :


#include osg/Geode
#include osg/ShapeDrawable
#include osgViewer/Viewer
#include osgGA/TrackballManipulator
#include osgDB/WriteFile

int main(int argc, char *argv[])
{
osg::ArgumentParser args(argc, argv);
osgViewer::Viewer viewer(args);
osg::Camera *camera = viewer.getCamera();

osg::ref_ptrosg::GraphicsContext::Traits traits = new
osg::GraphicsContext::Traits;
traits-width = 512;
traits-height = 512;
traits-pbuffer = true;
traits-readDISPLAY();
osg::GraphicsContext *gc =
osg::GraphicsContext::createGraphicsContext(traits.get());
camera-setGraphicsContext(gc);
camera-setDrawBuffer(GL_FRONT);
camera-setProjectionMatrixAsPerspective(22, 1, 0.1, 1000);
camera-setViewport(new osg::Viewport(0, 0, 512, 512));

osg::Geode *scene = new osg::Geode();
osg::Shape *sphere = new osg::Sphere(osg::Vec3(), 1);
scene-addDrawable(new osg::ShapeDrawable(sphere));
viewer.setSceneData(scene);

viewer.setCameraManipulator(new osgGA::TrackballManipulator());

osg::Image *image = new osg::Image();
camera-attach(osg::Camera::COLOR_BUFFER0, image);

viewer.realize();
viewer.run();
}

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


[osg-users] rain/snow accumulation on the screen

2010-12-01 Thread Trajce (Nick) Nikolov
Hi Community,

any ideas/hints how to implement rain/snow accumulation on the screen (like
for a driving sim)?


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


Re: [osg-users] rain/snow accumulation on the screen

2010-12-01 Thread Robert Osfield
Hi Nick,

On Wed, Dec 1, 2010 at 10:15 AM, Trajce (Nick) Nikolov
nikolov.tra...@gmail.com wrote:
 any ideas/hints how to implement rain/snow accumulation on the screen (like
 for a driving sim)?

Bring a laptop to Scotland and sit outside.  Right now you'll get an
accumulation of snow on the screen.  Waiting another week and we might
be able to provide an accumulation of rain, although it's likely to
ruin the laptop.  Still you'd have achieved your mission :-)

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


Re: [osg-users] Hidden Viewer

2010-12-01 Thread Juan Hernando



I have tested under Kubuntu 9.04 + ATI 4670 and the driver doesn't
support pbuffer but the fallback opens up a full screen window and it
works fine.

I have also tested under Kubuntu 10.10 + ATI 4670 and the driver does
support pbuffer and the app runs correctly.

In Ubuntu 9.10 with a Nvidia GTX 280 with driver version 190.53 it works 
fine.


Oliver, maybe you should try a low level pbuffer example to discard it 
as the problem. First, you can use an OpenGL extension checker and 
search for WGL_ARB_pbuffer, I think GPU-Z does the job.


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


[osg-users] Please test svn/trunk in prep for 2.9.10 dev release

2010-12-01 Thread Robert Osfield
Hi All,

I'm planning to make the 2.9.10 dev release this week.  There have
been lots of check-in's recently with me merging lots of submissions
over the last two weeks, some very significant ones like iOS support,
so we need lots of testing on the various platforms to make sure that
everything is compiling and running well.

If you do a build of svn/trunk let me know how you get on and what
platforms you've tested, I want to know success and failures as it's
important to know how well things are converging for the release.

Thanks for you help in testing,
Robert.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Plans for OpenSceneGraph-3.0 release

2010-12-01 Thread Robert Osfield
Hi All,

We've been discussing the next stable release, OpenSceneGraph-3.0, on
and off for a year now, and it's been coming soon for rather too long.
 I believe it's time now to make a push to get 3.0 out the door, and
if we get the testing done, code refined and not attempt any ambitious
new feature development we should be able to get it out in the next
three weeks - in time for a well deserved rest at the end of year ;-)

Getting 3.0 before Christmas is a very competitive goal.  To achieve
this I will need to be pretty strict about what new codes and fixes go
in and what features we attempt to finish.  OpenGL ES support is well
established,  iOS support is well on it's way to being ready, and the
new serializers work very well in most usage models.  All of these
should be possible to tidy up in time for 3.0 without undue risk to
the competitive schedule.

One feature I have long assigned as a MUST HAVE for 3.0 was shader
composition, and I and others have done work in this direction, but as
things stand no one implementation is flexible and complete enough to
say that it achieves the goals I wanted for it.  I have been busy with
too much other work in the last three months to complete what I
started with what is now integrated with svn/trunk, what is there is
about half done.  For limited usage models it can be used
successfully, and for more traditional usage of the OSG it doesn't
effect usage so while it's incomplete I don't believe it's presence in
svn/trunk need hold back 3.0.  I have to be realistic though, there
isn't anyway I or anyone else can perfect such a cutting edge feature
in the next few weeks, so rather than try to chase the goal of having
full feature shader composition, I feel it we just need to let this
feature take a back seat till after 3.0 and shift it to a goal for the
follow up stable release 3.2.

In prep for 3.0 I will start pushing out one or two more dev releases,
and then go a feature freeze and the 3.0 branch, from this a series a
release candidates will be made, till the final one goes out the door.

A provisional schedule will be something like:

  Friday 3rd December OpenSceneGraph-2.9.10 dev release
  Friday 10th December OpenSceneGraph-2.9.11 dev release
  Tuesday 14th December OpenSceneGraph-3.0 branch made
  Wednesday 15th December OpenSceneGraph-3.0-rc1
  Friday 15th December OpenSceneGraph-3.0-rc2 (if required)
  Monday 19th December OpenSceneGraph-3.0-rc3 (if required)
  Wednesday 22nd December OpenSceneGraph-3.0-rc4 (if required)

  Somewhere between 19th to 24th December official  OpenSceneGraph-3.0 release

Hopefully this competitive schedule won't sound too crazy.  Lots of
testing will be required from myself and others in the community - a
busy time for us all even without adding extra release work.  The more
testing we can do of the OSG and how well it works against our
applications the more we'll be able to fix problems and refine it for
the final stable release.

When working within this time frame we all need to think from the
perspective of minimizing the risk on the schedule and prioritizing
code robustness over feature development, so it's no time to start
proposing wouldn't it be great to have feature x for 3.0.  It's about
getting 3.0 out the door, further new features will be for 3.2 and
beyond.

This is just a first post in a series for working towards getting 3.0
out the door.  If you have thoughts/opinions/suggestions about getting
3.0 smoothly then please post them here.

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


[osg-users] osgscreencapture sample doesn't work

2010-12-01 Thread Igor Galochkin
Hi,

I am trying to render the scene to an image without opening any windows. After 
doing a lot of searching and looking thru source code of OSG classes, I still 
get a completely white image.

In many places people say one should use the same code as there is in 
osgscreencapture which renders to a pbuffer is --pbuffer-only option is passed.

But the fact is that osgscreencapture doesn't work itself! 

osgscreencapture.exe axes.osg --pbuffer-only 640 480 

must produce an image without opening any windows.

When running this on my laptop (WindowsXP home) i get the following error 
message:
PixelBufferWin32::init(), Error: Couldn't find a suitable pixel format
Pixel buffer has not been created successfully.
Windows Error #2000: Win32WindowingSystem::OpenGLContext() - Unable to restore 
current OpenGL rendering context. Reason: Pixel format is invalid.

after that the axes.osg file is just opened in a full-screen viwer window, no 
image file is created.


When running this on my Desktop PC (WindowsXP Pro) i get the following error 
message:
Pixel buffer has been created successfully.
PixelBufferWin32::makeCurrentImplementation, wglMakeCurrent error: Die 
angeforderte Ressource wird bereits verwendet. (The requested resource is 
already being used)

Error: OpenGL version test failed, requires valid graphics context.
After that the program crashes and attempt to open Visual Studio debugger.

On both machines OSG is correctly installed, e.g. i can easily open the osg 
files in viewer by double clicking.

Do I at least call the osgscreenviewer correctly?


... 

Thank you!

Cheers,
Igor

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





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


Re: [osg-users] Hidden Viewer

2010-12-01 Thread Oliver Neumann
Hi Juan and Robert,

Thanks for the help, I compiled the pbuffertest code, I had to add this to the 
header section to make it work (i'm using osg 2.8.3)


Code:

#include osg/Notify
#define OSG_NOTICE OSG_NOTIFY_1(osg::NOTICE)
#define OSG_NOTIFY_1(level) if (osg::isNotifyEnabled(level)) osg::notify(level)




pbuffertest -w 
works and makes 100 frames (the viewer window is shortly visible).

pbuffertest -f 1
doesn't work and produces the known error:


Code:

Frame : PixelBufferWin32::makeCurrentImplementation, wglMakeCurrent error: 0Die
angeforderte Ressource wird bereits verwendet.

Test Ecrormoprl:e Otpeedn.
GL version test failed, requires valid graphics context.





(btw, exchanging the OSG_NOTICE with printf gives the correct Test 
completed.\nError: OpenGL version test failed, requires valid graphics 
context. instead of Test Ecrormoprl:e Otpeedn for pbuffertest.exe -f 1)

I installed GPU-Z but couldn't find the OpenGL Extension Information. I 
installed the OpenGL Extensions Viewer 
(http://www.realtech-vr.com/glview/download.html). It confirms that among others

WGL_ARB_pbuffer
WGL_ARB_pixel_format
WGL_ARB_pixel_format

are supported by my nVidia Quadro FX 580 (see screenshot).
Because it sounded like a possible fix, I defined the environment variable
OSG_WIN32_NV_MULTIMON_MULTITHREAD_WORKAROUND to ON, but that changed nothing.

As far as my little knowledge goes, I think that the bug is in the osg code. 

Cheers,
Oliver

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




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


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


Re: [osg-users] rain/snow accumulation on the screen

2010-12-01 Thread Trajce (Nick) Nikolov
Hahahahahahah ... thanks Robert !!!

-Nick


On Wed, Dec 1, 2010 at 2:44 PM, Kim Bale kcb...@googlemail.com wrote:

 Genius. :)

 K.


 On 1 December 2010 10:24, Robert Osfield robert.osfi...@gmail.com wrote:

 Hi Nick,

 On Wed, Dec 1, 2010 at 10:15 AM, Trajce (Nick) Nikolov
 nikolov.tra...@gmail.com wrote:
  any ideas/hints how to implement rain/snow accumulation on the screen
 (like
  for a driving sim)?

 Bring a laptop to Scotland and sit outside.  Right now you'll get an
 accumulation of snow on the screen.  Waiting another week and we might
 be able to provide an accumulation of rain, although it's likely to
 ruin the laptop.  Still you'd have achieved your mission :-)

 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


Re: [osg-users] rain/snow accumulation on the screen

2010-12-01 Thread Trajce (Nick) Nikolov
actually, not a a bad idea ... people with John Nesh fortune could probably
figure out the algorithm then ;-)

-Nick


On Wed, Dec 1, 2010 at 4:43 PM, Trajce (Nick) Nikolov 
nikolov.tra...@gmail.com wrote:

  Hahahahahahah ... thanks Robert !!!

 -Nick


   On Wed, Dec 1, 2010 at 2:44 PM, Kim Bale kcb...@googlemail.com wrote:

 Genius. :)

 K.


 On 1 December 2010 10:24, Robert Osfield robert.osfi...@gmail.comwrote:

 Hi Nick,

 On Wed, Dec 1, 2010 at 10:15 AM, Trajce (Nick) Nikolov
 nikolov.tra...@gmail.com wrote:
  any ideas/hints how to implement rain/snow accumulation on the screen
 (like
  for a driving sim)?

 Bring a laptop to Scotland and sit outside.  Right now you'll get an
 accumulation of snow on the screen.  Waiting another week and we might
 be able to provide an accumulation of rain, although it's likely to
 ruin the laptop.  Still you'd have achieved your mission :-)

 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


Re: [osg-users] Plans for OpenSceneGraph-3.0 release

2010-12-01 Thread Torben Dannhauer
Hi Robert,

I think introducing a defined feature merge window and a defined bugfix window 
as you did is a good idea to establish tight roadmaps/release dates.

Maybe you could introduce this windows generally, not only regarding the 
rollout of 3.0.


Thank you!

Cheers,
Torben

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





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


Re: [osg-users] osgscreencapture sample doesn't work

2010-12-01 Thread Robert Osfield
HI Ignore,

I have just tried the command line you supplied and it worked
correctly on my Kubuntu 10.10/ATI system.

The errors you are seeing suggest an issue with the OpenGL driver.
What hardware and drivers are you using?

Robert.

On Wed, Dec 1, 2010 at 12:10 PM, Igor Galochkin isee...@yandex.com wrote:
 Hi,

 I am trying to render the scene to an image without opening any windows. 
 After doing a lot of searching and looking thru source code of OSG classes, I 
 still get a completely white image.

 In many places people say one should use the same code as there is in 
 osgscreencapture which renders to a pbuffer is --pbuffer-only option is 
 passed.

 But the fact is that osgscreencapture doesn't work itself!

 osgscreencapture.exe axes.osg --pbuffer-only 640 480

 must produce an image without opening any windows.

 When running this on my laptop (WindowsXP home) i get the following error 
 message:
 PixelBufferWin32::init(), Error: Couldn't find a suitable pixel format
 Pixel buffer has not been created successfully.
 Windows Error #2000: Win32WindowingSystem::OpenGLContext() - Unable to 
 restore current OpenGL rendering context. Reason: Pixel format is invalid.

 after that the axes.osg file is just opened in a full-screen viwer window, no 
 image file is created.


 When running this on my Desktop PC (WindowsXP Pro) i get the following error 
 message:
 Pixel buffer has been created successfully.
 PixelBufferWin32::makeCurrentImplementation, wglMakeCurrent error: Die 
 angeforderte Ressource wird bereits verwendet. (The requested resource is 
 already being used)

 Error: OpenGL version test failed, requires valid graphics context.
 After that the program crashes and attempt to open Visual Studio debugger.

 On both machines OSG is correctly installed, e.g. i can easily open the osg 
 files in viewer by double clicking.

 Do I at least call the osgscreenviewer correctly?


 ...

 Thank you!

 Cheers,
 Igor

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





 ___
 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] Please test svn/trunk in prep for 2.9.10 dev release

2010-12-01 Thread Wang Rui
Hi Robert,

The latest trunk is built well on my Windows XP and VisualStudio 2008.
An additional hint to Windows users is that the osgdb_directshow
plugin must be compiled with the MBCS configuration of DirectShow
while using Windows SDK 7.1; otherwise it reports an unresolved symbol
error. Maybe we could go deeper to see if normal configurations could
also work.

I'll try compiling with VisualStudio 2005 and 2010 and MinGW tomorrow.

Cheers,

Wang Rui


2010/12/1 Robert Osfield robert.osfi...@gmail.com:
 Hi All,

 I'm planning to make the 2.9.10 dev release this week.  There have
 been lots of check-in's recently with me merging lots of submissions
 over the last two weeks, some very significant ones like iOS support,
 so we need lots of testing on the various platforms to make sure that
 everything is compiling and running well.

 If you do a build of svn/trunk let me know how you get on and what
 platforms you've tested, I want to know success and failures as it's
 important to know how well things are converging for the release.

 Thanks for you help in testing,
 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] osgDB::writeNodeFile and node types without wrappers/serializers

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

Hi Wang Rui, Robert,


The dotosg wrapper / serializer recognizes classes from there class
names. These should be defined with the className() method (or
META_Node macro) and the writing processor in osgDB will try to find a
wrapper corresponding to the name. If found, the node will be written
to files; otherwise the unknown node and its subgraph will be skipped.
It can't decide if the OceanScene is derived from osg::Group without a
name-wrapper map recorded in the Registry object.


Thanks for the explanation, together with Robert's explanation that 
makes sense.


The only possible workaround in my case (if I have no time to write 
actual dotosg plugin/serializer support) would be to make className() 
and libraryName() return osg::Group? Or maybe just not implementing 
them, so that the osg::Group versions will be called?



Do you mind if I could have time to help finish the serializers of the
osgOcean project someday? :-)


Hehe, if you want you're welcome to do it of course. :-)

I've read that adding serializer support is very straightforward, but 
unfortunately our software currently runs on OSG 2.8.3 so that won't 
solve the problem for me...


Thanks a lot,

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] Please test svn/trunk in prep for 2.9.10 dev release

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

Hi Robert,


If you do a build of svn/trunk let me know how you get on and what
platforms you've tested, I want to know success and failures as it's
important to know how well things are converging for the release.


With yesterday's checkin of some OpenGL types the build now succeeds on 
Windows / VC++ 2008 again.


I've run a few tests to check the status:
* osgviewer is OK (cow.osg, fountain.osg, cessnafire.osg, 
glsl_julia.osg, glsl_confetti.osg, SmokeBox.osg, spaceship.osg, nathan.osg)
* osgshadow in sm, ssm, pssm and lispsm work well (pssm with the recent 
fix works better than it has in the last 2 years!)

* osgtext is OK
* osgText3D seems to work (I know it's in development)
* osgparticle crashed, I'll check it out later
* osganimationviewer nathan.osg crashed, I'll check it out later

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] osgDB::writeNodeFile and node types without wrappers/serializers

2010-12-01 Thread Robert Osfield
Hi JS,

On Wed, Dec 1, 2010 at 2:02 PM, Jean-Sébastien Guay
jean-sebastien.g...@cm-labs.com wrote:
 Thanks for the explanation, together with Robert's explanation that makes
 sense.

 The only possible workaround in my case (if I have no time to write actual
 dotosg plugin/serializer support) would be to make className() and
 libraryName() return osg::Group? Or maybe just not implementing them, so
 that the osg::Group versions will be called?

You could do this.  By adding a DotOsgWrapper for the class in
question should be straight forward, it doesn't need a plugin, just
stick the wrapper declaration in osgOcean or your app. Something as
simple as:

// register the read and write functions with the osgDB::Registry.
REGISTER_DOTOSGWRAPPER(OceanScene)
(
new osgOcean::OceanScene,
OceanScene,
Object Node OceanScene Group,
NULL,
NULL
);

Might well be sufficient.  Later you could add the read and write
functions for the OceanScene methods rather than let them be non ops
as done here with the NULL's.

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


Re: [osg-users] Please test svn/trunk in prep for 2.9.10 dev release

2010-12-01 Thread Robert Osfield
Hi JS,

Thanks for the testing.

 * osgparticle crashed, I'll check it out later
 * osganimationviewer nathan.osg crashed, I'll check it out later

I've just run these tests on my Kubuntu 10.10 system here and both
work fine.  Could others test these to see if we can get a picture of
when they work, when they fail.  Stack traces of any crashes would be
really useful.

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


Re: [osg-users] Please test svn/trunk in prep for 2.9.10 dev release

2010-12-01 Thread Wang Rui
Hi Robert and J-S,

I made a quick test and found that osgparticle and osganimationviewer
nathan.osg work well on my computer. I'm working with VS2008 and a
really latest OSG version (updated about two hours ago :-)

Cheers,

Wang Rui


2010/12/1 Jean-Sébastien Guay jean-sebastien.g...@cm-labs.com:
 I've run a few tests to check the status:
 * osgviewer is OK (cow.osg, fountain.osg, cessnafire.osg, glsl_julia.osg,
 glsl_confetti.osg, SmokeBox.osg, spaceship.osg, nathan.osg)
 * osgshadow in sm, ssm, pssm and lispsm work well (pssm with the recent fix
 works better than it has in the last 2 years!)
 * osgtext is OK
 * osgText3D seems to work (I know it's in development)
 * osgparticle crashed, I'll check it out later
 * osganimationviewer nathan.osg crashed, I'll check it out later

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


Re: [osg-users] Please test svn/trunk in prep for 2.9.10 dev release

2010-12-01 Thread Torben Dannhauer
Hi,

Win7 + VS2008 SP1 works well in 32 and 64 bit.

Thank you!

Cheers,
Torben

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





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


Re: [osg-users] Hidden Viewer

2010-12-01 Thread Juan Hernando

WGL_ARB_pbuffer
WGL_ARB_pixel_format
WGL_ARB_pixel_format

are supported by my nVidia Quadro FX 580 (see screenshot).
Because it sounded like a possible fix, I defined the environment variable
OSG_WIN32_NV_MULTIMON_MULTITHREAD_WORKAROUND to ON, but that changed nothing.

As far as my little knowledge goes, I think that the bug is in the osg code. 


The first step to discard a driver bug should be testing a pbuffer 
example that only uses OpenGL and WGL.


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


Re: [osg-users] Please test svn/trunk in prep for 2.9.10 dev release

2010-12-01 Thread Cole, Charles E. (LARC-B702)[LITES]
Hi Robert, J-S

I just tested osgparticle and osganiimationviewer, and both worked fine for me. 
 I'm running Ubuntu 10.04 (64-bit) with nVidia 256.53 drivers.  While not too 
different from your configuration, it's at least another data point.

Chuck

-Original Message-
From: osg-users-boun...@lists.openscenegraph.org 
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Robert Osfield
Sent: Wednesday, December 01, 2010 9:18 AM
To: OpenSceneGraph Users
Subject: Re: [osg-users] Please test svn/trunk in prep for 2.9.10 dev release

Hi JS,

Thanks for the testing.

 * osgparticle crashed, I'll check it out later
 * osganimationviewer nathan.osg crashed, I'll check it out later

I've just run these tests on my Kubuntu 10.10 system here and both
work fine.  Could others test these to see if we can get a picture of
when they work, when they fail.  Stack traces of any crashes would be
really useful.

Cheers,
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] osgDB::writeNodeFile and node types without wrappers/serializers

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

Hello Robert,


Might well be sufficient.  Later you could add the read and write
functions for the OceanScene methods rather than let them be non ops
as done here with the NULL's.


Ah, nice, I'll try this out. With the third line in the macro (Object 
Node OceanScene Group) it will write out the OceanScene as if it were a 
Group for now?


Thanks a lot for your 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] Hidden Viewer

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

Hello Robert,


I tested your example and adapted it a little to add command line
options, and a CMakeLists.txt file to compile it.  Zip file attached
so that others can test it out easily.


You need to add ${OSGGA_LIBRARY} to the TARGET_LINK_LIBRARIES line. Also 
it was missing some things to make it link to the debug libraries when 
compiling in debug, which is required on Windows. Here is the changed 
file if anyone else wants to test on Windows.



To test run with a pbuffer if supported, with the app running for 100 frames:

   pbuffertest

If pbuffer isn't supported by your driver/hardware the OSG will
fallback to using a normal graphics window in the Viewer::realize()
method.


On my system it gives the following output:

Frame : 0
PixelBufferWin32::makeCurrentImplementation, wglMakeCurrent error: The 
requested resource is in use.


Warning: detected OpenGL error 'invalid operation' at Before 
Renderer::compile
Warning: detected OpenGL error 'invalid operation' at After 
Renderer::compile

Frame : 1
Frame : 1

and then it crashes.

I also tried to compile against OSG 2.8.3 (replacing OSG_NOTICE with 
osg::notify(osg::NOTICE) ), there I get:


Frame : 0
PixelBufferWin32::makeCurrentImplementation, wglMakeCurrent error: The 
requested

 resource is in use.

Frame : E1r
ror: OpenGL version test failed, requires valid graphics context.

This sounds very similar to what Olivier is getting.

I have just tested the osgscreencapture example on svn trunk, with the 
command:


osgscreencapture.exe axes.osg --pbuffer-only 640 480

as given in another thread, and it gives the same result. I remember 
this example working in the not too distant past, so it may be that 
something has been broken in nVidia's Windows drivers. I am using the 
most recent version (260.99), what version are you using Olivier?


With the -w argument it works fine (with a window coming up on the 
screen of course).


So I'll investigate a bit more as to why pbuffer is failing. We've not 
ruled out a driver bug or an OSG bug here as far as I can see, it could 
still be both, since all the OSG pbuffer examples I've tried have failed 
in the same way.


Thanks,

J-S
--
__
Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com
   http://www.cm-labs.com/
http://whitestar02.webhop.org/
cmake_minimum_required(VERSION 2.6)

PROJECT(pbuffertest)

SET(CMAKE_MODULE_PATH 
${osggroudsim_SOURCE_DIR}/../CMakeModules;${CMAKE_MODULE_PATH})

FIND_PACKAGE(OpenThreads)
FIND_PACKAGE(osg)
FIND_PACKAGE(osgUtil)
FIND_PACKAGE(osgGA)
FIND_PACKAGE(osgDB)
FIND_PACKAGE(osgViewer)

SET(SOURCES
pbuffertest.cpp
)

INCLUDE_DIRECTORIES(${OPENTHREADS_INCLUDE_DIR} ${OSG_INCLUDE_DIR})
LINK_DIRECTORIES(${OSG_LIB_DIR})
ADD_EXECUTABLE(${CMAKE_PROJECT_NAME} ${SOURCES})
TARGET_LINK_LIBRARIES(${CMAKE_PROJECT_NAME} 
optimized ${OSG_LIBRARY} 
debug ${OSG_LIBRARY_DEBUG} 
optimized ${OSGVIEWER_LIBRARY} 
debug ${OSGVIEWER_LIBRARY_DEBUG}
optimized ${OSGGA_LIBRARY}
debug ${OSGGA_LIBRARY_DEBUG}
optimized ${OPENTHREADS_LIBRARY} 
debug ${OPENTHREADS_LIBRARY_DEBUG} 
)
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] osgDB::writeNodeFile and node types without wrappers/serializers

2010-12-01 Thread Robert Osfield
On Wed, Dec 1, 2010 at 2:43 PM, Jean-Sébastien Guay
jean-sebastien.g...@cm-labs.com wrote:
 Hello Robert,

 Might well be sufficient.  Later you could add the read and write
 functions for the OceanScene methods rather than let them be non ops
 as done here with the NULL's.

 Ah, nice, I'll try this out. With the third line in the macro (Object Node
 OceanScene Group) it will write out the OceanScene as if it were a Group
 for now?

It'll write it out as class named OceanScene but with all the contents
of a Group.

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


[osg-users] debugging slow path

2010-12-01 Thread Keith Parkins

Hi,

My app is currently rendering via the slow path. I've checked for 
DrawArrayLengths and BIND_PER_PRIMITVES, but don't seem to have either. 
Dose anyone know of other things I should be looking for? I am walking 
through the rendering stage to see if I can figure out what is getting set 
that is putting me on the slow track, but I don't have endless amounts of 
time to do this. If anyone has any understanding of this, I would be most 
appreciative if you could point me in the right direction.


If you need more information, check my post FBO problem?

Thanks!
Keith

PS: Thanks a lot for the help, Jason.

On Tue, 30 Nov 2010, Jason Daly wrote:


On 11/30/2010 08:09 PM, Keith Parkins wrote:

I am using geo-setNormalBinding(osg::Geometry::BIND_OVERALL);
and I did see a model with NormalBinding PER_VERTEX. Should I be setting
these to BIND_OFF or is it just BIND_PER_PRIMITIVE?


No, BIND_PER_PRIMITIVE is the bad binding.  All of the others are fine. 
If you are avoiding BIND_PER_PRIMITIVE and the attribute indexes, I'm not 
sure why you'd be falling off the fast path.  There may be other reasons 
for it, but I can't think of them...


--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] rain/snow accumulation on the screen

2010-12-01 Thread Andrew Lowe

On 1/12/2010 6:15 PM, Trajce (Nick) Nikolov wrote:

Hi Community,

any ideas/hints how to implement rain/snow accumulation on the screen (like
for a driving sim)?


-Nick


	A company I used to work for which did driving sims, mining trucks in 
fact, just used a series of bitmaps - I might be using totally the wrong 
buzzwords here, I've had my after work beer and the correct terms escape 
me. The bit maps were generated by the graphics people and we just 
loaded them up and overlayed them as needed.


There was a series of overlays that corresponded to:

1) A few drops

2) More drops

3) Even more drops

4) quite a few drops
...
...
...
...
n) That many drop that in combination with a dusty windscreen, remember 
this is of a mining truck in an iron ore mine in Australia, that the 
windscreen has become mud. Then the user would turn on the wipers and a 
new set of overlays would be used which corresponded to the windscreen 
wipers going.


	These overlays were created by our graphic artists and we just dumped 
them into the scene at the speed we needed to simulate the rain. In 
other words the screen/rain/mud was not done dynamically with a snazzy 
algorithm, it was basically good old page flipping animation.


	Nick, does this make sense? If not I'll revisit the topic in the 
morning, it's currently 11.15pm, and try and make more sense.


Regards,
Andrew

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


Re: [osg-users] rain/snow accumulation on the screen

2010-12-01 Thread Michael Robb
Pixelmaps or billboard textures might be the OpenGL terminology. Animation
studios might use the term Particle Systems. 1980's game programmers would
probably use the term sprites, especially if their motion changed when you
moved. In this case blowing off as the vehicle moved.

 For snow,  they would be partially transparent at the edges (alpha -0 )
and darker in the middle, so that when they were pasted on top together,
they would make that area of the screen go dark.

Not sure about the description of rain accumulation - if it were the effect
of water trickling down the window,
Doing trickling raindrops would be tricky - you would definitely need a
particle system with a surface threshold algorithm (marching
cubes/triangles) and some surface tension physics to generate the geometry
to do refraction.

On the inside of the window, you'd want condensation effects - that would
just be partially transparent gray.

On Wed, Dec 1, 2010 at 3:17 PM, Andrew Lowe a...@wht.com.au wrote:

 On 1/12/2010 6:15 PM, Trajce (Nick) Nikolov wrote:

 Hi Community,

 any ideas/hints how to implement rain/snow accumulation on the screen
 (like
 for a driving sim)?


 -Nick


A company I used to work for which did driving sims, mining trucks
 in fact, just used a series of bitmaps - I might be using totally the wrong
 buzzwords here, I've had my after work beer and the correct terms escape me.
 The bit maps were generated by the graphics people and we just loaded them
 up and overlayed them as needed.

There was a series of overlays that corresponded to:

 1) A few drops

 2) More drops

 3) Even more drops

 4) quite a few drops
 ...
 ...
 ...
 ...
 n) That many drop that in combination with a dusty windscreen, remember
 this is of a mining truck in an iron ore mine in Australia, that the
 windscreen has become mud. Then the user would turn on the wipers and a new
 set of overlays would be used which corresponded to the windscreen wipers
 going.

These overlays were created by our graphic artists and we just
 dumped them into the scene at the speed we needed to simulate the rain. In
 other words the screen/rain/mud was not done dynamically with a snazzy
 algorithm, it was basically good old page flipping animation.

Nick, does this make sense? If not I'll revisit the topic in the
 morning, it's currently 11.15pm, and try and make more sense.

Regards,
Andrew

 ___
 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] second-order equation

2010-12-01 Thread Cracj Kurt
Hi,

how can I draw a second-order equation?
what class\methods need use?

Thank you!

Cheers,
kurt

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





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


[osg-users] OSG and QT

2010-12-01 Thread Cracj Kurt
Hi,

how i can render scene in my QT dialog form?
Can you help me. I read common manual ,there use console applications and 
viewer class. But i want render my scene  in GUI.

For example there is cow.osg. How it open in QT GUI application?

Thank you!

Cheers,
kurt

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




Attachments: 
http://forum.openscenegraph.org//files/cow_139.osg


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


Re: [osg-users] Hidden Viewer

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

Hi again,


So I'll investigate a bit more as to why pbuffer is failing. We've not
ruled out a driver bug or an OSG bug here as far as I can see, it could
still be both, since all the OSG pbuffer examples I've tried have failed
in the same way.


I've tried an example that uses straight WGL_ARB_pbuffer code and it 
works fine. I found the example on the web, see here:


http://www.codesampler.com/oglsrc/oglsrc_7.htm

See the example Off-screen Rendering Using Pixel Buffers and I used 
version #1.


However this still doesn't prove it isn't a driver bug, since this 
example is single threaded and if I make the pbuffertest example single 
threaded (by adding 
viewer.setThreadingModel(osgViewer::ViewerBase::SingleThreaded); after 
the viewer creation) it works too.


I've debugged what happens, and roughly the sequence is this:

1. main(): createGraphicsContext(traits.get())
   --- PixelBufferWin32 is created successfully

2. main(): viewer.realize()
   --- PixelBufferWin32::makeCurrentImplementation() is called, and 
succeeds.


3. GraphicsThread::run()
   --- PixelBufferWin32::makeCurrentImplementation() is called, and 
fails with The requested resource is in use.


I don't know why the second makeCurrentImplementation would fail, but 
going from Juan's hunch that it was failing because some other thread 
was holding on to it (the main thread in this case), I added the 
following code after viewer.realize(); :


viewer.stopThreading();
gc-releaseContext();
viewer.startThreading();

This made it work.

This is obviously not a solution. It worked as-is before on Linux, so 
perhaps on Windows the makeCurrent() call makes the context exclusive 
to the thread on which it was called, whereas on Linux a subsequent 
makeCurrent() will still succeed and just remove the context from the 
previous thread that had it current silently?


Just theorizing here.

Any other ideas?

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] rain/snow accumulation on the screen

2010-12-01 Thread Trajce (Nick) Nikolov
Thank you !!!

Andrew, your approach was the first that crossed my mind  But not too
much of a fan of it. More into what Michael is proposing ... Thanks again

-Nick


On Wed, Dec 1, 2010 at 7:56 PM, Michael Robb msar2...@gmail.com wrote:

 Pixelmaps or billboard textures might be the OpenGL terminology. Animation
 studios might use the term Particle Systems. 1980's game programmers would
 probably use the term sprites, especially if their motion changed when you
 moved. In this case blowing off as the vehicle moved.

  For snow,  they would be partially transparent at the edges (alpha -0 )
 and darker in the middle, so that when they were pasted on top together,
 they would make that area of the screen go dark.

 Not sure about the description of rain accumulation - if it were the effect
 of water trickling down the window,
 Doing trickling raindrops would be tricky - you would definitely need a
 particle system with a surface threshold algorithm (marching
 cubes/triangles) and some surface tension physics to generate the geometry
 to do refraction.

 On the inside of the window, you'd want condensation effects - that would
 just be partially transparent gray.


 On Wed, Dec 1, 2010 at 3:17 PM, Andrew Lowe a...@wht.com.au wrote:

 On 1/12/2010 6:15 PM, Trajce (Nick) Nikolov wrote:

 Hi Community,

 any ideas/hints how to implement rain/snow accumulation on the screen
 (like
 for a driving sim)?


 -Nick


A company I used to work for which did driving sims, mining trucks
 in fact, just used a series of bitmaps - I might be using totally the wrong
 buzzwords here, I've had my after work beer and the correct terms escape me.
 The bit maps were generated by the graphics people and we just loaded them
 up and overlayed them as needed.

There was a series of overlays that corresponded to:

 1) A few drops

 2) More drops

 3) Even more drops

 4) quite a few drops
 ...
 ...
 ...
 ...
 n) That many drop that in combination with a dusty windscreen, remember
 this is of a mining truck in an iron ore mine in Australia, that the
 windscreen has become mud. Then the user would turn on the wipers and a new
 set of overlays would be used which corresponded to the windscreen wipers
 going.

These overlays were created by our graphic artists and we just
 dumped them into the scene at the speed we needed to simulate the rain. In
 other words the screen/rain/mud was not done dynamically with a snazzy
 algorithm, it was basically good old page flipping animation.

Nick, does this make sense? If not I'll revisit the topic in the
 morning, it's currently 11.15pm, and try and make more sense.

Regards,
Andrew

 ___
 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] Please test svn/trunk in prep for 2.9.10 dev release

2010-12-01 Thread Jason Daly

On 12/01/2010 06:18 AM, Robert Osfield wrote:

If you do a build of svn/trunk let me know how you get on and what
platforms you've tested, I want to know success and failures as it's
important to know how well things are converging for the release.


Hi, Robert,

Building on the brand new Red Hat Enterprise Linux 6... (gcc-4.4.4, 
CMake 2.6.4)


Build almost completes, but there's a problem with the osgQtWidgets 
example (errors below). I did some Googling and discovered that, while 
RHEL6 ships with Qt 4.6, they deliberately left out the QtWebkit module. 
I couldn't find exactly why, but there was some speculation that it was 
a security-related issue. It's possible they'll reintroduce it a future 
point release. Currently, though, this prevents a clean build if 
examples are enabled. I'm not a Qt expert, so I'm not sure what the best 
way to address this would be.



[100%] Building CXX object 
examples/osgQtWidgets/CMakeFiles/example_osgQtWidgets.dir/osgQtWidgets.o
In file included from 
/root/OpenSceneGraph-svn-src/examples/osgQtWidgets/osgQtWidgets.cpp:52:
/root/OpenSceneGraph-svn-src/include/osgQt/QWebViewImage:20:29: error: 
QtWebKit/QtWebKit: No such file or directory
In file included from 
/root/OpenSceneGraph-svn-src/examples/osgQtWidgets/osgQtWidgets.cpp:52:
/root/OpenSceneGraph-svn-src/include/osgQt/QWebViewImage:53: warning: 
ISO C++ forbids declaration of ‘QWebView’ with no type
/root/OpenSceneGraph-svn-src/include/osgQt/QWebViewImage:53: error: 
expected ‘;’ before ‘*’ token
/root/OpenSceneGraph-svn-src/include/osgQt/QWebViewImage:54: error: 
expected ‘;’ before ‘QWebPage’
/root/OpenSceneGraph-svn-src/include/osgQt/QWebViewImage:54: warning: 
ISO C++ forbids declaration of ‘QWebPage’ with no type
/root/OpenSceneGraph-svn-src/include/osgQt/QWebViewImage:54: error: 
expected ‘;’ before ‘*’ token
/root/OpenSceneGraph-svn-src/include/osgQt/QWebViewImage:55: error: 
expected ‘;’ before ‘QGraphicsViewAdapter’
/root/OpenSceneGraph-svn-src/include/osgQt/QWebViewImage:92: error: 
‘QWebView’ was not declared in this scope
/root/OpenSceneGraph-svn-src/include/osgQt/QWebViewImage:92: error: 
template argument 1 is invalid
/root/OpenSceneGraph-svn-src/include/osgQt/QWebViewImage:93: error: 
‘QWebPage’ was not declared in this scope
/root/OpenSceneGraph-svn-src/include/osgQt/QWebViewImage:93: error: 
template argument 1 is invalid
/root/OpenSceneGraph-svn-src/include/osgQt/QWebViewImage: In constructor 
‘osgQt::QWebViewImage::QWebViewImage()’:
/root/OpenSceneGraph-svn-src/include/osgQt/QWebViewImage:37: error: 
expected type-specifier before ‘QWebView’
/root/OpenSceneGraph-svn-src/include/osgQt/QWebViewImage:37: warning: 
invalid conversion from ‘int*’ to ‘int’
/root/OpenSceneGraph-svn-src/include/osgQt/QWebViewImage:37: error: 
expected ‘;’ before ‘QWebView’
/root/OpenSceneGraph-svn-src/include/osgQt/QWebViewImage:39: error: 
expected type-specifier before ‘QWebPage’
/root/OpenSceneGraph-svn-src/include/osgQt/QWebViewImage:39: warning: 
invalid conversion from ‘int*’ to ‘int’
/root/OpenSceneGraph-svn-src/include/osgQt/QWebViewImage:39: error: 
expected ‘;’ before ‘QWebPage’
/root/OpenSceneGraph-svn-src/include/osgQt/QWebViewImage:40: error: base 
operand of ‘-’ is not a pointer
/root/OpenSceneGraph-svn-src/include/osgQt/QWebViewImage:40: error: 
‘QWebSettings’ has not been declared
/root/OpenSceneGraph-svn-src/include/osgQt/QWebViewImage:41: error: base 
operand of ‘-’ is not a pointer
/root/OpenSceneGraph-svn-src/include/osgQt/QWebViewImage:41: error: 
‘QWebSettings’ has not been declared
/root/OpenSceneGraph-svn-src/include/osgQt/QWebViewImage:43: error: base 
operand of ‘-’ is not a pointer
/root/OpenSceneGraph-svn-src/include/osgQt/QWebViewImage:45: error: 
request for member ‘data’ in 
‘((osgQt::QWebViewImage*)this)-osgQt::QWebViewImage::_webView’, which 
is of non-class type ‘int’
/root/OpenSceneGraph-svn-src/include/osgQt/QWebViewImage: In member 
function ‘virtual void osgQt::QWebViewImage::navigateTo(const 
std::string)’:
/root/OpenSceneGraph-svn-src/include/osgQt/QWebViewImage:50: error: base 
operand of ‘-’ is not a pointer
/root/OpenSceneGraph-svn-src/include/osgQt/QWebViewImage: In member 
function ‘virtual bool osgQt::QWebViewImage::sendFocusHint(bool)’:
/root/OpenSceneGraph-svn-src/include/osgQt/QWebViewImage:70: warning: 
invalid conversion from ‘int’ to ‘QObject*’
/root/OpenSceneGraph-svn-src/include/osgQt/QWebViewImage:70: warning: 
initializing argument 1 of ‘static bool 
QCoreApplication::sendEvent(QObject*, QEvent*)’
/root/OpenSceneGraph-svn-src/examples/osgQtWidgets/osgQtWidgets.cpp: In 
function ‘int main(int, char**)’:
/root/OpenSceneGraph-svn-src/examples/osgQtWidgets/osgQtWidgets.cpp:209: 
error: ‘QWebPage’ was not declared in this scope
/root/OpenSceneGraph-svn-src/examples/osgQtWidgets/osgQtWidgets.cpp:209: 
error: ‘webPage’ was not declared in this scope
/root/OpenSceneGraph-svn-src/examples/osgQtWidgets/osgQtWidgets.cpp:209: 
error: expected type-specifier before 

Re: [osg-users] Please test svn/trunk in prep for 2.9.10 dev release

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

Hi Robert and Wang Rui,


I made a quick test and found that osgparticle and osganimationviewer
nathan.osg work well on my computer. I'm working with VS2008 and a
really latest OSG version (updated about two hours ago :-)


Sorry, false alert. Once in a while some program I install alters my 
system PATH, and it has a libpng13.dll which is a different version than 
the one the OSG png plugin is compiled against. So the app tries to load 
a png image, finds the png plugin, loads it, needs a libpng13.dll, loads 
the first one it finds in the PATH and crashes.


So osgparticle and osganimationviewer nathan.osg now work fine for me.

I'll try to compile our own simulator against OSG SVN soon (today or 
tomorrow). Any other tests you want me to try?


Sorry again for the false alert.

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] Hidden Viewer

2010-12-01 Thread Juan Hernando

Hi,

I've debugged what happens, and roughly the sequence is this:

1. main(): createGraphicsContext(traits.get())
   --- PixelBufferWin32 is created successfully

2. main(): viewer.realize()
   --- PixelBufferWin32::makeCurrentImplementation() is called, and 
succeeds.


3. GraphicsThread::run()
   --- PixelBufferWin32::makeCurrentImplementation() is called, and 
fails with The requested resource is in use.
I don't know why the second makeCurrentImplementation would fail, but 
going from Juan's hunch that it was failing because some other thread 
was holding on to it (the main thread in this case), 

Good tracking here.
According to the glxMakeCurrent specification making a context current 
on one thread while another one is holding it is also a mistake and 	a 
BadAccess error should be generated.


I added the 
following code after viewer.realize(); :


viewer.stopThreading();
gc-releaseContext();
viewer.startThreading();

This made it work.
This basically means that the context needs to be released at the end of 
createGraphicsContext or some other point.


This is obviously not a solution. It worked as-is before on Linux, so 
perhaps on Windows the makeCurrent() call makes the context exclusive 
to the thread on which it was called, whereas on Linux a subsequent 
makeCurrent() will still succeed and just remove the context from the 
previous thread that had it current silently?
If your trace is correct and it's the same for Linux then I think that 
it has been a matter of luck that a Linux driver didn't complain before.
However, I've taking a look at the code searching for how contexts are 
handled and I've found a fundamental difference between the X11 and 
Win32 implementations of PixelBufferXYZ::realizeImplementation. In Win32 
makeCurrentImplementation is called but not in X11. Maybe adding a 
releaseContextImplementation(); at the end of that function solves the 
problem.


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


[osg-users] PDF plugin on Windows

2010-12-01 Thread Serge Lages
Hi all,

Anyone has successfully build the pdf plugin on Windows ? Is there any link
to get pre-build dependencies for this plugin ?

Thanks in advance.
Cheers,

-- 
Serge Lages
http://www.tharsis-software.com
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Please test svn/trunk in prep for 2.9.10 dev release

2010-12-01 Thread Jason Daly

On 12/01/2010 12:01 PM, Jason Daly wrote:

On 12/01/2010 06:18 AM, Robert Osfield wrote:

If you do a build of svn/trunk let me know how you get on and what
platforms you've tested, I want to know success and failures as it's
important to know how well things are converging for the release.

Hi, Robert,

Building on the brand new Red Hat Enterprise Linux 6... (gcc-4.4.4,
CMake 2.6.4)

Build almost completes, but there's a problem with the osgQtWidgets
example (errors below). I did some Googling and discovered that, while
RHEL6 ships with Qt 4.6, they deliberately left out the QtWebkit module.
I couldn't find exactly why, but there was some speculation that it was
a security-related issue. It's possible they'll reintroduce it a future
point release. Currently, though, this prevents a clean build if
examples are enabled. I'm not a Qt expert, so I'm not sure what the best
way to address this would be.


I just submitted a fix for this.  The rest of the build is fine.

--J

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


Re: [osg-users] osgDB::writeNodeFile and node types without wrappers/serializers

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

Hello Robert,


It'll write it out as class named OceanScene but with all the contents
of a Group.


Works like a charm, thanks a lot.

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] Hidden Viewer

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

Hello Juan,


However, I've taking a look at the code searching for how contexts are
handled and I've found a fundamental difference between the X11 and
Win32 implementations of PixelBufferXYZ::realizeImplementation. In Win32
makeCurrentImplementation is called but not in X11. Maybe adding a
releaseContextImplementation(); at the end of that function solves the
problem.


I think that's the crux of the problem and yes, adding 
releaseContextImplementation() at the end of realizeImplementation() 
solves the problem. I'll submit the changed file to Robert.


It also solves the problem for osgscreencapture, which now works.

This will only fix Olivier's problem if he can compile and use the SVN 
version of OSG, but he could use the workaround I posted in my previous 
message for now I guess.


Thanks for the help Juan,

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] debugging slow path

2010-12-01 Thread Keith Parkins

So I added a nodevisitor to traverse my scene like so:

class checkFastPath : public osg::NodeVisitor {
   public:
  checkFastPath() :
   osg::NodeVisitor(osg::NodeVisitor::TRAVERSE_ALL_CHILDREN) {}
   virtual void apply(osg::Geode geode) {
  for(unsigned int i=0;igeode.getNumDrawables();++i) {
  osg::Geometry*geometry =  
geode.getDrawable(i)-asGeometry();
  if (geometry) {
  std::string name = geometry-getName();
  if (!geometry-areFastPathsUsed())
std::cout  name   is not using fast path\n;
  }
   }
}

checkFastPath  fptest;
getSceneData()-accept(fptest);

Nothing comes up. I did have an else on this test 
(!geometry-areFastPathsUsed()) to make sure that I was hitting the 
conditional. I did the same test before quitting and nothing comes up, 
neither after initialization nor at the end.


Any ideas?  Are there any other roads to the short path?


On Wed, 1 Dec 2010, Keith Parkins wrote:


Hi,

My app is currently rendering via the slow path. I've checked for 
DrawArrayLengths and BIND_PER_PRIMITVES, but don't seem to have either. 
Dose anyone know of other things I should be looking for? I am walking 
through the rendering stage to see if I can figure out what is getting set 
that is putting me on the slow track, but I don't have endless amounts of 
time to do this. If anyone has any understanding of this, I would be most 
appreciative if you could point me in the right direction.


If you need more information, check my post FBO problem?

Thanks!
Keith

PS: Thanks a lot for the help, Jason.

On Tue, 30 Nov 2010, Jason Daly wrote:


On 11/30/2010 08:09 PM, Keith Parkins wrote:

I am using geo-setNormalBinding(osg::Geometry::BIND_OVERALL);
and I did see a model with NormalBinding PER_VERTEX. Should I be 
setting

these to BIND_OFF or is it just BIND_PER_PRIMITIVE?


No, BIND_PER_PRIMITIVE is the bad binding.  All of the others are 
fine. If you are avoiding BIND_PER_PRIMITIVE and the attribute indexes, 
I'm not sure why you'd be falling off the fast path.  There may be other 
reasons for it, but I can't think of them...


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


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


Re: [osg-users] OSG ActiveX + IFC - looking for developer

2010-12-01 Thread Zdravko Clarion
[quote=Zdravko]
Mathieu MARACHE wrote:
 No I'm sorry I don't.
 
 Mathieu
 
 



Should I ask someone in your company?
I mean, if there is no chance to sell your software, I can understand.
If yes, then please be so kind and inform me about conditions.

Thanks
Zdravko

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





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


Re: [osg-users] Hidden Viewer

2010-12-01 Thread Oliver Neumann
Hi,

Wow, you guys are great! Thanks for your help! Maybe we can solve this bug.
@Jean-Sébastien:
I had to additionally include the osgGA.lib to make it work in Win32.
My nVidia driver version is 6.14.12.5849 which should be 258 in your 
nomenclature.

Cheers,
Oliver

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





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


Re: [osg-users] osgscreencapture sample doesn't work

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

Hello Igor,


In many places people say one should use the same code as there is in 
osgscreencapture which renders to a pbuffer is --pbuffer-only option is passed.
But the fact is that osgscreencapture doesn't work itself!

osgscreencapture.exe axes.osg --pbuffer-only 640 480


In another thread we established that there was a problem with using 
pbuffers on Windows in a multithreaded app. The call to viewer.realize() 
eventually calls makeCurrent on the context, which makes the context 
current for the main thread, and then when the GraphicsThread tries to 
call makeCurrent in its own thread it fails with the The requested 
resource is in use message.


I have just submitted a fix. A workaround is to add this after 
viewer.realize():


viewer.stopThreading();
gc-releaseContext();
viewer.startThreading();

As for your laptop, I think it just doesn't support pbuffers. Check if 
it supports the WGL_ARB_pbuffer extension (you can see the supported 
extensions by setting OSG_NOTIFY_LEVEL=DEBUG and running osgviewer 
cow.osg, they will be printed near the start of the output when the 
context is created).


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] Making a Visible Vector

2010-12-01 Thread Richard Redding
Hello World,

I am trying to create a visible vector that moves around a set space with one 
point stationary. I have polling data which can be used for the polling 
position of the dynamic point.

Here is how I set up my vector. I do not know how to create the vector visible 
and then start to move the dynamic end point with relation to the stationary 
end point.

The Vector just has to be a visible line that can be colored to make it stand 
out from the background.

[code]

class orientVector : public osg::NodeCallback{
public:
orientVector::orientVector():

  pos()
  {};
orientCoords pos;
virtual void operator()(osg::Node* node, osg::NodeVisitor* nv)
{
pos.coordsCalc();
osg::PositionAttitudeTransform* moveVector = 
dynamic_cast osg::PositionAttitudeTransform*(node);
//std::coutX - Value:  pos.itsX Y - Value:  
 pos.itsY  Z - Value:   pos.itsZ  std::endl;
moveVector-setPosition( osg::Vec3( pos.itsX, pos.itsY, 
pos.itsZ));
traverse(node, nv);
}

};

/* DRAW THE FIRST VECTORS */
osg::Vec3Array* lineVisible1 = new osg::Vec3Array;
osg::Geode* lineVertex1 = new osg::Geode;
osg::Geometry* lineGeometry1 = new osg::Geometry;
lineVisible1-push_back( osg::Vec3 (511.33, 0, 767));
lineVisible1-push_back( osg::Vec3 (767, 767, 767));
lineGeometry1-setVertexArray( lineVisible1 );
lineVertex1-addDrawable(lineGeometry1);

// ORIENT THE VECTOR WITH IR DATA ***/
osg::PositionAttitudeTransform* vectorOrient = new 
osg::PositionAttitudeTransform;
vectorOrient-addChild(lineVertex1);
vectorOrient-setUpdateCallback(new orientVector());

[/code]

I later on I will be setting up another vector at another static position so 
that in the end there will be two vectors who point at one object as the 
object moves through space.


... 
I really appreciate all the help I can get! :D

Cheers,

Richard

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





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


[osg-users] Shader Update Latency?!

2010-12-01 Thread Thorsten Roth

Hi,

I currently have a problem with a shader update callback I do not 
understand. I have a vertex and fragment shader which calculate linear 
depth in [0,1] for me, also respecting dynamic clipping planes. To 
achieve this, I pass zNear and zFar as uniform parameters to the shader. 
To have them updated, I have the following callback methods (zFar is 
looking accordingly):


class UpdateShaderZNear: public osg::Uniform::Callback {
public:
virtual void operator()(osg::Uniform* uniform, osg::NodeVisitor* nv) {
double x, zNear;
viewer-getCamera()-getProjectionMatrixAsPerspective(x,x,zNear,x);
uniform-set((float)zFar);
}
};

Now when I move my camera towards and away from the object, it seems 
like the shader update is one frame (or so) too late, as I get values 
that do not correspond to the [0,1]-normalization and the problem 
disappears as soon as the camera stops.


Is there any reason for that/does anyone have an idea what I'm doing 
wrong? If more information or code is necessary, just tell me :-)


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


Re: [osg-users] Shader Update Latency?!

2010-12-01 Thread Tim Moore
Have you set the data variance of the Uniform object -- and the containing
StateSet object -- to Object::DYNAMIC?

Tim

On Wed, Dec 1, 2010 at 7:15 PM, Thorsten Roth thorsten.r...@alsvartr.dewrote:

 Hi,

 I currently have a problem with a shader update callback I do not
 understand. I have a vertex and fragment shader which calculate linear depth
 in [0,1] for me, also respecting dynamic clipping planes. To achieve this, I
 pass zNear and zFar as uniform parameters to the shader. To have them
 updated, I have the following callback methods (zFar is looking
 accordingly):

 class UpdateShaderZNear: public osg::Uniform::Callback {
 public:
virtual void operator()(osg::Uniform* uniform, osg::NodeVisitor* nv)
 {
double x, zNear;
viewer-getCamera()-getProjectionMatrixAsPerspective(x,x,zNear,x);
uniform-set((float)zFar);
}
 };

 Now when I move my camera towards and away from the object, it seems like
 the shader update is one frame (or so) too late, as I get values that do
 not correspond to the [0,1]-normalization and the problem disappears as soon
 as the camera stops.

 Is there any reason for that/does anyone have an idea what I'm doing wrong?
 If more information or code is necessary, just tell me :-)

 -Thorsten
 ___
 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] Shader Update Latency?!

2010-12-01 Thread Thorsten Roth

I have actually tried it now, but it made no difference :-(

-Thorsten

Am 01.12.2010 19:22, schrieb Tim Moore:

Have you set the data variance of the Uniform object -- and the
containing StateSet object -- to Object::DYNAMIC?

Tim

On Wed, Dec 1, 2010 at 7:15 PM, Thorsten Roth thorsten.r...@alsvartr.de
mailto:thorsten.r...@alsvartr.de wrote:

Hi,

I currently have a problem with a shader update callback I do not
understand. I have a vertex and fragment shader which calculate
linear depth in [0,1] for me, also respecting dynamic clipping
planes. To achieve this, I pass zNear and zFar as uniform parameters
to the shader. To have them updated, I have the following callback
methods (zFar is looking accordingly):

class UpdateShaderZNear: public osg::Uniform::Callback {
public:
virtual void operator()(osg::Uniform* uniform,
osg::NodeVisitor* nv) {
double x, zNear;

  viewer-getCamera()-getProjectionMatrixAsPerspective(x,x,zNear,x);
uniform-set((float)zFar);
}
};

Now when I move my camera towards and away from the object, it seems
like the shader update is one frame (or so) too late, as I get
values that do not correspond to the [0,1]-normalization and the
problem disappears as soon as the camera stops.

Is there any reason for that/does anyone have an idea what I'm doing
wrong? If more information or code is necessary, just tell me :-)

-Thorsten
___
osg-users mailing list
osg-users@lists.openscenegraph.org
mailto: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] debugging slow path

2010-12-01 Thread Tim Moore
You could set a breakpoint on glBegin() in a debugger and see where it is
called from OSG.Once there you should be able to figure out why you are
falling off the fast path.

Tim

On Wed, Dec 1, 2010 at 6:35 PM, Keith Parkins kpark...@cs.rochester.eduwrote:

 So I added a nodevisitor to traverse my scene like so:

 class checkFastPath : public osg::NodeVisitor {
   public:
  checkFastPath() :
   osg::NodeVisitor(osg::NodeVisitor::TRAVERSE_ALL_CHILDREN) {}
   virtual void apply(osg::Geode geode) {
  for(unsigned int i=0;igeode.getNumDrawables();++i) {
  osg::Geometry*geometry =
  geode.getDrawable(i)-asGeometry();
  if (geometry) {
  std::string name = geometry-getName();
  if (!geometry-areFastPathsUsed())
std::cout  name   is not using fast path\n;
  }
   }
 }

 checkFastPath  fptest;
 getSceneData()-accept(fptest);

 Nothing comes up. I did have an else on this test
 (!geometry-areFastPathsUsed()) to make sure that I was hitting the
 conditional. I did the same test before quitting and nothing comes up,
 neither after initialization nor at the end.

 Any ideas?  Are there any other roads to the short path?



 On Wed, 1 Dec 2010, Keith Parkins wrote:

  Hi,

 My app is currently rendering via the slow path. I've checked for
 DrawArrayLengths and BIND_PER_PRIMITVES, but don't seem to have either. Dose
 anyone know of other things I should be looking for? I am walking through
 the rendering stage to see if I can figure out what is getting set that is
 putting me on the slow track, but I don't have endless amounts of time to do
 this. If anyone has any understanding of this, I would be most appreciative
 if you could point me in the right direction.

 If you need more information, check my post FBO problem?

 Thanks!
 Keith

 PS: Thanks a lot for the help, Jason.

 On Tue, 30 Nov 2010, Jason Daly wrote:

  On 11/30/2010 08:09 PM, Keith Parkins wrote:

 I am using geo-setNormalBinding(osg::Geometry::BIND_OVERALL);
 and I did see a model with NormalBinding PER_VERTEX. Should I be setting
 these to BIND_OFF or is it just BIND_PER_PRIMITIVE?


 No, BIND_PER_PRIMITIVE is the bad binding.  All of the others are fine.
 If you are avoiding BIND_PER_PRIMITIVE and the attribute indexes, I'm not
 sure why you'd be falling off the fast path.  There may be other reasons for
 it, but I can't think of them...

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

  ___
 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] Hidden Viewer

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

On Hello Oliver,


I had to additionally include the osgGA.lib to make it work in Win32.


Yes, that was fixed by adding ${OSGGA_LIBRARY} in the CMakeLists.txt 
file, I had included it in a previous e-mail.



My nVidia driver version is 6.14.12.5849 which should be 258 in your 
nomenclature.


OK, but Juan and I have established it's not a driver bug, but something 
that was done in a questionable way in OSG's PixelBufferWin32 class. 
It's possible that previously this did not cause an error and that newer 
driver versions have made it give the error we saw, but it was clearly 
not very good OpenGL usage so the fix I submitted to OSG should clear it up.


In the mean time, have you tried the workaround I suggested? You could add

viewer.stopThreading();
gc-releaseContext();
viewer.startThreading();

right after viewer.realize(); and it should work (at least the 
pbuffertest example works then, so if your program does things in the 
same way it should work too).


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] Hidden Viewer

2010-12-01 Thread Robert Osfield
Hi Guys,

I've just reviewed J-S's submission that added a
releaseContextImplementation() call at the end of the
PixelBufferWin32::realizeImplementation().  Reviewing the method in
question I am curious why there is the makeCurrentImplementation()
call, the only need for it would be if wglShareLists(..) required the
context to be current, but having quickly looked online for docs on
wglShareLists(..) I can't spot any mention of need a context current.

Since wglShareLists(..) takes the two contexts to be shared as
parameters it would seem to me neither of these contexts should need
to be made current before calling wglShareLists(..).  MS's do have put
in some funny little quirks so perhaps wglShareLists() does require
the context to be first make current, if this is the case then J-S's
submission is correct.   If the makeCurrent() isn't required then the
right thing to do is remove the redundant makeCurrentImplementation().

I don't have a window system to test out this change so have to defer
to Windows users to go tweak the code and test it out.  Could you
please try out a PixelBufferWin32::realizeImplementation() with the
makeCurrentImplementation() commented out and no additional
releaseContextImplementation() call either.  If this works then we
should just go with this sans makeCurrentImplentation version.

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


Re: [osg-users] second-order equation

2010-12-01 Thread Robert Osfield
Hi Kurt,

On Tue, Nov 30, 2010 at 3:16 PM, Cracj Kurt couple...@mail.ru wrote:
 how can I draw a second-order equation?

An impressive lack of information to go on there... what do you mean
by draw a second-order equation?  What exactly are you expecting?
Lines?  Surfaces? Volumes?

 what class\methods need use?

osgMindReader::DoAnythingICanImagineButNeedn'tBotherExplainingWhatImean class.

Since I don't really know what you are after, I have to take the safe
route and say the OSG can't do what you are wanting out of the box as
we don't have a osgMindReader NodeKit yet.

However, modern vertex shaders are very flexible and given the right
input data and shader code can do pretty complex things with lines and
surfaces. So I no doubt that if you can work out what you actually
need then you can probably implement it.

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


Re: [osg-users] OSG and QT

2010-12-01 Thread Robert Osfield
Hi Kurt,

Have you looked at any of the osgviewerQt* examples If no try there.

Robert.

On Wed, Dec 1, 2010 at 3:39 PM, Cracj Kurt couple...@mail.ru wrote:
 Hi,

 how i can render scene in my QT dialog form?
 Can you help me. I read common manual ,there use console applications and 
 viewer class. But i want render my scene  in GUI.

 For example there is cow.osg. How it open in QT GUI application?

 Thank you!

 Cheers,
 kurt

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




 Attachments:
 http://forum.openscenegraph.org//files/cow_139.osg


 ___
 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] Shader Update Latency?!

2010-12-01 Thread Robert Osfield
Hi Thorsten,

By default the OSG computes the near/far planes on the fly during the
cull traversal on every single frame.  You can disable this.
Alternatively you could just use the gl_ProjectionMatrix directly on
the GPU to get the near/far planes - this is how I'd do it, far more
flexible and never needs any additional uniforms or callbacks.

Robert.

On Wed, Dec 1, 2010 at 6:15 PM, Thorsten Roth thorsten.r...@alsvartr.de wrote:
 Hi,

 I currently have a problem with a shader update callback I do not
 understand. I have a vertex and fragment shader which calculate linear depth
 in [0,1] for me, also respecting dynamic clipping planes. To achieve this, I
 pass zNear and zFar as uniform parameters to the shader. To have them
 updated, I have the following callback methods (zFar is looking
 accordingly):

 class UpdateShaderZNear: public osg::Uniform::Callback {
 public:
        virtual void operator()(osg::Uniform* uniform, osg::NodeVisitor* nv)
 {
                double x, zNear;
        viewer-getCamera()-getProjectionMatrixAsPerspective(x,x,zNear,x);
                uniform-set((float)zFar);
        }
 };

 Now when I move my camera towards and away from the object, it seems like
 the shader update is one frame (or so) too late, as I get values that do
 not correspond to the [0,1]-normalization and the problem disappears as soon
 as the camera stops.

 Is there any reason for that/does anyone have an idea what I'm doing wrong?
 If more information or code is necessary, just tell me :-)

 -Thorsten
 ___
 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] Shader Update Latency?!

2010-12-01 Thread Thorsten Roth

Hi Robert,

thank you for this information. I did not know that I could do this, as 
I'm an absolute newbie concerning shader stuff and was happy that I just 
got it to work somehow ;)


I will try the approach with gl_ProjectionMatrix tomorrow, thank you :)

-Thorsten

Am 01.12.2010 20:51, schrieb Robert Osfield:

Hi Thorsten,

By default the OSG computes the near/far planes on the fly during the
cull traversal on every single frame.  You can disable this.
Alternatively you could just use the gl_ProjectionMatrix directly on
the GPU to get the near/far planes - this is how I'd do it, far more
flexible and never needs any additional uniforms or callbacks.

Robert.

On Wed, Dec 1, 2010 at 6:15 PM, Thorsten Roththorsten.r...@alsvartr.de  wrote:

Hi,

I currently have a problem with a shader update callback I do not
understand. I have a vertex and fragment shader which calculate linear depth
in [0,1] for me, also respecting dynamic clipping planes. To achieve this, I
pass zNear and zFar as uniform parameters to the shader. To have them
updated, I have the following callback methods (zFar is looking
accordingly):

class UpdateShaderZNear: public osg::Uniform::Callback {
public:
virtual void operator()(osg::Uniform* uniform, osg::NodeVisitor* nv)
{
double x, zNear;
viewer-getCamera()-getProjectionMatrixAsPerspective(x,x,zNear,x);
uniform-set((float)zFar);
}
};

Now when I move my camera towards and away from the object, it seems like
the shader update is one frame (or so) too late, as I get values that do
not correspond to the [0,1]-normalization and the problem disappears as soon
as the camera stops.

Is there any reason for that/does anyone have an idea what I'm doing wrong?
If more information or code is necessary, just tell me :-)

-Thorsten
___
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] osgTerrain: How to modify heightfield of a tile [solved]

2010-12-01 Thread Torben Dannhauer
Hi all,

I solved this problem. To help others I'll explain my ideas here, so other can 
use this information as well.

The wrong part in my structure was the function were I modified the height 
values.

To explain my optionion of the right way, it is required to understand how the 
tiles are initialized.


Step 1: When the tile is added to the scene graph, it will be traversed in the 
next frame.  - TerrainTile.cpp, line 120
Step 2: If it is the first traversal, the tile's init() function is called. - 
TerrainTile.cpp, line 143
Step 3: If no terrainTechnique is assigned, it assigns the terrainTechnique. - 
TerrainTile.cpp, line 169
Step 4: Now a terrainTechnique should be available, so it's init() function is 
called. - TerrainTile.cpp, line 184
Step 5: The drawable geometry is created from heightfield in 
generateGeometry(). - GeometryTechnique.cpp, line 135
Step 6: The color- and transparency layer are created from imagelayer and 
blending policy in applyColorLayers() / applyTransparency().  - 
GeometryTechnique.cpp, line 135+
Step7: The created tile data buffer is assigned to the _newBufferData pointer, 
so the next update traversal will use it as current data to display. - 
GeometryTechnique.cpp, line 145 / 150


If the color / transparency or geometry data should be modified, it must be 
done prior the data is used to compile the data to display.

e.g. To modify the geometry, you can subclass GeometryTechnique and overwrite 
the init function. There in you can modify all of the tile's layers. afterwards 
you call the baseclass implementation via

Code:

void myTerrainTechnique::init(int dirtyMask, bool assumeMultiThreaded)
{
  // Modify the data
  [...]

  // Call base class implementation to init the tile correctly:
  GeometryTechnique::init(dirtyMask, assumeMultiThreaded);
}




If you have to modify more than only the tile data you have to overwrite the 
generating function. 

Example:
In my case I want to cut holes in the terrain, this means the tile drawable is 
not longer a regular grid of triangles. This irregular drawable must be created 
by my specialized generateGeometry() function, I have to implement in my 
subclassed TerrainTechnique.

I know it is a very simple approach, but oftern the first contact is quite 
hard, so this may be a good starter for other beginners out there :) 

So far, thanks to the community which helped me to reach this point!
I'll be back with my generateGeometry() problems ;)

Cheers,
Torben

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





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


Re: [osg-users] OSG and QT

2010-12-01 Thread Cracj Kurt
it example have 3 files.
i`m not understand how  open it  in QT.
I try create empty project and include it *.cpp there.

 INCLUDEPATH += D:/openscenegraph/OpenSceneGraph/include
 INCLUDEPATH += C:/Qt/2010.05/qt/src/opengl
 LIBS += D:/openscenegraph/OpenSceneGraph/lib

INCLUDEPATH += C:/Qt/2010.05/qt/src/opengl  for qgl.h

but get list of errors


 
 mingw32-make: Entering directory `D:/OpenSceneGraph-2.8.3 
 (1)/OpenSceneGraph-2.8.3/examples/osgviewerQT/untitled1-build-desktop'
 
 C:/Qt/2010.05/mingw/bin/mingw32-make -f Makefile.Debug
 
 mingw32-make[1]: Entering directory `D:/OpenSceneGraph-2.8.3 
 (1)/OpenSceneGraph-2.8.3/examples/osgviewerQT/untitled1-build-desktop'
 
 g++ -c -g -frtti -fexceptions -mthreads -Wall -DUNICODE 
 -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_GUI_LIB -DQT_CORE_LIB 
 -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -Ic:\Qt\2010.05\qt\include\QtCore 
 -Ic:\Qt\2010.05\qt\include\QtGui -Ic:\Qt\2010.05\qt\include 
 -Id:\openscenegraph\OpenSceneGraph\include -Ic:\Qt\2010.05\qt\src\opengl 
 -Ic:\Qt\2010.05\qt\include\ActiveQt -Idebug -I..\untitled1 -I. 
 -Ic:\Qt\2010.05\qt\mkspecs\win32-g++ -o debug\AdapterWidget.o 
 ..\AdapterWidget.cpp
 
 ..\AdapterWidget.cpp:55: error: 'WFlags' has not been declared
 
 ..\AdapterWidget.cpp:76: error: 'WFlags' has not been declared
 
 ..\AdapterWidget.cpp: In constructor 'AdapterWidget::AdapterWidget(QWidget*, 
 const char*, const QGLWidget*, int)':
 
 ..\AdapterWidget.cpp:80: error: no matching function for call to 
 'QGLWidget::QGLWidget(QWidget*, const char*, const QGLWidget*, int)'
 
 c:\Qt\2010.05\qt\src\opengl/qgl.h:570: note: candidates are: 
 QGLWidget::QGLWidget(const QGLWidget)
 
 c:\Qt\2010.05\qt\src\opengl/qgl.h:461: note: 
 QGLWidget::QGLWidget(const QGLFormat, QWidget*, const QGLWidget*, 
 Qt::WindowFlags)
 
 c:\Qt\2010.05\qt\src\opengl/qgl.h:459: note: 
 QGLWidget::QGLWidget(QGLContext*, QWidget*, const QGLWidget*, Qt::WindowFlags)
 
 c:\Qt\2010.05\qt\src\opengl/qgl.h:457: note: 
 QGLWidget::QGLWidget(QWidget*, const QGLWidget*, Qt::WindowFlags)
 
 ..\AdapterWidget.cpp:87: error: 'ClickFocus' is not a member of 'QWidget'
 
 ..\AdapterWidget.cpp: In member function 'virtual void 
 AdapterWidget::keyPressEvent(QKeyEvent*)':
 
 ..\AdapterWidget.cpp:102: error: invalid use of incomplete type 'struct 
 QKeyEvent'
 
 c:\Qt\2010.05\qt\include/QtGui/../../src/gui/kernel/qwidget.h:79: error: 
 forward declaration of 'struct QKeyEvent'
 
 ..\AdapterWidget.cpp: In member function 'virtual void 
 AdapterWidget::keyReleaseEvent(QKeyEvent*)':
 
 ..\AdapterWidget.cpp:111: error: invalid use of incomplete type 'struct 
 QKeyEvent'
 
 c:\Qt\2010.05\qt\include/QtGui/../../src/gui/kernel/qwidget.h:79: error: 
 forward declaration of 'struct QKeyEvent'
 
 ..\AdapterWidget.cpp: In member function 'virtual void 
 AdapterWidget::mousePressEvent(QMouseEvent*)':
 
 ..\AdapterWidget.cpp:118: error: invalid use of incomplete type 'struct 
 QMouseEvent'
 
 c:\Qt\2010.05\qt\include/QtGui/../../src/gui/kernel/qwidget.h:76: error: 
 forward declaration of 'struct QMouseEvent'
 
 ..\AdapterWidget.cpp:126: error: invalid use of incomplete type 'struct 
 QMouseEvent'
 
 c:\Qt\2010.05\qt\include/QtGui/../../src/gui/kernel/qwidget.h:76: error: 
 forward declaration of 'struct QMouseEvent'
 
 ..\AdapterWidget.cpp:126: error: invalid use of incomplete type 'struct 
 QMouseEvent'
 
 c:\Qt\2010.05\qt\include/QtGui/../../src/gui/kernel/qwidget.h:76: error: 
 forward declaration of 'struct QMouseEvent'
 
 ..\AdapterWidget.cpp: In member function 'virtual void 
 AdapterWidget::mouseReleaseEvent(QMouseEvent*)':
 
 ..\AdapterWidget.cpp:132: error: invalid use of incomplete type 'struct 
 QMouseEvent'
 
 c:\Qt\2010.05\qt\include/QtGui/../../src/gui/kernel/qwidget.h:76: error: 
 forward declaration of 'struct QMouseEvent'
 
 ..\AdapterWidget.cpp:140: error: invalid use of incomplete type 'struct 
 QMouseEvent'
 
 c:\Qt\2010.05\qt\include/QtGui/../../src/gui/kernel/qwidget.h:76: error: 
 forward declaration of 'struct QMouseEvent'
 
 ..\AdapterWidget.cpp:140: error: invalid use of incomplete type 'struct 
 QMouseEvent'
 
 c:\Qt\2010.05\qt\include/QtGui/../../src/gui/kernel/qwidget.h:76: error: 
 forward declaration of 'struct QMouseEvent'
 
 ..\AdapterWidget.cpp: In member function 'virtual void 
 AdapterWidget::mouseMoveEvent(QMouseEvent*)':
 
 ..\AdapterWidget.cpp:145: error: invalid use of incomplete type 'struct 
 QMouseEvent'
 
 c:\Qt\2010.05\qt\include/QtGui/../../src/gui/kernel/qwidget.h:76: error: 
 forward declaration of 'struct QMouseEvent'
 
 ..\AdapterWidget.cpp:145: error: invalid use of incomplete type 'struct 
 QMouseEvent'
 
 c:\Qt\2010.05\qt\include/QtGui/../../src/gui/kernel/qwidget.h:76: error: 
 forward declaration of 'struct QMouseEvent'
 
 ..\AdapterWidget.cpp: At global scope:
 
 ..\AdapterWidget.cpp:153: error: 'WFlags' has not been declared
 
 ..\AdapterWidget.cpp:180: error: 'WFlags' has not been declared
 
 mingw32-make[1]: 

Re: [osg-users] Hidden Viewer

2010-12-01 Thread Oliver Neumann
Hi,

I added to the pbuffertest.cpp directly after viewer.realize();

Code:

viewer.stopThreading();
gc-releaseContext();
viewer.startThreading(); 



but I still have the same behaviour (-1 works, -f 1 gives the wglMakeCurrent 
error)

Cheers,
Oliver

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





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


Re: [osg-users] Hidden Viewer

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

Hello Oliver,


I added to the pbuffertest.cpp directly after viewer.realize();
but I still have the same behaviour (-1 works, -f 1 gives the wglMakeCurrent 
error)


Hmmm, seems you are tripping over something else on your hardware... I 
just remembered you had mentioned in another post that setting the 
threading model to SingleThreaded didn't work for you either, but in my 
case it did... So that indicates something else is going on for you.


You've already confirmed that pbuffers are supported by your card and 
driver, but there may still be a bug in your driver that makes them not 
work correctly in OSG's usage (which is valid in general except for that 
thing that I submitted a fix for). Your driver is recent but perhaps 
there was an obscure bug that was fixed in the latest version, so 
updating to the most recent would be a first step to at least eliminate 
that one difference between your machine and mine (other than the card 
itself of course, but with the same driver the behavior should be similar).


At this point I can't suggest much more than to try to put breakpoints 
in the OSG code and see what's going on. We don't have your hardware and 
driver so we can only help so much... You'll need to have a debug build 
of OSG and the sources of the same version to be able to do this.


In my case, I put a breakpoint in pbuffertest.cpp at the 
createGraphicsContext() line, stepped into that (F11) which eventually 
got me to the new PixelBufferWin32 call.


Then I put a breakpoint in PixelBufferWin32::realizeImplementation(), 
makeCurrentImplementation() and releaseContextImplementation() and 
looked at what was going on there, if any errors occured, and the call 
stack at the point where those functions were called. Looking at the 
call stack will tell you from which thread the methods are called 
(either they have main() in them or GraphicsThread or something else).


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] Please test svn/trunk in prep for 2.9.10 dev release

2010-12-01 Thread Paul Martz
Hi Robert -- I built on Windows and ran the FLT regression test suite as a test. 
The results are expected, just the known failures.


--
  -Paul Martz  Skew Matrix Software
   http://www.skew-matrix.com/
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Please test svn/trunk in prep for 2.9.10 dev release

2010-12-01 Thread Thomas Hogarth
Hi Robert

Great to hear the IOS support is now in the trunk, I wasn't liking git too
much :).

I built the latest trunk yesterday on Windows 7 using Visual Studio 2008,
all seemed to be fine and my own app is still functioning as expected. Also
gave the fbx plugin and osgAnimationViewer a quick test which worked as
well. I'll move onto osx and ios tomorrow.

I did want to raise one issue with the Texture objects being released from
my NPOT subloadcallback, this is also effecting osgArt so I know others will
be looking for a fix. If you check out this post

http://www.mail-archive.com/osg-users@lists.openscenegraph.org/msg44349.html

I found the problem, around line 157 of texture2d.cpp but need the
subloadcallback to be able to override the release if the texture and image
are different sizes. i.e. I don't want them to match sizes, my image is
always smaller then the texture space. You added the generateTextureObject
function to the subloadcallback so perhaps a shouldReleaseTextureObject
could be added also?

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


[osg-users] OSG on iPhone (size?)

2010-12-01 Thread Mike Wozniewski

Hi all,

I've been playing around with the iPhone version of OSG lately, and I'm 
pretty happy.


Just wondering about the feasibility of posting something on the app 
store due to size constraints. I'm noticing that OSG is pretty massive:


$ du -hs *.a
328KlibOpenThreads.a
240Mlibosg.a
 51MlibosgAnimation.a
116MlibosgDB.a
 34MlibosgFX.a
 75MlibosgGA.a
 67MlibosgManipulator.a
 75MlibosgParticle.a
 25MlibosgPresentation.a
 69MlibosgShadow.a
 56MlibosgSim.a
 24MlibosgTerrain.a
 32MlibosgText.a
227MlibosgUtils.a
547MlibosgViewer.a
 31MlibosgVolume.a
 92MlibosgWidget.a

It's not an option to use 1GB of storage for OSG libraries. Does anyone 
have ideas of how to simplify the build? Is there a way to automatically 
remove library items that are not used?


Why is this so big?

Thanks in advance,
Mike Wozniewski
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] OSG on iPhone (size?)

2010-12-01 Thread Ulrich Hertlein
On 2/12/10 12:49 , Mike Wozniewski wrote:
 Just wondering about the feasibility of posting something on the app store 
 due to size
 constraints. I'm noticing that OSG is pretty massive:
 
 $ du -hs *.a
 328KlibOpenThreads.a
 240Mlibosg.a
  51MlibosgAnimation.a
 116MlibosgDB.a
  34MlibosgFX.a
  75MlibosgGA.a
  67MlibosgManipulator.a
  75MlibosgParticle.a
  25MlibosgPresentation.a
  69MlibosgShadow.a
  56MlibosgSim.a
  24MlibosgTerrain.a
  32MlibosgText.a
 227MlibosgUtils.a
 547MlibosgViewer.a
  31MlibosgVolume.a
  92MlibosgWidget.a

What sort of a build is this?  Debug or release?  Device or simulator?
The numbers I'm getting from a release/simulator build (Xcode 3.2.3) are far 
lower:

5.5Mlibosg.a
1.2MlibosgAnimation.a
1.7MlibosgDB.a
408KlibosgFX.a
1.2MlibosgGA.a
692KlibosgManipulator.a
848KlibosgParticle.a
484KlibosgPresentation.a
952KlibosgShadow.a
1020K   libosgSim.a
384KlibosgTerrain.a
616KlibosgText.a
3.1MlibosgUtil.a
1.2MlibosgViewer.a
448KlibosgVolume.a
744KlibosgWidget.a

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


Re: [osg-users] OSG on iPhone (size?)

2010-12-01 Thread Chris 'Xenon' Hanson
On 12/1/2010 6:49 PM, Mike Wozniewski wrote:
 It's not an option to use 1GB of storage for OSG libraries. Does anyone have 
 ideas of how
 to simplify the build? Is there a way to automatically remove library items 
 that are not
 used?

  Static linking makes a BIG difference, though it introduces (resolvable) 
issues with
loader plugins and unresolvable license issues with some (GPL) thirdparty 
libraries that
don't like static linking.

  I don't know if you can static link on iOS, or how you would go about doing 
it.

-- 
Chris 'Xenon' Hanson, omo sanza lettere. xe...@alphapixel.com 
http://www.alphapixel.com/
  Digital Imaging. OpenGL. Scene Graphs. GIS. GPS. Training. Consulting. 
Contracting.
There is no Truth. There is only Perception. To Perceive is to Exist. - 
Xen
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] OSG on iPhone (size?)

2010-12-01 Thread Mike Wozniewski

On 10-12-01 9:03 PM, Ulrich Hertlein wrote:

On 2/12/10 12:49 , Mike Wozniewski wrote:

Just wondering about the feasibility of posting something on the app store due 
to size
constraints. I'm noticing that OSG is pretty massive:

$ du -hs *.a
328KlibOpenThreads.a
240Mlibosg.a
  51MlibosgAnimation.a
116MlibosgDB.a
  34MlibosgFX.a
  75MlibosgGA.a
  67MlibosgManipulator.a
  75MlibosgParticle.a
  25MlibosgPresentation.a
  69MlibosgShadow.a
  56MlibosgSim.a
  24MlibosgTerrain.a
  32MlibosgText.a
227MlibosgUtils.a
547MlibosgViewer.a
  31MlibosgVolume.a
  92MlibosgWidget.a

What sort of a build is this?  Debug or release?  Device or simulator?
The numbers I'm getting from a release/simulator build (Xcode 3.2.3) are far 
lower:

5.5Mlibosg.a
1.2MlibosgAnimation.a
1.7MlibosgDB.a
408KlibosgFX.a
1.2MlibosgGA.a
692KlibosgManipulator.a
848KlibosgParticle.a
484KlibosgPresentation.a
952KlibosgShadow.a
1020K   libosgSim.a
384KlibosgTerrain.a
616KlibosgText.a
3.1MlibosgUtil.a
1.2MlibosgViewer.a
448KlibosgVolume.a
744KlibosgWidget.a

/uli

This is a release/device build (Xcode 3.2.4), but oddly, the debug build 
is pretty similar... just slightly larger (eg, 244M for libosg.a rather 
than 240M).


I don't get it. Why are yours so small? ... I did a clean checkout of 
the iphone git branch today and built with the existing project 
settings. Hm... I see that I'm building for both arm6 and arm7. This 
means a universal build will be generated, and will be larger. Are you 
optimizing for only one architecture (arm7?).


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


Re: [osg-users] second-order equation

2010-12-01 Thread Cracj Kurt
Surface , for example z= sin(x)sin(y).

I see only one solution. Calculate the value of a formula written into the 
matrix and show the shape. But  may exist complete class or method...

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





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


Re: [osg-users] OSG and QT

2010-12-01 Thread Sajjadul Islam
Hi,

That is how a typical .pro file should look like if you want to compile osg 
with qt.


/7
TEMPLATE = app
QT += opengl

INCLUDEPATH += .
INCLUDEPATH += /usr/include/osg
INCLUDEPATH += /usr/include/osgAnimation
INCLUDEPATH += /usr/include/osgDB
INCLUDEPATH += /usr/include/osgGA
INCLUDEPATH += /usr/include/osgManipulator
INCLUDEPATH += /usr/include/osgViewer
INCLUDEPATH += /usr/include/osgUtil



LIBS += -L/usr/lib64 -losgViewer -losgDB -losgUtil -losg -losgSim

HEADERS += \
ViewerQT.h \
AdapterWidget.h \
OSGQtMainWindow.h \
Teapot.h \
SnapImage.h \
SnapImageHandler.h

SOURCES += \
AdapterWidget.cpp \
main.cpp \
OSGQtMainWindow.cpp \
ViewerQT.cpp

FORMS += \
OSGQtWindow.ui

RESOURCES +=


7

Hope it helps.

Cheers,
Sajjadul

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





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