本文整理汇总了C++中LODNode::getRelativePosition方法的典型用法代码示例。如果您正苦于以下问题:C++ LODNode::getRelativePosition方法的具体用法?C++ LODNode::getRelativePosition怎么用?C++ LODNode::getRelativePosition使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LODNode
的用法示例。
在下文中一共展示了LODNode::getRelativePosition方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: loadTextureToGPU
bool loadTextureToGPU(const LODNode& lodNode, const DataSource& dataSource,
const TexturePool& texturePool,
const ConstDataObjectPtr& data) const
{
#ifdef LIVRE_DEBUG_RENDERING
std::cout << "Upload " << lodNode.getNodeId().getLevel() << ' '
<< lodNode.getRelativePosition() << " to "
<< _textureState.textureId << std::endl;
#endif
const Vector3ui& overlap = dataSource.getVolumeInfo().overlap;
const Vector3ui& voxSizeVec = lodNode.getBlockSize() + overlap * 2;
_textureState.bind();
glTexSubImage3D(GL_TEXTURE_3D, 0, 0, 0, 0, voxSizeVec[0], voxSizeVec[1],
voxSizeVec[2], texturePool.getFormat(),
texturePool.getTextureType(), data->getDataPtr());
const GLenum glErr = glGetError();
if (glErr != GL_NO_ERROR)
{
LBERROR << "Error loading the texture into GPU, error number : "
<< glErr << std::endl;
return false;
}
return true;
}