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

◆ CreateRenderTarget()

void Microsoft.Xna.Framework.Graphics.RenderTargetCube.CreateRenderTarget ( GraphicsDevice graphicsDevice,
int size,
[MarshalAs(UnmanagedType.U1)] bool mipMap,
SurfaceFormat preferredFormat,
DepthFormat preferredDepthFormat,
int preferredMultiSampleCount,
RenderTargetUsage usage )
inlinepackage

Definition at line 84 of file RenderTargetCube.cs.

85 {
86 if (graphicsDevice == null)
87 {
88 throw new ArgumentNullException("graphicsDevice", FrameworkResources.DeviceCannotBeNullOnResourceCreate);
89 }
90 graphicsDevice.Adapter.QueryFormat(isBackBuffer: false, graphicsDevice._deviceType, graphicsDevice._graphicsProfile, preferredFormat, preferredDepthFormat, preferredMultiSampleCount, out var selectedFormat, out var selectedDepthFormat, out var selectedMultiSampleCount);
91 TextureCube.ValidateCreationParameters(graphicsDevice._profileCapabilities, size, selectedFormat);
92 (helper = new RenderTargetHelper(this, size, size, selectedFormat, selectedDepthFormat, selectedMultiSampleCount, usage, graphicsDevice._profileCapabilities)).CreateSurfaces(graphicsDevice);
93 CreateTexture(graphicsDevice, size, mipMap, 1u, (_D3DPOOL)0, selectedFormat);
94 }
unsafe void CreateTexture(GraphicsDevice graphicsDevice, int size, [MarshalAs(UnmanagedType.U1)] bool mipMap, uint usage, _D3DPOOL pool, SurfaceFormat format)

References Microsoft.Xna.Framework.Graphics.GraphicsDevice._deviceType, Microsoft.Xna.Framework.Graphics.GraphicsDevice._graphicsProfile, Microsoft.Xna.Framework.Graphics.GraphicsDevice._profileCapabilities, Microsoft.Xna.Framework.Graphics.GraphicsDevice.Adapter, Microsoft.Xna.Framework.Graphics.TextureCube.CreateTexture(), Microsoft.Xna.Framework.FrameworkResources.DeviceCannotBeNullOnResourceCreate, Microsoft.Xna.Framework.Graphics.RenderTargetCube.helper, Microsoft.Xna.Framework.Graphics.GraphicsAdapter.QueryFormat(), and Microsoft.Xna.Framework.Graphics.TextureCube.ValidateCreationParameters().

Referenced by Microsoft.Xna.Framework.Graphics.RenderTargetCube.RenderTargetCube(), and Microsoft.Xna.Framework.Graphics.RenderTargetCube.RenderTargetCube().