Ejemplo n.º 1
0
Message MessageStorage::loadFromStorage(const std::shared_ptr<StoragePoint> &storagePoint)
{
    auto result = m_injectedFactory->makeInjected<MessageShared>();
    result->setStorage(storagePoint);

    return result;
}
Ejemplo n.º 2
0
Identity IdentityStorage::loadStubFromStorage(const std::shared_ptr<StoragePoint> &storagePoint)
{
    auto result = m_injectedFactory->makeInjected<IdentityShared>();
    result->setStorage(storagePoint);
    result->loadStub();

    return result;
}
Ejemplo n.º 3
0
StructuredScript::IMemory::Ptr StructuredScript::Objects::Any::findMemory(const std::string &name, unsigned short searchScope /*= SEARCH_DEFAULT*/){
	auto memory = dynamic_cast<IStorage *>(type_.get())->findMemory(name, searchScope);
	auto functionMemory = dynamic_cast<IFunctionMemory *>(memory.get());
	if (functionMemory != nullptr)//Set object as storage
		functionMemory->setStorage(this);

	return memory;
}
Ejemplo n.º 4
0
    void Scene::prepareFramebuffer(glm::ivec2 size) {
        auto tex = NUGL::Texture::createTexture(GL_TEXTURE0, GL_TEXTURE_2D, size.x, size.y, GL_RGB);

        auto rbo  = std::make_unique<NUGL::Renderbuffer>();
        rbo->setStorage(GL_RENDERBUFFER, GL_DEPTH24_STENCIL8, size.x, size.y);

        framebuffer = std::make_unique<NUGL::Framebuffer>();
        framebuffer->attach(std::move(tex));
        framebuffer->attach(std::move(rbo));
    }
Ejemplo n.º 5
0
    void Scene::prepareReflectionFramebuffer(int size) {
        auto rbo  = std::make_unique<NUGL::Renderbuffer>();
        rbo->setStorage(GL_RENDERBUFFER, GL_DEPTH24_STENCIL8, size, size);

        reflectionFramebuffer = std::make_unique<NUGL::Framebuffer>();
        reflectionFramebuffer->attach(std::move(rbo));

//        auto depthTex = std::make_unique<NUGL::Texture>(GL_TEXTURE15, GL_TEXTURE_2D);
//        depthTex->setTextureData(GL_TEXTURE_2D, windowSize.x, windowSize.y, nullptr, GL_DEPTH_COMPONENT, GL_DEPTH_COMPONENT);
//        depthTex->setDefaultParams();
//        std::cerr << __FILE__ << ", " << __LINE__ << ": "
//                <<  getFramebufferStatusString(glCheckFramebufferStatus(GL_FRAMEBUFFER))
//                << std::endl;

        NUGL::Framebuffer::useDefault();
    }
Ejemplo n.º 6
0
void Monster::onCreatureAppear(const Creature* creature)
{
	Creature::onCreatureAppear(creature);
	if(creature == this)
	{
		//We just spawned lets look around to see who is there.
		if(isSummon())
			isMasterInRange = canSee(getMaster()->getPosition());
			
			 setStorage(510, mType->realName); // sistema de shiny nomes 2.0
			
			CreatureEventList spawn = getCreatureEvents(CREATURE_EVENT_SPAWN);
			for(CreatureEventList::iterator it = spawn.begin(); it != spawn.end(); ++it)

			(*it)->executeOnSpawn(this);
			

		updateTargetList();
		updateIdleStatus();
	}
	else
		onCreatureEnter(const_cast<Creature*>(creature));
}
Ejemplo n.º 7
0
void Buffer::setStorage(const std::array<T, Count> & data, GLbitfield flags)
{
    setStorage(static_cast<GLsizei>(Count * sizeof(T)), data.data(), flags);
}
Ejemplo n.º 8
0
void Buffer::setStorage(const std::vector<T> & data, GLbitfield flags)
{
    setStorage(static_cast<GLsizei>(data.size() * sizeof(T)), data.data(), flags);
}
Ejemplo n.º 9
0
Func::Func(const Func& func, Stmt body)
    : Func(func.getName(), func.getArguments(), func.getResults(), body,
           func.getEnvironment(), func.getKind()) {
  setStorage(func.getStorage());
}
Ejemplo n.º 10
0
DigitalRASTA::DigitalRASTA() : m_pole(0.94)
{
  setStorage(m_storage);
}
Ejemplo n.º 11
0
void petabricks::MatrixStorageInfo::reset(){
  setExtraVal();
  setStorage(0,0);
  _dimensions=-1;
}