Пример #1
0
            public PerObjectConstantBufferBinding(int slot, D3DConstantBuffer constantBuffer, bool isVertexBuffer, bool isGeometryShader, bool isPixelShader)
            {
                Slot           = slot;
                ConstantBuffer = constantBuffer;
                ShaderStageApplicabilityFlags applicability = 0;

                if (isVertexBuffer)
                {
                    applicability |= ShaderStageApplicabilityFlags.Vertex;
                }
                if (isGeometryShader)
                {
                    applicability |= ShaderStageApplicabilityFlags.Geometry;
                }
                if (isPixelShader)
                {
                    applicability |= ShaderStageApplicabilityFlags.Fragment;
                }

                _applicability = applicability;
            }
Пример #2
0
            public GlobalConstantBufferBinding(int slot, BufferProviderPair pair, bool isLocalBinding, bool isVertexBuffer, bool isGeometryShader, bool isPixelShader)
            {
                Slot           = slot;
                Pair           = pair;
                IsLocalBinding = isLocalBinding;
                ShaderStageApplicabilityFlags applicability = 0;

                if (isVertexBuffer)
                {
                    applicability |= ShaderStageApplicabilityFlags.Vertex;
                }
                if (isGeometryShader)
                {
                    applicability |= ShaderStageApplicabilityFlags.Geometry;
                }
                if (isPixelShader)
                {
                    applicability |= ShaderStageApplicabilityFlags.Fragment;
                }

                _applicability = applicability;
            }