コード例 #1
0
        /// <summary>
        /// Initializes a <see cref="DeviceContext10">Direct3D10 device context</see> according to the specified settings.
        /// The base class retains ownership of the context and will dispose of it when appropriate.
        /// </summary>
        /// <param name="settings">The settings.</param>
        /// <returns>The initialized device context.</returns>
        protected void InitializeDevice(DeviceSettings10 settings)
        {
            var result = new DeviceContext10(_form.Handle, settings);

            userInterfaceRenderer = new UserInterfaceRenderer10(result.Device, settings.Width, settings.Height);
            apiContext            = result;
            Context10             = result;
        }
コード例 #2
0
ファイル: Sample.cs プロジェクト: zhandb/slimdx
 /// <summary>
 /// Initializes a <see cref="DeviceContext10">Direct3D10 device context</see> according to the specified settings.
 /// The base class retains ownership of the context and will dispose of it when appropriate.
 /// </summary>
 /// <param name="settings">The settings.</param>
 /// <returns>The initialized device context.</returns>
 protected void InitializeDevice( DeviceSettings10 settings ) {
     var result = new DeviceContext10( _form.Handle, settings );
     userInterfaceRenderer = new UserInterfaceRenderer10( result.Device, settings.Width, settings.Height );
     apiContext = result;
     Context10 = result;
 }