Page 2 of 2 FirstFirst 12
Results 21 to 29 of 29

Thread: Switching to fullscreen on the fly

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

    Default

    If only people started documenting on the public wiki the knowledge they gained from the results of their trials-and-errors instead of complaining on the forums, we would have had proper documentation along time ago.

    But noone is doing that, because writing documentation is much much more boring than writing code or playing Skyrim. And guess what, we core ClanLib developers wants to spend our spare time doing the fun things as well.

  2. #22
    Lesser Knight
    Join Date
    Jul 2011
    Posts
    57

    Default

    Wiki isn't even structured to encourage documenting into it. I personally wouldn't mind to write several lines of hard earned experience into it from time to time, but usually only one question stopping me from it - "Where should I write it???" Main doc's topics are just too global and classes documentation isn't editable.

  3. #23
    ClanLib Developer
    Join Date
    Sep 2006
    Location
    Denmark
    Posts
    554

    Default

    Regarding the CL_FrameBuffer thing, those aren't shared between OpenGL contexts and you have to re-create them when you switch. Here's some example code:

    Code:
    if (frame_buffer.is_null() || !gc.is_frame_buffer_owner(frame_buffer))
    {
    	frame_buffer = CL_FrameBuffer(gc);
    	frame_buffer.attach_color_buffer(0, texture);
    	frame_buffer.attach_color_buffer(1, normal_texture);
    	frame_buffer.attach_depth_stencil_buffer(depth);
    }

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

    Default

    "Main doc's topics are just too global and classes documentation isn't editable."

    Yeah, and who is going to fix it ??? You have the power to edit the wiki, create new pages etc.

    The classes documentation are generated from the source code. It is "you" that can edit the source code and submit a patch.

    Nobody enjoys writing documentation.

    The difference between ClanLib and other libraries, it that it is free - it has a "zlib style license", no commercial license. Developers do not get any money. You can donate to ClanLib, but the money goes towards hosting ClanLib. If someone donate 60,000 euro's - I'm sure ClanLib would be improved rapidly!

    I have written lots of documentation myself in the past, during my free time. I get no thanks for it, just people complaining.

    I only develop ClanLib to see how far I can stretch a modern PC. It is just a hobby.


    If you have fixed or added something to ClanLib, here is a description
    how to get those changes included in the official repository.

    Diffing
    ===================================
    Use 'diff -u > mypatch.patch' or 'svn diff > mypatch.patch' from within
    the ClanLib (trunk) directory. This is contextual diff, it provides more
    information so it easier to examine the changes before applying.

    If you're using Windows, the TortoiseSVN utility
    (http://tortoisesvn.tigris.org/) can easily create patches. Right click
    your ClanLib directory (or trunk), and select TortoiseSVN->Create Patch.

    Submitting
    ===================================
    Please submit patches to our development forum:
    Go to http://www.clanlib.org, click Forum, and go to Developer Chat subforum.

    Describing
    ===================================
    You should describe what your patch does. Please no 'This fixes a bug'.
    Tell us which bug, in what component. Generally, be descriptive without
    being being needlessly verbose.

  5. #25
    Lesser Knight
    Join Date
    Jul 2011
    Posts
    57

    Default

    Hey, no offence was intended!
    I love you guys, you are doing a great job and I'm very thankful for it. I just couldn't go against my human nature and not to complain a little bit

    >Magnus Norddahl
    As for framebuffers:
    Code:
    frame_buffer = CL_FrameBuffer(gc);
    isn't working currently when graphic context framebuffer was defined for is already destroyed - exception occurs when destroying it. So I had to destroy it before destroying old window. But anyway I managed to put it all together and now I have a properly working on-the-fly-fullscreen, at last!

  6. #26
    ClanLib Developer
    Join Date
    Sep 2006
    Location
    Denmark
    Posts
    554

    Default

    Hmm, well it works on my computer in 2.4 SVN. But then again, I can't remember exactly which version I submitted the code that makes it work.

  7. #27
    Lesser Knight
    Join Date
    Jul 2011
    Posts
    57

    Default

    And this topic isn't closed yet!

    Now, how do I do a textures shared between several graphic contexts? I couldn't quite figure it out from the CL_Sprite code, sorry.

  8. #28
    ClanLib Developer
    Join Date
    Sep 2006
    Location
    Denmark
    Posts
    554

    Default

    All objects shareable between multiple OpenGL contexts are automatically shared by ClanLib. FrameBuffer objects are not shareable, which is why you needed to recreate those.

    If you are getting crashes with shared textures and a debugger shows we are always passing in a valid OpenGL context in glXCreateContext/WGLCreateContext, then it IS a driver bug. The entire point of share lists are that they share textures and other GPU objects and this has been a core feature since OpenGL 1.1

    The only situation I know that causes a crash is when you destroy all OpenGL contexts first (all display windows) before creating a new one, since in this situation the share list will be destroyed and thus the texture will be invalid.

  9. #29
    Lesser Knight
    Join Date
    Jul 2011
    Posts
    57

    Default

    My bad, I had it working all the time. Just didn't initialized texture properly.
    Now I think all is in place and no questions left. For the moment

Similar Threads

  1. GUI switching windows example
    By rombust in forum Official ClanLib SDK Forums
    Replies: 1
    Last Post: 03-17-2011, 03:33 PM
  2. Res switching
    By Uhfgood in forum Novashell Game Creation System
    Replies: 2
    Last Post: 07-02-2008, 10:28 PM
  3. Fullscreen problems
    By Veitikka in forum Official ClanLib SDK Forums
    Replies: 5
    Last Post: 03-27-2008, 11:02 AM
  4. Fix for Fullscreen mode
    By glorified_ameba in forum Official ClanLib SDK Forums
    Replies: 5
    Last Post: 07-27-2007, 04:22 PM
  5. make fullscreen 1280x1024
    By gmatt in forum Official ClanLib SDK Forums
    Replies: 4
    Last Post: 07-25-2007, 08:34 AM

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
  •