/// <summary>
        /// Loads all resources.
        /// </summary>
        /// <param name="device">The device on which to load all resources.</param>
        /// <param name="resources">The current ResourceDictionary.</param>
        protected override void LoadResourceInternal(EngineDevice device, ResourceDictionary resources)
        {
            // Prepare texture
            m_texture = GraphicsHelper.CreateCpuWritableTexture(
                device, m_videoWidth, m_videoHeight);
            m_textureView = new D3D11.ShaderResourceView(device.DeviceD3D11_1, m_texture);

            // Read the thumbnail
            m_videoReader.SetCurrentPosition(m_thumbnailTimestamp);
            m_thumbnailFrame = m_videoReader.ReadFrame();
            m_thumbnailFrame.SetAllAlphaValuesToOne_ARGB();
        }
Пример #2
0
 /// <summary>
 /// Loads all resource.
 /// </summary>
 /// <param name="device">The device on which to load all resources.</param>
 /// <param name="resources">The current ResourceDictionary.</param>
 protected override void LoadResourceInternal(EngineDevice device, ResourceDictionary resources)
 {
     m_texture = GraphicsHelper.CreateCpuWritableTexture(
         device, m_currentWidth, m_currentHeight);
     m_textureView = new D3D11.ShaderResourceView(device.DeviceD3D11_1, m_texture);
 }