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
120 120
121Resource::Size Resource::Sysmem::setData( Size size, const Byte* bytes ) {121Resource::Size Resource::Sysmem::setData( Size size, const Byte* bytes ) {
122 if (allocate(size) == size) {122 if (allocate(size) == size) {
123 if (bytes) {123 if (size && bytes) {
124 memcpy( _data, bytes, _size );124 memcpy( _data, bytes, _size );
125 _stamp++;125 _stamp++;
126 }126 }
@@ -129,7 +129,7 @@ Resource::Size Resource::Sysmem::setData( Size size, const Byte* bytes ) { · 2 unmodified lines
129}129}
130 130
131Resource::Size Resource::Sysmem::setSubData( Size offset, Size size, const Byte* bytes) {131Resource::Size Resource::Sysmem::setSubData( Size offset, Size size, const Byte* bytes) {
132 if (((offset + size) <= getSize()) && bytes) {132 if (size && ((offset + size) <= getSize()) && bytes) {
133 memcpy( _data + offset, bytes, size );133 memcpy( _data + offset, bytes, size );
134 _stamp++;134 _stamp++;
135 return size;135 return size;