// 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); }
// 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); }
// 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); } }
// 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); } }
/// <summary> /// Configures the layout of the video background (location on the screen /// and size). /// </summary> public abstract void SetVideoBackgroundConfig(VideoBGCfgData config);
// 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); } }
/// <summary> /// Configures the layout of the video background (location on the screen /// and size). /// </summary> public abstract void SetVideoBackgroundConfig(VideoBGCfgData config);
// 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); }