void LLDrawPoolBump::renderShiny(bool invisible) { LLFastTimer t(FTM_RENDER_SHINY); if ((!invisible && !gPipeline.hasRenderBatches(LLRenderPass::PASS_SHINY))|| (invisible && !gPipeline.hasRenderBatches(LLRenderPass::PASS_INVISI_SHINY))) { return; } if( gSky.mVOSkyp->getCubeMap() ) { LLGLEnable blend_enable(GL_BLEND); if (!invisible && mVertexShaderLevel > 1) { LLRenderPass::pushBatches(LLRenderPass::PASS_SHINY, sVertexMask | LLVertexBuffer::MAP_TEXTURE_INDEX, TRUE, TRUE); } else if (!invisible) { renderGroups(LLRenderPass::PASS_SHINY, sVertexMask); } //else // invisible (deprecated) //{ //renderGroups(LLRenderPass::PASS_INVISI_SHINY, sVertexMask); //} } }
void LLDrawPoolBump::renderShiny(bool invisible) { LLFastTimer t(LLFastTimer::FTM_RENDER_SHINY); if ((!invisible && !gPipeline.hasRenderBatches(LLRenderPass::PASS_SHINY))|| (invisible && !gPipeline.hasRenderBatches(LLRenderPass::PASS_INVISI_SHINY))) { return; } if( gSky.mVOSkyp->getCubeMap() ) { LLGLEnable blend_enable(GL_BLEND); if (!invisible && mVertexShaderLevel > 1) { LLRenderPass::renderTexture(LLRenderPass::PASS_SHINY, sVertexMask); } else if (!invisible) { renderGroups(LLRenderPass::PASS_SHINY, sVertexMask); } else // invisible { renderGroups(LLRenderPass::PASS_INVISI_SHINY, sVertexMask); } } }
void LLDrawPoolBump::renderFullbrightShiny() { LLFastTimer t(LLFastTimer::FTM_RENDER_SHINY); if (!gPipeline.hasRenderBatches(LLRenderPass::PASS_FULLBRIGHT_SHINY)) { return; } if( gSky.mVOSkyp->getCubeMap() ) { LLGLEnable blend_enable(GL_BLEND); LLRenderPass::renderTexture(LLRenderPass::PASS_FULLBRIGHT_SHINY, sVertexMask); } }
bool init( memory_pool &xdr_pool, size_t vb_offset ) { uint32_t *ptr = (uint32_t *)xdr_pool.alloc( 0 ); fifo = ptr; geom_desc_t pos, tx0, col; pos.stride = 24; pos.components = 3; pos.format = FLOAT; pos.type = POS0; pos.offset = 0; col.stride = 24; col.components = 4; col.format = HALF; col.type = COL0; col.offset = 16; tx0.stride = 24; tx0.components = 2; tx0.format = HALF; tx0.type = TEX0; tx0.offset = 12; ptr += blend_enable( 1, ptr, Nv3D ); blend_desc_t blend; blend.src_color_blend = ONE; blend.src_alpha_blend = ONE; blend.dst_color_blend = ONE; blend.dst_alpha_blend = ONE; ptr += set_blend_mode( &blend, ptr, Nv3D ); ptr += depth_enable( 0, 1, ptr, Nv3D ); ptr += set_geometry_source( &pos, DDR, vb_offset, ptr, Nv3D ); ptr += set_geometry_source( &col, DDR, vb_offset, ptr, Nv3D ); ptr += set_geometry_source( &tx0, DDR, vb_offset, ptr, Nv3D ); cmd_size = ptr - fifo; xdr_pool.alloc( cmd_size * 4 ); return true; }
bool init( const char *file, memory_pool &xdr_pool, size_t vb_offset, size_t ib_offset ) { file_map<model_desc_t> f( file ); if( model_desc_t *desc = f.get_object() ) { uint32_t *ptr = (uint32_t *)xdr_pool.alloc( 0 ); fifo = ptr; ptr += blend_enable( 0, ptr, Nv3D ); ptr += depth_enable( 1, 1, ptr, Nv3D ); ptr += set_geometry_source( &desc->position, DDR, vb_offset, ptr, Nv3D ); ptr += set_geometry_source( &desc->texcoord, DDR, vb_offset, ptr, Nv3D ); ptr += set_index_source( DDR, ib_offset, ptr, Nv3D ); ptr += draw_primitives( 1, TRIANGLES, 0, desc->indices_num, ptr, Nv3D ); cmd_size = ptr - fifo; xdr_pool.alloc( cmd_size * 4 ); return true; } return false; }
void LLDrawPoolBump::renderFullbrightShiny() { LLFastTimer t(FTM_RENDER_SHINY); if (!gPipeline.hasRenderBatches(LLRenderPass::PASS_FULLBRIGHT_SHINY)) { return; } if( gSky.mVOSkyp->getCubeMap() ) { LLGLEnable blend_enable(GL_BLEND); if (mVertexShaderLevel > 1) { LLRenderPass::pushBatches(LLRenderPass::PASS_FULLBRIGHT_SHINY, sVertexMask | LLVertexBuffer::MAP_TEXTURE_INDEX, TRUE, TRUE); } else { LLRenderPass::renderTexture(LLRenderPass::PASS_FULLBRIGHT_SHINY, sVertexMask); } } }