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 8 of 8

Thread: using DirectDraw output as an OpenGL texture

  1. #1
    Intern Contributor
    Join Date
    Apr 2003
    Location
    Turin, Italy
    Posts
    94

    using DirectDraw output as an OpenGL texture

    hi all,
    i hope it isn't OT. In case... sorry!!

    now I am working on an application that should grab the output of a web cam and use it to texture map a surface. The theory is clear:
    i get the pixmap and then i texsubimage2d it on a texture.
    now i have been modifing an app of that kind, but the video played on the texture eventually sloooows down to 2 fps...
    anyone knows where the problem may lay?

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

    Re: using DirectDraw output as an OpenGL texture

    Have you profiled the application? What does VTune say? Is it leaking memory? How about Purify, or BoundsChecker, or one of those other leak tools? It seems unlikely to be a bug in the OpenGL, although you can test it on another machine with another graphics card; if the problem still persists, it's likely in your code.
    "If you can't afford to do something right,
    you'd better make sure you can afford to do it wrong!"

  3. #3
    Senior Member OpenGL Pro
    Join Date
    Feb 2002
    Location
    Bonn, Germany
    Posts
    1,652

    Re: using DirectDraw output as an OpenGL texture

    You are most probably "leaking" texture objects, ie for each frame of video you generate a new texture object instead of reusing the "old" established texture object. So you clog up all your local video memory with now-unused textures, start spilling to AGP memory and eventually force the driver to do texture swapping.

    I could be wrong, but this would fit with your performance observations. Code please

  4. #4
    Member Regular Contributor
    Join Date
    Nov 2000
    Location
    Belmont, CA
    Posts
    254

    Re: using DirectDraw output as an OpenGL texture

    A leak sounds about right, but if you're using TexSubImage, it seems unlikely that you're leaking texture objects. Maybe you're leaking pixmaps, or the direct draw surfaces?

    Hard to tell without more details.

    -Won

  5. #5
    Advanced Member Frequent Contributor yooyo's Avatar
    Join Date
    Apr 2003
    Location
    Belgrade, Serbia
    Posts
    883

    Re: using DirectDraw output as an OpenGL texture

    Do google for DsVideoLib... This is all what you need.

    yooyo

  6. #6
    Intern Contributor
    Join Date
    Apr 2003
    Location
    Turin, Italy
    Posts
    94

    Re: using DirectDraw output as an OpenGL texture

    Originally posted by yooyo:
    Do google for DsVideoLib... This is all what you need.

    yooyo
    actually I am using dsvideolib.
    Again I hope not to fall too much OT, but can anyone point me a good OpenSource profiler? The only one i found was Nprof but it doesn't feel like a very robust product...

  7. #7
    Advanced Member Frequent Contributor yooyo's Avatar
    Join Date
    Apr 2003
    Location
    Belgrade, Serbia
    Posts
    883

    Re: using DirectDraw output as an OpenGL texture

    DsVideoLib work fine on my machine. I have test it with webcam, firewire camera and file source.

    yooyo

  8. #8
    Intern Contributor
    Join Date
    Apr 2003
    Location
    Turin, Italy
    Posts
    94

    Re: using DirectDraw output as an OpenGL texture

    Originally posted by yooyo:
    DsVideoLib work fine on my machine. I have test it with webcam, firewire camera and file source.

    yooyo
    hi yooyo,
    what kind of camera are you using? If i use a usb 1 webcam my app works fine, when i switch to a usb2 camera, it hangs. It sure looks like a driver problem, but no matter how much i struggle, i can't fix it... anyone has got ideas???

Posting Permissions

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