void
HdxDrawTargetRenderPass::Execute(
    HdRenderPassStateSharedPtr const &renderPassState)
{
    if (!_drawTarget) {
        return;
    }

    _drawTarget->Bind();

    _ClearBuffers();

    GfVec2i const &resolution = _drawTarget->GetSize();

    // XXX: Should the Raster State or Renderpass set and restore this?
    // save the current viewport
    GLint viewport[4];
    glGetIntegerv(GL_VIEWPORT, viewport);
    glViewport(0, 0, resolution[0], resolution[1]);

    // Perform actual draw
    _renderPass.Execute(renderPassState, TfTokenVector());

    // restore viewport
    glViewport(viewport[0], viewport[1], viewport[2], viewport[3]);

    _drawTarget->Unbind();
}
예제 #2
0
TfTokenVector
UsdMayaAdaptor::GetAppliedSchemas() const
{
    if (!*this) {
        return TfTokenVector();
    }

    VtValue appliedSchemas;
    if (GetMetadata(UsdTokens->apiSchemas, &appliedSchemas)) {
        TfTokenVector result;
        appliedSchemas.Get<SdfTokenListOp>().ApplyOperations(&result);
        return result;
    }

    return TfTokenVector();
}
예제 #3
0
TfTokenVector
UsdMayaAdaptor::SchemaAdaptor::GetAttributeNames() const
{
    if (!*this) {
        return TfTokenVector();
    }

    TfTokenVector attrNames;
    for (const SdfAttributeSpecHandle attr : _schemaDef->GetAttributes()) {
        attrNames.push_back(attr->GetNameToken());
    }

    return attrNames;
}
예제 #4
0
TfTokenVector
UsdMayaAdaptor::SchemaAdaptor::GetAuthoredAttributeNames() const
{
    if (!*this) {
        return TfTokenVector();
    }

    MFnDependencyNode node(_handle.object());
    TfTokenVector result;
    for (const SdfAttributeSpecHandle& attr : _schemaDef->GetAttributes()) {
        std::string mayaAttrName = _GetMayaAttrNameOrAlias(attr);
        if (node.hasAttribute(mayaAttrName.c_str())) {
            result.push_back(attr->GetNameToken());
        }
    }

    return result;
}
예제 #5
0
/*virtual*/
TfTokenVector
HdSceneDelegate::GetPrimVarInstanceNames(SdfPath const& id)
{
    return TfTokenVector();
}
예제 #6
0
/*virtual*/
TfTokenVector
HdSceneDelegate::GetPrimVarUniformNames(SdfPath const& id)
{
    return TfTokenVector();
}
예제 #7
0
/*virtual*/
TfTokenVector
HdSceneDelegate::GetPrimVarFacevaryingNames(SdfPath const& id)
{
    return TfTokenVector();
}
예제 #8
0
/*virtual*/
TfTokenVector
HdSceneDelegate::GetSurfaceShaderParamNames(SdfPath const &shaderId)
{
    return TfTokenVector();
}