Esempio n. 1
0
    IEnumerator Start()
    {
        m_dllInterface = new OpenCVDllInterface();
        m_frameInfo    = new OpenCVDllInterface.FrameInfo();

        m_eventCallback = new eventCallbackDelegate(m_dllInterface.updateFrameDataOGL);

        m_dllInterface.getFrameBufferInfo(m_frameInfo);


        m_texture            = new Texture2D(m_frameInfo.width, m_frameInfo.height, TextureFormat.RGB24, false);
        m_texture.filterMode = FilterMode.Point;
        m_texture.Apply();
        m_material.mainTexture = m_texture;

        m_dllInterface.setTextureHandle(m_texture.GetNativeTexturePtr());

        yield return(StartCoroutine("CallPluginAtEndOfFrames"));
    }
Esempio n. 2
0
 void OnDestroy()
 {
     StopCoroutine("CallPluginAtEndOfFrames");
     m_dllInterface.Dispose();
     m_dllInterface = null;
 }