本文整理汇总了C++中std_string类的典型用法代码示例。如果您正苦于以下问题:C++ std_string类的具体用法?C++ std_string怎么用?C++ std_string使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了std_string类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: UpdateNativeImage
void UpdateNativeImage(bool bInstall)
{
const std_string strNGen = FindNGen();
if(strNGen.size() == 0) return;
const std_string strKeePassExe = GetKeePassExePath();
if(strKeePassExe.size() == 0) return;
std_string strParam = (bInstall ? _T("") : _T("un"));
strParam += _T("install \"");
strParam += strKeePassExe + _T("\"");
SHELLEXECUTEINFO sei;
ZeroMemory(&sei, sizeof(SHELLEXECUTEINFO));
sei.cbSize = sizeof(SHELLEXECUTEINFO);
sei.fMask = SEE_MASK_NOCLOSEPROCESS;
sei.lpVerb = _T("open");
sei.lpFile = strNGen.c_str();
sei.lpParameters = strParam.c_str();
sei.nShow = SW_HIDE;
ShellExecuteEx(&sei);
if(sei.hProcess != NULL)
{
WaitForSingleObject(sei.hProcess, 16000);
CloseHandle(sei.hProcess);
}
}
开发者ID:amiryal,项目名称:keepass2,代码行数:28,代码来源:ShInstUtil.cpp
示例2: FindNGenRec
void FindNGenRec(const std_string& strPath, std_string& strNGenPath,
ULONGLONG& ullVersion)
{
const std_string strSearch = strPath + _T("*.*");
const std_string strNGen = _T("ngen.exe");
WIN32_FIND_DATA wfd;
ZeroMemory(&wfd, sizeof(WIN32_FIND_DATA));
HANDLE hFind = FindFirstFile(strSearch.c_str(), &wfd);
if(hFind == INVALID_HANDLE_VALUE) return;
while(true)
{
if((wfd.cFileName[0] == 0) || (_tcsicmp(wfd.cFileName, _T(".")) == 0) ||
(_tcsicmp(wfd.cFileName, _T("..")) == 0)) { }
else if((wfd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) != 0)
FindNGenRec((strPath + wfd.cFileName) + _T("\\"), strNGenPath, ullVersion);
else if(_tcsicmp(wfd.cFileName, strNGen.c_str()) == 0)
{
const std_string strFullPath = strPath + strNGen;
const ULONGLONG ullThisVer = SiuGetFileVersion(strFullPath);
if(ullThisVer >= ullVersion)
{
strNGenPath = strFullPath;
ullVersion = ullThisVer;
}
}
if(FindNextFile(hFind, &wfd) == FALSE) break;
}
FindClose(hFind);
}
开发者ID:CaledoniaProject,项目名称:KeeThief,代码行数:33,代码来源:ShInstUtil.cpp
示例3: EnsureTerminatingSeparator
void EnsureTerminatingSeparator(std_string& strPath)
{
if(strPath.size() == 0) return;
if(strPath.c_str()[strPath.size() - 1] == _T('\\')) return;
strPath += _T("\\");
}
开发者ID:amiryal,项目名称:keepass2,代码行数:7,代码来源:ShInstUtil.cpp
示例4: FindNGenRec
void FindNGenRec(const std_string& strPath, std_string& strNGenPath, FILETIME& ftCreation)
{
const std_string strSearch = strPath + _T("*.*");
const std_string strNGen = _T("ngen.exe");
WIN32_FIND_DATA wfd;
ZeroMemory(&wfd, sizeof(WIN32_FIND_DATA));
HANDLE hFind = FindFirstFile(strSearch.c_str(), &wfd);
if(hFind == INVALID_HANDLE_VALUE) return;
while(true)
{
if((wfd.cFileName[0] == 0) || (_tcsicmp(wfd.cFileName, _T(".")) == 0) ||
(_tcsicmp(wfd.cFileName, _T("..")) == 0)) { }
else if((wfd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) != 0)
FindNGenRec((strPath + wfd.cFileName) + _T("\\"), strNGenPath, ftCreation);
else if(_tcsicmp(wfd.cFileName, strNGen.c_str()) == 0)
{
if((wfd.ftCreationTime.dwHighDateTime > ftCreation.dwHighDateTime) ||
((wfd.ftCreationTime.dwHighDateTime == ftCreation.dwHighDateTime) &&
(wfd.ftCreationTime.dwLowDateTime > ftCreation.dwLowDateTime)))
{
strNGenPath = strPath + wfd.cFileName;
ftCreation = wfd.ftCreationTime;
}
}
if(FindNextFile(hFind, &wfd) == FALSE) break;
}
FindClose(hFind);
}
开发者ID:amiryal,项目名称:keepass2,代码行数:32,代码来源:ShInstUtil.cpp
示例5: CheckDotNetInstalled
void CheckDotNetInstalled()
{
OSVERSIONINFO osv;
ZeroMemory(&osv, sizeof(OSVERSIONINFO));
osv.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
GetVersionEx(&osv);
if(osv.dwMajorVersion >= 6) return; // .NET ships with Vista and higher
const std_string strNGen = FindNGen();
if(strNGen.size() == 0)
{
std_string strMsg = _T("KeePass 2.x requires the Microsoft .NET Framework >= 2.0, ");
strMsg += _T("however this framework currently doesn't seem to be installed ");
strMsg += _T("on your computer. Without this framework, KeePass will not run.\r\n\r\n");
strMsg += _T("The Microsoft .NET Framework is available as free download from the ");
strMsg += _T("Microsoft website.\r\n\r\n");
strMsg += _T("Do you want to visit the Microsoft website now?");
const int nRes = MessageBox(NULL, strMsg.c_str(), _T("KeePass Setup"),
MB_ICONQUESTION | MB_YESNO);
if(nRes == IDYES)
{
SHELLEXECUTEINFO sei;
ZeroMemory(&sei, sizeof(SHELLEXECUTEINFO));
sei.cbSize = sizeof(SHELLEXECUTEINFO);
sei.lpVerb = _T("open");
sei.lpFile = _T("http://msdn.microsoft.com/en-us/netframework/aa569263.aspx");
sei.nShow = SW_SHOW;
ShellExecuteEx(&sei);
}
}
}
开发者ID:amiryal,项目名称:keepass2,代码行数:32,代码来源:ShInstUtil.cpp
示例6: _tWinMain
int WINAPI _tWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
LPTSTR lpCmdLine, int nCmdShow)
{
UNREFERENCED_PARAMETER(hInstance);
UNREFERENCED_PARAMETER(hPrevInstance);
UNREFERENCED_PARAMETER(lpCmdLine);
UNREFERENCED_PARAMETER(nCmdShow);
INITCOMMONCONTROLSEX icc;
ZeroMemory(&icc, sizeof(INITCOMMONCONTROLSEX));
icc.dwSize = sizeof(INITCOMMONCONTROLSEX);
icc.dwICC = ICC_STANDARD_CLASSES;
InitCommonControlsEx(&icc);
std_string strCmdLine = GetCommandLine();
boost::trim_if(strCmdLine, boost::is_any_of(g_lpPathTrimChars));
std::transform(strCmdLine.begin(), strCmdLine.end(), strCmdLine.begin(), tolower);
if((strCmdLine.size() >= g_strNGenInstall.size()) && (strCmdLine.substr(
strCmdLine.size() - g_strNGenInstall.size()) == g_strNGenInstall))
{
UpdateNativeImage(false);
Sleep(200);
UpdateNativeImage(true);
}
if((strCmdLine.size() >= g_strNGenUninstall.size()) && (strCmdLine.substr(
strCmdLine.size() - g_strNGenUninstall.size()) == g_strNGenUninstall))
{
UpdateNativeImage(false);
}
if((strCmdLine.size() >= g_strPreLoadRegister.size()) && (strCmdLine.substr(
strCmdLine.size() - g_strPreLoadRegister.size()) == g_strPreLoadRegister))
{
RegisterPreLoad(true);
}
if((strCmdLine.size() >= g_strPreLoadUnregister.size()) && (strCmdLine.substr(
strCmdLine.size() - g_strPreLoadUnregister.size()) == g_strPreLoadUnregister))
{
RegisterPreLoad(false);
}
if((strCmdLine.size() >= g_strNetCheck.size()) && (strCmdLine.substr(
strCmdLine.size() - g_strNetCheck.size()) == g_strNetCheck))
{
CheckDotNetInstalled();
}
return 0;
}
开发者ID:amiryal,项目名称:keepass2,代码行数:53,代码来源:ShInstUtil.cpp
示例7: makeLine
void cFreeType::makeLine(sFreeTypeFontDesc const& desc, std_string const& str, cFreeTypeLine& line)
{
cFreeTypeFont* font = m_ftFontCash->get(desc.m_name);
if (!font)
{
assert(0 && _T("failed find font"));
return ;
}
font->setSize(desc.m_size);
line.setStr(str);
TCHAR const* c_str = str.c_str();
for (size_t i = 0; i < str.length(); ++i)
{
line.addGlyph(m_ftGlyphCash->getKey(desc, font->getFace(), c_str[i]));
}
}
开发者ID:prodongi,项目名称:Bread,代码行数:18,代码来源:BreadFreeType.cpp
示例8: memcpy
bool cSceneManager::createScene(std_string const& filename, int loadingType)
{
cSerializeBsd serialize;
cSerializeBsd::sData data;
if (!serialize.load(filename, data))
return false;
m_worldOctree->addScene(data.getOctreeOnce(), true);
m_terrain = data.getTerrainOnce();
m_terrain->initialize();
memcpy(&m_cullFigure, &data.m_cullFigure, sizeof (sCullFigure));
assert(m_terrain);
BUID buid;
std_string _filename;
std_string bmdName;
std_string passName = cFileHelper::getPassNameInFullPassT(filename.c_str());
if (LOADING_BACKGROUND == loadingType)
{
for (UINT i = 0; i < data.getRdSize(); ++i)
{
buid = data.m_rdList[i].m_buid;
cSerializeBmd::makeFileName(buid, bmdName);
_filename = passName + bmdName;
sModelLoadInfo info(buid, _filename);
info.m_pos = data.m_rdList[i].m_position;
info.m_radian = 0.0f;
info.m_isScene = true;
info.m_shareType = (uint)(ST_IB | ST_VB);
m_modelCache->addLoadingList(info);
m_entityMgr->createEntity<cEntityModel>(info.getBuid());
}
}
else if (LOADING_DIRECT == loadingType)
{
for (UINT i = 0; i < data.getRdSize(); ++i)
{
buid = data.m_rdList[i].m_buid;
cSerializeBmd::makeFileName(buid, bmdName);
_filename = passName + bmdName;
createEntity<cEntityModel>(_filename, buid, data.m_rdList[i].m_position, 1.0f, loadingType);
}
}
else if (LOADING_ACCESS == loadingType)
{
}
return true;
}
开发者ID:prodongi,项目名称:Bread,代码行数:55,代码来源:BreadSceneManager.cpp
示例9: GetNodeName
void CXmlReader::GetNodeName(std_string &strName)
{
strName.clear();
if (m_pOpenElement)
{
const char* p = m_pOpenElement->Value();
if (p != NULL)
{
strName = UTF8ToTChar(p);
}
}
}
开发者ID:musclecui,项目名称:Solution1,代码行数:12,代码来源:XmlReader.cpp
示例10: GetNodeContent
void CXmlReader::GetNodeContent(std_string &strText)
{
strText.clear();
if (m_pOpenElement)
{
const char* p = m_pOpenElement->GetText();
if (p != NULL)
{
strText = UTF8ToTChar(p);
}
}
}
开发者ID:musclecui,项目名称:Solution1,代码行数:12,代码来源:XmlReader.cpp
示例11: SU_SplitSearchTerms
DWORD CPwManager::FindEx(const TCHAR *pszFindString, BOOL bCaseSensitive,
DWORD searchFlags, DWORD nStart)
{
if(((searchFlags & PWMS_REGEX) != 0) || (pszFindString == NULL) ||
(pszFindString[0] == 0))
return this->Find(pszFindString, bCaseSensitive, searchFlags, nStart, DWORD_MAX);
const std_string strText = pszFindString;
if(strText != g_strFindCachedString)
{
g_vFindCachedSplitted = SU_SplitSearchTerms(strText.c_str());
g_strFindCachedString = strText;
}
const std::vector<std_string>* pvTerms = &g_vFindCachedSplitted;
if(pvTerms->size() == 0) return nStart;
DWORD dwIndex = nStart;
while(dwIndex != DWORD_MAX)
{
bool bAllMatch = true;
for(size_t i = 0; i < pvTerms->size(); ++i)
{
const std_string& strTerm = (*pvTerms)[i];
const DWORD dwRes = this->Find(strTerm.c_str(), bCaseSensitive,
searchFlags, dwIndex, DWORD_MAX);
if(dwRes > dwIndex)
{
dwIndex = dwRes;
bAllMatch = false;
break;
}
}
if(bAllMatch) break;
}
return dwIndex;
}
开发者ID:perfectapi,项目名称:keepass1-mirror,代码行数:40,代码来源:PwFindImpl.cpp
示例12: GetNodeAttribute
void CXmlReader::GetNodeAttribute(LPCTSTR szKey, std_string &strValue)
{
strValue.clear();
if (m_pOpenElement)
{
const char* p = m_pOpenElement->Attribute(TCharToUTF8(szKey));
if (p != NULL)
{
strValue = UTF8ToTChar(p);
}
}
}
开发者ID:musclecui,项目名称:Solution1,代码行数:13,代码来源:XmlReader.cpp
示例13: SiuGetFileVersion
ULONGLONG SiuGetFileVersion(const std_string& strFilePath)
{
DWORD dwDummy = 0;
const DWORD dwVerSize = GetFileVersionInfoSize(
strFilePath.c_str(), &dwDummy);
if(dwVerSize == 0) return 0;
boost::scoped_array<BYTE> vVerInfo(new BYTE[dwVerSize]);
if(vVerInfo.get() == NULL) return 0; // Out of memory
if(GetFileVersionInfo(strFilePath.c_str(), 0, dwVerSize,
vVerInfo.get()) == FALSE) return 0;
VS_FIXEDFILEINFO* pFileInfo = NULL;
UINT uFixedInfoLen = 0;
if(VerQueryValue(vVerInfo.get(), _T("\\"), (LPVOID*)&pFileInfo,
&uFixedInfoLen) == FALSE) return 0;
if(pFileInfo == NULL) return 0;
return ((static_cast<ULONGLONG>(pFileInfo->dwFileVersionMS) <<
32) | static_cast<ULONGLONG>(pFileInfo->dwFileVersionLS));
}
开发者ID:CaledoniaProject,项目名称:KeeThief,代码行数:22,代码来源:ShInstUtil.cpp
示例14: load
bool sCubeTexture::load(std_string const& filename)
{
std_string realPath;
if (!_getFileSystem()->findRealPath(filename, realPath))
{
return false;
}
if (!checkHResultReturn(D3DXCreateCubeTextureFromFile(cD3DSystem::getD3DDevice(), realPath.c_str(), &m_tex)))
return false;
trace(_T("load texture : %s\n"), filename.c_str());
return true;
}
开发者ID:prodongi,项目名称:Bread,代码行数:15,代码来源:BreadCubeTexture.cpp
示例15: RegisterPreLoad
void RegisterPreLoad(bool bRegister)
{
const std_string strPath = GetKeePassExePath();
if(strPath.size() == 0) return;
HKEY hKey = NULL;
if(RegOpenKeyEx(HKEY_LOCAL_MACHINE, _T("Software\\Microsoft\\Windows\\CurrentVersion\\Run"),
0, KEY_WRITE, &hKey) != ERROR_SUCCESS) return;
if(hKey == NULL) return;
const std_string strItemName = _T("KeePass 2 PreLoad");
std_string strItemValue = _T("\"");
strItemValue += strPath;
strItemValue += _T("\" --preload");
if(bRegister)
RegSetValueEx(hKey, strItemName.c_str(), 0, REG_SZ,
(const BYTE*)strItemValue.c_str(), static_cast<DWORD>((strItemValue.size() +
1) * sizeof(TCHAR)));
else
RegDeleteValue(hKey, strItemName.c_str());
RegCloseKey(hKey);
}
开发者ID:amiryal,项目名称:keepass2,代码行数:24,代码来源:ShInstUtil.cpp
示例16: renderRenderListShader
void cSceneManager::renderRenderListShader(cShader* shader, std_string const& technique, cBatchRenderManager::vecEntityList const& renderList)
{
if (!shader)
return ;
uint pass;
shader->setTechnique(technique.c_str());
shader->begin(&pass);
cBatchRenderManager::vecEntityList::const_iterator it = renderList.begin();
for (; it != renderList.end(); ++it)
{
renderRdShader(shader, pass, it->m_rd);
}
shader->end();
}
开发者ID:prodongi,项目名称:Bread,代码行数:17,代码来源:BreadSceneManager.cpp
示例17: renderEntitySingleShader
void cSceneManager::renderEntitySingleShader(cShader* shader, std_string const& technique, cEntityModel const* entity)
{
if (!shader)
return ;
if (!entity)
return ;
cRenderData* rd = getRenderData(entity->getRenderDataBuid());
if (!rd)
return ;
uint pass;
shader->setTechnique(technique.c_str());
shader->begin(&pass);
renderRdShader(shader, pass, rd);
shader->end();
}
开发者ID:prodongi,项目名称:Bread,代码行数:18,代码来源:BreadSceneManager.cpp
示例18: SU_Split
void CUpdateCheckEx::AddComponent(const std_string& strLine, UC_COMPONENTS_LIST& vList)
{
if(strLine.size() == 0) return;
if(strLine[0] == _T('#')) { ASSERT(FALSE); return; } // Reserved for future use
std::vector<std_string> vInfo;
SU_Split(vInfo, strLine, _T("#"));
if(vInfo.size() < 2) { ASSERT(FALSE); return; }
std::vector<std_string> vVersion;
SU_Split(vVersion, vInfo[1], _T("."));
if(vVersion.size() < 4) { ASSERT(FALSE); return; }
UC_COMPONENT_INFO c;
c.strName = vInfo[0];
c.qwVerAvailable = ((static_cast<UINT64>(_ttol(vVersion[0].c_str())) << 48) |
(static_cast<UINT64>(_ttol(vVersion[1].c_str())) << 32) |
(static_cast<UINT64>(_ttol(vVersion[2].c_str())) << 16) |
static_cast<UINT64>(_ttol(vVersion[3].c_str())));
vList.push_back(c);
}
开发者ID:xt9852,项目名称:KeePassXT,代码行数:23,代码来源:UpdateCheckEx.cpp
示例19: NewGUI_TranslateCWnd
BOOL CLanguagesDlg::OnInitDialog()
{
CDialog::OnInitDialog();
NewGUI_TranslateCWnd(this);
EnumChildWindows(this->m_hWnd, NewGUI_TranslateWindowCb, 0);
NewGUI_XPButton(m_btClose, IDB_CANCEL, IDB_CANCEL);
NewGUI_XPButton(m_btGetLang, IDB_LANGUAGE, IDB_LANGUAGE);
NewGUI_XPButton(m_btOpenFolder, IDB_TB_OPEN, IDB_TB_OPEN);
NewGUI_ConfigSideBanner(&m_banner, this);
m_banner.SetIcon(AfxGetApp()->LoadIcon(IDI_WORLD),
KCSB_ICON_LEFT | KCSB_ICON_VCENTER);
m_banner.SetTitle(TRL("Select Language"));
m_banner.SetCaption(TRL("Here you can change the user interface language."));
RECT rcList;
m_listLang.GetClientRect(&rcList);
const int wList = rcList.right - rcList.left - GetSystemMetrics(SM_CXVSCROLL);
const int w2 = (wList * 2) / 20;
const int w3 = (wList * 3) / 20;
const int w5 = (wList * 5) / 20;
m_listLang.InsertColumn(0, TRL("Installed Languages"), LVCFMT_LEFT, w5, 0);
m_listLang.InsertColumn(1, TRL("Version"), LVCFMT_LEFT, w2, 1);
m_listLang.InsertColumn(2, TRL("Author"), LVCFMT_LEFT, w5, 2);
m_listLang.InsertColumn(3, TRL("Contact"), LVCFMT_LEFT, w5, 3);
m_listLang.InsertColumn(4, TRL("File"), LVCFMT_LEFT, w3, 4);
// m_ilIcons.Create(CPwSafeApp::GetClientIconsResourceID(), 16, 1, RGB(255,0,255));
CPwSafeApp::CreateHiColorImageList(&m_ilIcons, IDB_CLIENTICONS_EX, 16);
m_listLang.SetImageList(&m_ilIcons, LVSIL_SMALL);
m_listLang.PostMessage(LVM_SETEXTENDEDLISTVIEWSTYLE, 0, LVS_EX_SI_REPORT |
LVS_EX_FULLROWSELECT | LVS_EX_GRIDLINES | LVS_EX_ONECLICKACTIVATE |
LVS_EX_UNDERLINEHOT | LVS_EX_INFOTIP);
m_listLang.DeleteAllItems();
LV_ITEM lvi;
ZeroMemory(&lvi, sizeof(LV_ITEM));
lvi.iItem = m_listLang.InsertItem(LVIF_TEXT | LVIF_IMAGE, m_listLang.GetItemCount(),
_T("English"), 0, 0, 1, NULL);
CString strTemp;
strTemp = PWM_VERSION_STR;
lvi.iSubItem = 1; lvi.mask = LVIF_TEXT;
lvi.pszText = (LPTSTR)(LPCTSTR)strTemp;
m_listLang.SetItem(&lvi);
strTemp = PWMX_ENGLISH_AUTHOR;
lvi.iSubItem = 2; lvi.mask = LVIF_TEXT;
lvi.pszText = (LPTSTR)(LPCTSTR)strTemp;
m_listLang.SetItem(&lvi);
strTemp = PWMX_ENGLISH_CONTACT;
lvi.iSubItem = 3; lvi.mask = LVIF_TEXT;
lvi.pszText = (LPTSTR)(LPCTSTR)strTemp;
m_listLang.SetItem(&lvi);
strTemp = TRL("Built-in");
lvi.iSubItem = 4; lvi.mask = LVIF_TEXT;
lvi.pszText = (LPTSTR)(LPCTSTR)strTemp;
m_listLang.SetItem(&lvi);
const std_string strActive = GetCurrentTranslationTable();
std_string strFilter = SU_DriveLetterToUpper(Executable::instance().getPathOnly());
strFilter += PWM_DIR_LANGUAGES;
strFilter += _T("\\*.lng");
CFileFind ff;
BOOL bMore = ff.FindFile(strFilter.c_str(), 0);
while(bMore != FALSE)
{
bMore = ff.FindNextFile();
// Ignore KeePass 2.x LNGX files (these are found even though
// "*.lng" is specified as file mask)
CString strFileName = ff.GetFileName();
strFileName = strFileName.MakeLower();
if((strFileName.GetLength() >= 5) && (strFileName.Right(5) == _T(".lngx")))
continue;
CString strID = ff.GetFileTitle();
strID = strID.MakeLower();
if((strID != _T("standard")) && (strID != _T("english")))
{
VERIFY(LoadTranslationTable((LPCTSTR)ff.GetFileTitle()));
strTemp = (LPCTSTR)ff.GetFileTitle();
// strTemp += _T(" - "); // Name is used as identifier
// strTemp += TRL("~LANGUAGENAME");
lvi.iItem = m_listLang.InsertItem(LVIF_TEXT | LVIF_IMAGE,
m_listLang.GetItemCount(), strTemp, 0, 0, 1, NULL);
strTemp = TRL("~LANGUAGEVERSION");
if(strTemp == _T("~LANGUAGEVERSION")) strTemp.Empty();
//.........这里部分代码省略.........
开发者ID:joshuadugie,项目名称:KeePass-1.x,代码行数:101,代码来源:LanguagesDlg.cpp
示例20: renderSingleShader
void cNoAlphaShaderAccumulate::renderSingleShader(cShader* shader, std_string const& technique, uint renderMask)
{
uint passes;
shader->setTechnique(technique.c_str());
shader->setDefaultTexture();
shader->begin(&passes);
/*
* shader
*/
iter_shadercol it_shader = m_list.begin();
for (; it_shader != m_list.end(); ++it_shader)
{
cUberShader* oriShader = _getUberShaderMgr()->get(it_shader->first);
if (!oriShader)
continue;
/*
* material
*/
map_mtlcol& mtlList = it_shader->second->m_mtlColList;
iter_mtlcol it_mtl = mtlList.begin();
for (; it_mtl != mtlList.end(); ++it_mtl)
{
/*
* mesh
*/
vec_meshcol& meshList = it_mtl->second->m_meshColList;
iter_meshcol it_mesh = meshList.begin();
for (; it_mesh != meshList.end(); ++it_mesh)
{
cMesh* mesh = (*it_mesh)->m_mesh;
if (!mesh)
{
//assert(0 && _T("mesh is NULL"));
continue;
}
if (!(*it_mesh)->m_entity->isValidRenderMask(renderMask))
continue;
shader->setMeshParam(mesh, (*it_mesh)->m_entity);
for (uint p = 0; p < passes; ++p)
{
shader->beginPass(p);
sVBInfo* vbInfo = _getVBMgr()->get(mesh->m_vbBuid);
sIBInfo* ibInfo = _getIBMgr()->get(mesh->m_ibBuid);
cRenderer::renderIndexedPrimitive(vbInfo, ibInfo);
shader->endPass();
}
}
}
}
shader->end();
}
开发者ID:prodongi,项目名称:Bread,代码行数:61,代码来源:BreadNoAlphaShaderAccumulate.cpp
注:本文中的std_string类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论