Example #1
0
                public void SetValue(Matrix[] matrices)
                {
                    if (_protogameParameterSet._locked)
                    {
                        throw new InvalidOperationException(
                                  "The effect parameter set is locked because it has been assigned to a " +
                                  "render request.  Create a new parameter set instead of modifying this one.");
                    }

                    _matrices       = matrices;
                    _valueStateHash = _matrices.GetHashCode() ^ 397;
                    InternalType    = ProtogameEffectWriteableParameterInternalType.MatrixArray;
                }
Example #2
0
                public void SetValue(Color color)
                {
                    if (_protogameParameterSet._locked)
                    {
                        throw new InvalidOperationException(
                                  "The effect parameter set is locked because it has been assigned to a " +
                                  "render request.  Create a new parameter set instead of modifying this one.");
                    }

                    _vector4        = color.ToVector4();
                    _valueStateHash = _vector4.GetHashCode() ^ 397;
                    InternalType    = ProtogameEffectWriteableParameterInternalType.Vector4;
                }
Example #3
0
                public void SetValue(Texture2D texture)
                {
                    if (_protogameParameterSet._locked)
                    {
                        throw new InvalidOperationException(
                                  "The effect parameter set is locked because it has been assigned to a " +
                                  "render request.  Create a new parameter set instead of modifying this one.");
                    }

                    _texture2D      = texture;
                    _valueStateHash = _texture2D.GetHashCode() ^ 397;
                    InternalType    = ProtogameEffectWriteableParameterInternalType.Texture2D;
                }