Results 1 to 2 of 2

Thread: Yet another multithreading issue...

  1. #1
    Senior Member Frequent Contributor
    Join Date
    Feb 2000
    San Diego, CA, USA

    Yet another multithreading issue...

    I know there are a zillion posts on multithreading issues, but none of them seemed to apply to my problem. I'll try to be as specific as possible.

    I'm working on a large simulator that suddenly needs to go multi-threaded.

    Using Visual C++ 6.0, I changed the settings under code generation to use multi-threaded instead of single-threaded runtime libraries. This is the only change I made. No threads are actually created within my program.

    Most everything still worked fine, except that now my procedural water texture always comes out flat (totally blue bump map).

    This texture works a lot like nvidia's interactive reflection map demo (looks like a liquid sheet of metal with nvidia logo). That is, it renders a lot to the backbuffer and does a lot of copyTexSubImages.

    To make it more interesting, I tried changing my standalone water texture demo to multithreaded, and it still worked fine.

    I have basically zero experience with multithreading, so I'm just hoping that some of you might have some suggestions as to why this one thing breaks when the change is made? I'm not even sure where to start looking for the problem.

    -- Zeno

  2. #2
    Senior Member Frequent Contributor marcus256's Avatar
    Join Date
    Aug 2001

    Re: Yet another multithreading issue...

    I may not be the right person to reply to this, since I have zero experience with MSVC (except for some simple command-line compiling), but I think it's some C run-time call that behaves slightly differently in MT mode than in ST mode. You should probably look for: 1) Documentation on the different runtime modes (what exactly is the difference - is there anything that can go wrong), and 2) If you use the runtime functions in a faulty way, or use illegal parameters (faulty memory pointers etc).

    It can be something even more "trivial", such as the memory layout changes when you link with different runtime libraries, so that some memory pointer fault in your code is exposed.

    By the way, changing a compilation flag does not make your application multithreaded. You need to explicitly create your own threads, and use synchronization to handle communication between the threads etc.

Similar Threads

  1. Multithreading
    By exiled in forum OpenGL: Basic Coding
    Replies: 7
    Last Post: 07-02-2011, 02:54 AM
  2. PBO's & multithreading
    By mark ds in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 07-04-2009, 02:28 PM
  3. When to go for multithreading
    By OgliX in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 07-13-2004, 10:42 PM
  4. multithreading and ogl
    By markun in forum OpenGL: Advanced Coding
    Replies: 2
    Last Post: 04-06-2003, 11:07 AM
  5. multithreading
    By dmy in forum OpenGL: Advanced Coding
    Replies: 5
    Last Post: 03-05-2000, 09:31 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Proudly hosted by Digital Ocean