[osg-users] Using OsgViewerMFC to load a sphere

TANG Fangqin fqtang at gmail.com
Wed Jul 16 01:04:50 PDT 2008


Hi Steve,

Yes, you are right.
I called setProjectionMatrixAsPerspective to set the aspect ratio of camera,
and it works.
Thanks.

Tang


On 7/16/08, osg-users-request at lists.openscenegraph.org <
osg-users-request at lists.openscenegraph.org> wrote:
>
> Send osg-users mailing list submissions to
>        osg-users at lists.openscenegraph.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
>
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
> or, via email, send a message with subject or body 'help' to
>        osg-users-request at lists.openscenegraph.org
>
> You can reach the person managing the list at
>        osg-users-owner at lists.openscenegraph.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of osg-users digest..."
>
>
> Today's Topics:
>
>   1. Re: Looking for tips on importing osgWidget (Robert Osfield)
>   2. Re: Looking for tips on importing osgWidget (Robert Osfield)
>   3. Re: Using OsgViewerMFC to load a sphere (spowers at gdrs.com)
>   4. Re: osgWidget Remaining Issues (Farshid Lashkari)
>   5. Re: How to take a picture of my scene? (Carlos Sanches)
>   6. Re: How to take a picture of my scene? (Gordon Tomlinson)
>   7. osgWidget now checked into OSG SVN trunk (Robert Osfield)
>   8. Re: osgWidget now checked into OSG SVN trunk (Jeremy Moles)
>   9. Re: osgWidget now checked into OSG SVN trunk (Jean-S?bastien Guay)
> 10. Re: osgWidget now checked into OSG SVN trunk (Robert Osfield)
> 11. Re: osgWidget now checked into OSG SVN trunk (Jean-S?bastien Guay)
> 12. Re: osgWidget now checked into OSG SVN trunk (Jeremy Moles)
> 13. Re: osgWidget now checked into OSG SVN trunk (Jean-S?bastien Guay)
> 14. binding a shader uniform to a matrix transform node (Botorabi)
> 15. Re: osgWidget now checked into OSG SVN trunk (Jean-S?bastien Guay)
> 16. Re: osgWidget now checked into OSG SVN trunk (Robert Osfield)
> 17. Re: osgWidget now checked into OSG SVN trunk (Robert Osfield)
> 18. Re: osgWidget now checked into OSG SVN trunk (Jeremy Moles)
> 19. Re: KD-Tree Performance Challenge....
>      (Adrian Egli OpenSceneGraph (3D))
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Tue, 15 Jul 2008 16:23:17 +0100
> From: "Robert Osfield" <robert.osfield at gmail.com>
> Subject: Re: [osg-users] Looking for tips on importing osgWidget
> To: "OpenSceneGraph Users" <osg-users at lists.openscenegraph.org>
> Message-ID:
>        <7ffb8e9b0807150823x234d2c5dj14d806be47e44074 at mail.gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1
>
> On Tue, Jul 15, 2008 at 3:44 PM, Jeremy Moles <jeremy at emperorlinux.com>
> wrote:
> > You would lose the history, but this may not be too big of a deal,
> > really. I've been good about keeping the CHANGELOG up to date, but my
> > commit messages are hardly worth preserving. As a matter of fact, I had
> > always assumed you would import it from a local un-SVN'ified version,
> > and that my horrible SVN log messages would go away. :)
>
> We'll if you happy to see the history not reproduced then I'll just go
> ahead an do an import, I guess the googlecode SVN will still be around
> if do need to go hunting an old rev of some class.
>
> Robert.
>
>
> ------------------------------
>
> Message: 2
> Date: Tue, 15 Jul 2008 16:24:27 +0100
> From: "Robert Osfield" <robert.osfield at gmail.com>
> Subject: Re: [osg-users] Looking for tips on importing osgWidget
> To: "OpenSceneGraph Users" <osg-users at lists.openscenegraph.org>
> Message-ID:
>        <7ffb8e9b0807150824j70e3041ta3f4a0d917247c0c at mail.gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1
>
> Hi Alberto,
>
> Thanks for the explanation.  It sounds like there a few steps extra in
> doing the full import of histories, given that Jeremy is up for a
> straight import minus histories I'll go this route for an easy life.
>
> Robert.
>
> On Tue, Jul 15, 2008 at 4:06 PM, Alberto Luaces <aluaces at udc.es> wrote:
> > Hi,
> >
> > El Martes 15 Julio 2008ES 16:42:12 Robert Osfield escribi?:
> >> Is there some option in svn that I'm missing?
> >
> > Generally joining two repositories require to do some administration work
> with
> > the svnadmin tools.
> >
> > First you would get the dump file of the osgWidget repository with
> "svnadmin
> > dump". Then you would insert the osgWidgets dump file into OSG repository
> with
> > "svnadmin load".
> >
> > The disadvantage is that osgWidgets will be put at the root of the
> repository.
> > To place it anywhere, a common recommendation on SVN lists is to replace
> file
> > paths into the dump file (with sed or similar) before uploading to the
> new
> > server.
> >
> > It's not an automatic procedure but it's not very complicated either.
> >
> > Hope that helps,
> >
> > Alberto
> > _______________________________________________
> > osg-users mailing list
> > osg-users at lists.openscenegraph.org
> >
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
> >
>
>
> ------------------------------
>
> Message: 3
> Date: Tue, 15 Jul 2008 11:29:11 -0400
> From: <spowers at gdrs.com>
> Subject: Re: [osg-users] Using OsgViewerMFC to load a sphere
> To: <osg-users at lists.openscenegraph.org>
> Message-ID:
>        <A47866F933DF804684068A24BF04A97304024FDE at gdrs-exchange.gdrs.com>
> Content-Type: text/plain; charset="us-ascii"
>
> Hi and welcome to OSG.
>
> You need to make sure your viewport and projection matrix have
> equivalent aspect ratios.
>
> The best way to do this in MFC is to use the viewport dimensions that
> your using (traits->width, traits->height) and then change your
> projection matrix to match that aspect ratio.
>
> -Steve
>
>
>
> ________________________________
>
> From: osg-users-bounces at lists.openscenegraph.org
> [mailto:osg-users-bounces at lists.openscenegraph.org] On Behalf Of TANG
> Fangqin
> Sent: Tuesday, July 15, 2008 10:34 AM
> To: osg-users at lists.openscenegraph.org
> Subject: [osg-users] Using OsgViewerMFC to load a sphere
>
> Hi All,
>
> I am a beginner of OSG.
> I used OsgViewerMFC to load a sphere into the scene, but it displays as
> an ellipsoid.
> The radius doesn't seem to be equal in two orthotropic axes.
>
> I find that it may be related to the width and height of the view window
> when initializing.
>
> The following codes are from OsgViewerMFC:
>
> ::GetWindowRect(m_hWnd, &rect);
> ...
> traits->x = 0;
> traits->y = 0;
> traits->width = rect.right - rect.left;
> traits->height = rect.bottom - rect.top;
> ...
> osg::GraphicsContext* gc =
> osg::GraphicsContext::createGraphicsContext(traits.get());
>
> How to solve this?
> Thanks for your advices in advance.
> Tang
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <
> http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20080715/93329386/attachment-0001.htm
> >
>
> ------------------------------
>
> Message: 4
> Date: Tue, 15 Jul 2008 09:18:59 -0700
> From: "Farshid Lashkari" <flashk at gmail.com>
> Subject: Re: [osg-users] osgWidget Remaining Issues
> To: "OpenSceneGraph Users" <osg-users at lists.openscenegraph.org>
> Message-ID:
>        <978d1eac0807150918s5a416d4ob217060266ddd67f at mail.gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1
>
> On Tue, Jul 15, 2008 at 5:41 AM, Kim C Bale <K.Bale at hull.ac.uk> wrote:
> > Just to reinforce the above point, we used the freetype library to
> > generate OpenGL screen fonts here and found that for font sizes <12
> > Disabling anti-aliasing really improved the clarity of the font. So much
> > so we made it automatically default to removing the AA when size below a
> > threshold were set.
>
> Thanks for the advice Kim. Did you have to modify the source for the
> freetype plugin to disable AA? I can't find where this is an option?
>
> -Farshid
>
>
> ------------------------------
>
> Message: 5
> Date: Tue, 15 Jul 2008 13:23:28 -0300
> From: "Carlos Sanches" <carlos at met.com.br>
> Subject: Re: [osg-users] How to take a picture of my scene?
> To: "OpenSceneGraph Users" <osg-users at lists.openscenegraph.org>
> Message-ID:
>        <5773c4a0807150923w2ae9faedx4522ff657a22fd68 at mail.gmail.com>
> Content-Type: text/plain; charset="iso-8859-1"
>
> I continue to render a black screen :(
> How do I have to use de postdrawcallback ?
> I m using this code:
>
> bool myKeyboardEventHandler::handle(const osgGA::GUIEventAdapter&
> ea,osgGA::GUIActionAdapter& aa)
> {
>      switch(ea.getEventType())
>       {
>       case(osgGA::GUIEventAdapter::KEYDOWN):
>          {
>               switch(ea.getKey())
>               {
>                 case 'a':
>
>                     image->readPixels(0,0,200,200,
> GL_RGB,GL_UNSIGNED_BYTE);
>                     osgDB::writeImageFile(*image,"capture.bmp");
>
>                     return false;
>                 break;
>
>                 ...
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <
> http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20080715/f32894cd/attachment-0001.htm
> >
>
> ------------------------------
>
> Message: 6
> Date: Tue, 15 Jul 2008 12:42:15 -0400
> From: "Gordon Tomlinson" <gordon.tomlinson at sensor.com>
> Subject: Re: [osg-users] How to take a picture of my scene?
> To: "'OpenSceneGraph Users'" <osg-users at lists.openscenegraph.org>
> Message-ID: <00b401c8e699$bd59c1a0$7aed6bc0 at sensor.com>
> Content-Type: text/plain; charset="us-ascii"
>
> A search of the mailing list archives will answer this often asked question
>
> you need a valid graphics context to do this which is typically available
> in
> the draw process, t
>
> _____
>
> From: osg-users-bounces at lists.openscenegraph.org
> [mailto:osg-users-bounces at lists.openscenegraph.org] On Behalf Of Carlos
> Sanches
> Sent: Tuesday, July 15, 2008 12:23 PM
> To: OpenSceneGraph Users
> Subject: Re: [osg-users] How to take a picture of my scene?
>
>
>
> I continue to render a black screen :(
> How do I have to use de postdrawcallback ?
> I m using this code:
>
> bool myKeyboardEventHandler::handle(const osgGA::GUIEventAdapter&
> ea,osgGA::GUIActionAdapter& aa)
> {
>      switch(ea.getEventType())
>       {
>       case(osgGA::GUIEventAdapter::KEYDOWN):
>          {
>               switch(ea.getKey())
>               {
>                 case 'a':
>
>                     image->readPixels(0,0,200,200,
> GL_RGB,GL_UNSIGNED_BYTE);
>                     osgDB::writeImageFile(*image,"capture.bmp");
>
>                     return false;
>                 break;
>
>                 ...
>
>
>
>
>
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <
> http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20080715/23e10411/attachment-0001.htm
> >
>
> ------------------------------
>
> Message: 7
> Date: Tue, 15 Jul 2008 17:58:21 +0100
> From: "Robert Osfield" <robert.osfield at gmail.com>
> Subject: [osg-users] osgWidget now checked into OSG SVN trunk
> To: "OpenSceneGraph Users" <osg-users at lists.openscenegraph.org>
> Message-ID:
>        <7ffb8e9b0807150958xc4f362bxe04adc28fa75e0c1 at mail.gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1
>
> Hi All,
>
> I have just completed the import of Jeremy Moles osgWidget library
> into OpenSceneGraph SVN trunk.  I merged with relatively few changes -
> mainly just CMakeLists.txt file changes and move of
> imager/scripts/shaders out into OpenSceneGraph-Data SVN trunk.
>
> We need to come up with some new imagery files for the osgwidget
> examples so that we know we know the full history/license of them, as
> I've only placed the ones in OpenSceneGraph-Data that are original.
> We might be able to just reuse existing OpenSceneGraph-Data for these
> examples.
>
> There are also fonts references in the osgwidgets examples that I
> don't have in OpenSceneGraph-Data so we'll need to enumerate these and
> then replace/add them into OpenSceneGraph-Data where appropriate.
>
> Now osgWidget's is in OSG SVN it'll be exposed to much more testing
> across platforms so there is certainly potential for build problems.
> Picking these up early will allow us to fix them in plenty of time for
> 2.6 so I'd very much appreciate testing across as many platforms as
> people have access to.
>
> Just in case build issues do come about then you can disable the build
> of osgWidget via the BUILD_OSGWIDGET Cmake variable, this currently
> defaults to ON.  If everything builds fine across all platforms then
> I'll drop build option to keep things simple.
>
> Thanks in advance for you assistance on testing.  Once it looks like
> things are building across all our main platforms I'll go ahead and
> tag another dev release.
>
> Cheers,
> Robert.
>
>
> ------------------------------
>
> Message: 8
> Date: Tue, 15 Jul 2008 13:33:16 -0400
> From: Jeremy Moles <jeremy at emperorlinux.com>
> Subject: Re: [osg-users] osgWidget now checked into OSG SVN trunk
> To: OpenSceneGraph Users <osg-users at lists.openscenegraph.org>
> Message-ID: <1216143196.3043.46.camel at ripley.weyland-yutani>
> Content-Type: text/plain; charset="us-ascii"
>
> Running ccmake I get:
>
> ---
>
> CMake Error: Error in cmake code
> at /home/cubicool/sources/svn-OpenSceneGraph/examples/CMakeLists.txt:152:
> Parse error.  Expected a command name, got right paren with text ")".
>
> The end of a CMakeLists file was reached with an IF statement that was
> not closed properly. Within the
> directory: /home/cubicool/sources/svn-OpenSceneGraph/examples
> The arguments are: DYNAMIC_OPENSCENEGRAPH
>
> The end of a CMakeLists file was reached with an IF statement that was
> not closed properly. Within the
> directory: /home/cubicool/sources/svn-OpenSceneGraph/examples
> The arguments are: BUILD_OSGWIDGET
>
> ---
>
> ...which I was able to fix by using the attached diff. I didn't figure
> it was a big enough issue to warrant a full-protocol submission for
> now...
>
> On Tue, 2008-07-15 at 17:58 +0100, Robert Osfield wrote:
> > Hi All,
> >
> > I have just completed the import of Jeremy Moles osgWidget library
> > into OpenSceneGraph SVN trunk.  I merged with relatively few changes -
> > mainly just CMakeLists.txt file changes and move of
> > imager/scripts/shaders out into OpenSceneGraph-Data SVN trunk.
> >
> > We need to come up with some new imagery files for the osgwidget
> > examples so that we know we know the full history/license of them, as
> > I've only placed the ones in OpenSceneGraph-Data that are original.
> > We might be able to just reuse existing OpenSceneGraph-Data for these
> > examples.
> >
> > There are also fonts references in the osgwidgets examples that I
> > don't have in OpenSceneGraph-Data so we'll need to enumerate these and
> > then replace/add them into OpenSceneGraph-Data where appropriate.
> >
> > Now osgWidget's is in OSG SVN it'll be exposed to much more testing
> > across platforms so there is certainly potential for build problems.
> > Picking these up early will allow us to fix them in plenty of time for
> > 2.6 so I'd very much appreciate testing across as many platforms as
> > people have access to.
> >
> > Just in case build issues do come about then you can disable the build
> > of osgWidget via the BUILD_OSGWIDGET Cmake variable, this currently
> > defaults to ON.  If everything builds fine across all platforms then
> > I'll drop build option to keep things simple.
> >
> > Thanks in advance for you assistance on testing.  Once it looks like
> > things are building across all our main platforms I'll go ahead and
> > tag another dev release.
> >
> > Cheers,
> > Robert.
> > _______________________________________________
> > osg-users mailing list
> > osg-users at lists.openscenegraph.org
> >
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
> >
> -------------- next part --------------
> A non-text attachment was scrubbed...
> Name: diff.txt
> Type: text/x-patch
> Size: 729 bytes
> Desc: not available
> URL: <
> http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20080715/fd80365c/attachment-0001.bin
> >
>
> ------------------------------
>
> Message: 9
> Date: Tue, 15 Jul 2008 13:36:13 -0400
> From: Jean-S?bastien Guay <jean-sebastien.guay at cm-labs.com>
> Subject: Re: [osg-users] osgWidget now checked into OSG SVN trunk
> To: OpenSceneGraph Users <osg-users at lists.openscenegraph.org>
> Message-ID: <487CE00D.4010002 at cm-labs.com>
> Content-Type: text/plain; charset="iso-8859-1"; Format="flowed"
>
> Hi Robert,
>
> You have some mismatched parentheses in examples/CMakeLists.txt
>
>     IF   (BUILD_OSGWIDGET))
>         ADD_SUBDIRECTORY(osgwidgetaddremove)
>         ADD_SUBDIRECTORY(osgwidgetbox)
>         ADD_SUBDIRECTORY(osgwidgetcanvas)
>         ADD_SUBDIRECTORY(osgwidgetframe)
>         ADD_SUBDIRECTORY(osgwidgetinput)
>         ADD_SUBDIRECTORY(osgwidgetlabel)
>         ADD_SUBDIRECTORY(osgwidgetmenu)
>         ADD_SUBDIRECTORY(osgwidgetnotebook)
>         ADD_SUBDIRECTORY(osgwidgetscrolled)
>         ADD_SUBDIRECTORY(osgwidgetshader)
>         ADD_SUBDIRECTORY(osgwidgetstyled)
>         ADD_SUBDIRECTORY(osgwidgettable)
>         ADD_SUBDIRECTORY(osgwidgetversion)
>         ADD_SUBDIRECTORY(osgwidgetwindow
>     ENDIF(BUILD_OSGWIDGET)
>
> should be
>
>     IF   (BUILD_OSGWIDGET)
>         ADD_SUBDIRECTORY(osgwidgetaddremove)
>         ADD_SUBDIRECTORY(osgwidgetbox)
>         ADD_SUBDIRECTORY(osgwidgetcanvas)
>         ADD_SUBDIRECTORY(osgwidgetframe)
>         ADD_SUBDIRECTORY(osgwidgetinput)
>         ADD_SUBDIRECTORY(osgwidgetlabel)
>         ADD_SUBDIRECTORY(osgwidgetmenu)
>         ADD_SUBDIRECTORY(osgwidgetnotebook)
>         ADD_SUBDIRECTORY(osgwidgetscrolled)
>         ADD_SUBDIRECTORY(osgwidgetshader)
>         ADD_SUBDIRECTORY(osgwidgetstyled)
>         ADD_SUBDIRECTORY(osgwidgettable)
>         ADD_SUBDIRECTORY(osgwidgetversion)
>         ADD_SUBDIRECTORY(osgwidgetwindow)
>     ENDIF(BUILD_OSGWIDGET)
>
>
> (note, first line has an extra paren and osgwidgetwindow is missing
> closing paren).
>
> Building now.
>
> J-S
> --
> ______________________________________________________
> Jean-Sebastien Guay    jean-sebastien.guay at cm-labs.com
>                                http://www.cm-labs.com/
>                         http://whitestar02.webhop.org/
> -------------- next part --------------
> An embedded and charset-unspecified text was scrubbed...
> Name: CMakeLists.txt
> URL: <
> http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20080715/972d1858/attachment-0001.txt
> >
>
> ------------------------------
>
> Message: 10
> Date: Tue, 15 Jul 2008 18:39:01 +0100
> From: "Robert Osfield" <robert.osfield at gmail.com>
> Subject: Re: [osg-users] osgWidget now checked into OSG SVN trunk
> To: "OpenSceneGraph Users" <osg-users at lists.openscenegraph.org>
> Message-ID:
>        <7ffb8e9b0807151039h50449e6bu800e7ff88859a4ed at mail.gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1
>
> Sorry about this, typo on editing a CMakeLists.txt, I've now made the
> fix and checked it in, I presume it'll be the same as yours.
>
> On Tue, Jul 15, 2008 at 6:33 PM, Jeremy Moles <jeremy at emperorlinux.com>
> wrote:
> > Running ccmake I get:
> >
> > ---
> >
> > CMake Error: Error in cmake code
> > at /home/cubicool/sources/svn-OpenSceneGraph/examples/CMakeLists.txt:152:
> > Parse error.  Expected a command name, got right paren with text ")".
> >
> > The end of a CMakeLists file was reached with an IF statement that was
> > not closed properly. Within the
> > directory: /home/cubicool/sources/svn-OpenSceneGraph/examples
> > The arguments are: DYNAMIC_OPENSCENEGRAPH
> >
> > The end of a CMakeLists file was reached with an IF statement that was
> > not closed properly. Within the
> > directory: /home/cubicool/sources/svn-OpenSceneGraph/examples
> > The arguments are: BUILD_OSGWIDGET
> >
> > ---
> >
> > ...which I was able to fix by using the attached diff. I didn't figure
> > it was a big enough issue to warrant a full-protocol submission for
> > now...
> >
> > On Tue, 2008-07-15 at 17:58 +0100, Robert Osfield wrote:
> >> Hi All,
> >>
> >> I have just completed the import of Jeremy Moles osgWidget library
> >> into OpenSceneGraph SVN trunk.  I merged with relatively few changes -
> >> mainly just CMakeLists.txt file changes and move of
> >> imager/scripts/shaders out into OpenSceneGraph-Data SVN trunk.
> >>
> >> We need to come up with some new imagery files for the osgwidget
> >> examples so that we know we know the full history/license of them, as
> >> I've only placed the ones in OpenSceneGraph-Data that are original.
> >> We might be able to just reuse existing OpenSceneGraph-Data for these
> >> examples.
> >>
> >> There are also fonts references in the osgwidgets examples that I
> >> don't have in OpenSceneGraph-Data so we'll need to enumerate these and
> >> then replace/add them into OpenSceneGraph-Data where appropriate.
> >>
> >> Now osgWidget's is in OSG SVN it'll be exposed to much more testing
> >> across platforms so there is certainly potential for build problems.
> >> Picking these up early will allow us to fix them in plenty of time for
> >> 2.6 so I'd very much appreciate testing across as many platforms as
> >> people have access to.
> >>
> >> Just in case build issues do come about then you can disable the build
> >> of osgWidget via the BUILD_OSGWIDGET Cmake variable, this currently
> >> defaults to ON.  If everything builds fine across all platforms then
> >> I'll drop build option to keep things simple.
> >>
> >> Thanks in advance for you assistance on testing.  Once it looks like
> >> things are building across all our main platforms I'll go ahead and
> >> tag another dev release.
> >>
> >> Cheers,
> >> Robert.
> >> _______________________________________________
> >> osg-users mailing list
> >> osg-users at lists.openscenegraph.org
> >>
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
> >>
> >
> > _______________________________________________
> > osg-users mailing list
> > osg-users at lists.openscenegraph.org
> >
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
> >
> >
>
>
> ------------------------------
>
> Message: 11
> Date: Tue, 15 Jul 2008 13:47:06 -0400
> From: Jean-S?bastien Guay <jean-sebastien.guay at cm-labs.com>
> Subject: Re: [osg-users] osgWidget now checked into OSG SVN trunk
> To: OpenSceneGraph Users <osg-users at lists.openscenegraph.org>
> Message-ID: <487CE29A.2010001 at cm-labs.com>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
> Hello Robert,
>
> Regarding osgWidget's examples, should their CMakeLists.txt files use
> the SETUP_EXAMPLE() macro as do all the other OSG examples? I would
> assume so since this will make things more consistent. If so I can help
> convert them to use this macro.
>
> Also, do we want osgwidgetversion as an example? Since osgWidget is now
> part of core OSG, should it have its own version?
>
> J-S
> --
> ______________________________________________________
> Jean-Sebastien Guay    jean-sebastien.guay at cm-labs.com
>                                http://www.cm-labs.com/
>                         http://whitestar02.webhop.org/
>
>
> ------------------------------
>
> Message: 12
> Date: Tue, 15 Jul 2008 13:50:17 -0400
> From: Jeremy Moles <jeremy at emperorlinux.com>
> Subject: Re: [osg-users] osgWidget now checked into OSG SVN trunk
> To: OpenSceneGraph Users <osg-users at lists.openscenegraph.org>
> Message-ID: <1216144217.3043.48.camel at ripley.weyland-yutani>
> Content-Type: text/plain
>
> Looks like there's a small spelling error in the "style plugin"
> placeholder; it's calling itself:
>
>        osgdb_osgwisget
>
> :)
>
> On Tue, 2008-07-15 at 18:39 +0100, Robert Osfield wrote:
> > Sorry about this, typo on editing a CMakeLists.txt, I've now made the
> > fix and checked it in, I presume it'll be the same as yours.
> >
> > On Tue, Jul 15, 2008 at 6:33 PM, Jeremy Moles <jeremy at emperorlinux.com>
> wrote:
> > > Running ccmake I get:
> > >
> > > ---
> > >
> > > CMake Error: Error in cmake code
> > > at
> /home/cubicool/sources/svn-OpenSceneGraph/examples/CMakeLists.txt:152:
> > > Parse error.  Expected a command name, got right paren with text ")".
> > >
> > > The end of a CMakeLists file was reached with an IF statement that was
> > > not closed properly. Within the
> > > directory: /home/cubicool/sources/svn-OpenSceneGraph/examples
> > > The arguments are: DYNAMIC_OPENSCENEGRAPH
> > >
> > > The end of a CMakeLists file was reached with an IF statement that was
> > > not closed properly. Within the
> > > directory: /home/cubicool/sources/svn-OpenSceneGraph/examples
> > > The arguments are: BUILD_OSGWIDGET
> > >
> > > ---
> > >
> > > ...which I was able to fix by using the attached diff. I didn't figure
> > > it was a big enough issue to warrant a full-protocol submission for
> > > now...
> > >
> > > On Tue, 2008-07-15 at 17:58 +0100, Robert Osfield wrote:
> > >> Hi All,
> > >>
> > >> I have just completed the import of Jeremy Moles osgWidget library
> > >> into OpenSceneGraph SVN trunk.  I merged with relatively few changes -
> > >> mainly just CMakeLists.txt file changes and move of
> > >> imager/scripts/shaders out into OpenSceneGraph-Data SVN trunk.
> > >>
> > >> We need to come up with some new imagery files for the osgwidget
> > >> examples so that we know we know the full history/license of them, as
> > >> I've only placed the ones in OpenSceneGraph-Data that are original.
> > >> We might be able to just reuse existing OpenSceneGraph-Data for these
> > >> examples.
> > >>
> > >> There are also fonts references in the osgwidgets examples that I
> > >> don't have in OpenSceneGraph-Data so we'll need to enumerate these and
> > >> then replace/add them into OpenSceneGraph-Data where appropriate.
> > >>
> > >> Now osgWidget's is in OSG SVN it'll be exposed to much more testing
> > >> across platforms so there is certainly potential for build problems.
> > >> Picking these up early will allow us to fix them in plenty of time for
> > >> 2.6 so I'd very much appreciate testing across as many platforms as
> > >> people have access to.
> > >>
> > >> Just in case build issues do come about then you can disable the build
> > >> of osgWidget via the BUILD_OSGWIDGET Cmake variable, this currently
> > >> defaults to ON.  If everything builds fine across all platforms then
> > >> I'll drop build option to keep things simple.
> > >>
> > >> Thanks in advance for you assistance on testing.  Once it looks like
> > >> things are building across all our main platforms I'll go ahead and
> > >> tag another dev release.
> > >>
> > >> Cheers,
> > >> Robert.
> > >> _______________________________________________
> > >> osg-users mailing list
> > >> osg-users at lists.openscenegraph.org
> > >>
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
> > >>
> > >
> > > _______________________________________________
> > > osg-users mailing list
> > > osg-users at lists.openscenegraph.org
> > >
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
> > >
> > >
> > _______________________________________________
> > osg-users mailing list
> > osg-users at lists.openscenegraph.org
> >
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
> >
>
>
>
> ------------------------------
>
> Message: 13
> Date: Tue, 15 Jul 2008 13:51:57 -0400
> From: Jean-S?bastien Guay <jean-sebastien.guay at cm-labs.com>
> Subject: Re: [osg-users] osgWidget now checked into OSG SVN trunk
> To: OpenSceneGraph Users <osg-users at lists.openscenegraph.org>
> Message-ID: <487CE3BD.1010905 at cm-labs.com>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
> Hi Robert,
>
> > Regarding osgWidget's examples, should their CMakeLists.txt files use
> > the SETUP_EXAMPLE() macro as do all the other OSG examples? I would
> > assume so since this will make things more consistent. If so I can help
> > convert them to use this macro.
>
> Sorry for spamming... I've done the conversion to use SETUP_EXAMPLE in
> the osgWidget examples, and it's finishing up building now. All seems well.
>
> I'll send the files to osg-submissions.
>
> J-S
> --
> ______________________________________________________
> Jean-Sebastien Guay    jean-sebastien.guay at cm-labs.com
>                                http://www.cm-labs.com/
>                         http://whitestar02.webhop.org/
>
>
> ------------------------------
>
> Message: 14
> Date: Tue, 15 Jul 2008 20:01:50 +0200
> From: "Botorabi" <botorabi at gmx.net>
> Subject: [osg-users] binding a shader uniform to a matrix transform
>        node
> To: osg-users at lists.openscenegraph.org
> Message-ID: <20080715180150.303890 at gmx.net>
> Content-Type: text/plain; charset="us-ascii"
>
> hi,
>
> i am trying to setup a couple of meshes which should share the same geodes
> (vegetation meshes). the only difference between the meshes of same type is
> the transformation and a height bias which is used by a vertex shader
> program.
>
> the height bias is defined as an uniform in the vertex program. i cannot
> set the uniform in the geometry's state set as the height bias must be set
> for every mesh individually. so i tried to set the uniform in the matrix
> transform nodes which contains the geodes. however it seems that the value
> of the uniform does not arrive with right value in the vertex shader. if the
> uniform is set in geodes' stateset the value is ok, though.
>
> now my question: may i try another approach? is something wrong with
> setting an uniform ina matrix transform node?
>
> thanks for any help
> boto
>
>
> p.s.: here is a snippet of the osg file:
>
> ....
>      MatrixTransform {
>        DataVariance STATIC
>        name "Plane3505"
>        nodeMask 0x5
>        cullingActive TRUE
>        StateSet {
>          rendering_hint DEFAULT_BIN
>          renderBinMode INHERIT
>          Uniform {
>            name "heightbias"
>            type float 1 FloatArray 1
>            {
>              62.8316
>            }
>          }
>        }
>        referenceFrame RELATIVE
>        Matrix {
>          0.5 0 0 0
>          0 0.5 0 0
>          0 0 0.5 0
>          -0.0344534 0.0439845 -0.674881 1
>        }
>        num_children 1
>        Geode {
>          UniqueID Geode_12
>          DataVariance STATIC
>          nodeMask 0x5
>          cullingActive TRUE
>          num_drawables 1
>          Geometry {
> ....
>
>
>
> ------------------------------
>
> Message: 15
> Date: Tue, 15 Jul 2008 14:27:03 -0400
> From: Jean-S?bastien Guay <jean-sebastien.guay at cm-labs.com>
> Subject: Re: [osg-users] osgWidget now checked into OSG SVN trunk
> To: OpenSceneGraph Users <osg-users at lists.openscenegraph.org>
> Message-ID: <487CEBF7.6030200 at cm-labs.com>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
> Hello Robert, Jeremy,
>
> > Thanks in advance for you assistance on testing.  Once it looks like
> > things are building across all our main platforms I'll go ahead and
> > tag another dev release.
>
> Builds on Windows Vista, VS8 here, with the previously posted fixes and
> the changed osgwidget example CMakeLists.txt files.
>
> I'm getting some errors in the osgWidget examples which I didn't get
> when osgWidget was separate from OSG though:
>
> ============================
>
> osgwidgetbox doesn't display anything
>
> ============================
>
> osgwidgetshader can't find the shaders, even if I updated the
> OpenSceneGraph-Data from SVN and they're there...
>
> ============================
>
> In osgwidgetnotebook, when clicking on a tab, I get
>
> osgWidget: Window [notebook] couldn't find the Widget [Tab_0] in it's
> object list.
>
> but the behavior seems correct (i.e. the correct tab becomes active).
>
> ============================
>
> On startup, osgwidgetmenu gives
>
> osgWidget: Window [Menu_Pick me!] can't call resizeAdd() with the values
> -72 and 0
> osgWidget: Window [Menu_Pick me!] can't call resizeAdd() with the values
> -72 and 0
> osgWidget: Window [Menu_Pick me!] can't call resizeAdd() with the values
> -72 and 0
> osgWidget: Window [Menu_Pick me!] can't call resizeAdd() with the values
> -72 and 0
> osgWidget: Window [Menu_Grarar!?!] can't call resizeAdd() with the
> values -64 and 0
> osgWidget: Window [Menu_Pick me!] can't call resizeAdd() with the values
> -72 and 0
> osgWidget: Window [Menu_Grarar!?!] can't call resizeAdd() with the
> values -64 and 0
>
> (apart from the font not found messages) and there is no menu on screen.
>
> ============================
>
> Finally, and this is something that bugged me before but should probably
> be fixed now that osgWidget is part of core OSG: it seems like the
> osgWidget examples set some values for the window
> (viewer.setUpViewInWindow(0, 0, 1280, 1024);) whereas they should just
> use the normal viewer and let the user set OSG_WINDOW, or --window, or
> whatever themselves. On Windows, particularly, using
> setUpViewInWindow(0, 0, 1280, 1024) gives a window whose extents go out
> of the screen, so the top of the graphics window is chopped off...
>
> Let me know if there is any more testing I can do. The next step once we
> fix these issues is probably to get a few screenshots to make sure the
> output is correct w.r.t. what you expect.
>
> J-S
> --
> ______________________________________________________
> Jean-Sebastien Guay    jean-sebastien.guay at cm-labs.com
>                                http://www.cm-labs.com/
>                         http://whitestar02.webhop.org/
>
>
> ------------------------------
>
> Message: 16
> Date: Tue, 15 Jul 2008 19:41:22 +0100
> From: "Robert Osfield" <robert.osfield at gmail.com>
> Subject: Re: [osg-users] osgWidget now checked into OSG SVN trunk
> To: "OpenSceneGraph Users" <osg-users at lists.openscenegraph.org>
> Message-ID:
>        <7ffb8e9b0807151141i2c50eb42j2758a9fcfa7c2e2f at mail.gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1
>
> Hi Jeremy,
>
> On Tue, Jul 15, 2008 at 6:50 PM, Jeremy Moles <jeremy at emperorlinux.com>
> wrote:
> > Looks like there's a small spelling error in the "style plugin"
> > placeholder; it's calling itself:
>
> I haven't merged the style plugin, I'll leave a merge of this plugin
> for when it has some functionality to offer.  The less extra stuff we
> have in SVN before we do 2.6 the better.
>
> Robert.
>
>
> ------------------------------
>
> Message: 17
> Date: Tue, 15 Jul 2008 19:42:47 +0100
> From: "Robert Osfield" <robert.osfield at gmail.com>
> Subject: Re: [osg-users] osgWidget now checked into OSG SVN trunk
> To: "OpenSceneGraph Users" <osg-users at lists.openscenegraph.org>
> Message-ID:
>        <7ffb8e9b0807151142r1ab6a17am6728c0803eec7dc6 at mail.gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1
>
> Hi J-S,
>
> My guess most of the problems are down to problems finding the new
> file placement - it might be that osgWidget isn't automatically using
> osgDB::findDataFile().
>
> Robert.
>
> On Tue, Jul 15, 2008 at 7:27 PM, Jean-S?bastien Guay
> <jean-sebastien.guay at cm-labs.com> wrote:
> > Hello Robert, Jeremy,
> >
> >> Thanks in advance for you assistance on testing.  Once it looks like
> >> things are building across all our main platforms I'll go ahead and
> >> tag another dev release.
> >
> > Builds on Windows Vista, VS8 here, with the previously posted fixes and
> the
> > changed osgwidget example CMakeLists.txt files.
> >
> > I'm getting some errors in the osgWidget examples which I didn't get when
> > osgWidget was separate from OSG though:
> >
> > ============================
> >
> > osgwidgetbox doesn't display anything
> >
> > ============================
> >
> > osgwidgetshader can't find the shaders, even if I updated the
> > OpenSceneGraph-Data from SVN and they're there...
> >
> > ============================
> >
> > In osgwidgetnotebook, when clicking on a tab, I get
> >
> > osgWidget: Window [notebook] couldn't find the Widget [Tab_0] in it's
> object
> > list.
> >
> > but the behavior seems correct (i.e. the correct tab becomes active).
> >
> > ============================
> >
> > On startup, osgwidgetmenu gives
> >
> > osgWidget: Window [Menu_Pick me!] can't call resizeAdd() with the values
> -72
> > and 0
> > osgWidget: Window [Menu_Pick me!] can't call resizeAdd() with the values
> -72
> > and 0
> > osgWidget: Window [Menu_Pick me!] can't call resizeAdd() with the values
> -72
> > and 0
> > osgWidget: Window [Menu_Pick me!] can't call resizeAdd() with the values
> -72
> > and 0
> > osgWidget: Window [Menu_Grarar!?!] can't call resizeAdd() with the values
> > -64 and 0
> > osgWidget: Window [Menu_Pick me!] can't call resizeAdd() with the values
> -72
> > and 0
> > osgWidget: Window [Menu_Grarar!?!] can't call resizeAdd() with the values
> > -64 and 0
> >
> > (apart from the font not found messages) and there is no menu on screen.
> >
> > ============================
> >
> > Finally, and this is something that bugged me before but should probably
> be
> > fixed now that osgWidget is part of core OSG: it seems like the osgWidget
> > examples set some values for the window (viewer.setUpViewInWindow(0, 0,
> > 1280, 1024);) whereas they should just use the normal viewer and let the
> > user set OSG_WINDOW, or --window, or whatever themselves. On Windows,
> > particularly, using setUpViewInWindow(0, 0, 1280, 1024) gives a window
> whose
> > extents go out of the screen, so the top of the graphics window is
> chopped
> > off...
> >
> > Let me know if there is any more testing I can do. The next step once we
> fix
> > these issues is probably to get a few screenshots to make sure the output
> is
> > correct w.r.t. what you expect.
> >
> > J-S
> > --
> > ______________________________________________________
> > Jean-Sebastien Guay    jean-sebastien.guay at cm-labs.com
> >                               http://www.cm-labs.com/
> >                        http://whitestar02.webhop.org/
> > _______________________________________________
> > osg-users mailing list
> > osg-users at lists.openscenegraph.org
> >
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
> >
>
>
> ------------------------------
>
> Message: 18
> Date: Tue, 15 Jul 2008 14:43:10 -0400
> From: Jeremy Moles <jeremy at emperorlinux.com>
> Subject: Re: [osg-users] osgWidget now checked into OSG SVN trunk
> To: OpenSceneGraph Users <osg-users at lists.openscenegraph.org>
> Message-ID: <1216147390.3043.52.camel at ripley.weyland-yutani>
> Content-Type: text/plain
>
> On Tue, 2008-07-15 at 19:41 +0100, Robert Osfield wrote:
> > Hi Jeremy,
> >
> > On Tue, Jul 15, 2008 at 6:50 PM, Jeremy Moles <jeremy at emperorlinux.com>
> wrote:
> > > Looks like there's a small spelling error in the "style plugin"
> > > placeholder; it's calling itself:
> >
> > I haven't merged the style plugin, I'll leave a merge of this plugin
> > for when it has some functionality to offer.  The less extra stuff we
> > have in SVN before we do 2.6 the better.
>
> Ah, I misspoke; I meant the regular osgdb export plugin.
>
> > Robert.
> > _______________________________________________
> > osg-users mailing list
> > osg-users at lists.openscenegraph.org
> >
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
> >
>
>
>
> ------------------------------
>
> Message: 19
> Date: Tue, 15 Jul 2008 20:44:05 +0200
> From: "Adrian Egli OpenSceneGraph (3D)" <3dhelp at gmail.com>
> Subject: Re: [osg-users] KD-Tree Performance Challenge....
> To: "OpenSceneGraph Users" <osg-users at lists.openscenegraph.org>
> Message-ID:
>        <1c6d4c30807151144w328a146ax5cb20c7692ef09e4 at mail.gmail.com>
> Content-Type: text/plain; charset="iso-8859-1"
>
> Hi Robert,
>
> thanks for the answer, i understand very well what kind of optimisation we
> can do and what kind of optimisation we should implement in a new class.
> the design of osg does still nicely preview such custom optimisation.
>
>
> I played with the osg::KDtree.cpp and did a review. then after thinking a
> while how we can reduce the number of flops, i found one first optimisation
> we should do. the ray or just a line with starting point s and ending point
> e is during the whole intersection test static, so we can precalculate the
> direction and also the inverse direction and store this information in dir
> /
> invdir.
>
> 1-KdTree.cpp
>
> the performance win is about 10-12%
>
> ** should be check in **
>
> ****************************
>
> we can assume that we can get in general a very bad posed problem. assume
> that we have a scene with n triangles and each triangle has exactly the
> same
> center point. Very bad geometry
> but then we can never seperate them, so we will get a kdTree with max
> number
> of levels. i assumed, if there is a split with too less seperation
> behaviour, we do just a 50-50 split. may this isn't yet the best idea, but
> i
> helps. But i know we should talk about this, because the kdTree should be
> as
> small as possible with "best" performance in building and intersection
> check
> ,... not only line / ray.
>
>
> 2-kdTree.cpp based on 1-kdTree.cpp
>
> i have to read some further papers about this part. but anyway
> the performance win is about 5-10% and the building time has not really
> changed.
>
> (Total win compared to SVN about 18-22%)
>
>
> Is there someone who has well understood how we can avoid this behavoiur ?
>
>
> 2-kdTree.cpp :
> ----------------------
> fraction_hit:10495:0.10495
> time:216.111ms
> 462.726K rays/sec:
>
>
> OpenSceneGraph's KD-Tree (SVN) :
> ----------------------------------------------------
> fraction_hit:10495:0.10495
> time:258.756ms
> 386.464K rays/sec:
>
>
> 2008/7/15 Robert Osfield <robert.osfield at gmail.com>:
>
> > Hi Adrian,
> >
> > On Tue, Jul 15, 2008 at 8:15 AM, Adrian Egli OpenSceneGraph (3D)
> > <3dhelp at gmail.com> wrote:
> > > Thanks for your eMail. First of all i like to do a review of the
> current
> > > kdTree code, w.r.t. the build method. As we know form the publications
> > about
> > > kdTree based Real Time Ray Tracer the build method and some heuristics
> > are
> > > more important than the traversal. May the sah heuristic will boost our
> > > kdTree, if this would be true, and the build methode is still efficient
> > in
> > > time and memory i will change directly the current kd-Tree code.
> >
> > The surface area heuristic might provide a little improvement on pure
> > KdTree intersection performance - but at a cost of building.  Please
> > remember that it's intended that KdTree will be built on the fly, such
> > as when paging in databases, you absolutely don't want to cost of
> > build to be greater than the cost reduction in intersection that it
> > provides - if you are paging lots of data all the time, and only doing
> > a moderate number of intersections per frame the balance far from pure
> > in favour of optimizing the final KdTree traversal.
> >
> > Another factor in this is that the actual scene graph traversal is
> > currently more costly then the KdTree traversal, so doubling the speed
> > of the KdTree traversal won't come close to doubling the speed of
> > intersection, it might only have a 5% improvement.
> >
> > So its really important to benchmark all aspect in the context that
> > most users will use it.  Going for more sophisticated build techniques
> > make do more overall harm for some users types of usage models than
> > others - your benchmark is far from the most common usage that users
> > will put intersection traversal through.  The OSG is not a ray tracing
> > engine, its a general purpose scene graph that uses OpenGL for
> > rendering, and just happens to support intersections to help users
> > out.
> >
> > Given this context, I'm not about to merge new algorithms in place of
> > the existing ones if they impact on build performance.  There is no
> > harm in having multiple KdTree implementations, the design is intended
> > for this.  If you want to extend it go ahead, if the implementation
> > ticks all the boxes then I'll consider merging it as the default.
> >
> > Robert.
> > _______________________________________________
> > osg-users mailing list
> > osg-users at lists.openscenegraph.org
> >
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
> >
>
>
>
> --
> ********************************************
> Adrian Egli
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <
> http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20080715/e45b00c5/attachment.htm
> >
> -------------- next part --------------
> A non-text attachment was scrubbed...
> Name: 1-KdTree.cpp
> Type: text/x-c++src
> Size: 24806 bytes
> Desc: not available
> URL: <
> http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20080715/e45b00c5/attachment.cpp
> >
> -------------- next part --------------
> A non-text attachment was scrubbed...
> Name: 2-KdTree.cpp
> Type: text/x-c++src
> Size: 25701 bytes
> Desc: not available
> URL: <
> http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20080715/e45b00c5/attachment-0001.cpp
> >
>
> ------------------------------
>
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
> End of osg-users Digest, Vol 13, Issue 54
> *****************************************
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20080716/0a73412f/attachment-0003.htm>


More information about the osg-users mailing list