protected override void Dispose( bool p_Disposing ) { if( m_GraphicsDeviceService != null ) { m_GraphicsDeviceService.Release( p_Disposing ); m_GraphicsDeviceService = null; } base.Dispose( p_Disposing ); }
public static GraphicsDeviceService AddReference( IntPtr p_WindowHandle, int p_Width, int p_Height) { if (Interlocked.Increment(ref m_ReferenceCount) == 1) { Instance = new GraphicsDeviceService( p_WindowHandle, p_Width, p_Height ); } return Instance; }
protected override void OnCreateControl( ) { if( !DesignMode ) { m_GraphicsDeviceService = GraphicsDeviceService.AddReference( Handle, ClientSize.Width, ClientSize.Height ); m_Services.AddService< IGraphicsDeviceService >( m_GraphicsDeviceService ); Initialise( ); } base.OnCreateControl( ); }