コード例 #1
0
ObjectDesc *copy_memory(DomainDesc * src, DomainDesc * dst, struct MemoryProxy_s *obj, u4_t * quota)
{
	if (obj == NULL)
		return NULL;
	if (src == dst)
		return obj;

	if (src == domainZero) {
		MemoryProxyHandle handle = allocMemoryProxyInDomain(dst, obj2ClassDesc(obj),
								    obj->mem, obj->size);
		ObjectDesc *o = unregisterObject(dst, handle);
		//printf("MEMADDR2: %p\n", o);
		addToRefTable(obj, o);
		return (ObjectDesc *) o;
	}
#ifdef ALLOW_SHARING
	{
		MemoryProxyHandle handle = allocMemoryProxyInDomain(dst, obj2ClassDesc(obj),
								    obj->mem, obj->size);
		ObjectDesc *o = unregisterObject(dst, handle);
		//printf("MEMADDR2: %p\n", o);
		addToRefTable(obj, o);
		return (ObjectDesc *) o;
	}
#else
	exceptionHandlerMsg(THROW_RuntimeException,
			    "Memory objects cannot be copied between domains in the current configuration");
#endif
}
コード例 #2
0
ファイル: GPBFile.cpp プロジェクト: AllenPestaluky/GamePlay
void GPBFile::addScenelessNode(Node* node)
{
    addToRefTable(node);
    _nodes.push_back(node);
    // Nodes are normally written to file as part of a scene. 
    // Nodes that don't belong to a scene need to be written on their own (outside a scene).
    // That is why node is added to the list of objects here.
    _objects.push_back(node);
}
コード例 #3
0
ファイル: GPBFile.cpp プロジェクト: AllenPestaluky/GamePlay
void GPBFile::addAnimation(Animation* animation)
{
    _animations.add(animation);

    if (!_animationsAdded)
    {
        // The animations container should only be added once and only if the file has at least one animation.
        _animationsAdded = true;
        addToRefTable(&_animations);
        add(&_animations);
    }
}
コード例 #4
0
ファイル: GPBFile.cpp プロジェクト: AllenPestaluky/GamePlay
void GPBFile::addNode(Node* node)
{
    addToRefTable(node);
    _nodes.push_back(node);
}
コード例 #5
0
ファイル: GPBFile.cpp プロジェクト: AllenPestaluky/GamePlay
void GPBFile::addMesh(Mesh* mesh)
{
    addToRefTable(mesh);
    _geometry.push_back(mesh);
}
コード例 #6
0
ファイル: GPBFile.cpp プロジェクト: AllenPestaluky/GamePlay
void GPBFile::addLight(Light* light)
{
    addToRefTable(light);
    _lights.push_back(light);
}
コード例 #7
0
ファイル: GPBFile.cpp プロジェクト: AllenPestaluky/GamePlay
void GPBFile::addCamera(Camera* camera)
{
    addToRefTable(camera);
    _cameras.push_back(camera);
}
コード例 #8
0
ファイル: GPBFile.cpp プロジェクト: AllenPestaluky/GamePlay
void GPBFile::addScene(Scene* scene)
{
    addToRefTable(scene);
    _objects.push_back(scene);
}