Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 2 of 2

Thread: multi video to texture

  1. #1
    Junior Member Newbie
    Join Date
    Jan 2001
    Posts
    18

    multi video to texture

    hi,
    I am writing a GL app to render multiple live video screams. What is the fastest way to do this?

    The code is multi-threaded. The GL rendering context and the video cap are in different threads. I found that the call glTexSubImage2D in the video cap thread has no effect (it doesn't update the video texture at all)

    If I only update the texture in the glutIdle call, then all the texture updates have to be serialized, not very efficient.

    What I really want is that once I get a new frame, I want to throw it into texture mem -- in a different thread.

    Any suggestions?

    I seem to recall that I can do this with directX, i.e. DirectX is thread safe. Is this true?


    thanks in advance.

    ruigang

  2. #2
    Senior Member OpenGL Guru
    Join Date
    Mar 2001
    Posts
    3,768

    Re: multi video to texture

    If I recall correctly, if you create a rendering context in Thread A, it can only be used in Thread A. You're probably going to need to do some tight synchronization between threads to pull this off.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •