コード例 #1
0
ファイル: ShaderMixinObjectId.cs プロジェクト: cg123/xenko
 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");
 }
コード例 #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();
        }