示例#1
0
        internal static RenderTargetObject CreateSwapchainTarget(LightDevice device)
        {
            var ret = new RenderTargetObject(device);

            ret._type           = RenderTargetObjectType.SwapchainTarget;
            ret._isDepthStencil = false;
            ret.RebuildView();
            return(ret);
        }
示例#2
0
        internal static RenderTargetObject CreateTextureTarget(LightDevice device, int format)
        {
            var ret = new RenderTargetObject(device);

            ret._type           = RenderTargetObjectType.TextureTarget;
            ret._isDepthStencil = false;
            ret._formatTexture  = format;
            ret._formatTarget   = format;
            ret._formatResource = format;
            ret._textureObj     = new Texture2D(device, IntPtr.Zero, IntPtr.Zero, 0, 0, false);
            ret.RebuildView();
            return(ret);
        }
示例#3
0
        internal static RenderTargetObject CreateDepthStencilTarget(LightDevice device,
                                                                    int formatTexture, int formatTarget, int formatResource)
        {
            var ret = new RenderTargetObject(device);

            ret._type           = RenderTargetObjectType.TextureTarget;
            ret._isDepthStencil = true;
            ret._formatTexture  = formatTexture;
            ret._formatTarget   = formatTarget;
            ret._formatResource = formatResource;
            ret.RebuildView();
            return(ret);
        }