Ejemplo n.º 1
0
 private ShaderMixinObjectId()
 {
     objectIdBuilder = new ObjectIdBuilder();
     buffer = Marshal.AllocHGlobal(65536);
     memStream = new NativeMemoryStream(buffer, 65536);
     writer = new HashSerializationWriter(memStream);
     writer.Context.SerializerSelector = new SerializerSelector("Default", "Hash");
 }
Ejemplo n.º 2
0
        private ShaderMixinObjectId()
        {
            objectIdBuilder = new ObjectIdBuilder();
            buffer = Marshal.AllocHGlobal(65536);
            memStream = new NativeMemoryStream(buffer, 65536);
            writer = new HashSerializationWriter(memStream);
            writer.Context.SerializerSelector = new SerializerSelector();
            writer.Context.SerializerSelector.RegisterProfile("Default");
            writer.Context.SerializerSelector.RegisterSerializer(new ParameterKeyHashSerializer());
            writer.Context.SerializerSelector.RegisterSerializer(new ParameterCollectionHashSerializer());

            if (parameters == null)
                parameters = new ParameterCollection();
        }