Aye Aye Sir! I'm going to recompile & test under Win32.
And I agree for your tweaks, that's good for me.

Sukender
PVLE - Lightweight cross-platform game engine - http://pvle.sourceforge.net/


Le Tue, 16 Dec 2008 16:15:50 +0100, Robert Osfield <[email protected]> a 
écrit:

> Hi Sukender,
>
> I have just checked in your changes with a few tweaks.
>
> The main one being that I've renamed ScreenResolution to
> ScreenSettings as the structure covers more than resolution.  I change
> the method names to reflect this as well.  I re-instated the
> setRefreshRate() method for backwards compatibility, implementing it
> using the new setScreenSettings(..) method.
>
> I also implemented the enumateScreenSettings code for X11 using
> Xrandr, and tweaked the Xrandr options usage so it's on by default if
> the has Xrandr installed.  I believe under Linux Xrandr is pretty
> standard now so it should be OK to enable.
>
> I did find problems with Xrandr's implementation of refresh rates,
> it's only reporting 50 and 51herz as support for my monitors 1280x1024
> default resolution when the monitor is capable of 75herz at this size.
>  Running xrandr on the command line reports exactly the same res and
> refresh rates so it's clearly a bug in the xrandr implementation or X
> configuration.
>
> Due to tweaks in naming there is chance that I've broken the Windows
> build so I'd appreciate a quick test of this.
>
> Robert.
>
> On Tue, Dec 16, 2008 at 12:52 AM, Sukender <[email protected]> wrote:
>> Forgot to mention (but that was obvious): you of course can enumerate 
>> supported screen resolutions with corresponding method (not implemented yet 
>> for X11 as explained).
>> I used it in my project and that's nice because I now can auto-find the 
>> closest supported fullscreen resolution using a simple search function (Ex: 
>> 1600x1024 not supported? It will try 1600x1200 or something similar). 
>> Morover, it avoids the ugly 60 Hz default by using the highest refresh rate 
>> available. :)
>>
>> Sukender
>> PVLE - Lightweight cross-platform game engine - http://pvle.sourceforge.net/
>>
>>
>> Le Tue, 16 Dec 2008 00:49:11 +0100, Sukender <[email protected]> a écrit:
>>
>>> Hi Robert, hi all,
>>>
>>> As discussed on osg-users, I changed 
>>> GraphicsContext::WindowingSystemInterface. The main problem is that I need 
>>> testing under OSX and Linux. Here is what has been done:
>>>
>>> I created a ScreenResolution structure to take as argument (instead of 
>>> references on integers) for 
>>> WindowingSystemInterface::get/setScreenResolution(). It contains:
>>> - screen size
>>> - color depth
>>> - and refresh rate
>>> This structure may be extended later if needed, but it seems to fit what's 
>>> possible with Win32/Carbon/X11.
>>>
>>> Please note that I kept the previous prototypes of 
>>> get/setScreenResolution() for backward compatibility (they are marked as 
>>> deprecated though). But I removed the setScreenRefreshRate() since I don't 
>>> find it logical to set the refresh rate without the resolution. If that 
>>> decision is wrong, you just need to uncomment the setScreenRefreshRate() 
>>> declaration and definitions. If it is right, then commented lines can be 
>>> deleted.
>>>
>>> The behaviour of the setScreenResolution() method is to set parameters that 
>>> don't have a 0 value. For instance, if you set the refresh rate but not the 
>>> screen size not the color depth, then it is as calling the (commented out) 
>>> setScreenRefreshRate().
>>>
>>> Here is the detail for each windowsing system:
>>> - Win32: Almost everything ok, except setting color depth that seem to have 
>>> trouble with OpenGL (maybe my video driver?). That works but I have a 
>>> strange behaviour when setting my screen to 8 or 16 bits.
>>> - Carbon: Everything has been coded, thanks to Apple's online 
>>> documentation, but I just can't compile (I'm under Win32).
>>> - X11: I got lost in X11 and XRANDR, so some things were coded, some not: 
>>> you can't *Get* the refresh rate, you can't *Set* the color depth, and you 
>>> can't enumerate your supported resolutions.
>>>
>>> So, what is needed:
>>> - Test Carbon code.
>>> - Finish X11 code, and test it.
>>>
>>> Attached:
>>> - A 7-Zip archive containing modified files against rev. 9357 of the SVN 
>>> trunk.
>>> - An OpenOffice 3 spread sheet that sums up what I coded/tested (The one I 
>>> used).
>>>
>>> Sukender
>>> PVLE - Lightweight cross-platform game engine - http://pvle.sourceforge.net/
>>
>> _______________________________________________
>> 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