diff options
Diffstat (limited to 'libs/rs/rsAllocation.cpp')
-rw-r--r-- | libs/rs/rsAllocation.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
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 @@ 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()); |