Beispiel #1
0
 shared_ptr <GLTFBufferView> convertUnsignedIntArrayToGLTFBufferView(const COLLADAFW::UIntValuesArray &array) {
     unsigned char* sourceData = (unsigned char*)array.getData();
     size_t sourceSize = array.getCount() * sizeof(unsigned int);
     unsigned char* copiedData = (unsigned char*)malloc(sourceSize);
     memcpy(copiedData, sourceData, sourceSize);
     shared_ptr <GLTF::GLTFBufferView> bufferView = createBufferViewWithAllocatedBuffer(copiedData, 0, sourceSize, true);
     
     return bufferView;
 }
Beispiel #2
0
void SkinInfo::transfer_uint_array_data_const(const COLLADAFW::UIntValuesArray& src, COLLADAFW::UIntValuesArray& dest)
{
	dest.setData((unsigned int*)src.getData(), src.getCount());
	dest.yieldOwnerShip();
}