Quote:
Originally Posted by Gavino
Incidentally, the reason I was so quick to spot this issue (and the previous one) is that I am working on something similar (without Lua) for my own purposes, and I had already made a similar change (create the context only once) in my own code.
|
It's mysterious that for every frame in avisynth the same context has to be make the current again. You know why?
Quote:
Originally Posted by Gavino
Other points which you might find helpful:
- Some graphics cards/drivers (like my laptop!) will not render to an invisible window. You can use a pbuffer context (where supported) to avoid this problem.
|
Never heard of such a case. Know PBOs but weren't needed until know (slower than standard). Maybe add to next version with VBOs.
Quote:
Originally Posted by Gavino
- Instead of copying to and from an intermediate buffer when passing pixel data between Avisynth and OpenGL, you can use glPixelStorei(GL_[UN]PACK_ROW_LENGTH, pitch/4) with a format of GL_BGRA_EXT in glReadPixels and glDrawPixels. (This probably makes your PixelHandler class redundant.)
|
The BGRA format is an official part of OpenGL 1.2, so i'd chosen the way by swapping RGBA because of my old PC (without graphic card) didn't support it + won't become much faster.