Lines Matching refs:sm
120 SimpleMesh *sm = new SimpleMesh(rsc);
121 sm->incUserRef();
123 sm->mIndexType.set((const Type *)idx);
124 sm->mPrimitiveType.set((const Type *)prim);
126 sm->mVertexTypeCount = vtxCount;
127 sm->mVertexTypes = new ObjectBaseRef<const Type>[vtxCount];
128 sm->mVertexBuffers = new ObjectBaseRef<Allocation>[vtxCount];
130 sm->mVertexTypes[ct].set((const Type *)vtx[ct]);
133 sm->mPrimitive = (RsPrimitive)primType;
134 switch(sm->mPrimitive) {
135 case RS_PRIMITIVE_POINT: sm->mGLPrimitive = GL_POINTS; break;
136 case RS_PRIMITIVE_LINE: sm->mGLPrimitive = GL_LINES; break;
137 case RS_PRIMITIVE_LINE_STRIP: sm->mGLPrimitive = GL_LINE_STRIP; break;
138 case RS_PRIMITIVE_TRIANGLE: sm->mGLPrimitive = GL_TRIANGLES; break;
139 case RS_PRIMITIVE_TRIANGLE_STRIP: sm->mGLPrimitive = GL_TRIANGLE_STRIP; break;
140 case RS_PRIMITIVE_TRIANGLE_FAN: sm->mGLPrimitive = GL_TRIANGLE_FAN; break;
142 return sm;
147 SimpleMesh *sm = static_cast<SimpleMesh *>(mv);
148 rsAssert(slot < sm->mVertexTypeCount);
150 sm->mVertexBuffers[slot].set((Allocation *)va);
155 SimpleMesh *sm = static_cast<SimpleMesh *>(mv);
156 sm->mIndexBuffer.set((Allocation *)va);
161 SimpleMesh *sm = static_cast<SimpleMesh *>(mv);
162 sm->mPrimitiveBuffer.set((Allocation *)va);