Esempio n. 1
0
    // Configures the layout of the video background (location on the screen
    // and size).
    public void SetVideoBackgroundConfig(VideoBGCfgData config)
    {
        IntPtr configPtr = Marshal.AllocHGlobal(
            Marshal.SizeOf(typeof(VideoBGCfgData)));

        Marshal.StructureToPtr(config, configPtr, true);
        rendererSetVideoBackgroundCfg(configPtr);
        Marshal.FreeHGlobal(configPtr);
    }
Esempio n. 2
0
    // Retrieves the current layout configuration of the video background.
    public VideoBGCfgData GetVideoBackgroundConfig()
    {
        IntPtr configPtr = Marshal.AllocHGlobal(
            Marshal.SizeOf(typeof(VideoBGCfgData)));

        rendererGetVideoBackgroundCfg(configPtr);
        VideoBGCfgData config = (VideoBGCfgData)Marshal.PtrToStructure
                                    (configPtr, typeof(VideoBGCfgData));

        Marshal.FreeHGlobal(configPtr);

        return(config);
    }
Esempio n. 3
0
 // Configures the layout of the video background (location on the screen
 // and size).
 public override void SetVideoBackgroundConfig(VideoBGCfgData config)
 {
     if (QCARRuntimeUtilities.IsPlayMode())
     {
         mVideoBGConfig = config;
         // remember the config has been set (checking for null not possible for structs)
         mVideoBGConfigSet = true;
     }
     else
     {
         IntPtr configPtr = Marshal.AllocHGlobal(
             Marshal.SizeOf(typeof(VideoBGCfgData)));
         Marshal.StructureToPtr(config, configPtr, true);
         QCARWrapper.Instance.RendererSetVideoBackgroundCfg(configPtr);
         Marshal.FreeHGlobal(configPtr);
     }
 }
Esempio n. 4
0
    // Retrieves the current layout configuration of the video background.
    public override VideoBGCfgData GetVideoBackgroundConfig()
    {
        if (QCARRuntimeUtilities.IsPlayMode())
        {
            return(mVideoBGConfig);
        }
        else
        {
            IntPtr configPtr = Marshal.AllocHGlobal(
                Marshal.SizeOf(typeof(VideoBGCfgData)));
            QCARWrapper.Instance.RendererGetVideoBackgroundCfg(configPtr);
            VideoBGCfgData config = (VideoBGCfgData)Marshal.PtrToStructure
                                        (configPtr, typeof(VideoBGCfgData));
            Marshal.FreeHGlobal(configPtr);

            return(config);
        }
    }
Esempio n. 5
0
 /// <summary>
 /// Configures the layout of the video background (location on the screen
 /// and size).
 /// </summary>
 public abstract void SetVideoBackgroundConfig(VideoBGCfgData config);
Esempio n. 6
0
 // Configures the layout of the video background (location on the screen
 // and size).
 public override void SetVideoBackgroundConfig(VideoBGCfgData config)
 {
     if (QCARRuntimeUtilities.IsPlayMode())
     {
         mVideoBGConfig = config;
         // remember the config has been set (checking for null not possible for structs)
         mVideoBGConfigSet = true;
     }
     else
     {
         IntPtr configPtr = Marshal.AllocHGlobal(
                             Marshal.SizeOf(typeof(VideoBGCfgData)));
         Marshal.StructureToPtr(config, configPtr, true);
         QCARWrapper.Instance.RendererSetVideoBackgroundCfg(configPtr);
         Marshal.FreeHGlobal(configPtr);
     }
 }
Esempio n. 7
0
 /// <summary>
 /// Configures the layout of the video background (location on the screen
 /// and size).
 /// </summary>
 public abstract void SetVideoBackgroundConfig(VideoBGCfgData config);
Esempio n. 8
0
	// Configures the layout of the video background (location on the screen
    // and size).
    public void SetVideoBackgroundConfig(VideoBGCfgData config)
    {
        IntPtr configPtr = Marshal.AllocHGlobal(
                            Marshal.SizeOf(typeof(VideoBGCfgData)));
        Marshal.StructureToPtr(config, configPtr, true);
        rendererSetVideoBackgroundCfg(configPtr);
        Marshal.FreeHGlobal(configPtr);
    }