The graphics device clears everything via at the beginning of each frame
and shows the render buffer on screen at the end of each frame via .
Clear Present View code on GitHub
Inheritance Hierarchy
DeltaEngine.Graphics Device
DeltaEngine.Graphics.BaseOpenGL11 OpenGL11Device
DeltaEngine.Graphics.BaseOpenGL20 OpenGL20Device
DeltaEngine.Graphics.Mocks MockDevice
DeltaEngine.Graphics.SharpDX SharpDXDevice
DeltaEngine.Graphics.SlimDX SlimDXDevice
DeltaEngine.Graphics.Xna XnaDevice
Namespace: DeltaEngine.Graphics
Assembly: DeltaEngine.Graphics (in DeltaEngine.Graphics.dll) Version: 1.1.1.0 (1.1.1)
Syntax
The Device type exposes the following members.
Constructors
Name | Description | |
---|---|---|
Device | Initializes a new instance of the Device class |
Methods
Name | Description | |
---|---|---|
Clear | ||
CreateCircularBuffer | ||
DisableCulling | ||
DisableDepthTest | ||
Dispose | Releases all resources used by the Device | |
EnableClockwiseBackfaceCulling | ||
EnableDepthTest | ||
OnFullscreenChanged | ||
Present | ||
Set2DMode | ||
Set3DMode | ||
SetBlendMode | ||
SetModelViewProjectionMatrixFor2D | ||
SetViewport |
Fields
Name | Description | |
---|---|---|
window |
Properties
Name | Description | |
---|---|---|
CameraInvertedViewMatrix | ||
CameraProjectionMatrix | ||
CameraViewMatrix | ||
CullingMode | ||
CurrentlyUsedShader | ||
ModelViewProjectionMatrix |
Events
Name | Description | |
---|---|---|
OnSet3DMode |
Remarks
Examples
[Test, ApproveFirstFrameScreenshot] public void DrawRedBackground() { Resolve<Window>().BackgroundColor = Color.Red; }
[Test] public void SizeChanged() { Resolve<Window>().ViewportPixelSize = new Size(200, 100); Assert.AreEqual(new Size(200, 100), Resolve<Window>().ViewportPixelSize); }
[Test, ApproveFirstFrameScreenshot] public void SetFullscreenModeToJustWindowWithoutDeviceAndShowRedBackground() { var settings = Resolve<Settings>(); settings.StartInFullscreen = true; // does not mean we really go fullscreen without device! Resolve<Window>().BackgroundColor = Color.Red; settings.StartInFullscreen = false; }
See Also