Results 1 to 9 of 9

Thread: 0.9 CL_DisplayMode incomplete

  1. #1
    Lesser Knight
    Join Date
    Aug 2008
    Location
    Folsom, California USA
    Posts
    37

    Default 0.9 CL_DisplayMode incomplete

    Using 0.9 SVN r1791. Apparently CL_DisplayMode is never fully declared, although it is forward declared in display_window.h and used as a const ref param in functions such as CL_DisplayWindow::set_fullscreen().

    It's very helpful to be able to enumerate the video modes to decide on initial window sizes.

    Thanks,

    --- Kevin

  2. #2
    ClanLib Developer
    Join Date
    Sep 2006
    Location
    Bergen, Norway
    Posts
    588

    Default

    DisplayMode was in 0.8, and it might have disappeared in the port to 0.9.. or we renamed it to DisplayModeDescription... or not We're not sure and can't remember

    To be honest, we haven't really focused much on fullscreen functionality for a while. Feel free to look into this

    This gotta be the vaguest post ever

  3. #3
    ClanLib Developer
    Join Date
    May 2007
    Posts
    1,824

    Default

    Yes, it does not work. It has not been implemented.

    To get full screen, currently the only way is to do it is on window creation (CL_DisplayWindowDescription)

    I believe that it is not that easy to get dynamic full-screen to work, due to the handling of OpenGL by Microsoft windows. (i cannot remember the details)

  4. #4
    Lesser Knight
    Join Date
    Aug 2008
    Location
    Folsom, California USA
    Posts
    37

    Default

    Quote Originally Posted by rombust View Post
    To get full screen, currently the only way is to do it is on window creation (CL_DisplayWindowDescription)
    I personally think that's acceptable. All I really want is to be able to select a sensible window size (or fullscreen resolution) at window creation time. In the meantime, might want to prune the set_fullscreen() method, or have it throw a "not implemented" exception.

    I'll have a go at transplanting CL_DisplayMode from 0.8 forward into 0.9. If anybody thinks this is a bad idea or won't work, please let me know.

    --- Kevin

  5. #5
    ClanLib Developer
    Join Date
    Sep 2006
    Location
    Bergen, Norway
    Posts
    588

    Default

    Feel free to port the 0.8 enumeration code, we appreciate that

  6. #6
    Lesser Knight
    Join Date
    Aug 2008
    Location
    Folsom, California USA
    Posts
    37

    Default

    Patch attached. You'll first need to svn copy three files from the 0.8 branch to 0.9 before applying it:

    Code:
    ClanLib-0.8/Sources/API/Display/display_mode.h
    ClanLib-0.8/Sources/Display/display_mode_generic.h
    ClanLib-0.8/Sources/Display/display_mode.cpp
    I only tried it on Linux.

    --- Kevin
    Attached Files Attached Files

  7. #7
    ClanLib Developer
    Join Date
    Sep 2006
    Location
    Bergen, Norway
    Posts
    588

    Default

    I've added the classes from 0.8, applied your patch, and tuned it to fit more into 0.9.

  8. #8
    Lesser Knight
    Join Date
    Aug 2008
    Location
    Folsom, California USA
    Posts
    37

    Default

    Thanks.

    I see the class name and a few other things have changed. I hope you didn't have to fix too much to make it fit 0.9.

    Small nit: Sources/API/display.h still attempts to #include "Display/display_mode.h" instead of "Display/Window/display_window_mode.h" Attached patch to fix that.

    Edit: also, string_types.h should be #included in "Display/Window/display_window_mode.h". If its the first #include in a source file, the CL_String breaks build otherwise.

    Apart from these issues, I tried it on Ubuntu 8.04 and OpenSuse 11; it builds and works as expected on both and correctly enumerates available display modes.

    --- Kevin
    Attached Files Attached Files
    Last edited by kbluck; 09-11-2008 at 02:41 AM.

  9. #9
    ClanLib Developer
    Join Date
    Sep 2006
    Location
    Bergen, Norway
    Posts
    588

    Default

    Thanks!

    I basically had to rename the _generic class to _impl (as thats what we call those classes now), and fix up the comments on every function since we now use a doxygen format for those.

Similar Threads

  1. CL_DisplayMode::get_display_modes() odd modes
    By ares in forum Official ClanLib SDK Forums
    Replies: 1
    Last Post: 02-03-2008, 03:52 AM
  2. Replies: 1
    Last Post: 10-27-2007, 11:19 PM

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •