本文整理汇总了C++中CBlender_Compile::_cpp_Compile方法的典型用法代码示例。如果您正苦于以下问题:C++ CBlender_Compile::_cpp_Compile方法的具体用法?C++ CBlender_Compile::_cpp_Compile怎么用?C++ CBlender_Compile::_cpp_Compile使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CBlender_Compile
的用法示例。
在下文中一共展示了CBlender_Compile::_cpp_Compile方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: defined
Shader* CResourceManager::_cpp_Create (IBlender* B, LPCSTR s_shader, LPCSTR s_textures, LPCSTR s_constants, LPCSTR s_matrices)
{
CBlender_Compile C;
Shader S;
//.
// if (strstr(s_shader,"transparent")) __asm int 3;
// Access to template
C.BT = B;
C.bEditor = FALSE;
C.bDetail = FALSE;
#ifdef _EDITOR
if (!C.BT) { ELog.Msg(mtError,"Can't find shader '%s'",s_shader); return 0; }
C.bEditor = TRUE;
#endif
// Parse names
_ParseList (C.L_textures, s_textures );
_ParseList (C.L_constants, s_constants );
_ParseList (C.L_matrices, s_matrices );
// Compile element (LOD0 - HQ)
{
C.iElement = 0;
#if defined(DEBUG) && _SECURE_SCL
#pragma message("alpet: вылету здесь удивляться не стоит")
R_ASSERT(C.L_textures._Myfirst);
R_ASSERT(C.L_textures._Myproxy);
#endif
C.bDetail = m_textures_description.GetDetailTexture(C.L_textures[0],C.detail_texture,C.detail_scaler);
//. C.bDetail = _GetDetailTexture(*C.L_textures[0],C.detail_texture,C.detail_scaler);
ShaderElement E;
C._cpp_Compile (&E);
S.E[0] = _CreateElement (E);
}
// Compile element (LOD1)
{
C.iElement = 1;
//. C.bDetail = _GetDetailTexture(*C.L_textures[0],C.detail_texture,C.detail_scaler);
C.bDetail = m_textures_description.GetDetailTexture(C.L_textures[0],C.detail_texture,C.detail_scaler);
ShaderElement E;
C._cpp_Compile (&E);
S.E[1] = _CreateElement (E);
}
// Compile element
{
C.iElement = 2;
C.bDetail = FALSE;
ShaderElement E;
C._cpp_Compile (&E);
S.E[2] = _CreateElement (E);
}
// Compile element
{
C.iElement = 3;
C.bDetail = FALSE;
ShaderElement E;
C._cpp_Compile (&E);
S.E[3] = _CreateElement (E);
}
// Compile element
{
C.iElement = 4;
C.bDetail = TRUE; //.$$$ HACK :)
ShaderElement E;
C._cpp_Compile (&E);
S.E[4] = _CreateElement (E);
}
// Compile element
{
C.iElement = 5;
C.bDetail = FALSE;
ShaderElement E;
C._cpp_Compile (&E);
S.E[5] = _CreateElement (E);
}
// Search equal in shaders array
for (u32 it=0; it<v_shaders.size(); it++)
if (S.equal(v_shaders[it])) return v_shaders[it];
// Create _new_ entry
Shader* N = xr_new<Shader>(S);
N->dwFlags |= xr_resource_flagged::RF_REGISTERED;
v_shaders.push_back (N);
return N;
}