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

C++ NGL_OUT函数代码示例

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

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



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

示例1: request

void MainWindow::OnCreation()
{
  nuiHTTPRequest request(_T("http://127.0.0.1:8888/"), _T("POST"));
  
  nuiMimeMultiPart mime;
  mime.AddVariable(_T("MyParam"), _T("MyValue"));
  mime.AddFile(_T("rsrc:/css/main.css"), _T("MyFile"));
  mime.Dump(&request);
  
  nuiHTTPResponse* pRes = request.SendRequest();

  nuiHTMLView* pView = new nuiHTMLView();
  AddChild(pView);

  if (pRes)
  {
    NGL_OUT(_T("Result:\n%ls\n"), pRes->GetBodyStr().GetChars());
    pView->SetText(pRes->GetBodyStr());
  }
  else
  {
    NGL_OUT(_T("Unable to send HTTP Request"));
    pView->SetText(_T("Unable to send HTTP Request. Make sure you have launched the local *AMP (* Apache + Mysql + Php) server with the correct doc root."));
  }

  delete pRes;
  

}
开发者ID:JamesLinus,项目名称:nui3,代码行数:29,代码来源:MainWindow.cpp


示例2: NGL_OUT

bool MainWindow::LoadCSS(const nglPath& rPath)
{
  NGL_OUT("MainWindow::LoadCSS");
  nglIStream* pF = rPath.OpenRead();
  if (!pF)
  {
    NGL_OUT(_T("Unable to open CSS source file '%ls'\n"), rPath.GetChars());
    return false;
  }
  
  nuiCSS* pCSS = new nuiCSS();
  bool res = pCSS->Load(*pF, rPath);
  delete pF;
  
  if (res)
  {
    nuiMainWindow::SetCSS(pCSS);
    NGL_OUT("MainWindow::LoadCSS OK");
    return true;
  }
  
  NGL_OUT(_T("%ls\n"), pCSS->GetErrorString().GetChars());
  
  delete pCSS;
  NGL_OUT("MainWindow::LoadCSS ERROR");
  return false;
}
开发者ID:changbiao,项目名称:nui3,代码行数:27,代码来源:MainWindow.cpp


示例3: NGL_OUT

nuiRect nuiFlowView::CalcIdealSize()
{
  if (mCurrentIdealWidth == 0)
  {
    if (GetObjectName() == "Grid")
    {
      NGL_OUT("Flow Layout %p '%s'\n", this, GetObjectName().GetChars());
    }
  }
  if (mIdealWidth > 0)
  {
    mCurrentIdealWidth = mIdealWidth;
  }
  else if (mRect.GetWidth() > 0)
  {
    mCurrentIdealWidth = mRect.GetWidth();
  }
  nuiRect idealsize = Layout(false, mCurrentIdealWidth);

  if (GetDebug())
  {
    NGL_OUT(_T("nuiFlowView::CalcIdealSize[%f]: %s\n"), mCurrentIdealWidth, idealsize.GetValue().GetChars());
  }

  return idealsize;
}
开发者ID:hamedmohammadi,项目名称:nui3,代码行数:26,代码来源:nuiFlowView.cpp


示例4: glCheckFramebufferStatusNUI

bool nuiGLPainter::CheckFramebufferStatus()
{
//  return true;
#if 1
  GLint status = glCheckFramebufferStatusNUI(GL_FRAMEBUFFER_NUI);
#if defined(NGL_DEBUG)
  switch (status)
  {
    case GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_NUI:
    {
      NGL_OUT(_T("GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT\n"));
    } break;
    case GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_NUI:
    {
      NGL_OUT(_T("GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT\n"));
    } break;
    case GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_NUI:
    {
      NGL_OUT(_T("GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS\n"));
    } break;
    case GL_FRAMEBUFFER_INCOMPLETE_FORMATS_NUI:
    {
      NGL_OUT(_T("GL_FRAMEBUFFER_INCOMPLETE_FORMATS\n"));
    } break;
    case GL_FRAMEBUFFER_UNSUPPORTED_NUI:
    {
      NGL_OUT(_T("GL_FRAMEBUFFER_UNSUPPORTED\n"));
    } break;
  }
#endif  
  return (status == GL_FRAMEBUFFER_COMPLETE_NUI);
#endif
}
开发者ID:jpastuszek,项目名称:nui3,代码行数:33,代码来源:nuiGLPainter.cpp


示例5: NGL_OUT

void nuiTessellator::InternalTessError(GLenum ErrNo)
{
#ifdef __NUI_NO_GL__
  NGL_OUT(_T("nui_glu tessellation error\n"));
#elsif !defined(_OPENGL_ES_)
  NGL_OUT(_T("nui_glu tessellation error: %s\n"), gluErrorString(ErrNo));
#endif
}
开发者ID:hamedmohammadi,项目名称:nui3,代码行数:8,代码来源:nuiTessellator.cpp


示例6: log_callback

// Error callback for handling gameswf messages.
static void  log_callback(bool error, const char* message)
{
#ifdef _DEBUG_
  if (error)
  {
    NGL_OUT(_T("ERROR from GameSWF: %s\n"), message);
  }
  else
  {
    NGL_OUT(_T("GameSWF> %s\n"), message);
  }
#endif
}
开发者ID:JamesLinus,项目名称:nui3,代码行数:14,代码来源:nuiSWF.cpp


示例7: str

bool nuiSWF::Load(const nglPath& rPath)
{
  std::string str(rPath.GetPathName().GetStdString());
  const char* pFlashMovieName = str.c_str();
  int  movie_version = 0;

  StopAutoDraw();

//  gameswf::get_movie_info(pFlashMovieName, &movie_version, &mWidth, &mHeight, &mFPS, &mFrames, &mTags);
//  if (movie_version == 0)
//  {
//    NGL_OUT(_T("error: can't get info about %s\n"), pFlashMovieName);
//    return false;
//  }
//  
//  if (mFPS <= 0.5f)
//  {
//    NGL_OUT(_T("Forcing %f FPS instead of 0\n"), mFPS);
//    mFPS = 12.0f;
//  }
//
//  NGL_OUT(_T("Flash file loaded successfully\nName %s\nVersion %i\nWidth %i\nHeight %i\nFPS %f\n"), pFlashMovieName, movie_version, mWidth, mHeight, mFPS);

  //computeMouseScale(mBounds.extent);

  // Load the actual movie.
  mpMovie = mpPlayer->create_movie(pFlashMovieName);
  if (mpMovie == NULL)
  {
    NGL_OUT(_T("error: can't create a movie from '%s'\n"), pFlashMovieName);
    return false;
  }

  movie_version = mpMovie->get_version();
  mWidth = mpMovie->get_width_pixels();
  mHeight = mpMovie->get_height_pixels();
  mFPS = mpMovie->get_frame_rate();
  mFrames = mpMovie->get_frame_count();
  NGL_OUT(_T("Flash file loaded successfully\nName %s\nVersion %i\nWidth %i\nHeight %i\nFPS %f\n"), pFlashMovieName, movie_version, mWidth, mHeight, mFPS);
  
  mpMovieInterface = mpMovie->create_instance();
  if (mpMovieInterface == NULL)
  {
    NGL_OUT(_T("error: can't create movie instance\n"));
    return false;
  }
  mpMovieInterface->add_ref();
    
  InvalidateLayout();
  return true;
}
开发者ID:JamesLinus,项目名称:nui3,代码行数:51,代码来源:nuiSWF.cpp


示例8: while

bool nuiTranslator::LoadLanguages(const nglPath& rLanguageFilesFolder)
{
  mFiles.clear();
  
  std::list<nglPath> Children;
  rLanguageFilesFolder.GetChildren(&Children);
  
  std::list<nglPath>::iterator it = Children.begin();
  std::list<nglPath>::iterator end = Children.end();
  
  while (it != end)
  {
    const nglPath& rPath(*it);
    NGL_OUT(_T("Localization file: %ls\n"), rPath.GetChars());
    if (rPath.GetExtension() == _T("loc"))
    {
      nglPath p(rPath.GetNodeName());
      nglString n(p.GetRemovedExtension());
      mFiles[n] = rPath;
    }
    
    ++it;
  }
  
  return mFiles.empty();
}
开发者ID:YetToCome,项目名称:nui3,代码行数:26,代码来源:nuiTranslator.cpp


示例9: csv

bool nuiTranslator::LoadLanguage(nglIStream* pStream)
{
  nuiCSV csv(_T(','));
  bool res = csv.Load(pStream);
  
  if (!res)
    return false;
    
  const std::vector<std::vector<nglString> >& rDoc(csv.GetDocument());
  
  uint32 count = 0;
  
  for (uint32 i = 0; i < rDoc.size(); i++)
  {
    const std::vector<nglString>& rLine(rDoc[i]);
    if (rLine.size() >= 3)
    {
      AddSentence(rLine[0], rLine[1], rLine[2]);
      count++;
    }
  }
  
  NGL_OUT(_T("Loaded %d translated sentences from %d lines\n"), count, rDoc.size());
  
  return true;
}
开发者ID:YetToCome,项目名称:nui3,代码行数:26,代码来源:nuiTranslator.cpp


示例10: switch

void nuiUniformDesc::Dump() const
{
  nglString v;
  int32 count = 0;
  switch (mType)
  {
    case GL_FLOAT:        count = 1; break;
    case GL_FLOAT_VEC2:   count = 2; break;
    case GL_FLOAT_VEC3:   count = 3; break;
    case GL_FLOAT_VEC4:   count = 4; break;

    case GL_FLOAT_MAT2:   count = 2 * 2; break;
    case GL_FLOAT_MAT3:   count = 3 * 3; break;
    case GL_FLOAT_MAT4:   count = 4 * 4; break;

    case GL_INT:          count = 1; break;
    case GL_INT_VEC2:     count = 2; break;
    case GL_INT_VEC3:     count = 3; break;
    case GL_INT_VEC4:     count = 4; break;

    case GL_UNSIGNED_INT: count = 1; break;
    case GL_SAMPLER_2D:   count = 1; break;
    case GL_SAMPLER_CUBE: count = 1; break;

    default:
      NGL_ASSERT(0);
  }

  for (int32 i = 0; i < count * mCount; i++)
    v.Add(mValues.mpFloats[i]).Add(" ");
  NGL_OUT("%s: %s\n", mName.GetChars(), v.GetChars());
}
开发者ID:hamedmohammadi,项目名称:nui3,代码行数:32,代码来源:nuiUniformDesc.cpp


示例11: nuiMainWindow

MainWindow::MainWindow(const nglContextInfo& rContextInfo, const nglWindowInfo& rInfo, bool ShowFPS, const nglContext* pShared )
  : nuiMainWindow(rContextInfo, rInfo, pShared, nglPath(ePathCurrent)), mEventSink(this)
{
  NGL_OUT("MainWindow::MainWindow");
  SetDebugMode(true);
  LoadCSS(_T("rsrc:/css/main.css"));  
}
开发者ID:changbiao,项目名称:nui3,代码行数:7,代码来源:MainWindow.cpp


示例12: NGL_OUT

void nuiFrame::SetTexturePath(const nglPath& rPath)
{
  mTexturePath = rPath;
  nuiTexture* pOld = mpTexture;
  mpTexture = nuiTexture::GetTexture(rPath);

  if (!mpTexture || !mpTexture->IsValid())
  {
    NGL_OUT(_T("nuiFrame::SetTexturePath warning : could not load graphic resource '%ls'\n"), rPath.GetChars());
    return;
  }

  if (GetSourceClientRect() == nuiRect(0,0,0,0))
    SetSourceClientRect(nuiRect(0, 0, mpTexture->GetWidth(), mpTexture->GetHeight()));
  if (pOld)
    pOld->Release();
    
  if (mInterpolated)
  {
    mpTexture->SetMinFilter(GL_LINEAR);
    mpTexture->SetMagFilter(GL_LINEAR);
  }
  else
  {
    mpTexture->SetMinFilter(GL_NEAREST);
    mpTexture->SetMagFilter(GL_NEAREST);
  }
  Changed();
}
开发者ID:jpastuszek,项目名称:nui3,代码行数:29,代码来源:nuiFrame.cpp


示例13: NGL_OUT

bool ProjectGenerator::MsgError(const nglString& error)
{
  nglString msg;
  msg.Format(_T("error %ls"), error.GetChars());
  NGL_OUT(msg);
  nuiMessageBox* pMessageBox = new nuiMessageBox(GetMainWindow(), _T("Project Creator"), msg, eMB_OK);
  pMessageBox->QueryUser();  
  return false;
}
开发者ID:JamesLinus,项目名称:nui3,代码行数:9,代码来源:ProjectGenerator.cpp


示例14: NGL_OUT

int nuiPath::AddVertexOptim(const nuiPoint& rPoint)
{
  if (!rPoint.IsValid())
  {
    NGL_OUT(_T("Invalid path point: {%f, %f, %f, %f}\n"), rPoint[0], rPoint[1], rPoint[2], rPoint[3]);
    NGL_ASSERT(false);
  }
  if (mVertices.empty() || !(rPoint == mVertices.back()))
    mVertices.push_back(rPoint);
  return mVertices.size()-1;
}
开发者ID:YetToCome,项目名称:nui3,代码行数:11,代码来源:nuiPath.cpp


示例15: ParsePngFiles

void Generator::ParsePngFiles(const nglPath& rootSource, const nglPath& pngSource, const nglPath& codeSource)
{
  std::list<nglPath> children;
  pngSource.GetChildren(&children);
  
  std::list<nglPath>::iterator it;
  for (it = children.begin(); it != children.end(); ++it)
  {
    const nglPath& child = *it;
    
    if (!child.IsLeaf())
    {
      // recurs.
      ParsePngFiles(rootSource, child, codeSource);
      continue;
    }
    
    if (child.GetExtension().Compare(_T("png"), false))
      continue;
    
    nglString node = child.GetPathName();
    node.DeleteLeft(rootSource.GetPathName().GetLength()+1);
    node.DeleteRight(nglPath(node).GetExtension().GetLength() +1);
    
    nglPath destPath = codeSource + nglPath(node);
    
    NGL_OUT(_T("path '%ls', node '%ls' => destPath '%ls'\n"), child.GetChars(), node.GetChars(), destPath.GetChars());
    
    nglPath destDir = destPath.GetParent();
    if (!destDir.Exists())
      destDir.Create(true);
    
    // and call the generator tool to create .cpp and .h files
    nglString cmd;
    nglString space(_T(" "));
    cmd.Append(mTool).Append(_T(" ")).Append(child.GetChars()).Append(_T(" ")).Append(destPath.GetChars());
    NGL_OUT(_T("command : %ls\n"), cmd.GetChars());
    system(cmd.GetStdString().c_str());
  }
  
}
开发者ID:JamesLinus,项目名称:nui3,代码行数:41,代码来源:Generator.cpp


示例16: va_start

void MainWindow::AddMessage(const nglChar* pFormat, ...)
{
  va_list args;
  nglString buf;
  
  va_start(args, pFormat);
  buf.Formatv(pFormat, args);
  va_end (args);

  mpConsole->SetText(mpConsole->GetText() + nglString(_T("\n\n")) + buf);
  NGL_OUT(_T("%ls\n"), buf.GetChars());
}
开发者ID:JamesLinus,项目名称:nui3,代码行数:12,代码来源:MainWindow.cpp


示例17: MsgError

bool ProjectGenerator::CopyDirectory(const nglPath& targetPath, const nglPath& srcpath)
{
  // create folder
  if (!targetPath.Create())
  {
    nglString msg;
    msg.Format(_T("creating target folder '%ls'"), targetPath.GetChars());
    return MsgError(msg);
  }
  
  
  std::list<nglPath> children;
  srcpath.GetChildren(&children);
  std::list<nglPath>::iterator it;
  for (it = children.begin(); it != children.end(); ++it)
  {
    const nglPath& srcpath = *it;
    
    if (!srcpath.IsLeaf())
      continue;
    
    nglPath dstpath = targetPath;
    dstpath += srcpath.GetNodeName();
    
    nglString contents;
    
    nglIStream* piFile = srcpath.OpenRead();
    if (!piFile)
    {
      nglString msg;
      msg.Format(_T("opening for reading input file '%ls'"), srcpath.GetChars());
      return MsgError(msg);
    }
    
    nglOStream* poFile = dstpath.OpenWrite(false);
    if (!poFile)
    {
      nglString msg;
      msg.Format(_T("opening for writing output file '%ls'"), dstpath.GetChars());
      return MsgError(msg);
    }
    
    piFile->PipeTo(*poFile);
    delete poFile;
    delete piFile;
    
    NGL_OUT(_T("nui project generator : created file '%ls'\n"), dstpath.GetChars());
  }
  
  return true;
}
开发者ID:JamesLinus,项目名称:nui3,代码行数:51,代码来源:ProjectGenerator.cpp


示例18: NGL_OUT

void nglLog::Output (const nglString& rText) const
{
  #if DISABLE_LOG
  return;
  #endif

  if (mUseConsole)
  {
    NGL_OUT(rText);
  }

  OutputList::const_iterator out;
  for (out = mOutputList.begin(); out != mOutputList.end(); out++)
    (*out)->WriteText (rText);
}
开发者ID:JamesLinus,项目名称:nui3,代码行数:15,代码来源:nglLog.cpp



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ NG_FREE_M函数代码示例发布时间:2022-05-30
下一篇:
C++ NGL_ASSERT函数代码示例发布时间: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