25 using SiliconStudio.Core;
26 using SiliconStudio.Core.ReferenceCounting;
28 namespace SiliconStudio.
Paradox.Graphics
48 Description = presentationParameters.Clone();
50 DefaultViewport =
new Viewport(0, 0, Description.BackBufferWidth, Description.BackBufferHeight);
53 CreateDepthStencilBuffer();
70 public Viewport DefaultViewport {
get;
protected set; }
84 return depthStencilBuffer;
89 depthStencilBuffer = value;
97 public abstract object NativePresenter {
get; }
104 public abstract bool IsFullScreen {
get; set; }
112 get {
return Description.PresentationInterval; }
113 set { Description.PresentationInterval = value; }
119 public abstract void Present();
128 Description.BackBufferWidth = width;
129 Description.BackBufferHeight = height;
130 Description.BackBufferFormat =
format;
132 DefaultViewport =
new Viewport(0, 0, Description.BackBufferWidth, Description.BackBufferHeight);
134 ResizeBackBuffer(width, height, format);
135 ResizeDepthStencilBuffer(width, height, format);
138 protected abstract void ResizeBackBuffer(
int width,
int height,
PixelFormat format);
140 protected abstract void ResizeDepthStencilBuffer(
int width,
int height,
PixelFormat format);
146 depthStencilBuffer.Texture.ReleaseInternal();
147 depthStencilBuffer.RemoveKeepAliveBy(
this);
171 if (Description.DepthStencilFormat ==
PixelFormat.None)
175 var depthTexture = Texture2D.New(
GraphicsDevice, Description.BackBufferWidth, Description.BackBufferHeight, Description.DepthStencilFormat, TextureFlags.DepthStencil | TextureFlags.ShaderResource).KeepAliveBy(
this);
A renderable texture view.
void Resize(int width, int height, PixelFormat format)
Resizes the current presenter, by resizing the back buffer and the depth stencil buffer.
void ReleaseCurrentDepthStencilBuffer()
Base class for a framework component.
virtual void CreateDepthStencilBuffer()
Creates the depth stencil buffer.
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.
This class is a frontend to SwapChain and SwapChain1.
Defines the window dimensions of a render-target surface onto which a 3D volume projects.
GraphicsPresenter(GraphicsDevice device, PresentationParameters presentationParameters)
Initializes a new instance of the GraphicsPresenter class.
virtual void OnRecreated()
Called when [recreated].
PresentInterval
Defines flags that describe the relationship between the adapter refresh rate and the rate at which P...
virtual void OnDestroyed()
Called when [destroyed].
_In_ size_t _In_ size_t _In_ DXGI_FORMAT format
PixelFormat
Defines various types of pixel formats.
Describess how data will be displayed to the screen.