Home | History | Annotate | Download | only in rs

Lines Matching refs:rsc

24 Mesh::Mesh(Context *rsc) : ObjectBase(rsc) {
38 Mesh::Mesh(Context *rsc,
40 uint32_t primitivesCount) : ObjectBase(rsc) {
81 void Mesh::serialize(Context *rsc, OStream *stream) const {
89 mHal.state.vertexBuffers[vCount]->serialize(rsc, stream);
99 mHal.state.indexBuffers[pCount]->serialize(rsc, stream);
106 Mesh *Mesh::createFromStream(Context *rsc, IStream *stream) {
122 Allocation *vertexAlloc = Allocation::createFromStream(rsc, stream);
141 Allocation *indexAlloc = Allocation::createFromStream(rsc, stream);
147 Mesh *mesh = new Mesh(rsc, vertexBuffersCount, primitivesCount);
167 mesh->uploadAll(rsc);
172 void Mesh::render(Context *rsc) const {
174 renderPrimitive(rsc, ct);
178 void Mesh::renderPrimitive(Context *rsc, uint32_t primIndex) const {
185 renderPrimitiveRange(rsc, primIndex, 0, mHal.state.indexBuffers[primIndex]->getType()->getDimX());
189 renderPrimitiveRange(rsc, primIndex, 0, mHal.state.vertexBuffers[0]->getType()->getDimX());
192 void Mesh::renderPrimitiveRange(Context *rsc, uint32_t primIndex, uint32_t start, uint32_t len) const {
201 void Mesh::uploadAll(Context *rsc) {
204 rsc->mHal.funcs.allocation.markDirty(rsc, mHal.state.vertexBuffers[ct]);
210 rsc->mHal.funcs.allocation.markDirty(rsc, mHal.state.indexBuffers[ct]);
215 void Mesh::computeBBox(Context *rsc) {
232 const uint8_t *bp = (const uint8_t *)rsc->mHal.funcs.allocation.lock1D(
233 rsc, posAlloc);
262 rsc->mHal.funcs.allocation.unlock1D(rsc, posAlloc);
266 RsMesh rsi_MeshCreate(Context *rsc,
271 Mesh *sm = new Mesh(rsc, vtxCount, idxCount);