本文整理汇总了C++中SampleBuffer::getSize方法的典型用法代码示例。如果您正苦于以下问题:C++ SampleBuffer::getSize方法的具体用法?C++ SampleBuffer::getSize怎么用?C++ SampleBuffer::getSize使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SampleBuffer
的用法示例。
在下文中一共展示了SampleBuffer::getSize方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Exception
void UniformSampleGenerator2DCL::generateNextSamples(SampleBuffer& positionSamplesOut, const VECTOR_CLASS<cl::Event>* waitForEvents /*= nullptr*/, cl::Event* event /*= nullptr*/) {
if (kernel_ == NULL) {
return throw Exception("Invalid kernel: Kernel not found or failed to compile");
}
size2_t nSamples{static_cast<size_t>(std::sqrt(static_cast<double>(positionSamplesOut.getSize())))};
if (getUseGLSharing()) {
SyncCLGL glSync;
BufferCLGL* samples = positionSamplesOut.getEditableRepresentation<BufferCLGL>();
// Acquire shared representations before using them in OpenGL
// The SyncCLGL object will take care of synchronization between OpenGL and OpenCL
glSync.addToAquireGLObjectList(samples);
glSync.aquireAllObjects();
generateSamples(nSamples, positionSamplesOut.getSize(), samples, waitForEvents, event);
} else {
BufferCL* samples = positionSamplesOut.getEditableRepresentation<BufferCL>();
generateSamples(nSamples, positionSamplesOut.getSize(), samples, waitForEvents, event);
}
}
开发者ID:ResearchDaniel,项目名称:Correlated-Photon-Mapping-for-Interactive-Global-Illumination-of-Time-Varying-Volumetric-Data,代码行数:19,代码来源:uniformsamplegenerator2dcl.cpp