Exemplo n.º 1
0
        public void Write(SubPatternStruct <TPattern> destination)
        {
            byte *srcPtr = InstancePtr, destPtr = destination.InstancePtr;

            for (int i = 0; i < StructInterpreter <TPattern> .PatternFieldCount; i++)
            {
                if (_structFieldOffsets[i] > 0 && destination._structFieldOffsets[i] > 0)
                {
                    MoveField(srcPtr + _structFieldOffsets[i], destPtr + destination._structFieldOffsets[i], i);
                }
            }
        }
Exemplo n.º 2
0
        public static void ChangeActiveShader(Type shaderType, IShader shader)
        {
            if (_activeShaderType == shaderType)
            {
                return;
            }

            SubPatternStruct <TPattern>[] inout = ShaderInterpreter <TStage, TPattern> .GetInterpretedInOut(shaderType);

            ActiveInputMap    = inout[0];
            ActiveOutputMap   = inout[1];
            _activeShader     = (TStage)shader;
            _activeShaderType = shaderType;
        }