当前位置: 首页>>代码示例>>C++>>正文


C++ CBlender_Compile::PassSET_Blend方法代码示例

本文整理汇总了C++中CBlender_Compile::PassSET_Blend方法的典型用法代码示例。如果您正苦于以下问题:C++ CBlender_Compile::PassSET_Blend方法的具体用法?C++ CBlender_Compile::PassSET_Blend怎么用?C++ CBlender_Compile::PassSET_Blend使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CBlender_Compile的用法示例。


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

示例1:

void CBlender_Editor_Wire::Compile	(CBlender_Compile& C)
{
	IBlender::Compile		(C);
#if !defined(USE_DX10) && !defined(USE_DX11)
	if (C.bEditor)	
	{
		C.PassBegin		();
		{
			C.PassSET_ZB		(TRUE,TRUE);
			C.PassSET_Blend		(FALSE,D3DBLEND_ONE,D3DBLEND_ZERO,	FALSE,0);
			C.PassSET_LightFog	(FALSE,FALSE);

			// Stage0 - Base texture
			C.StageBegin		();
			C.StageSET_Color	(D3DTA_DIFFUSE,	  D3DTOP_MODULATE,		D3DTA_TFACTOR);
			C.StageSET_Alpha	(D3DTA_DIFFUSE,	  D3DTOP_MODULATE,		D3DTA_TFACTOR);
			C.Stage_Texture		("$null");
			C.Stage_Matrix		("$null",	0);
			C.Stage_Constant	("$null");
			//		C.Stage_Constant	("$base0",	"$user$wire");
			C.StageEnd			();
		}
		C.PassEnd			();
	} 
	else 
#endif	//	USE_DX10
	{
		C.r_Pass	("editor","simple_color",FALSE,TRUE,TRUE);
		C.r_End		();
	}
}
开发者ID:2asoft,项目名称:xray-16,代码行数:31,代码来源:Blender_Editor_Wire.cpp

示例2:

void	CBlender_Editor_Selection::Compile	(CBlender_Compile& C)
{
	IBlender::Compile		(C);	
	if (C.bEditor)	{
		C.PassBegin		();
		{
			C.PassSET_ZB		(TRUE,FALSE);
			C.PassSET_Blend		(TRUE,D3DBLEND_SRCALPHA,D3DBLEND_INVSRCALPHA,	FALSE,0);
			C.PassSET_LightFog	(FALSE,FALSE);

			// Stage0 - Base texture
			C.StageBegin		();
			C.StageSET_Address	(D3DTADDRESS_CLAMP);
			C.StageSET_Color	(D3DTA_TFACTOR,	  D3DTOP_MODULATE,		D3DTA_DIFFUSE);
			C.StageSET_Alpha	(D3DTA_TFACTOR,	  D3DTOP_MODULATE,		D3DTA_DIFFUSE);
			C.Stage_Texture		(oT_Name	);
			C.Stage_Matrix		(oT_xform,	0);
			C.Stage_Constant	("$null"	);
			C.StageEnd			();
		}
		C.PassEnd			();
	} else {
		C.r_Pass	("editor","simple_color",FALSE,TRUE,FALSE,TRUE,D3DBLEND_SRCALPHA,D3DBLEND_INVSRCALPHA);
		C.r_End		();
	}
}
开发者ID:OLR-xray,项目名称:OLR-3.0,代码行数:26,代码来源:Blender_Editor_Selection.cpp

示例3: switch

void CBlender_Vertex::Compile	(CBlender_Compile& C)
{
    IBlender::Compile		(C);

    if (C.bEditor)
    {
        // Editor shader
        C.PassBegin		();
        {
            C.PassSET_ZB			(TRUE,TRUE);
            C.PassSET_Blend			(FALSE,D3DBLEND_ONE,D3DBLEND_ZERO,	FALSE,0);
            C.PassSET_LightFog		(TRUE,TRUE);

            // Stage0 - Base texture
            C.StageBegin			();
            C.StageSET_Color		(D3DTA_TEXTURE,	  D3DTOP_MODULATE,	D3DTA_DIFFUSE);
            C.StageSET_Alpha		(D3DTA_TEXTURE,	  D3DTOP_MODULATE,	D3DTA_DIFFUSE);
            C.Stage_Texture			(oT_Name);
            C.Stage_Matrix			(oT_xform,0);
            C.Stage_Constant		("$null");
            C.StageEnd				();
        }
        C.PassEnd			();
    } else {
        switch (C.iElement)
        {
        case SE_R1_NORMAL_HQ:
            // Level view
            if (C.bDetail_Diffuse)
            {
                C.r_Pass	("vert_dt","vert_dt",TRUE);
                C.r_Sampler	("s_base",	C.L_textures[0]);
                C.r_Sampler	("s_detail",C.detail_texture);
                C.r_End		();
            } else	{
                C.r_Pass	("vert","vert",TRUE);
                C.r_Sampler	("s_base",C.L_textures[0]);
                C.r_End		();
            }
            break;
        case SE_R1_NORMAL_LQ:
            // Level view
            C.r_Pass	("vert","vert",TRUE);
            C.r_Sampler	("s_base",C.L_textures[0]);
            C.r_End		();
            break;
        case SE_R1_LPOINT:
            C.r_Pass		("vert_point","add_point",FALSE,TRUE,FALSE,TRUE,D3DBLEND_ONE,D3DBLEND_ONE,TRUE);
            C.r_Sampler		("s_base",	C.L_textures[0]);
            C.r_Sampler_clf	("s_lmap",	TEX_POINT_ATT		);
            C.r_Sampler_clf	("s_att",	TEX_POINT_ATT		);
            C.r_End			();
            break;
        case SE_R1_LSPOT:
            C.r_Pass		("vert_spot","add_spot",FALSE,TRUE,FALSE,TRUE,D3DBLEND_ONE,D3DBLEND_ONE,TRUE);
            C.r_Sampler		("s_base",	C.L_textures[0]);
            C.r_Sampler_clf	("s_lmap",	"internal\\internal_light_att",		true);
            C.r_Sampler_clf	("s_att",	TEX_SPOT_ATT		);
            C.r_End			();
            break;
        case SE_R1_LMODELS:
            // Lighting only
            C.r_Pass		("vert_l","vert_l",FALSE);
            C.r_Sampler		("s_base",C.L_textures[0]);
            C.r_End			();
            break;
        }
    }
}
开发者ID:vasilenkomike,项目名称:xray,代码行数:69,代码来源:Blender_Vertex.cpp


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