Example #1
0
PcpPrimIndex_GraphRefPtr
PcpPrimIndex_Graph::New(const PcpLayerStackSite& rootSite, bool usd)
{
    TfAutoMallocTag2 tag("Pcp", "PcpPrimIndex_Graph");

    return TfCreateRefPtr(new PcpPrimIndex_Graph(rootSite, usd));
}
Example #2
0
PXR_NAMESPACE_OPEN_SCOPE


GlfTextureHandleRefPtr
GlfTextureHandle::New(GlfTextureRefPtr texture)
{
    return TfCreateRefPtr(new GlfTextureHandle(texture));
}
Example #3
0
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)));
}
Example #4
0
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));
}
Example #5
0
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);
}
Example #6
0
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;
    }
}
Example #7
0
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));
}
Example #8
0
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()));
}
Example #9
0
 static SuperNodeRefPtr New() {
     return TfCreateRefPtr(new SuperNode);
 }
Example #10
0
 static NodeRefPtr New() {
     return TfCreateRefPtr(new Node);
 }
Example #11
0
/* static */
GlfSimpleLightingContextRefPtr
GlfSimpleLightingContext::New()
{
    return TfCreateRefPtr(new This());
}
Example #12
0
 static RefPtr New() {
     return TfCreateRefPtr(new This());
 }