Ejemplo n.º 1
0
 protected void WriteProperty(string key, TextureElem value)
 {
     if (value != null)
     {
         scope.WriteKeyValue(key, value.Uuid);
     }
 }
Ejemplo n.º 2
0
        void RegisterTexture(TextureContainer n)
        {
            // create image
            var imageNode = new ImageElem(n);

            root.SharedNodeTable.Add(imageNode, n.InstanceId);

            // create texture
            var texNode = new TextureElem(n);

            texNode.Image = imageNode;
            root.SharedNodeTable.Add(texNode, n.InstanceId);
        }
 public void Visit(TextureElem el)
 {
     using (var scope = new JsonScopeObjectWriter(writer)) {
         scope.WriteKeyValue("uuid", el.Uuid);
         scope.WriteKeyValue("offset", el.Offset);
         scope.WriteKeyValue("repeat", el.Repeat);
         scope.WriteKeyValue("magFilter", el.MagFilter);
         scope.WriteKeyValue("minFilter", el.MinFilter);
         scope.WriteKeyValue("wrap", el.Wrap);
         scope.WriteKeyValue("image", el.ImageUuid);
         scope.WriteKeyValue("name", el.ImagePath);
         scope.WriteKeyValue("anisotropy", el.Anisotropy);
     }
 }
Ejemplo n.º 4
0
        void RegisterLightmap(LightmapContainer n)
        {
            // create image
            var imageNode = new ImageElem(n);

            imageNode.Uuid = n.Guid + "-image";
            root.SharedNodeTable.Add(imageNode, n.InstanceId);

            var texNode = new TextureElem(n);

            texNode.Uuid = n.Guid + "-texture";
            root.SharedNodeTable.Add(texNode, n.InstanceId);

            texNode.Image = imageNode;
        }
Ejemplo n.º 5
0
 public void Visit(TextureElem el)
 {
     Debug.Assert(false, "do not reach");
     throw new NotImplementedException();
 }