[osg-users] Multisample problem

David Callu ledocc at gmail.com
Wed Oct 17 09:42:55 PDT 2007


Ok I have a not really clean fix but this work.

I will investigate more on this issue.
Keep you informed

David


2007/10/17, Panagiotis Papadakos <papadako at csd.uoc.gr>:
>
> Hi David. Thanks for your time and the example.
>
> I have the same problem with your example as I have with my own code.
> Running "./a.out --samples 4 saved_model.osg", uses anti-aliasing when the
> application starts although SwitchMultisampleHandler disables it in
> constructor. Pressing 2 times 'm' disables it, as it also happens with my
> app.
>
>         Panagiotis Papadakos
>
> On Wed, 17 Oct 2007, David Callu wrote:
>
> > Hi Panagiotis
> >
> > I attach a osgviewer based example of use of multisample
> >
> > You can switch on/off multisample with the key 'm'
> >
> > Cheers
> > David
> >
> > 2007/10/14, Panagiotis Papadakos <papadako at csd.uoc.gr>:
> >>
> >> Hi David
> >>
> >> On Tue, 9 Oct 2007, David Callu wrote:
> >>
> >>> Hi Panagiotis
> >>>
> >>> 2007/10/6, Panagiotis Papadakos <papadako at csd.uoc.gr>:
> >>>>
> >>>> Hi.
> >>>>
> >>>> I want to add an option of using multisampling for my app. So I have
> >> setup
> >>>> DisplaySettings with setNumMultiSamples(4). The user is able to
> >>>> enable/disable multisampling as he feels in the app, by
> >> enabling/disabling
> >>>>
> >>>> the GL_MULTISAMPLE_ARB in the root stateset. My problem now is that
> >>>> initially I want to have multisampling disabled, which I can't figure
> >> out
> >>>> how to do. I have tried setting GL_MULTISAMPLE_ARB OFF in the root
> >>>> stateset, but this doesn't seem to help. Any ideas?
> >>>
> >>>
> >>
> >>> This seem to be the good method.
> >>> you can try
> >>>
> >>> 1) do root->getOrCreateStateSet()->setMode(GLL_MULTISAMPLE_ARB,
> >>> osg::StateAttribut::OFF | osg::StateAttribut::OVERRIDE)
> >>
> >> This is what I've been trying. More specifically
> >> root->getOrCreateStateSet()->setMode(GL_MULTISAMPLE_ARB,
> >> osg::StateAttribute::OFF | osg::StateAttribute::PROTECTED |
> >>   osg::StateAttribute::OVERRIDE);
> >>
> >> after the viewer has been realized.
> >>
> >>> 2) I think that number of sample is define when the OpenGL context is
> >>> created
> >>>    so recreate a context on each switch of the number os sample you
> >> want.
> >>>
> >> Why should I recreate a context? I think I should be able to
> >> enable/disable Multisampling with setting the state mode ON/OFF.
> >>
> >>> How did you know that multisample is enabling/disabling.
> >>> Did you look the render ?
> >> Yep, that is the case. I saw the render.
> >>
> >>> Did you do a request to OpenGL about multisample ?
> >>>
> >>>
> >>> David
> >>>
> >>>
> >>> Thanks
> >>>>          Panagiotis Papadakos
> >>>> _______________________________________________
> >>>> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20071017/cab517bc/attachment-0003.htm>


More information about the osg-users mailing list