コード例 #1
0
/* static */
bool
GlfQGLPlatformDebugContext::IsEnabledDebugOutput()
{
    static bool isEnabledDebugOutput =
        TfGetenvBool("GLF_ENABLE_DEBUG_OUTPUT", false);
    return isEnabledDebugOutput;
}
コード例 #2
0
/* static */
bool
GlfQGLPlatformDebugContext::IsEnabledCoreProfile()
{
    static bool isEnabledCoreProfile =
        TfGetenvBool("GLF_ENABLE_CORE_PROFILE", false);
    return isEnabledCoreProfile;
}
コード例 #3
0
NdrNodeDiscoveryResultVec
UsdMtlxDiscoveryPlugin::DiscoverNodes(const Context& context)
{
    NdrNodeDiscoveryResultVec result;

    // Merge all MaterialX standard library files into a single document.
    //
    // These files refer to elements in each other but they're not
    // all included by a single document.  We could construct such
    // a document in memory and parse it but instead we choose to
    // read each document separately and merge them.
    if (auto document = UsdMtlxGetDocument("")) {
        auto standardResult =
            NdrNodeDiscoveryResult(
                NdrIdentifier(),// identifier unused
                NdrVersion(),   // version unused
                "",             // name unused
                TfToken(),      // family unused
                _tokens->discoveryType,
                _tokens->discoveryType,
                "mtlx",
                "mtlx"          // identify as the standard library
            );
        _DiscoverNodes(&result, document, standardResult,
                       _ComputeNameMapping(document));
    }

    // Find the mtlx files from other search paths.
    for (auto&& fileResult:
            NdrFsHelpersDiscoverNodes(
                _searchPaths,
                UsdMtlxStandardFileExtensions(),
                TfGetenvBool("USDMTLX_PLUGIN_FOLLOW_SYMLINKS", false))) {
        if (auto document = UsdMtlxGetDocument(fileResult.resolvedUri)) {
            _DiscoverNodes(&result, document, fileResult,
                           _ComputeNameMapping(document));
        }
    }

    return result;
}