Lines Matching full:state
24 mHal.state.primitives = NULL;
25 mHal.state.primitivesCount = 0;
26 mHal.state.vertexBuffers = NULL;
27 mHal.state.vertexBuffersCount = 0;
35 mHal.state.primitivesCount = primitivesCount;
36 mHal.state.primitives = new Primitive_t *[mHal.state.primitivesCount];
37 for (uint32_t i = 0; i < mHal.state.primitivesCount; i ++) {
38 mHal.state.primitives[i] = new Primitive_t;
40 mHal.state.vertexBuffersCount = vertexBuffersCount;
41 mHal.state.vertexBuffers = new ObjectBaseRef<Allocation>[mHal.state.vertexBuffersCount];
49 if (mHal.state.vertexBuffers) {
50 delete[] mHal.state.vertexBuffers;
53 if (mHal.state.primitives) {
54 for (uint32_t i = 0; i < mHal.state.primitivesCount; i ++) {
55 mHal.state.primitives[i]->mIndexBuffer.clear();
56 delete mHal.state.primitives[i];
58 delete[] mHal.state.primitives;
76 stream->addU32(mHal.state.vertexBuffersCount);
77 for (uint32_t vCount = 0; vCount < mHal.state.vertexBuffersCount; vCount ++) {
78 mHal.state.vertexBuffers[vCount]->serialize(stream);
81 stream->addU32(mHal.state.primitivesCount);
83 for (uint32_t pCount = 0; pCount < mHal.state.primitivesCount; pCount ++) {
84 Primitive_t * prim = mHal.state.primitives[pCount];
165 for (uint32_t ct = 0; ct < mHal.state.primitivesCount; ct ++) {
171 if (primIndex >= mHal.state.primitivesCount) {
176 Primitive_t *prim = mHal.state.primitives[primIndex];
183 renderPrimitiveRange(rsc, primIndex, 0, mHal.state.vertexBuffers[0]->getType()->getDimX());
187 if (len < 1 || primIndex >= mHal.state.primitivesCount) {
196 for (uint32_t ct = 0; ct < mHal.state.vertexBuffersCount; ct ++) {
197 if (mHal.state.vertexBuffers[ct].get()) {
198 rsc->mHal.funcs.allocation.markDirty(rsc, mHal.state.vertexBuffers[ct].get());
202 for (uint32_t ct = 0; ct < mHal.state.primitivesCount; ct ++) {
203 if (mHal.state.primitives[ct]->mIndexBuffer.get()) {
204 rsc->mHal.funcs.allocation.markDirty(rsc, mHal.state.primitives[ct]->mIndexBuffer.get());
215 for (uint32_t ct=0; ct < mHal.state.vertexBuffersCount; ct++) {
216 const Type *bufferType = mHal.state.vertexBuffers[ct]->getType();
224 posPtr = (float*)((uint8_t*)mHal.state.vertexBuffers[ct]->getPtr() + offset);
280 *numVtx = sm->mHal.state.vertexBuffersCount;
285 *numIdx = sm->mHal.state.primitivesCount;
290 rsAssert(vtxDataCount == sm->mHal.state.vertexBuffersCount);
293 vtxData[ct] = sm->mHal.state.vertexBuffers[ct].get();
294 sm->mHal.state.vertexBuffers[ct]->incUserRef();
300 rsAssert(idxDataCount == sm->mHal.state.primitivesCount);
303 va[ct] = sm->mHal.state.primitives[ct]->mIndexBuffer.get();
304 primType[ct] = sm->mHal.state.primitives[ct]->mPrimitive;
305 if (sm->mHal.state.primitives[ct]->mIndexBuffer.get()) {
306 sm->mHal.state.primitives[ct]->mIndexBuffer->incUserRef();