本文整理汇总了C++中OsdCudaComputeContext::GetEditTable方法的典型用法代码示例。如果您正苦于以下问题:C++ OsdCudaComputeContext::GetEditTable方法的具体用法?C++ OsdCudaComputeContext::GetEditTable怎么用?C++ OsdCudaComputeContext::GetEditTable使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OsdCudaComputeContext
的用法示例。
在下文中一共展示了OsdCudaComputeContext::GetEditTable方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: assert
void
OsdCudaComputeController::ApplyVertexEdits(
FarKernelBatch const &batch, void * clientdata) const {
OsdCudaComputeContext * context =
static_cast<OsdCudaComputeContext*>(clientdata);
assert(context);
const OsdCudaHEditTable *edit = context->GetEditTable(batch.GetTableIndex());
assert(edit);
const OsdCudaTable * primvarIndices = edit->GetPrimvarIndices();
const OsdCudaTable * editValues = edit->GetEditValues();
if (edit->GetOperation() == FarVertexEdit::Add) {
OsdCudaEditVertexAdd(
context->GetCurrentVertexBuffer(),
context->GetVertexDescriptor().numVertexElements-3,
edit->GetPrimvarOffset(),
edit->GetPrimvarWidth(),
batch.GetVertexOffset(),
batch.GetTableOffset(),
batch.GetStart(),
batch.GetEnd(),
static_cast<int*>(primvarIndices->GetCudaMemory()),
static_cast<float*>(editValues->GetCudaMemory()));
} else if (edit->GetOperation() == FarVertexEdit::Set) {
// XXXX TODO
}
}
示例2: assert
void
OsdCudaKernelDispatcher::ApplyVertexEdits(
FarMesh<OsdVertex> *mesh, int offset, int level, void * clientdata) const {
OsdCudaComputeContext * context =
static_cast<OsdCudaComputeContext*>(clientdata);
assert(context);
int numEditTables = context->GetNumEditTables();
for (int i=0; i < numEditTables; ++i) {
const OsdCudaHEditTable * edit = context->GetEditTable(i);
assert(edit);
const OsdCudaTable * primvarIndices = edit->GetPrimvarIndices();
const OsdCudaTable * editValues = edit->GetEditValues();
if (edit->GetOperation() == FarVertexEdit::Add) {
OsdCudaEditVertexAdd(
context->GetCurrentVertexBuffer(),
context->GetCurrentVertexNumElements()-3,
edit->GetPrimvarOffset(), edit->GetPrimvarWidth(),
primvarIndices->GetNumElements(level-1),
static_cast<int*>(primvarIndices->GetCudaMemory())
+ primvarIndices->GetMarker(level-1),
static_cast<float*>(editValues->GetCudaMemory())
+ editValues->GetMarker(level-1));
} else if (edit->GetOperation() == FarVertexEdit::Set) {
// XXXX TODO
}
}
}