History

fix the bug for blend shape when more than one and clean the model rendering with the new stream and buffer gpu api

Sam Gateau committed 12 years ago

Commit f413f931 parent ed067795 files · +37 −220Browse files

Showing the changes to interface/src/gpu/Resource.cpp (1 of 5 files). Show all

Unified · Split

interface/src/gpu/Resource.cpp+2−2
@@ -120,7 +120,7 @@ Resource::Size Resource::Sysmem::resize(Size size) { · 119 unmodified lines
120120
121121 Resource::Size Resource::Sysmem::setData( Size size, const Byte* bytes ) {
122122 if (allocate(size) == size) {
123− if (bytes) {
123+ if (size && bytes) {
124124 memcpy( _data, bytes, _size );
125125 _stamp++;
126126 }
@@ -129,7 +129,7 @@ Resource::Size Resource::Sysmem::setData( Size size, const Byte* bytes ) { · 2 unmodified lines
129129 }
130130
131131 Resource::Size Resource::Sysmem::setSubData( Size offset, Size size, const Byte* bytes) {
132− if (((offset + size) <= getSize()) && bytes) {
132+ if (size && ((offset + size) <= getSize()) && bytes) {
133133 memcpy( _data + offset, bytes, size );
134134 _stamp++;
135135 return size;