Click to See Complete Forum and Search --> : DirectDraw multithreading


danflu
July 30th, 2007, 04:25 PM
Hello,

I 've been writing a multithreaded application to render a video in fullscreen mode using directdraw. basically the application get a buffer with DIB information this buffer is passed to a ddraw back buffer in one thread.

The main thread simply to do the page flipping to exchange memory between front and back buffers but it doesnt works. If I do the both things (Load dib to back buffer and flip) in the same thread everything goes well.

I have set DDSCL_MULTITHREADED when creating the ddraw main object.

I'm using _beginthread to create the 2 threads of execution. Is there any trick ? something missing ?

Please help, I'm stuck into this and its driving me crazy.