Beispiel #1
0
            public void SetSamplers(HullShaderType shaderType, int slot, SamplerState[] samplers)
            {
                if (slot < 0)
                {
                    return;
                }
                int  idx        = SamplerCheckHullShaderStartIdx + 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.HullShader.SetSamplers(slot, samplers);
                }
            }
Beispiel #2
0
 public void SetShaderResources(HullShaderType shaderType, int slot, ShaderResourceView[] texture)
 {
     if (slot < 0)
     {
         return;
     }
     deviceContext.HullShader.SetShaderResources(slot, texture);
 }
Beispiel #3
0
            public void SetSampler(HullShaderType shaderType, int slot, SamplerState sampler)
            {
                if (slot < 0)
                {
                    return;
                }
                int idx = SamplerCheckHullShaderStartIdx + slot;

                if (SamplerStateCheck[idx] != sampler)
                {
                    SamplerStateCheck[idx] = sampler;
                    deviceContext.HullShader.SetSampler(slot, sampler);
                }
            }
Beispiel #4
0
 public HullShader GetShader(HullShaderType type)
 {
     return(HullShader);
 }
Beispiel #5
0
 public SamplerState[] GetSampler(HullShaderType shaderType, int startSlot, int num)
 {
     return(deviceContext.HullShader.GetSamplers(startSlot, num));
 }
Beispiel #6
0
 public ShaderResourceView[] GetShaderResources(HullShaderType shaderType, int startSlot, int num)
 {
     return(deviceContext.HullShader.GetShaderResources(startSlot, num));
 }