/// <summary> /// Creates the draw target cubemap. Note: Rendering resources will not be created until the first time the target is drawn or <see cref="Resource.Warm(IState)"/> is called /// </summary> public DrawTargetTextureCube(ICamera camera, int resolution, SurfaceFormat format, DepthFormat depthFormat, bool mipmap, PreferredMultiSampleLevel multisample, RenderTargetUsage usage) : this(camera, resolution, format, mipmap, multisample, usage) { this.depthFormat = depthFormat; if (this.depthFormat == DepthFormat.None) { this.ClearBuffer.ClearDepthEnabled = false; this.ClearBuffer.ClearStencilEnabled = false; } else { if (this.depthFormat != DepthFormat.Depth24Stencil8) this.ClearBuffer.ClearStencilEnabled = false; } SetHasDepth(); }
/// <summary> /// Creates the draw target cubemap. Note: Rendering resources will not be created until the first time the target is drawn or <see cref="Resource.Warm(IState)"/> is called /// </summary> /// <param name="camera"></param> /// <param name="resolution"></param> /// <param name="format"></param> /// <param name="mipmap"></param> /// <param name="multisample"></param> /// <param name="usage"></param> private DrawTargetTextureCube(ICamera camera, int resolution, SurfaceFormat format, bool mipmap, PreferredMultiSampleLevel multisample, RenderTargetUsage usage) : base(camera) { this.mipmap = mipmap; this.format = format; this.multisample = multisample; this.usage = usage; this.resolution = resolution; this.sizeAsVector = new Vector4((float)this.resolution, (float)this.resolution,0,0); }
private DrawTargetTexture2D(ICamera camera, int width, int height, SurfaceFormat format, bool mipmap, PreferredMultiSampleLevel multisample, RenderTargetUsage usage) : base(camera) { this.mipmap = mipmap; this.format = format; this.multisample = multisample; this.usage = usage; this.width = width; this.height = height; this.sizeAsVector = new Vector4((float)this.width, (float)this.height,0,0); }
/// <summary> /// Creates the draw target cubemap. Note: Rendering resources will not be created until the first time the target is drawn or <see cref="Resource.Warm(IState)"/> is called /// </summary> /// <param name="camera"></param> /// <param name="resolution"></param> /// <param name="format"></param> /// <param name="depthFormat"></param> /// <param name="mipmap"></param> /// <param name="multisample"></param> public DrawTargetTextureCube(ICamera camera, int resolution, SurfaceFormat format, DepthFormat depthFormat, bool mipmap, PreferredMultiSampleLevel multisample) : this(camera, resolution, format, depthFormat, mipmap, multisample, RenderTargetUsage.PlatformContents) { }
/// <summary> /// Creates the draw texture. Note: Rendering resources will not be created until the first time the target is drawn or <see cref="Resource.Warm(IState)"/> is called /// </summary> /// <param name="camera"></param> /// <param name="width"></param> /// <param name="height"></param> /// <param name="format"></param> /// <param name="depthFormat"></param> /// <param name="mipmap"></param> /// <param name="multisample"></param> public DrawTargetTexture2D(ICamera camera, int width, int height, SurfaceFormat format, DepthFormat depthFormat, bool mipmap, PreferredMultiSampleLevel multisample) : this(camera, width, height, format, depthFormat, mipmap, multisample, RenderTargetUsage.PlatformContents) { }