![]() |
Paradox Game Engine
v1.0.0 beta06
|
Performs primitive-based rendering, creates resources, handles system-level variables, adjusts gamma ramp levels, and creates shaders. See The+GraphicsDevice+class to learn more about the class. More...
Public Member Functions | |
void | Recreate (GraphicsAdapter adapter, GraphicsProfile[] profile, DeviceCreationFlags deviceCreationFlags, WindowHandle windowHandle) |
void | DrawQuad () |
Draws a full screen quad. An Effect must be applied before calling this method. More... | |
void | DrawTexture (Texture texture) |
Draws a fullscreen texture using a SamplerStateFactory.LinearClamp sampler. See Draw+a+texture to learn how to use it. More... | |
void | DrawTexture (Texture texture, SamplerState sampler) |
Draws a fullscreen texture using the specified sampler. See Draw+a+texture to learn how to use it. More... | |
void | DrawTexture (Texture texture, Color4 color) |
Draws a fullscreen texture using a SamplerStateFactory.LinearClamp sampler and the texture color multiplied by a custom color. See Draw+a+texture to learn how to use it. More... | |
void | DrawTexture (Texture texture, SamplerState sampler, Color4 color) |
Draws a fullscreen texture using the specified sampler and the texture color multiplied by a custom color. See Draw+a+texture to learn how to use it. More... | |
void | Present () |
Presents the current Presenter. More... | |
void | SetRenderTarget (DepthStencilBuffer depthStencilBuffer) |
Sets a new depthStencilBuffer to this GraphicsDevice. If there is any RenderTarget already bound, it will be unbinded. See Textures+and+render+targets to learn how to use it. More... | |
void | SetRenderTarget (RenderTarget renderTargetView) |
Binds a single render target to the output-merger stage. See Textures+and+render+targets to learn how to use it. More... | |
void | SetRenderTargets (params RenderTarget[] renderTargetViews) |
![]() | |
void | Dispose () |
override string | ToString () |
Static Public Member Functions | |
static GraphicsDevice | New (DeviceCreationFlags creationFlags=DeviceCreationFlags.None, params GraphicsProfile[] graphicsProfiles) |
Initializes a new instance of the GraphicsDevice class. More... | |
static GraphicsDevice | New (GraphicsAdapter adapter, DeviceCreationFlags creationFlags=DeviceCreationFlags.None, params GraphicsProfile[] graphicsProfiles) |
Initializes a new instance of the GraphicsDevice class. More... | |
static GraphicsDevice | New (GraphicsAdapter adapter, DeviceCreationFlags creationFlags=DeviceCreationFlags.None, WindowHandle windowHandle=null, params GraphicsProfile[] graphicsProfiles) |
Initializes a new instance of the GraphicsDevice class. More... | |
Public Attributes | |
GraphicsDeviceFeatures | Features |
Gets the features supported by this graphics device. More... | |
![]() | |
PropertyContainer | Tags |
Gets the attached properties to this component. More... | |
Static Public Attributes | |
static readonly int | ThreadCount = 1 |
Protected Member Functions | |
GraphicsDevice (GraphicsAdapter adapter, GraphicsProfile[] profile, DeviceCreationFlags deviceCreationFlags, WindowHandle windowHandle) | |
Initializes a new instance of the GraphicsDevice class. More... | |
override void | Destroy () |
Disposes of object resources. More... | |
![]() | |
ComponentBase () | |
Initializes a new instance of the ComponentBase class. More... | |
ComponentBase (string name) | |
Initializes a new instance of the ComponentBase class. More... | |
virtual void | OnNameChanged () |
Called when Name property was changed. More... | |
Properties | |
GraphicsAdapter | Adapter [get, set] |
Gets the adapter this instance is attached to. More... | |
RenderTarget | BackBuffer [get] |
Gets the back buffer sets by the current Presenter setup on this device. More... | |
BlendStateFactory | BlendStates [get, set] |
Gets the BlendStates factory. More... | |
DepthStencilBuffer | DepthStencilBuffer [get] |
Gets the depth stencil buffer sets by the current Presenter setup on this device. More... | |
DepthStencilStateFactory | DepthStencilStates [get, set] |
Gets the DepthStencilStateFactory factory. More... | |
bool | IsDebugMode [get, set] |
Gets a value indicating whether this instance is in debug mode. More... | |
bool | IsDeferred [get] |
Gets a value indicating whether this instance is a deferred graphics device context. More... | |
bool | IsProfilingSupported [get, set] |
Gets a value indicating whether this instance supports GPU markers and profiling. More... | |
ParameterCollection | Parameters [get] |
Gets the parameters attached to this particular device. This Parameters are used to override Effect parameters. More... | |
virtual GraphicsPresenter | Presenter [get, set] |
Gets or sets the current presenter use by the Present method. More... | |
RasterizerStateFactory | RasterizerStates [get, set] |
Gets the RasterizerStates factory. More... | |
GraphicsDevice | RootDevice [get, set] |
Gets the root device. More... | |
SamplerStateFactory | SamplerStates [get, set] |
Gets the SamplerStateFactory factory. More... | |
int | ThreadIndex [get, set] |
Gets or sets the index of the thread. More... | |
![]() | |
long | Id [get, set] |
string | Name [get, set] |
Gets or sets the name of this component. More... | |
bool | IsDisposed [get, set] |
Has the component been disposed or not yet. More... | |
![]() | |
long | Id [get] |
Gets the id of this component. More... | |
string | Name [get] |
Gets the name of this component. More... | |
![]() | |
int | ReferenceCount [get] |
Gets the reference count of this instance. More... | |
![]() | |
ObjectCollector | Collector [get] |
Gets the collector. More... | |
Events | |
EventHandler< EventArgs > | Disposing |
Occurs while this component is disposing and before it is disposed. More... | |
Performs primitive-based rendering, creates resources, handles system-level variables, adjusts gamma ramp levels, and creates shaders. See The+GraphicsDevice+class to learn more about the class.
Definition at line 15 of file GraphicsDevice.cs.
|
protected |
Initializes a new instance of the GraphicsDevice class.
adapter | The graphics adapter. |
profile | The graphics profile. |
deviceCreationFlags | The device creation flags. |
windowHandle | The window handle. |
Definition at line 51 of file GraphicsDevice.cs.
|
protectedvirtual |
Disposes of object resources.
Reimplemented from SiliconStudio.Core.ComponentBase.
Definition at line 94 of file GraphicsDevice.cs.
void SiliconStudio.Paradox.Graphics.GraphicsDevice.DrawQuad | ( | ) |
Draws a full screen quad. An Effect must be applied before calling this method.
Definition at line 313 of file GraphicsDevice.cs.
void SiliconStudio.Paradox.Graphics.GraphicsDevice.DrawTexture | ( | Texture | texture | ) |
Draws a fullscreen texture using a SamplerStateFactory.LinearClamp sampler. See Draw+a+texture to learn how to use it.
texture | The texture. Expecting an instance of Texture2D. |
Definition at line 322 of file GraphicsDevice.cs.
References SiliconStudio.Core.Mathematics.Color4.White.
void SiliconStudio.Paradox.Graphics.GraphicsDevice.DrawTexture | ( | Texture | texture, |
SamplerState | sampler | ||
) |
Draws a fullscreen texture using the specified sampler. See Draw+a+texture to learn how to use it.
texture | The texture. Expecting an instance of Texture2D. |
sampler | The sampler. |
Definition at line 332 of file GraphicsDevice.cs.
References SiliconStudio.Core.Mathematics.Color4.White.
Draws a fullscreen texture using a SamplerStateFactory.LinearClamp sampler and the texture color multiplied by a custom color. See Draw+a+texture to learn how to use it.
texture | The texture. Expecting an instance of Texture2D. |
color | The color. |
Definition at line 343 of file GraphicsDevice.cs.
void SiliconStudio.Paradox.Graphics.GraphicsDevice.DrawTexture | ( | Texture | texture, |
SamplerState | sampler, | ||
Color4 | color | ||
) |
Draws a fullscreen texture using the specified sampler and the texture color multiplied by a custom color. See Draw+a+texture to learn how to use it.
texture | The texture. Expecting an instance of Texture2D. |
sampler | The sampler. |
color | The color. |
Definition at line 355 of file GraphicsDevice.cs.
|
static |
Initializes a new instance of the GraphicsDevice class.
creationFlags | The creation flags. |
graphicsProfiles | The graphics profiles. |
Definition at line 280 of file GraphicsDevice.cs.
References SiliconStudio.Paradox.Graphics.GraphicsAdapterFactory.Default.
|
static |
Initializes a new instance of the GraphicsDevice class.
adapter | The adapter. |
creationFlags | The creation flags. |
graphicsProfiles | The graphics profiles. |
Definition at line 292 of file GraphicsDevice.cs.
References SiliconStudio.Paradox.Graphics.GraphicsAdapterFactory.Default.
|
static |
Initializes a new instance of the GraphicsDevice class.
adapter | The adapter. |
creationFlags | The creation flags. |
windowHandle | The window handle. |
graphicsProfiles | The graphics profiles. |
Definition at line 305 of file GraphicsDevice.cs.
References SiliconStudio.Paradox.Graphics.GraphicsAdapterFactory.Default.
void SiliconStudio.Paradox.Graphics.GraphicsDevice.Present | ( | ) |
Presents the current Presenter.
Definition at line 363 of file GraphicsDevice.cs.
void SiliconStudio.Paradox.Graphics.GraphicsDevice.Recreate | ( | GraphicsAdapter | adapter, |
GraphicsProfile[] | profile, | ||
DeviceCreationFlags | deviceCreationFlags, | ||
WindowHandle | windowHandle | ||
) |
Definition at line 67 of file GraphicsDevice.cs.
void SiliconStudio.Paradox.Graphics.GraphicsDevice.SetRenderTarget | ( | DepthStencilBuffer | depthStencilBuffer | ) |
Sets a new depthStencilBuffer to this GraphicsDevice. If there is any RenderTarget already bound, it will be unbinded. See Textures+and+render+targets to learn how to use it.
depthStencilBuffer | The depth stencil. |
Definition at line 375 of file GraphicsDevice.cs.
void SiliconStudio.Paradox.Graphics.GraphicsDevice.SetRenderTarget | ( | RenderTarget | renderTargetView | ) |
Binds a single render target to the output-merger stage. See Textures+and+render+targets to learn how to use it.
renderTargetView | A view of the render target to bind. |
Definition at line 384 of file GraphicsDevice.cs.
void SiliconStudio.Paradox.Graphics.GraphicsDevice.SetRenderTargets | ( | params RenderTarget[] | renderTargetViews | ) |
Bind one or more render targets atomically and the depth-stencil buffer to the output-merger stage. See Textures+and+render+targets to learn how to use it.
renderTargetViews | A set of render target views to bind. |
Definition at line 393 of file GraphicsDevice.cs.
GraphicsDeviceFeatures SiliconStudio.Paradox.Graphics.GraphicsDevice.Features |
Gets the features supported by this graphics device.
Definition at line 27 of file GraphicsDevice.cs.
Referenced by SiliconStudio.Paradox.Effects.Modules.Renderers.CubemapRenderer.CubemapRenderer(), and SiliconStudio.Paradox.Graphics.GeometricPrimitive< T >.GeometricPrimitive().
|
static |
Definition at line 17 of file GraphicsDevice.cs.
|
getset |
Gets the adapter this instance is attached to.
Definition at line 130 of file GraphicsDevice.cs.
|
get |
Gets the back buffer sets by the current Presenter setup on this device.
The back buffer. The returned value may be null if no GraphicsPresenter are setup on this device.
Definition at line 139 of file GraphicsDevice.cs.
Referenced by SiliconStudio.Paradox.Games.GameBase.Draw(), SiliconStudio.Paradox.UI.UISystem.Initialize(), SiliconStudio.Paradox.Game.Initialize(), SiliconStudio.Paradox.Effects.BackgroundRenderer.OnRendering(), and SiliconStudio.Paradox.Graphics.Regression.GraphicsTestBase.SaveBackBuffer().
|
getset |
Gets the BlendStates factory.
The BlendStates factory.
Definition at line 152 of file GraphicsDevice.cs.
Referenced by SiliconStudio.Paradox.Effects.SpriteRenderer.OnRendering().
|
get |
Gets the depth stencil buffer sets by the current Presenter setup on this device.
The depth stencil buffer. The returned value may be null if no GraphicsPresenter are setup on this device or no depth buffer was allocated.
Definition at line 161 of file GraphicsDevice.cs.
Referenced by SiliconStudio.Paradox.Effects.MainPlugin.Initialize().
|
getset |
Gets the DepthStencilStateFactory factory.
The DepthStencilStateFactory factory.
Definition at line 174 of file GraphicsDevice.cs.
Referenced by SiliconStudio.Paradox.Effects.RenderTargetsPlugin.Load().
|
getset |
Gets a value indicating whether this instance is in debug mode.
true
if this instance is debug; otherwise, false
.
Definition at line 182 of file GraphicsDevice.cs.
|
get |
Gets a value indicating whether this instance is a deferred graphics device context.
true
if this instance is deferred; otherwise, false
.
Definition at line 191 of file GraphicsDevice.cs.
Referenced by SiliconStudio.Paradox.Graphics.BatchBase< TDrawInfo >.PrepareForRendering().
|
getset |
Gets a value indicating whether this instance supports GPU markers and profiling.
Definition at line 201 of file GraphicsDevice.cs.
|
get |
Gets the parameters attached to this particular device. This Parameters are used to override Effect parameters.
The parameters used to override all effects.
Definition at line 208 of file GraphicsDevice.cs.
|
getset |
Gets or sets the current presenter use by the Present method.
The current presenter.
Definition at line 220 of file GraphicsDevice.cs.
Referenced by SiliconStudio.Paradox.Games.GraphicsDeviceManager.Destroy().
|
getset |
Gets the RasterizerStates factory.
The RasterizerStates factory.
Definition at line 244 of file GraphicsDevice.cs.
|
getset |
|
getset |
Gets the SamplerStateFactory factory.
The SamplerStateFactory factory.
Definition at line 258 of file GraphicsDevice.cs.
|
getset |
Gets or sets the index of the thread.
The index of the thread.
Definition at line 264 of file GraphicsDevice.cs.
EventHandler<EventArgs> SiliconStudio.Paradox.Graphics.GraphicsDevice.Disposing |
Occurs while this component is disposing and before it is disposed.
Definition at line 115 of file GraphicsDevice.cs.