Ejemplo n.º 1
0
            public void SetSamplers(DomainShaderType shaderType, int slot, SamplerState[] samplers)
            {
                if (slot < 0)
                {
                    return;
                }
                int  idx        = SamplerCheckDomainShaderStartIdx + slot;
                bool needUpdate = false;

                for (int i = 0; i < samplers.Length; ++i)
                {
                    if (SamplerStateCheck[idx + i] != samplers[i])
                    {
                        needUpdate = true;
                        break;
                    }
                }
                if (needUpdate)
                {
                    for (int i = 0; i < samplers.Length; ++i)
                    {
                        SamplerStateCheck[idx + i] = samplers[i];
                    }
                    deviceContext.DomainShader.SetSamplers(slot, samplers);
                }
            }
Ejemplo n.º 2
0
 public void SetShaderResources(DomainShaderType shaderType, int slot, ShaderResourceView[] texture)
 {
     if (slot < 0)
     {
         return;
     }
     deviceContext.DomainShader.SetShaderResources(slot, texture);
 }
Ejemplo n.º 3
0
 public void SetSamplers(DomainShaderType shaderType, int slot, SamplerState[] samplers)
 {
     if (slot < 0)
     {
         return;
     }
     deviceContext.DomainShader.SetSamplers(slot, samplers);
 }
Ejemplo n.º 4
0
            public void SetSampler(DomainShaderType shaderType, int slot, SamplerState sampler)
            {
                if (slot < 0)
                {
                    return;
                }
                int idx = SamplerCheckDomainShaderStartIdx + slot;

                if (SamplerStateCheck[idx] != sampler)
                {
                    SamplerStateCheck[idx] = sampler;
                    deviceContext.DomainShader.SetSampler(slot, sampler);
                }
            }
Ejemplo n.º 5
0
 public DomainShader GetShader(DomainShaderType type)
 {
     return(DomainShader);
 }
Ejemplo n.º 6
0
 public SamplerState[] GetSampler(DomainShaderType shaderType, int startSlot, int num)
 {
     return(deviceContext.DomainShader.GetSamplers(startSlot, num));
 }
Ejemplo n.º 7
0
 public ShaderResourceView[] GetShaderResources(DomainShaderType shaderType, int startSlot, int num)
 {
     return(deviceContext.DomainShader.GetShaderResources(startSlot, num));
 }