Lines Matching refs:state
26 mHal.state.primitives = NULL; in Mesh()
27 mHal.state.primitivesCount = 0; in Mesh()
28 mHal.state.indexBuffers = NULL; in Mesh()
29 mHal.state.indexBuffersCount = 0; in Mesh()
30 mHal.state.vertexBuffers = NULL; in Mesh()
31 mHal.state.vertexBuffersCount = 0; in Mesh()
42 mHal.state.primitivesCount = primitivesCount; in Mesh()
43 mHal.state.indexBuffersCount = primitivesCount; in Mesh()
44 mHal.state.primitives = new RsPrimitive[mHal.state.primitivesCount]; in Mesh()
45 mHal.state.indexBuffers = new Allocation *[mHal.state.indexBuffersCount]; in Mesh()
46 for (uint32_t i = 0; i < mHal.state.primitivesCount; i ++) { in Mesh()
47 mHal.state.primitives[i] = RS_PRIMITIVE_POINT; in Mesh()
49 for (uint32_t i = 0; i < mHal.state.indexBuffersCount; i ++) { in Mesh()
50 mHal.state.indexBuffers[i] = NULL; in Mesh()
52 mHal.state.vertexBuffersCount = vertexBuffersCount; in Mesh()
53 mHal.state.vertexBuffers = new Allocation *[mHal.state.vertexBuffersCount]; in Mesh()
54 for (uint32_t i = 0; i < mHal.state.vertexBuffersCount; i ++) { in Mesh()
55 mHal.state.vertexBuffers[i] = NULL; in Mesh()
58 mVertexBuffers = new ObjectBaseRef<Allocation>[mHal.state.vertexBuffersCount]; in Mesh()
59 mIndexBuffers = new ObjectBaseRef<Allocation>[mHal.state.primitivesCount]; in Mesh()
67 delete[] mHal.state.vertexBuffers; in ~Mesh()
68 delete[] mHal.state.primitives; in ~Mesh()
69 delete[] mHal.state.indexBuffers; in ~Mesh()
87 stream->addU32(mHal.state.vertexBuffersCount); in serialize()
88 for (uint32_t vCount = 0; vCount < mHal.state.vertexBuffersCount; vCount ++) { in serialize()
89 mHal.state.vertexBuffers[vCount]->serialize(rsc, stream); in serialize()
92 stream->addU32(mHal.state.primitivesCount); in serialize()
94 for (uint32_t pCount = 0; pCount < mHal.state.primitivesCount; pCount ++) { in serialize()
95 stream->addU8((uint8_t)mHal.state.primitives[pCount]); in serialize()
97 if (mHal.state.indexBuffers[pCount]) { in serialize()
99 mHal.state.indexBuffers[pCount]->serialize(rsc, stream); in serialize()
173 for (uint32_t ct = 0; ct < mHal.state.primitivesCount; ct ++) { in render()
179 if (primIndex >= mHal.state.primitivesCount) { in renderPrimitive()
184 if (mHal.state.indexBuffers[primIndex]) { in renderPrimitive()
185 … renderPrimitiveRange(rsc, primIndex, 0, mHal.state.indexBuffers[primIndex]->getType()->getDimX()); in renderPrimitive()
189 renderPrimitiveRange(rsc, primIndex, 0, mHal.state.vertexBuffers[0]->getType()->getDimX()); in renderPrimitive()
193 if (len < 1 || primIndex >= mHal.state.primitivesCount) { in renderPrimitiveRange()
202 for (uint32_t ct = 0; ct < mHal.state.vertexBuffersCount; ct ++) { in uploadAll()
203 if (mHal.state.vertexBuffers[ct]) { in uploadAll()
204 rsc->mHal.funcs.allocation.markDirty(rsc, mHal.state.vertexBuffers[ct]); in uploadAll()
208 for (uint32_t ct = 0; ct < mHal.state.primitivesCount; ct ++) { in uploadAll()
209 if (mHal.state.indexBuffers[ct]) { in uploadAll()
210 rsc->mHal.funcs.allocation.markDirty(rsc, mHal.state.indexBuffers[ct]); in uploadAll()
222 for (uint32_t ct=0; ct < mHal.state.vertexBuffersCount; ct++) { in computeBBox()
223 const Type *bufferType = mHal.state.vertexBuffers[ct]->getType(); in computeBBox()
231 posAlloc = mHal.state.vertexBuffers[ct]; in computeBBox()
294 *numVtx = sm->mHal.state.vertexBuffersCount; in rsaMeshGetVertexBufferCount()
299 *numIdx = sm->mHal.state.primitivesCount; in rsaMeshGetIndexCount()
304 rsAssert(vtxDataCount == sm->mHal.state.vertexBuffersCount); in rsaMeshGetVertices()
307 vtxData[ct] = sm->mHal.state.vertexBuffers[ct]; in rsaMeshGetVertices()
308 sm->mHal.state.vertexBuffers[ct]->incUserRef(); in rsaMeshGetVertices()
314 rsAssert(idxDataCount == sm->mHal.state.primitivesCount); in rsaMeshGetIndices()
317 va[ct] = sm->mHal.state.indexBuffers[ct]; in rsaMeshGetIndices()
318 primType[ct] = sm->mHal.state.primitives[ct]; in rsaMeshGetIndices()
319 if (sm->mHal.state.indexBuffers[ct]) { in rsaMeshGetIndices()
320 sm->mHal.state.indexBuffers[ct]->incUserRef(); in rsaMeshGetIndices()