Page 1 of 5 123 ... LastLast
Results 1 to 10 of 46

Thread: Multithreaded resource loading

  1. #1

    Multithreaded resource loading

    Some time ago I was interested in multithreaded resource loading in OpenGL and started working on it. After implementation it for GNU/Linux and MacOS X long time I couldn't understand what I must do for Windows. Now I implemented this and want to do some tests on different PC's.

    Can you please test this demo(1.5Mb) and write what CPU and GPU in your PC? Here the MacOS X version.



    Demo is based on one open source library and changes will be available after successfully tests
    Last edited by Andru; 05-10-2010 at 10:13 PM.

  2. #2
    PGD Community Manager AthenaOfDelphi's Avatar
    Join Date
    Dec 2004
    Location
    South Wales, UK
    Posts
    1,245
    Blog Entries
    2
    Hi Andru,

    I've tested the demo, and all appears to work correctly with one notable exception... the 'Play Sound'/'Mute Sounds' graphic is corrupted.
    :: AthenaOfDelphi :: My Blog :: My Software ::

  3. #3
    the 'Play Sound'/'Mute Sounds' graphic is corrupted.
    Can you make a screenshot? And what videocard is used?

  4. #4
    PGD Community Manager AthenaOfDelphi's Avatar
    Join Date
    Dec 2004
    Location
    South Wales, UK
    Posts
    1,245
    Blog Entries
    2
    Yes, you did ask for that info... sorry hon... Here's my machine specs:- http://www.pgdannual.com/index.php?m...KLCZSRESEOMPPE

    Now... a screenshot... I'd love to oblige, but when I fired it up to grab the screenie, it works, the images are great. The picture displayed when sound is off was very garbled, the picture for when sound on was just like a grey block that was all out of shape.
    :: AthenaOfDelphi :: My Blog :: My Software ::

  5. #5
    Quote Originally Posted by AthenaOfDelphi
    Now... a screenshot... I'd love to oblige, but when I fired it up to grab the screenie, it works, the images are great.
    Hmm... demo starts and waiting 1 sec. before starting load resources. Every texture that doesn't loaded - drawing like a white shape. Maybe demo lost a focus or something else happened?

    Quote Originally Posted by AthenaOfDelphi
    Here's my machine specs:
    - Drivers Version: Forceware 6.14.11.7813 (9-17-2008 )
    Pretty old drivers, but problem not in it I think.

  6. #6
    PGD Community Manager AthenaOfDelphi's Avatar
    Join Date
    Dec 2004
    Location
    South Wales, UK
    Posts
    1,245
    Blog Entries
    2
    Quote Originally Posted by Andru View Post
    Hmm... demo starts and waiting 1 sec. before starting load resources. Every texture that doesn't loaded - drawing like a white shape. Maybe demo lost a focus or something else happened?

    Pretty old drivers, but problem not in it I think.
    I've stopped and started it, switched focus and basically tried to break it during the load but I can't. I think it must have been something really quirky, but I just can't repeat it.

    As for my old drivers... I've been burned by keeping my drivers up to date in the past so generally I find a set that works with all the stuff I use and then leave them well alone
    :: AthenaOfDelphi :: My Blog :: My Software ::

  7. #7
    I think it must have been something really quirky, but I just can't repeat it.
    Threads... never guess when error can happens Maybe there is some error in my code, so I will investigate it.

  8. #8
    I was trying to make my OpenGL imageviewer threaded but no luck so far. The program keeps 3 images loaded same time and they are scrolled up and down continuously. You can imagine there is a small pause when scroll reach the ends and needs to load next file.

    I was hoping command glFinish would do the trick for me but it seemed to be more complicated problem...

    Edit: And i tested your program, it run good and all images loaded normally. Only windows taskbar button was showing a generic application icon instead of the icon that was in .exe and application titlebar.

    cpu: E8400 3Ghz dualcore
    gpu: Radeon HD 5700
    Last edited by User137; 03-10-2010 at 09:58 PM.

  9. #9
    Quote Originally Posted by User137
    I was hoping command glFinish would do the trick for me but it seemed to be more complicated problem...
    Yeah, there is some tricky way for using multithreaded texture loading under Windows

    1. Create context in main thread
    2. Call wglMakeCurrent( 0, 0 ) in main thread and create second thread
    3. Create new context using main device context(HDC) in second thread and make it current
    4. Call wglShareLists( context_from_main_thread, new_context ) in second thread
    5. Call wglMakeCurrent for main context in main thread

    So, after this you can load resources in second thread and use them in main thread. But you must be careful with other operations, like binding texture before it was loaded in second thread(seems this is my error in demo, but this happens not on all PC's)

    Quote Originally Posted by User137
    Only windows taskbar button was showing a generic application icon instead of the icon that was in .exe and application titlebar.
    Hmm, there is no icon in exe. I compiled it wthout resource file.
    Last edited by Andru; 03-10-2010 at 10:25 PM.

  10. #10
    Co-Founder / PGD Elder WILL's Avatar
    Join Date
    Apr 2003
    Location
    Canada
    Posts
    6,107
    Blog Entries
    25
    Hey is this a Windows demo? If you provide me with a Snow Leopard compatible demo I'd gladly run it on my, almost newest, iMac (has an Intel Core i7 with a ATI Radeon HD 4850) for you.
    Jason McMillen
    Pascal Game Development
    Co-Founder





Page 1 of 5 123 ... LastLast

Tags for this Thread

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
  •