Пример #1
0
        internal EffectPass(Effect effect,
                            string name,
                            Shader vertexShader,
                            Shader pixelShader,
                            BlendState blendState,
                            DepthStencilState depthStencilState,
                            RasterizerState rasterizerState,
                            EffectAnnotationCollection annotations)
        {
            Debug.Assert(effect != null, "Got a null effect!");
            Debug.Assert(annotations != null, "Got a null annotation collection!");

            _effect = effect;

            Name = name;

            _vertexShader = vertexShader;
            _pixelShader  = pixelShader;

            _blendState        = blendState;
            _depthStencilState = depthStencilState;
            _rasterizerState   = rasterizerState;

            Annotations = annotations;
        }
Пример #2
0
        internal EffectParameter(EffectParameterClass class_,
                                 EffectParameterType type,
                                 string name,
                                 int rowCount,
                                 int columnCount,
                                 string semantic,
                                 EffectAnnotationCollection annotations,
                                 EffectParameterCollection elements,
                                 EffectParameterCollection structMembers,
                                 object data)
        {
            ParameterClass = class_;
            ParameterType  = type;

            Name        = name;
            Semantic    = semantic;
            Annotations = annotations;

            RowCount    = rowCount;
            ColumnCount = columnCount;

            Elements         = elements;
            StructureMembers = structMembers;

            Data     = data;
            StateKey = unchecked (NextStateKey++);
        }
Пример #3
0
        internal EffectPass(Effect effect, EffectPass cloneSource)
        {
            Debug.Assert(effect != null, "Got a null effect!");
            Debug.Assert(cloneSource != null, "Got a null cloneSource!");

            _effect = effect;

            // Share all the immutable types.
            Name               = cloneSource.Name;
            _blendState        = cloneSource._blendState;
            _depthStencilState = cloneSource._depthStencilState;
            _rasterizerState   = cloneSource._rasterizerState;
            Annotations        = cloneSource.Annotations;
            _vertexShader      = cloneSource._vertexShader;
            _pixelShader       = cloneSource._pixelShader;
        }