Exemplo n.º 1
0
 //FIXME: these 3 functions up there could use some refactoring
 shared_ptr <GLTFBufferView> convertIntArrayToGLTFBufferView(const COLLADAFW::IntValuesArray &array) {
     unsigned char* sourceData = (unsigned char*)array.getData();
     size_t sourceSize = array.getCount() * sizeof(int);
     unsigned char* copiedData = (unsigned char*)malloc(sourceSize);
     memcpy(copiedData, sourceData, sourceSize);
     shared_ptr <GLTF::GLTFBufferView> bufferView = createBufferViewWithAllocatedBuffer(copiedData, 0, sourceSize, true);
     
     return bufferView;
 }
Exemplo n.º 2
0
// when src is const we cannot src.yieldOwnerShip, this is used by copy constructor
void SkinInfo::transfer_int_array_data_const(const COLLADAFW::IntValuesArray& src, COLLADAFW::IntValuesArray& dest)
{
	dest.setData((int*)src.getData(), src.getCount());
	dest.yieldOwnerShip();
}