Begin implementing SimpleMesh and fix some bugs with refcounting and java object destruction tracking.
diff --git a/libs/rs/rsAllocation.cpp b/libs/rs/rsAllocation.cpp
index ecfbf83..5ec73d7 100644
--- a/libs/rs/rsAllocation.cpp
+++ b/libs/rs/rsAllocation.cpp
@@ -41,11 +41,11 @@
mBufferID = 0;
mType.set(type);
+ rsAssert(type);
mPtr = malloc(mType->getSizeBytes());
if (!mPtr) {
LOGE("Allocation::Allocation, alloc failure");
}
-
}
Allocation::~Allocation()
@@ -114,6 +114,7 @@
glBindBuffer(GL_ARRAY_BUFFER, 0);
}
+
void Allocation::data(const void *data)
{
memcpy(mPtr, data, mType->getSizeBytes());