Original Post
Hey,
I''m trying to write classes to render a movie using OpenGL and DirectShow. It''s working so far, except...
Each frame, while the movie is playing, I call a set of gl functions to update the gl texture with the current frame data. I can''t guarantee that the video stream has power-of-two sizes, so I call gluScaleImage(); then, build the texture with glTexImage2D(); then, fix a couple of parameters with glTexParameter().
When I run the app, the framerate drops pretty badly. I''m absolutely sure it''s the glScaleImage()/glTexImage()/glTexParameter() set of calls, because when I cut them out (just use the same texture as the previous loop) the framerate goes right back up again.
I would guess that it''s the glScaleImage() function which slows things down the most.
Is there any way that I can optimise this, or do I just have to ensure that video files are powers-of-two in sizes?
Thanks in advance.
Superpig
- saving pigs from untimely fates, and when he''s not doing that, runs The Binary Refinery.
