void ResourceManager::checkSamplerAllocation(GLuint sampler) { if (sampler != 0 && !getSampler(sampler)) { Sampler *samplerObject = new Sampler(sampler); mSamplerMap[sampler] = samplerObject; samplerObject->addRef(); } }
void ResourceManager::checkSamplerAllocation(GLuint sampler) { if (sampler != 0 && !getSampler(sampler)) { Sampler *samplerObject = new Sampler(sampler); mSamplerMap[sampler] = samplerObject; samplerObject->addRef(); // Samplers cannot be created via Bind } }
Sampler *ResourceManager::checkSamplerAllocation(rx::GLImplFactory *factory, GLuint samplerHandle) { // Samplers cannot be created via Bind if (samplerHandle == 0) { return nullptr; } Sampler *sampler = getSampler(samplerHandle); if (!sampler) { sampler = new Sampler(factory, samplerHandle); mSamplerMap[samplerHandle] = sampler; sampler->addRef(); } return sampler; }
// static Sampler *SamplerManager::AllocateNewObject(rx::GLImplFactory *factory, GLuint handle) { Sampler *sampler = new Sampler(factory, handle); sampler->addRef(); return sampler; }