3 Replies Latest reply: Nov 19, 2012 2:25 AM by DaveProx RSS

    Premiere + OpenGL

    DaveProx

      Hello.

      I created a plugin in After Effects SDK CS6 (Adobe Forum members wrote that my plugin should work both in AE and Premiere).

      In AE my plugin works perfectly. In Premiere, when I don't use OpenGL and for example colorize footage everything is ok. When I use OpenGL my plugin crashes Premiere on the first line of OpenGL code...

      I don't know why. I read that Premier has multi-threading render but when I enable multi-threading render option in AE everything renders ok.

       

      How I use OpenGL:

      I create hidden OpenGL context, grab all the pixels and add them to the input pixels.

       

      Thanks in advance for answer.

      Dave

        • 1. Re: Premiere + OpenGL
          DaveProx Community Member

          Anybody? It drives me crazy that I can't run plugin with opengl in Premiere...

          However, my plugin works fine when I use dynamic link but this is just a workaround.

          • 2. Re: Premiere + OpenGL
            Zac Lam Adobe Employee

            Hi Dave,

             

            Here’s some helpful info from one of the Premiere Pro engineers:

             

            “Our multithreaded rendering isn't really the same as what AE does. They spawn multiple processes and will only call effects single threaded from each process. Premiere Pro has multithreaded rendering in a single process. A common approach for OpenGL plugins in PPro is to create a new single thread to serialize the calls onto.”

            • 3. Re: Premiere + OpenGL
              DaveProx Community Member

              Still can't make my plugin work in Premiere Pro CS6 using AE CS6 sdk...

               

              I recreated my plugin to only have local variables - it helped to solve some problems with AE multiprocessing rendering. Now, when I'm in the Render function in Premiere pro (Premiere doesn't support SmartRender) I call my function to create an OpenGL context in Objective-C, but it crashes every time... In AE it works great. So, here's my question:

              What do I have to do to avoid crashing? You wrote something about creating a new single thread - is there any help in AE SDK on how to do that or could you give me some tip about it? Also, when I create my hidden window with NSOpenGL context I use [[someContext openGLContext] makeCurrentContext] to draw something on it - should I somehow stop or disable Premiere Context? If so, how can I do that?