Paradox Game Engine  v1.0.0 beta06
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros Pages
SiliconStudio.Paradox.Graphics.GraphicsDevice Class Reference

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...

Inheritance diagram for SiliconStudio.Paradox.Graphics.GraphicsDevice:
SiliconStudio.Core.ComponentBase SiliconStudio.Core.IComponent SiliconStudio.Core.ICollectorHolder SiliconStudio.Core.IReferencable SiliconStudio.Core.IReferencable

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)
 
- Public Member Functions inherited from SiliconStudio.Core.ComponentBase
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...
 
- Public Attributes inherited from SiliconStudio.Core.ComponentBase
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...
 
- Protected Member Functions inherited from SiliconStudio.Core.ComponentBase
 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...
 
- Properties inherited from SiliconStudio.Core.ComponentBase
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...
 
- Properties inherited from SiliconStudio.Core.IComponent
long Id [get]
 Gets the id of this component. More...
 
string Name [get]
 Gets the name of this component. More...
 
- Properties inherited from SiliconStudio.Core.IReferencable
int ReferenceCount [get]
 Gets the reference count of this instance. More...
 
- Properties inherited from SiliconStudio.Core.ICollectorHolder
ObjectCollector Collector [get]
 Gets the collector. More...
 

Events

EventHandler< EventArgsDisposing
 Occurs while this component is disposing and before it is disposed. More...
 

Detailed Description

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.

Constructor & Destructor Documentation

SiliconStudio.Paradox.Graphics.GraphicsDevice.GraphicsDevice ( GraphicsAdapter  adapter,
GraphicsProfile[]  profile,
DeviceCreationFlags  deviceCreationFlags,
WindowHandle  windowHandle 
)
protected

Initializes a new instance of the GraphicsDevice class.

Parameters
adapterThe graphics adapter.
profileThe graphics profile.
deviceCreationFlagsThe device creation flags.
windowHandleThe window handle.

Definition at line 51 of file GraphicsDevice.cs.

Member Function Documentation

override void SiliconStudio.Paradox.Graphics.GraphicsDevice.Destroy ( )
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.

Parameters
textureThe 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.

Parameters
textureThe texture. Expecting an instance of Texture2D.
samplerThe sampler.

Definition at line 332 of file GraphicsDevice.cs.

References SiliconStudio.Core.Mathematics.Color4.White.

void SiliconStudio.Paradox.Graphics.GraphicsDevice.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.

Parameters
textureThe texture. Expecting an instance of Texture2D.
colorThe 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.

Parameters
textureThe texture. Expecting an instance of Texture2D.
samplerThe sampler.
colorThe color.

Definition at line 355 of file GraphicsDevice.cs.

static GraphicsDevice SiliconStudio.Paradox.Graphics.GraphicsDevice.New ( DeviceCreationFlags  creationFlags = DeviceCreationFlags.None,
params GraphicsProfile[]  graphicsProfiles 
)
static

Initializes a new instance of the GraphicsDevice class.

Parameters
creationFlagsThe creation flags.
graphicsProfilesThe graphics profiles.
Returns
An instance of GraphicsDevice

Definition at line 280 of file GraphicsDevice.cs.

References SiliconStudio.Paradox.Graphics.GraphicsAdapterFactory.Default.

static GraphicsDevice SiliconStudio.Paradox.Graphics.GraphicsDevice.New ( GraphicsAdapter  adapter,
DeviceCreationFlags  creationFlags = DeviceCreationFlags.None,
params GraphicsProfile[]  graphicsProfiles 
)
static

Initializes a new instance of the GraphicsDevice class.

Parameters
adapterThe adapter.
creationFlagsThe creation flags.
graphicsProfilesThe graphics profiles.
Returns
An instance of GraphicsDevice

Definition at line 292 of file GraphicsDevice.cs.

References SiliconStudio.Paradox.Graphics.GraphicsAdapterFactory.Default.

static GraphicsDevice SiliconStudio.Paradox.Graphics.GraphicsDevice.New ( GraphicsAdapter  adapter,
DeviceCreationFlags  creationFlags = DeviceCreationFlags.None,
WindowHandle  windowHandle = null,
params GraphicsProfile[]  graphicsProfiles 
)
static

Initializes a new instance of the GraphicsDevice class.

Parameters
adapterThe adapter.
creationFlagsThe creation flags.
windowHandleThe window handle.
graphicsProfilesThe graphics profiles.
Returns
An instance of GraphicsDevice

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.

Parameters
depthStencilBufferThe 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.

Parameters
renderTargetViewA 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.

Parameters
renderTargetViewsA set of render target views to bind.

Definition at line 393 of file GraphicsDevice.cs.

Member Data Documentation

GraphicsDeviceFeatures SiliconStudio.Paradox.Graphics.GraphicsDevice.Features
readonly int SiliconStudio.Paradox.Graphics.GraphicsDevice.ThreadCount = 1
static

Definition at line 17 of file GraphicsDevice.cs.

Property Documentation

GraphicsAdapter SiliconStudio.Paradox.Graphics.GraphicsDevice.Adapter
getset

Gets the adapter this instance is attached to.

Definition at line 130 of file GraphicsDevice.cs.

RenderTarget SiliconStudio.Paradox.Graphics.GraphicsDevice.BackBuffer
get
BlendStateFactory SiliconStudio.Paradox.Graphics.GraphicsDevice.BlendStates
getset

Gets the BlendStates factory.

The BlendStates factory.

Definition at line 152 of file GraphicsDevice.cs.

Referenced by SiliconStudio.Paradox.Effects.SpriteRenderer.OnRendering().

DepthStencilBuffer SiliconStudio.Paradox.Graphics.GraphicsDevice.DepthStencilBuffer
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().

DepthStencilStateFactory SiliconStudio.Paradox.Graphics.GraphicsDevice.DepthStencilStates
getset
bool SiliconStudio.Paradox.Graphics.GraphicsDevice.IsDebugMode
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.

bool SiliconStudio.Paradox.Graphics.GraphicsDevice.IsDeferred
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().

bool SiliconStudio.Paradox.Graphics.GraphicsDevice.IsProfilingSupported
getset

Gets a value indicating whether this instance supports GPU markers and profiling.

Definition at line 201 of file GraphicsDevice.cs.

ParameterCollection SiliconStudio.Paradox.Graphics.GraphicsDevice.Parameters
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.

virtual GraphicsPresenter SiliconStudio.Paradox.Graphics.GraphicsDevice.Presenter
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().

RasterizerStateFactory SiliconStudio.Paradox.Graphics.GraphicsDevice.RasterizerStates
getset

Gets the RasterizerStates factory.

The RasterizerStates factory.

Definition at line 244 of file GraphicsDevice.cs.

GraphicsDevice SiliconStudio.Paradox.Graphics.GraphicsDevice.RootDevice
getset

Gets the root device.

The root device.

Definition at line 250 of file GraphicsDevice.cs.

SamplerStateFactory SiliconStudio.Paradox.Graphics.GraphicsDevice.SamplerStates
getset

Gets the SamplerStateFactory factory.

The SamplerStateFactory factory.

Definition at line 258 of file GraphicsDevice.cs.

int SiliconStudio.Paradox.Graphics.GraphicsDevice.ThreadIndex
getset

Gets or sets the index of the thread.

The index of the thread.

Definition at line 264 of file GraphicsDevice.cs.

Event Documentation

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.


The documentation for this class was generated from the following file: