Results 1 to 10 of 46

Thread: Multithreaded resource loading

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #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.

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
  •