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?
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.
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
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.
Do google for DsVideoLib… This is all what you need.
DsVideoLib work fine on my machine. I have test it with webcam, firewire camera and file source.