PcpPrimIndex_GraphRefPtr PcpPrimIndex_Graph::New(const PcpLayerStackSite& rootSite, bool usd) { TfAutoMallocTag2 tag("Pcp", "PcpPrimIndex_Graph"); return TfCreateRefPtr(new PcpPrimIndex_Graph(rootSite, usd)); }
PXR_NAMESPACE_OPEN_SCOPE GlfTextureHandleRefPtr GlfTextureHandle::New(GlfTextureRefPtr texture) { return TfCreateRefPtr(new GlfTextureHandle(texture)); }
PcpPrimIndex_GraphRefPtr PcpPrimIndex_Graph::New(const PcpPrimIndex_GraphPtr& copy) { TfAutoMallocTag2 tag("Pcp", "PcpPrimIndex_Graph"); TRACE_FUNCTION(); return TfCreateRefPtr( new PcpPrimIndex_Graph(*boost::get_pointer(copy))); }
SdfLayerBaseRefPtr SdfFileFormat::NewLayer(const SdfFileFormatConstPtr &fileFormat, const std::string &identifier, const std::string &realPath, const ArAssetInfo& assetInfo, const FileFormatArguments &args) const { return TfCreateRefPtr( _InstantiateNewLayer( fileFormat, identifier, realPath, assetInfo, args)); }
SdfAbstractDataRefPtr SdfFileFormat::InitData(const FileFormatArguments& args) const { SdfData* metadata = new SdfData; // The pseudo-root spec must always exist in a layer's SdfData, so // add it here. metadata->CreateSpec( SdfAbstractDataSpecId(&SdfPath::AbsoluteRootPath()), SdfSpecTypePseudoRoot); return TfCreateRefPtr(metadata); }
PxrUsdMayaChaserRefPtr PxrUsdMayaChaserRegistry::Create( const std::string& name, const FactoryContext& context) const { TfRegistryManager::GetInstance().SubscribeTo<PxrUsdMayaChaserRegistry>(); if (PxrUsdMayaChaserRegistry::FactoryFn fn = _reg[name]) { return TfCreateRefPtr(fn(context)); } else { return TfNullPtr; } }
GlfUVTextureRefPtr GlfUVTexture::New( std::string const &imageFilePath, unsigned int cropTop, unsigned int cropBottom, unsigned int cropLeft, unsigned int cropRight, GlfImage::ImageOriginLocation originLocation) { return TfCreateRefPtr(new GlfUVTexture( TfToken(imageFilePath), cropTop, cropBottom, cropLeft, cropRight, originLocation)); }
PXR_NAMESPACE_OPEN_SCOPE HdxSimpleLightingShader::HdxSimpleLightingShader() : _lightingContext(GlfSimpleLightingContext::New()) , _bindingMap(TfCreateRefPtr(new GlfBindingMap())) , _useLighting(true) { // TODO: robust binding from codegen _bindingMap->GetUniformBinding(TfToken("GlobalUniform")); _bindingMap->GetUniformBinding(TfToken("DrawDataBuffer")); _lightingContext->InitUniformBlockBindings(_bindingMap); _lightingContext->InitSamplerUnitBindings(_bindingMap); _glslfx.reset(new GlfGLSLFX(HdxPackageSimpleLightingShader())); }
static SuperNodeRefPtr New() { return TfCreateRefPtr(new SuperNode); }
static NodeRefPtr New() { return TfCreateRefPtr(new Node); }
/* static */ GlfSimpleLightingContextRefPtr GlfSimpleLightingContext::New() { return TfCreateRefPtr(new This()); }
static RefPtr New() { return TfCreateRefPtr(new This()); }