本文整理汇总了C++中LLVertexBuffer::getEmissiveStrider方法的典型用法代码示例。如果您正苦于以下问题:C++ LLVertexBuffer::getEmissiveStrider方法的具体用法?C++ LLVertexBuffer::getEmissiveStrider怎么用?C++ LLVertexBuffer::getEmissiveStrider使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LLVertexBuffer
的用法示例。
在下文中一共展示了LLVertexBuffer::getEmissiveStrider方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: getGeometry
void LLParticlePartition::getGeometry(LLSpatialGroup* group)
{
LLFastTimer ftm(FTM_REBUILD_PARTICLE_GEOM);
std::sort(mFaceList.begin(), mFaceList.end(), LLFace::CompareDistanceGreater());
U32 index_count = 0;
U32 vertex_count = 0;
group->clearDrawMap();
LLVertexBuffer* buffer = group->mVertexBuffer;
LLStrider<U16> indicesp;
LLStrider<LLVector4a> verticesp;
LLStrider<LLVector3> normalsp;
LLStrider<LLVector2> texcoordsp;
LLStrider<LLColor4U> colorsp;
LLStrider<LLColor4U> emissivep;
buffer->getVertexStrider(verticesp);
buffer->getNormalStrider(normalsp);
buffer->getColorStrider(colorsp);
buffer->getEmissiveStrider(emissivep);
LLSpatialGroup::drawmap_elem_t& draw_vec = group->mDrawMap[mRenderPass];
for (std::vector<LLFace*>::iterator i = mFaceList.begin(); i != mFaceList.end(); ++i)
{
LLFace* facep = *i;
LLAlphaObject* object = (LLAlphaObject*) facep->getViewerObject();
if (!facep->isState(LLFace::PARTICLE))
{ //set the indices of this face
S32 idx = LLVOPartGroup::findAvailableVBSlot();
if (idx >= 0)
{
facep->setGeomIndex(idx*4);
facep->setIndicesIndex(idx*6);
facep->setVertexBuffer(LLVOPartGroup::sVB);
facep->setPoolType(LLDrawPool::POOL_ALPHA);
facep->setState(LLFace::PARTICLE);
}
else
{
continue; //out of space in particle buffer
}
}
S32 geom_idx = (S32) facep->getGeomIndex();
LLStrider<U16> cur_idx = indicesp + facep->getIndicesStart();
LLStrider<LLVector4a> cur_vert = verticesp + geom_idx;
LLStrider<LLVector3> cur_norm = normalsp + geom_idx;
LLStrider<LLVector2> cur_tc = texcoordsp + geom_idx;
LLStrider<LLColor4U> cur_col = colorsp + geom_idx;
LLStrider<LLColor4U> cur_glow = emissivep + geom_idx;
LLColor4U* start_glow = cur_glow.get();
object->getGeometry(facep->getTEOffset(), cur_vert, cur_norm, cur_tc, cur_col, cur_glow, cur_idx);
BOOL has_glow = FALSE;
if (cur_glow.get() != start_glow)
{
has_glow = TRUE;
}
llassert(facep->getGeomCount() == 4);
llassert(facep->getIndicesCount() == 6);
vertex_count += facep->getGeomCount();
index_count += facep->getIndicesCount();
S32 idx = draw_vec.size()-1;
BOOL fullbright = facep->isState(LLFace::FULLBRIGHT);
F32 vsize = facep->getVirtualSize();
bool batched = false;
U32 bf_src = LLRender::BF_SOURCE_ALPHA;
U32 bf_dst = LLRender::BF_ONE_MINUS_SOURCE_ALPHA;
object->getBlendFunc(facep->getTEOffset(), bf_src, bf_dst);
if (idx >= 0)
{
LLDrawInfo* info = draw_vec[idx];
if (info->mTexture == facep->getTexture() &&
info->mHasGlow == has_glow &&
info->mFullbright == fullbright &&
info->mBlendFuncDst == bf_dst &&
info->mBlendFuncSrc == bf_src)
{
//.........这里部分代码省略.........