示例#1
0
        public static LmVertexStreamDesc Unpack(LmMsgPck msg)
        {
            var slot = (LmEVertexStreamSlot)msg.ReadUint();
            var type = (LmEVertexStreamType)msg.ReadUint();
            var desc = LmStructuredVertexBufferDesc.Unpack(msg);

            return(new LmVertexStreamDesc(slot, type, desc));
        }
示例#2
0
        public static LmStructuredVertexBufferDesc Unpack(LmMsgPck msg)
        {
            var stride      = msg.ReadUint();
            var startOffset = msg.ReadUint();
            var result      = new LmStructuredVertexBufferDesc(stride, startOffset);

            var elementCount = msg.ReadUint();

            for (var _ = 0; _ < elementCount; _++)
            {
                var desc = LmVertexElementDesc.Unpack(msg);
                result.VtxElementDescs.Add(desc);
            }

            return(result);
        }
示例#3
0
 private LmVertexStreamDesc(LmEVertexStreamSlot slot, LmEVertexStreamType type, LmStructuredVertexBufferDesc structuredVertexBufferDesc)
 {
     this.Slot             = slot;
     this.Type             = type;
     this.StructuredVBDesc = structuredVertexBufferDesc;
 }