diff options
| author | Jason Sams <rjsams@android.com> | 2009-08-09 17:01:55 -0700 |
|---|---|---|
| committer | Jason Sams <rjsams@android.com> | 2009-08-09 17:05:13 -0700 |
| commit | 1bada8cd6e4f340de93cff4a2439835fc3b1456c (patch) | |
| tree | bdc1ed59f9b9ef531bca7220550a025a89ca4173 /libs/rs/rsAllocation.cpp | |
| parent | 467f3df13dc9324b35c139bd6d291265015ba4d3 (diff) | |
| download | frameworks_base-1bada8cd6e4f340de93cff4a2439835fc3b1456c.zip frameworks_base-1bada8cd6e4f340de93cff4a2439835fc3b1456c.tar.gz frameworks_base-1bada8cd6e4f340de93cff4a2439835fc3b1456c.tar.bz2 | |
Begin implementing SimpleMesh and fix some bugs with refcounting and java object destruction tracking.
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()); |
