From 1bada8cd6e4f340de93cff4a2439835fc3b1456c Mon Sep 17 00:00:00 2001 From: Jason Sams Date: Sun, 9 Aug 2009 17:01:55 -0700 Subject: Begin implementing SimpleMesh and fix some bugs with refcounting and java object destruction tracking. --- libs/rs/rsAllocation.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'libs/rs/rsAllocation.cpp') diff --git a/libs/rs/rsAllocation.cpp b/libs/rs/rsAllocation.cpp index ecfbf83778ac..5ec73d74ac89 100644 --- a/libs/rs/rsAllocation.cpp +++ b/libs/rs/rsAllocation.cpp @@ -41,11 +41,11 @@ Allocation::Allocation(const Type *type) mBufferID = 0; mType.set(type); + rsAssert(type); mPtr = malloc(mType->getSizeBytes()); if (!mPtr) { LOGE("Allocation::Allocation, alloc failure"); } - } Allocation::~Allocation() @@ -114,6 +114,7 @@ void Allocation::uploadToBufferObject() glBindBuffer(GL_ARRAY_BUFFER, 0); } + void Allocation::data(const void *data) { memcpy(mPtr, data, mType->getSizeBytes()); -- cgit v1.2.3-59-g8ed1b