Message MessageStorage::loadFromStorage(const std::shared_ptr<StoragePoint> &storagePoint) { auto result = m_injectedFactory->makeInjected<MessageShared>(); result->setStorage(storagePoint); return result; }
Identity IdentityStorage::loadStubFromStorage(const std::shared_ptr<StoragePoint> &storagePoint) { auto result = m_injectedFactory->makeInjected<IdentityShared>(); result->setStorage(storagePoint); result->loadStub(); return result; }
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; }
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)); }
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(); }
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)); }
void Buffer::setStorage(const std::array<T, Count> & data, GLbitfield flags) { setStorage(static_cast<GLsizei>(Count * sizeof(T)), data.data(), flags); }
void Buffer::setStorage(const std::vector<T> & data, GLbitfield flags) { setStorage(static_cast<GLsizei>(data.size() * sizeof(T)), data.data(), flags); }
Func::Func(const Func& func, Stmt body) : Func(func.getName(), func.getArguments(), func.getResults(), body, func.getEnvironment(), func.getKind()) { setStorage(func.getStorage()); }
DigitalRASTA::DigitalRASTA() : m_pole(0.94) { setStorage(m_storage); }
void petabricks::MatrixStorageInfo::reset(){ setExtraVal(); setStorage(0,0); _dimensions=-1; }