本文整理汇总了C++中Sampler::addRef方法的典型用法代码示例。如果您正苦于以下问题:C++ Sampler::addRef方法的具体用法?C++ Sampler::addRef怎么用?C++ Sampler::addRef使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Sampler
的用法示例。
在下文中一共展示了Sampler::addRef方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: checkSamplerAllocation
void ResourceManager::checkSamplerAllocation(GLuint sampler)
{
if (sampler != 0 && !getSampler(sampler))
{
Sampler *samplerObject = new Sampler(sampler);
mSamplerMap[sampler] = samplerObject;
samplerObject->addRef();
}
}
示例2: getSampler
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;
}
示例3: Sampler
// static
Sampler *SamplerManager::AllocateNewObject(rx::GLImplFactory *factory, GLuint handle)
{
Sampler *sampler = new Sampler(factory, handle);
sampler->addRef();
return sampler;
}