Home | History | Annotate | Download | only in rs

Lines Matching full:stream

81 void Mesh::serialize(Context *rsc, OStream *stream) const {
83 stream->addU32((uint32_t)getClassId());
84 stream->addString(getName());
87 stream->addU32(mHal.state.vertexBuffersCount);
89 mHal.state.vertexBuffers[vCount]->serialize(rsc, stream);
92 stream->addU32(mHal.state.primitivesCount);
95 stream->addU8((uint8_t)mHal.state.primitives[pCount]);
98 stream->addU32(1);
99 mHal.state.indexBuffers[pCount]->serialize(rsc, stream);
101 stream->addU32(0);
106 Mesh *Mesh::createFromStream(Context *rsc, IStream *stream) {
108 RsA3DClassID classID = (RsA3DClassID)stream->loadU32();
114 const char *name = stream->loadString();
116 uint32_t vertexBuffersCount = stream->loadU32();
122 Allocation *vertexAlloc = Allocation::createFromStream(rsc, stream);
127 uint32_t primitivesCount = stream->loadU32();
136 primitives[pCount] = (RsPrimitive)stream->loadU8();
139 uint32_t isIndexPresent = stream->loadU32();
141 Allocation *indexAlloc = Allocation::createFromStream(rsc, stream);