-
Notifications
You must be signed in to change notification settings - Fork 28
1B67C1D3
Marcel Härtel edited this page Aug 27, 2023
·
2 revisions
This class mainly creates the GraphicsDevice and the SwapChainRenderTarget. It inherits from Control, which makes its childs available as a tool box control.
Namespace: MonoGame.Forms.NET.Controls
Assembly: MonoGame.Forms.NET (in MonoGame.Forms.NET.dll) Version: 3.2.0
C#
public abstract class GraphicsDeviceControl : Control
Inheritance | Object → MarshalByRefObject → Component → Control → GraphicsDeviceControl |
Derived |
MonoGame.Forms.NET.Controls.GameControl MonoGame.Forms.NET.Controls.InvalidationControl |
GraphicsDeviceControl | Initializes a new instance of the GraphicsDeviceControl class |
AlwaysEnableKeyboardInput | If enabled the Keyboard input will work even if the current control has no focus (mouse cursor is outside of the control). |
BackColor | Set the background color of this Control in the designer. |
Components | Get the GameComponentCollection. |
ForeColor | Set the foreground color of this Control in the designer. |
GraphicsProfile | Set the GraphicsProfile in the property grid during Design-Time (HiDef or Reach). You shouldn't change this during runtime! |
IsMouseInsideControl | Returns true when the mouse cursor is inside the control. |
Services | Get the GameServiceContainer. |
SwapChainRenderTarget | A swap chain used for rendering to a secondary GameWindow. Note: When working with different RenderTarget2D, you need to set the current render target back to the SwapChainRenderTarget as this is the real 'Back Buffer'. 'GraphicsDevice.SetRenderTarget(null)' will NOT work as you are doing usally in MonoGame. Instead use 'GraphicsDevice.SetRenderTarget(SwapChainRenderTarget)'. Otherwise you will see only a black control window. |
Dispose | Releases the unmanaged resources used by the GraphicsDeviceControl and optionally releases the managed resources (Overrides Control.Dispose(Boolean)) |
IsMouseInsideControlArea | Returns true when the mouse cursor is inside the specific area. |
OnClientSizeChanged |
(Overrides Control.OnClientSizeChanged(EventArgs)) |
OnCreateControl |
(Overrides Control.OnCreateControl()) |
OnMouseEnter |
(Overrides Control.OnMouseEnter(EventArgs)) |
OnMouseLeave |
(Overrides Control.OnMouseLeave(EventArgs)) |
OnMouseWheel |
(Overrides Control.OnMouseWheel(MouseEventArgs)) |
OnPaint |
(Overrides Control.OnPaint(PaintEventArgs)) |
OnPaintBackground |
(Overrides Control.OnPaintBackground(PaintEventArgs)) |
PaintUsingSystemDrawing | |
SetMultiSampleCount | Set the "MultiSampleCount" for Multi Sampled AntiAlising (MSAA). The input value will be automatically clamped to the nearest power of two in relation of what the users GraphicsDevice can handle. |
ComponentState | Subscribe to get Update and Draw event info for all GameComponents (IUpdatable, IDrawable). |
MultiSampleCountRefreshed | Subscribe to this event to react to MultiSampleCount changes in your custom controls. |
OnMouseWheelDownwards | Scroll the mouse wheel downwards to trigger this event. |
OnMouseWheelUpwards | Scroll the mouse wheel upwards to trigger this event. |
-
Welcome to MonoGame.Forms!
- MonoGame.Forms.NET Namespace
- MonoGame.Forms.NET.Components Namespace
- MonoGame.Forms.NET.Components.Interfaces Namespace
-
MonoGame.Forms.NET.Controls Namespace
- GameControl Class
- GraphicsDeviceControl Class
- GraphicsDeviceControl.MouseWheelDownwardsEvent Delegate
- GraphicsDeviceControl.MouseWheelUpwardsEvent Delegate
- InvalidationControl Class
- MonoGameControl Class
-
MonoGame.Forms.NET.Services Namespace
-
EditorService Class
- EditorService Constructor
-
EditorService Properties
- BackgroundColor Property
- Camera Property
- Content Property
- Font Property
- FontHeight Property
- FPSCounter Property
- GetAbsoluteMousePosition Property
- GetCurrentMultiSampleCount Property
- GetRelativeMousePosition Property
- GetRenderTargetManager Property
- GraphicsDevice Property
- Pixel Property
- ResourceContent Property
- spriteBatch Property
- SwapChainRenderTarget Property
-
EditorService Methods
- AddDefaultComponents Method
- BeginAntialising Method
- BeginCamera2D Method
- BeginRenderTarget Method
- CamMove Method
- CamRotate Method
- CamZoom Method
- DisableRenderTargets Method
- Dispose Method
- EndAntialising Method
- EndCamera2D Method
- EndRenderTarget Method
- GetCamRotation Method
- GetCamZoom Method
- RemoveAllComponents Method
- RemoveDefaultComponents Method
- ResetCam Method
- ResourceContentManagerInitialize Method
- EditorService Events
- EditorService.RenderTargetManager Class
- EditorService.RenderTargetManager.RenderTarget2DHelper Class
- InvalidationService Class
- MonoGameService Class
-
EditorService Class