• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ color_rgba函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中color_rgba函数的典型用法代码示例。如果您正苦于以下问题:C++ color_rgba函数的具体用法?C++ color_rgba怎么用?C++ color_rgba使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了color_rgba函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: DestroyDragItem

void CUIDragDropReferenceList::ReloadReferences(CInventoryOwner* pActor)
{
	if (!pActor)
		return;

	if(m_drag_item)
		DestroyDragItem();

	m_container->ClearAll(true);
	m_selected_item	= NULL;

	for(u8 i=0; i<m_container->CellsCapacity().x; i++)
	{
		CUIStatic* ref = m_references[i];
		LPCSTR item_name = ACTOR_DEFS::g_quick_use_slots[i];
		if(item_name && xr_strlen(item_name))
		{
			PIItem itm = pActor->inventory().GetAny(item_name);
			if(itm)
			{
				SetItem(create_cell_item(itm), Ivector2().set(i, 0));
			}
			else
			{
				LoadItemTexture(item_name, Ivector2().set(i, 0));
				ref->SetTextureColor(color_rgba(255,255,255,100));
			}
		}
		else
		{
			ref->SetTextureColor(color_rgba(255,255,255,0));
		}
	}
}
开发者ID:AntonioModer,项目名称:xray-16,代码行数:34,代码来源:UIDragDropReferenceList.cpp


示例2: switch

void			CGameObject::dbg_DrawSkeleton	()
{
	CCF_Skeleton* Skeleton = smart_cast<CCF_Skeleton*>(collidable.model);
	if (!Skeleton) return;
	Skeleton->_dbg_refresh();

	const CCF_Skeleton::ElementVec& Elements = Skeleton->_GetElements();
	for (CCF_Skeleton::ElementVec::const_iterator I=Elements.begin(); I!=Elements.end(); I++){
		if (!I->valid())		continue;
		switch (I->type){
			case SBoneShape::stBox:{
				Fmatrix M;
				M.invert			(I->b_IM);
				Fvector h_size		= I->b_hsize;
				Level().debug_renderer().draw_obb	(M, h_size, color_rgba(0, 255, 0, 255));
								   }break;
			case SBoneShape::stCylinder:{
				Fmatrix M;
				M.c.set				(I->c_cylinder.m_center);
				M.k.set				(I->c_cylinder.m_direction);
				Fvector				h_size;
				h_size.set			(I->c_cylinder.m_radius,I->c_cylinder.m_radius,I->c_cylinder.m_height*0.5f);
				Fvector::generate_orthonormal_basis(M.k,M.j,M.i);
				Level().debug_renderer().draw_obb	(M, h_size, color_rgba(0, 127, 255, 255));
										}break;
			case SBoneShape::stSphere:{
				Fmatrix				l_ball;
				l_ball.scale		(I->s_sphere.R, I->s_sphere.R, I->s_sphere.R);
				l_ball.translate_add(I->s_sphere.P);
				Level().debug_renderer().draw_ellipse(l_ball, color_rgba(0, 255, 0, 255));
									  }break;
		};
	};	
}
开发者ID:AntonioModer,项目名称:xray-16,代码行数:34,代码来源:GameObject.cpp


示例3: Level

void CGameObject::OnRender			()
{
	if (!ai().get_level_graph())
		return;

	CDebugRenderer					&renderer = Level().debug_renderer();
	if (/**bDebug && /**/Visual()) {
		float						half_cell_size = 1.f*ai().level_graph().header().cell_size()*.5f;
		Fvector						additional = Fvector().set(half_cell_size,half_cell_size,half_cell_size);

		render_box					(Visual(),XFORM(),Fvector().set(0.f,0.f,0.f),true,color_rgba(0,0,255,255));
		render_box					(Visual(),XFORM(),additional,false,color_rgba(0,255,0,255));
	}

	if (0) {
		Fvector						bc,bd; 
		Visual()->getVisData().box.get_CD	(bc,bd);
		Fmatrix						M = Fidentity;
		float						half_cell_size = ai().level_graph().header().cell_size()*.5f;
		bd.add						(Fvector().set(half_cell_size,half_cell_size,half_cell_size));
		M.scale						(bd);
		Fmatrix						T = XFORM();
		T.c.add						(bc);
		renderer.draw_obb			(T,bd,color_rgba(255,255,255,255));
	}
}
开发者ID:AntonioModer,项目名称:xray-16,代码行数:26,代码来源:GameObject.cpp


示例4: color_rgba

void CUIActorMenu::ColorizeItem(CUICellItem* itm, bool colorize)
{
	if( colorize )
	{
		itm->SetColor( color_rgba(255,100,100,255) );
	}
	else
	{
		itm->SetColor( color_rgba(255,255,255,255) );
	}
}
开发者ID:2asoft,项目名称:xray,代码行数:11,代码来源:UIActorMenuTrade.cpp


示例5: UpdateActiveItemInfo

void CUIHudStatesWnd::UpdateActiveItemInfo( CActor* actor )
{
	PIItem item = actor->inventory().ActiveItem();
	if ( item )
	{
		if(m_b_force_update)
		{
			if(item->cast_weapon())
				item->cast_weapon()->ForceUpdateAmmo();
			m_b_force_update		= false;
		}

		item->GetBriefInfo			( m_item_info );

//		UIWeaponBack.SetText		( str_name.c_str() );
		m_fire_mode->SetText		( m_item_info.fire_mode.c_str() );
		SetAmmoIcon					( m_item_info.icon.c_str() );
		
		m_ui_weapon_cur_ammo->Show	( true );
		m_ui_weapon_fmj_ammo->Show	( true );
		m_ui_weapon_ap_ammo->Show	( true );
		m_fire_mode->Show			( true );
		m_ui_grenade->Show			( true );

		m_ui_weapon_cur_ammo->SetText	( m_item_info.cur_ammo.c_str() );
		m_ui_weapon_fmj_ammo->SetText	( m_item_info.fmj_ammo.c_str() );
		m_ui_weapon_ap_ammo->SetText	( m_item_info.ap_ammo.c_str() );
		
		m_ui_grenade->SetText	( m_item_info.grenade.c_str() );

		CWeaponMagazinedWGrenade* wpn = smart_cast<CWeaponMagazinedWGrenade*>(item);
		if(wpn && wpn->m_bGrenadeMode)
		{
			m_ui_weapon_fmj_ammo->SetTextColor(color_rgba(238,155,23,150));
			m_ui_grenade->SetTextColor(color_rgba(238,155,23,255));
		}
		else
		{
			m_ui_weapon_fmj_ammo->SetTextColor(color_rgba(238,155,23,255));
			m_ui_grenade->SetTextColor(color_rgba(238,155,23,150));
		}
	}
	else
	{
		m_ui_weapon_icon->Show		( false );

		m_ui_weapon_cur_ammo->Show	( false );
		m_ui_weapon_fmj_ammo->Show	( false );
		m_ui_weapon_ap_ammo->Show	( false );
		m_fire_mode->Show			( false );
		m_ui_grenade->Show			( false );
	}
}
开发者ID:zcaliptium,项目名称:xray-16,代码行数:53,代码来源:UIHudStatesWnd.cpp


示例6: color_rgba

void CUIFactionWarWnd::set_amount_enemy_bonus( int value )
{
	for ( u32 i = 0; i < max_bonuce; ++i )
	{
		m_enemy_bonuces[i]->SetColor( color_rgba( 255, 255, 255, 70) );
	}
	u32 cr = color_rgba( 0, 255, 0, 255);
	for ( int i = 0; i < value; ++i )
	{
		m_enemy_bonuces[i]->SetColor( cr );
	}
}
开发者ID:2asoft,项目名称:xray,代码行数:12,代码来源:UIFactionWarWnd.cpp


示例7:

IC u32 it_gloss_rev		(u32 d, u32 s)	{
    return	color_rgba	(
                color_get_A(s),		// gloss
                color_get_B(d),
                color_get_G(d),
                color_get_R(d)		);
}
开发者ID:awdavies,项目名称:cop,代码行数:7,代码来源:Texture.cpp


示例8: r_string

u32 CInifile::r_color( LPCSTR S, LPCSTR L )
{
    LPCSTR		C = r_string(S,L);
    u32			r=0,g=0,b=0,a=255;
    sscanf		(C,"%d,%d,%d,%d",&r,&g,&b,&a);
    return color_rgba(r,g,b,a);
}
开发者ID:vasilenkomike,项目名称:xray,代码行数:7,代码来源:Xr_ini.cpp


示例9: color_rgba

IC u32 it_difference	(u32 d, u32 orig, u32 ucomp)	{
    return	color_rgba(
                128+(int(color_get_R(orig))-int(color_get_R(ucomp)))*2,		// R-error
                128+(int(color_get_G(orig))-int(color_get_G(ucomp)))*2,		// G-error
                128+(int(color_get_B(orig))-int(color_get_B(ucomp)))*2,		// B-error
                128+(int(color_get_A(orig))-int(color_get_A(ucomp)))*2	);	// A-error
}
开发者ID:awdavies,项目名称:cop,代码行数:7,代码来源:Texture.cpp


示例10: it_height_rev_base

IC u32 it_height_rev_base(u32 d, u32 s)	{
    return	color_rgba	(
                color_get_A(d),					// diff x
                color_get_B(d),					// diff y
                color_get_G(d),					// diff z
                (color_get_R(s)+color_get_G(s)+color_get_B(s))/3	);	// height
}
开发者ID:awdavies,项目名称:cop,代码行数:7,代码来源:Texture.cpp


示例11:

void CRenderTarget::accum_direct_blend	()
{
	// blend-copy
	if (!RImplementation.o.fp16_blend)	{
		u_setrt						(rt_Accumulator,NULL,NULL,HW.pBaseZB);

		// Common calc for quad-rendering
		u32		Offset;
		u32		C					= color_rgba	(255,255,255,255);
		float	_w					= float			(Device.dwWidth);
		float	_h					= float			(Device.dwHeight);
		Fvector2					p0,p1;
		p0.set						(.5f/_w, .5f/_h);
		p1.set						((_w+.5f)/_w, (_h+.5f)/_h );
		float	d_Z	= EPS_S, d_W = 1.f;

		// Fill vertex buffer
		FVF::TL2uv* pv				= (FVF::TL2uv*) RCache.Vertex.Lock	(4,g_combine_2UV->vb_stride,Offset);
		pv->set						(EPS,			float(_h+EPS),	d_Z,	d_W, C, p0.x, p1.y, p0.x, p1.y);	pv++;
		pv->set						(EPS,			EPS,			d_Z,	d_W, C, p0.x, p0.y, p0.x, p0.y);	pv++;
		pv->set						(float(_w+EPS),	float(_h+EPS),	d_Z,	d_W, C, p1.x, p1.y, p1.x, p1.y);	pv++;
		pv->set						(float(_w+EPS),	EPS,			d_Z,	d_W, C, p1.x, p0.y, p1.x, p0.y);	pv++;
		RCache.Vertex.Unlock		(4,g_combine_2UV->vb_stride);
		RCache.set_Geometry			(g_combine_2UV);
		RCache.set_Element			(s_accum_mask->E[SE_MASK_ACCUM_2D]	);
		RCache.set_Stencil			(TRUE,D3DCMP_LESSEQUAL,dwLightMarkerID,0xff,0x00);
		RCache.Render				(D3DPT_TRIANGLELIST,Offset,0,4,0,2	);
	}
	dwLightMarkerID				+= 2;
}
开发者ID:OLR-xray,项目名称:XRay-NEW,代码行数:30,代码来源:r2_rendertarget_accum_direct.cpp


示例12: float

void CRenderTarget::reset_light_marker( bool bResetStencil)
{
    dwLightMarkerID = 5;
    if (bResetStencil)
    {
        u32		Offset;
        float	_w					= float(Device.dwWidth);
        float	_h					= float(Device.dwHeight);
        u32		C					= color_rgba	(255,255,255,255);
        float	eps					= 0;
        float	_dw					= 0.5f;
        float	_dh					= 0.5f;
        FVF::TL* pv					= (FVF::TL*) RCache.Vertex.Lock	(4,g_combine->vb_stride,Offset);
        pv->set						(-_dw,		_h-_dh,		eps,	1.f, C, 0, 0);
        pv++;
        pv->set						(-_dw,		-_dh,		eps,	1.f, C, 0, 0);
        pv++;
        pv->set						(_w-_dw,	_h-_dh,		eps,	1.f, C, 0, 0);
        pv++;
        pv->set						(_w-_dw,	-_dh,		eps,	1.f, C, 0, 0);
        pv++;
        RCache.Vertex.Unlock		(4,g_combine->vb_stride);
        RCache.set_Element			(s_occq->E[2]	);
        RCache.set_Geometry			(g_combine		);
        RCache.Render				(D3DPT_TRIANGLELIST,Offset,0,4,0,2);
    }
}
开发者ID:Zen13L,项目名称:xray-16,代码行数:27,代码来源:r3_rendertarget.cpp


示例13: color_rgba

void CEnvironment::RenderClouds			()
{
#ifndef _EDITOR
	if (0==g_pGameLevel)		return	;
#endif
	// draw clouds
	if (fis_zero(CurrentEnv.clouds_color.w,EPS_L))	return;

	::Render->rmFar				();

	Fmatrix						mXFORM, mScale;
	mScale.scale				(10,0.4f,10);
	mXFORM.rotateY				(CurrentEnv.sky_rotation);
	mXFORM.mulB_43				(mScale);
	mXFORM.translate_over		(Device.vCameraPosition);

	Fvector wd0,wd1;
	Fvector4 wind_dir;
	wd0.setHP					(PI_DIV_4,0);
	wd1.setHP					(PI_DIV_4+PI_DIV_8,0);
	wind_dir.set				(wd0.x,wd0.z,wd1.x,wd1.z).mul(0.5f).add(0.5f).mul(255.f);
	u32		i_offset,v_offset;
	u32		C0					= color_rgba(iFloor(wind_dir.x),iFloor(wind_dir.y),iFloor(wind_dir.w),iFloor(wind_dir.z));
	u32		C1					= color_rgba(iFloor(CurrentEnv.clouds_color.x*255.f),iFloor(CurrentEnv.clouds_color.y*255.f),iFloor(CurrentEnv.clouds_color.z*255.f),iFloor(CurrentEnv.clouds_color.w*255.f));

	// Fill index buffer
	u16*	pib					= RCache.Index.Lock	(CloudsIndices.size(),i_offset);
	CopyMemory					(pib,&CloudsIndices.front(),CloudsIndices.size()*sizeof(u16));
	RCache.Index.Unlock			(CloudsIndices.size());

	// Fill vertex buffer
	v_clouds* pv				= (v_clouds*)	RCache.Vertex.Lock	(CloudsVerts.size(),clouds_geom.stride(),v_offset);
	for (FvectorIt it=CloudsVerts.begin(); it!=CloudsVerts.end(); it++,pv++)
		pv->set					(*it,C0,C1);
	RCache.Vertex.Unlock		(CloudsVerts.size(),clouds_geom.stride());

	// Render
	RCache.set_xform_world		(mXFORM);
	RCache.set_Geometry			(clouds_geom);
	RCache.set_Shader			(clouds_sh);
	RCache.set_Textures			(&CurrentEnv.clouds_r_textures);
	RCache.Render				(D3DPT_TRIANGLELIST,v_offset,0,CloudsVerts.size(),i_offset,CloudsIndices.size()/3);

	::Render->rmNormal			();
}
开发者ID:OLR-xray,项目名称:OLR-3.0,代码行数:45,代码来源:Environment_render.cpp


示例14:

void CUIButtonHint::OnRender	()
{
    if(m_enabledOnFrame) {
        m_text->Update		();
        m_border->Update	();
        m_border->SetColor	(color_rgba(255,255,255,color_get_A(m_text->GetTextColor())));
        Draw				();
        m_enabledOnFrame	= false;
    }
}
开发者ID:vasilenkomike,项目名称:xray,代码行数:10,代码来源:UIBtnHint.cpp


示例15: it_gloss_rev_base

IC u32 it_gloss_rev_base(u32 d, u32 s)	{
    u32		occ		= color_get_A(d)/3;
    u32		def		= 8;
    u32		gloss	= (occ*1+def*3)/4;
    return	color_rgba	(
                gloss,			// gloss
                color_get_B(d),
                color_get_G(d),
                color_get_R(d)
            );
}
开发者ID:awdavies,项目名称:cop,代码行数:11,代码来源:Texture.cpp


示例16: u8

CUICellItem* CUIDragDropReferenceList::RemoveItem(CUICellItem* itm, bool force_root)
{
	Ivector2 vec2 = m_container->GetItemPos(itm);
	if(vec2.x!=-1&&vec2.y!=-1)
	{
		u8 index = u8(vec2.x);
		xr_strcpy(ACTOR_DEFS::g_quick_use_slots[index], "");
		m_references[index]->SetTextureColor(color_rgba(255,255,255,0));
	}
	inherited::RemoveItem(itm, force_root);
	return NULL;
}
开发者ID:AntonioModer,项目名称:xray-16,代码行数:12,代码来源:UIDragDropReferenceList.cpp


示例17: Init

void CUIDragItem::Init(const ui_shader& sh, const Frect& rect, const Frect& text_rect)
{
	SetWndRect						(rect);
	m_static.SetShader				(sh);
	m_static.SetTextureRect			(text_rect);
	m_static.SetWndPos				(Fvector2().set(0.0f,0.0f));
	m_static.SetWndSize				(GetWndSize());
	m_static.TextureOn				();
	m_static.SetTextureColor		(color_rgba(255,255,255,170));
	m_static.SetStretchTexture		(true);
	m_pos_offset.sub				(rect.lt, GetUICursor().GetCursorPosition());
}
开发者ID:AntonioModer,项目名称:xray-16,代码行数:12,代码来源:UICellItem.cpp


示例18: color_rgba

void dxEnvironmentRender::RenderClouds(CEnvironment &env)
{
	::Render->rmFar				();

	Fmatrix						mXFORM, mScale;
	mScale.scale				(10,0.4f,10);
	mXFORM.rotateY				(env.CurrentEnv->sky_rotation);
	mXFORM.mulB_43				(mScale);
	mXFORM.translate_over		(Device.vCameraPosition);

	Fvector wd0,wd1;
	Fvector4 wind_dir;
	wd0.setHP					(PI_DIV_4,0);
	wd1.setHP					(PI_DIV_4+PI_DIV_8,0);
	wind_dir.set				(wd0.x,wd0.z,wd1.x,wd1.z).mul(0.5f).add(0.5f).mul(255.f);
	u32		i_offset,v_offset;
	u32		C0					= color_rgba(iFloor(wind_dir.x),iFloor(wind_dir.y),iFloor(wind_dir.w),iFloor(wind_dir.z));
	u32		C1					= color_rgba(iFloor(env.CurrentEnv->clouds_color.x*255.f),iFloor(env.CurrentEnv->clouds_color.y*255.f),iFloor(env.CurrentEnv->clouds_color.z*255.f),iFloor(env.CurrentEnv->clouds_color.w*255.f));

	// Fill index buffer
	u16*	pib					= RCache.Index.Lock	(env.CloudsIndices.size(),i_offset);
	CopyMemory					(pib,&env.CloudsIndices.front(),env.CloudsIndices.size()*sizeof(u16));
	RCache.Index.Unlock			(env.CloudsIndices.size());

	// Fill vertex buffer
	v_clouds* pv				= (v_clouds*)	RCache.Vertex.Lock	(env.CloudsVerts.size(),clouds_geom.stride(),v_offset);
	for (FvectorIt it=env.CloudsVerts.begin(); it!=env.CloudsVerts.end(); it++,pv++)
		pv->set					(*it,C0,C1);
	RCache.Vertex.Unlock		(env.CloudsVerts.size(),clouds_geom.stride());

	// Render
	RCache.set_xform_world		(mXFORM);
	RCache.set_Geometry			(clouds_geom);
	RCache.set_Shader			(clouds_sh);
	dxEnvDescriptorMixerRender	&mixRen = *(dxEnvDescriptorMixerRender*)&*env.CurrentEnv->m_pDescriptorMixer;
	RCache.set_Textures			(&mixRen.clouds_r_textures);
	RCache.Render				(D3DPT_TRIANGLELIST,v_offset,0,env.CloudsVerts.size(),i_offset,env.CloudsIndices.size()/3);

	::Render->rmNormal			();
}
开发者ID:2asoft,项目名称:xray,代码行数:40,代码来源:dxEnvironmentRender.cpp


示例19: VERIFY

void ESceneObjectTools::HighlightTexture(LPCSTR tex_name, bool allow_ratio, u32 t_width, u32 t_height, BOOL mark)
{
	if (tex_name&&tex_name[0]){
        for (ObjectIt a_it=m_Objects.begin(); a_it!=m_Objects.end(); a_it++){
            CSceneObject* s_obj		= dynamic_cast<CSceneObject*>(*a_it);
            CEditableObject* e_obj	= s_obj->GetReference(); VERIFY(e_obj);
            SurfaceVec& s_vec		= e_obj->Surfaces();
            for (SurfaceIt it=s_vec.begin(); it!=s_vec.end(); it++){
                if (0==stricmp((*it)->_Texture(),tex_name)){
					Fvector 		verts[3];
					for (EditMeshIt mesh_it=e_obj->FirstMesh(); mesh_it!=e_obj->LastMesh(); mesh_it++){
                    	SurfFaces& 		surf_faces	= (*mesh_it)->GetSurfFaces();
                    	SurfFacesPairIt sf_it 		= surf_faces.find(*it);
                        if (sf_it!=surf_faces.end()){
                            IntVec& lst				= sf_it->second;
                            for (IntIt i_it=lst.begin(); i_it!=lst.end(); i_it++){
                                e_obj->GetFaceWorld	(s_obj->_Transform(),*mesh_it,*i_it,verts);
                                u32 clr	= 0x80FFFFFF;
                                if (allow_ratio){
                                	// select color
                                    const Fvector2* tc[3];
                                    Fvector 		c,e01,e02;
                                    e01.sub			(verts[1],verts[0]);
                                    e02.sub			(verts[2],verts[0]);
                                    float area		= c.crossproduct(e01,e02).magnitude()/2.f;
                                    (*mesh_it)->GetFaceTC(*i_it,tc);
                                    e01.sub			(Fvector().set(tc[1]->x,tc[1]->y,0),Fvector().set(tc[0]->x,tc[0]->y,0));
                                    e02.sub			(Fvector().set(tc[2]->x,tc[2]->y,0),Fvector().set(tc[0]->x,tc[0]->y,0));
                                    float p_area	= c.crossproduct(e01,e02).magnitude()/2.f;
                                    float ratio		= _sqrt((p_area*t_width*t_height)/area);
                                    int idx_clr		= 4;
                                    float w			= 0.f;
                                    if (ratio>=0.f && ratio<50.f) 			{idx_clr=0; w=ratio/30.f;}
                                    else if (ratio>=50.f && ratio<150.f) 	{idx_clr=1; w=(ratio-30.f)/150.f;}
                                    else if (ratio>=150.f && ratio<250.f) 	{idx_clr=2; w=(ratio-150.f)/250.f;}
                                    else if (ratio>=250.f && ratio<500.f) 	{idx_clr=3; w=(ratio-250.f)/500.f;}
                                    float inv_w		= 1.f-w;
                                    clr				= color_rgba(color_get_R(ratio_colors[idx_clr+0])*inv_w+color_get_R(ratio_colors[idx_clr+1])*w,
                                    							 color_get_G(ratio_colors[idx_clr+0])*inv_w+color_get_G(ratio_colors[idx_clr+1])*w,
                                                                 color_get_B(ratio_colors[idx_clr+0])*inv_w+color_get_B(ratio_colors[idx_clr+1])*w,
                                                                 color_get_A(ratio_colors[idx_clr+0])*inv_w+color_get_A(ratio_colors[idx_clr+1])*w);
                                }
                                Tools->m_DebugDraw.AppendSolidFace(verts[0],verts[1],verts[2],clr,false);
                                if (mark)	Tools->m_DebugDraw.AppendWireFace(verts[0],verts[1],verts[2],clr,false);
                            }
                        }
                    }
                }
            }
        }
    }
}
开发者ID:2asoft,项目名称:xray,代码行数:52,代码来源:ESceneObjectTools__.cpp


示例20: color_rgba

// render
void		CWallmarksEngine::static_wm_render		(CWallmarksEngine::static_wallmark*	W, FVF::LIT* &V)
{
	float		a		= 1-(W->ttl/ps_r__WallmarkTTL);
	int			aC		= iFloor	( a * 255.f);	clamp	(aC,0,255);
	u32			C		= color_rgba(128,128,128,aC);
	FVF::LIT*	S		= &*W->verts.begin	();
	FVF::LIT*	E		= &*W->verts.end	();
	for (; S!=E; S++, V++){
		V->p.set		(S->p);
		V->color		= C;
		V->t.set		(S->t);
	}
}
开发者ID:OLR-xray,项目名称:OLR-3.0,代码行数:14,代码来源:WallmarksEngine.cpp



注:本文中的color_rgba函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ colorname函数代码示例发布时间:2022-05-30
下一篇:
C++ colorGroup函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap