private void SetOrClearRenderTextureCreationFlag(bool value, RenderTextureCreationFlags flag) { if (value) { this._flags |= flag; } else { this._flags &= ~flag; } }
public RenderTextureDescriptor(int width, int height, RenderTextureFormat colorFormat, int depthBufferBits) : this() { this.width = width; this.height = height; volumeDepth = 1; msaaSamples = 1; this.colorFormat = colorFormat; this.depthBufferBits = depthBufferBits; dimension = Rendering.TextureDimension.Tex2D; shadowSamplingMode = Rendering.ShadowSamplingMode.None; vrUsage = VRTextureUsage.None; _flags = RenderTextureCreationFlags.AutoGenerateMips | RenderTextureCreationFlags.AllowVerticalFlip; memoryless = RenderTextureMemoryless.None; }
public RenderTextureDescriptor(int width, int height, GraphicsFormat colorFormat, int depthBufferBits, int mipCount) : this() { _flags = RenderTextureCreationFlags.AutoGenerateMips | RenderTextureCreationFlags.AllowVerticalFlip; // Set before graphicsFormat to avoid erasing the flag set by graphicsFormat this.width = width; this.height = height; volumeDepth = 1; msaaSamples = 1; this.graphicsFormat = colorFormat; this.depthBufferBits = depthBufferBits; this.mipCount = mipCount; dimension = Rendering.TextureDimension.Tex2D; shadowSamplingMode = Rendering.ShadowSamplingMode.None; vrUsage = VRTextureUsage.None; memoryless = RenderTextureMemoryless.None; }
public RenderTextureDescriptor(int width, int height, RenderTextureFormat colorFormat, int depthBufferBits) { this = default(RenderTextureDescriptor); this.width = width; this.height = height; this.volumeDepth = 1; this.msaaSamples = 1; this.colorFormat = colorFormat; this.depthBufferBits = depthBufferBits; this.dimension = TextureDimension.Tex2D; this.shadowSamplingMode = ShadowSamplingMode.None; this.vrUsage = VRTextureUsage.None; this._flags = (RenderTextureCreationFlags.AutoGenerateMips | RenderTextureCreationFlags.AllowVerticalFlip); this.memoryless = RenderTextureMemoryless.None; }