Hi Wojtek,

I'm now reviewing the changes and wondering what to do about the enum
placement.  Duplicating an enum doesn't feel right, I was inclined
towards a typedef but your comments suggest you couldn't get this to
work.

Did you try putting the enum into the osg namespace rather than the
scope of the DisplaySettings/GraphicsContext::Traits class?

Robert.

On Tue, Sep 28, 2010 at 11:56 AM, Wojciech Lewandowski
<[email protected]> wrote:
> Hi Guys,
>
> Second attempt. As usual devil is in details. This time I had to solve the
> coding style dillemma I avoided yesterday:
>
> Both DisplaySettings & GraphicsContext::Traits contain SwapMethod enum
> parameter. GraphicsContext::Traits seems to be simple & easy structure to be
> used for user preferences. I assumed its a bad idea to use
> DisplaySettings::SwapMethod enum inside Traits. So instead I have duplicated
> the enums in both classes. If you find it inappropriate, please redefine
> these enums as you wish.
>
> I have placed comments starting with
>   // Wojtek Lewandowski 2010-09-28:
> above every chunk of code that can be controversial.
> Please remove them after reading and taking proper action ;-)
>
> Cheers,
> Wojtek Lewandowski
>
> --------------------------------------------------
> From: "Wojciech Lewandowski" <[email protected]>
> Sent: Tuesday, September 28, 2010 10:52 AM
> To: "OpenSceneGraph Submissions" <[email protected]>
> Subject: Re: [osg-submissions] Swap Method
>
>> Ulrich & Robert,
>>
>> I agree especially when I have just read that WGL_SWAP_UNDEFINED is not
>> the same as DEFAULT which means we will have at least 4 enum values (not 3
>> as I thought before).
>>
>> So Robert please hold this submit. I will send another set of files soon.
>>
>> Wojtek
>>
>>
>> --------------------------------------------------
>> From: "Ulrich Hertlein" <[email protected]>
>> Sent: Tuesday, September 28, 2010 1:38 AM
>> To: "OpenSceneGraph Submissions"
>> <[email protected]>
>> Subject: Re: [osg-submissions] Swap Method
>>
>>> Hi Wojciech,
>>>
>>> On 27/09/10 22:28 , Wojciech Lewandowski wrote:
>>>>
>>>> As promised I prepared a patch to expose WGL_SWAP_METHOD /
>>>> PFD_SWAP_METHOD  selection via
>>>> GraphicsContext::Traits. Since Traits don't define any enums (I guess to
>>>> be simple to
>>>> use) I tried to keep it that way and have added two boolean values:
>>>> swapCopy &
>>>> swapExchange. It is somewhat similar approach to GDI
>>>> PixelFormatDescription were
>>>> both options can be present together.  Feel free to replace it with enum
>>>> if you find it
>>>> more appropriate.
>>>
>>> Is it valid to set both of them at the same time?  If not then I'd vote
>>> for making it an
>>> enum in order not to confuse users and have to worry about state
>>> consistency.
>>>
>>> Cheers,
>>> /ulrich
>>> _______________________________________________
>>> osg-submissions mailing list
>>> [email protected]
>>>
>>> http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
>>
>> _______________________________________________
>> osg-submissions mailing list
>> [email protected]
>>
>> http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
>
> _______________________________________________
> osg-submissions mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
>
>
_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org

Reply via email to