示例#1
0
 void Awake()
 {
     CVBridge.SetInteger(0, (int)w);
     CVBridge.SetInteger(1, (int)h);
     CVBridge.SetInteger(2, (int)wext);
     CVBridge.SetInteger(3, (int)hext);
     //CvBridgeDll.SetInteger(4, (int)Wt);
     //CvBridgeDll.SetInteger(5, (int)Ht);
 }
示例#2
0
    private IEnumerator CallPluginAtEndOfFrames()
    {
        while (true)
        {
            // Wait until all frame rendering is done
            yield return(new WaitForEndOfFrame());

            // Set time for the plugin
            //SetTimeFromUnity(Time.timeSinceLevelLoad);

            // Issue a plugin event with arbitrary integer identifier.
            // The plugin can distinguish between different
            // things it needs to do based on this ID.
            // For our simple plugin, it does not matter which ID we pass here.
            GL.IssuePluginEvent(CVBridge.GetRenderEventFunc(), 1);
        }
    }