Implement async data/subData. Implement TriangleMeshBuilder in SimpleMesh which replaces TriangleMesh. Update Film to use new builder.

This commit is contained in:
Jason Sams
2009-08-27 20:23:34 -07:00
parent 0409cde360
commit 07ae406237
29 changed files with 568 additions and 219 deletions

View File

@@ -67,7 +67,7 @@ void SimpleMesh::renderRange(uint32_t start, uint32_t len) const
if (mIndexType.get()) {
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, mIndexBuffer->getBufferObjectID());
glDrawElements(mGLPrimitive, len, GL_UNSIGNED_SHORT, (GLvoid *)(start * 2));
glDrawElements(mGLPrimitive, len, GL_UNSIGNED_SHORT, (uint16_t *)(start * 2));
} else {
glDrawArrays(mGLPrimitive, start, len);
}
@@ -91,7 +91,7 @@ namespace renderscript {
RsSimpleMesh rsi_SimpleMeshCreate(Context *rsc, RsType prim, RsType idx, RsType *vtx, uint32_t vtxCount, uint32_t primType)
{
SimpleMesh *sm = new SimpleMesh();
sm->incRef();
sm->incUserRef();
sm->mIndexType.set((const Type *)idx);
sm->mPrimitiveType.set((const Type *)prim);