Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ CaptureCamera()

Terraria.Graphics.Capture.CaptureCamera.CaptureCamera ( GraphicsDevice graphics)
inline

Definition at line 87 of file CaptureCamera.cs.

88 {
89 CameraExists = true;
90 _graphics = graphics;
91 _spriteBatch = new SpriteBatch(graphics);
92 try
93 {
94 _frameBuffer = new RenderTarget2D(graphics, 2048, 2048, mipMap: false, graphics.PresentationParameters.BackBufferFormat, DepthFormat.None);
95 _filterFrameBuffer1 = new RenderTarget2D(graphics, 2048, 2048, mipMap: false, graphics.PresentationParameters.BackBufferFormat, DepthFormat.None);
96 _filterFrameBuffer2 = new RenderTarget2D(graphics, 2048, 2048, mipMap: false, graphics.PresentationParameters.BackBufferFormat, DepthFormat.None);
97 }
98 catch
99 {
100 Main.CaptureModeDisabled = true;
101 return;
102 }
104 }
static readonly SamplerState AnisotropicClamp

References Terraria.Graphics.Capture.CaptureCamera._downscaleSampleState, Terraria.Graphics.Capture.CaptureCamera._filterFrameBuffer1, Terraria.Graphics.Capture.CaptureCamera._filterFrameBuffer2, Terraria.Graphics.Capture.CaptureCamera._frameBuffer, Terraria.Graphics.Capture.CaptureCamera._graphics, Terraria.Graphics.Capture.CaptureCamera._spriteBatch, Microsoft.Xna.Framework.Graphics.SamplerState.AnisotropicClamp, Microsoft.Xna.Framework.Graphics.PresentationParameters.BackBufferFormat, Terraria.Graphics.Capture.CaptureCamera.CameraExists, and Microsoft.Xna.Framework.Graphics.GraphicsDevice.PresentationParameters.