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(); }
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(); }
TfTokenVector UsdMayaAdaptor::SchemaAdaptor::GetAttributeNames() const { if (!*this) { return TfTokenVector(); } TfTokenVector attrNames; for (const SdfAttributeSpecHandle attr : _schemaDef->GetAttributes()) { attrNames.push_back(attr->GetNameToken()); } return attrNames; }
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; }
/*virtual*/ TfTokenVector HdSceneDelegate::GetPrimVarInstanceNames(SdfPath const& id) { return TfTokenVector(); }
/*virtual*/ TfTokenVector HdSceneDelegate::GetPrimVarUniformNames(SdfPath const& id) { return TfTokenVector(); }
/*virtual*/ TfTokenVector HdSceneDelegate::GetPrimVarFacevaryingNames(SdfPath const& id) { return TfTokenVector(); }
/*virtual*/ TfTokenVector HdSceneDelegate::GetSurfaceShaderParamNames(SdfPath const &shaderId) { return TfTokenVector(); }