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


C++ CTexture::GetPitch方法代码示例

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


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

示例1: DoWork

bool CTextureDDSJob::DoWork()
{
  CTexture texture;
  if (URIUtils::GetExtension(m_original).Equals(".dds"))
    return false;
  if (texture.LoadFromFile(m_original))
  { // convert to DDS
    CDDSImage dds;
    CLog::Log(LOGDEBUG, "Creating DDS version of: %s", m_original.c_str());
    return dds.Create(URIUtils::ReplaceExtension(m_original, ".dds"), texture.GetWidth(), texture.GetHeight(), texture.GetPitch(), texture.GetPixels(), 40);
  }
  return false;
}
开发者ID:misa17,项目名称:xbmc,代码行数:13,代码来源:TextureCacheJob.cpp

示例2: CreateNewWindow

bool CWinSystemEGL::CreateNewWindow(const CStdString& name, bool fullScreen, RESOLUTION_INFO& res, PHANDLE_EVENT_FUNC userFunction)
{
  if(!SetFullScreen(fullScreen, res, false))
	return false;

  CTexture iconTexture;
  iconTexture.LoadFromFile("special://xbmc/media/icon.png");

  SDL_WM_SetIcon(SDL_CreateRGBSurfaceFrom(iconTexture.GetPixels(), iconTexture.GetWidth(), iconTexture.GetHeight(), BPP, iconTexture.GetPitch(), 0xff0000, 0x00ff00, 0x0000ff, 0xff000000L), NULL);
  SDL_WM_SetCaption("XBMC Media Center", NULL);

  m_bWindowCreated = true;

  m_eglext  = " ";
  m_eglext += eglQueryString(m_eglDisplay, EGL_EXTENSIONS);
  m_eglext += " ";

  CLog::Log(LOGDEBUG, "EGL_EXTENSIONS:%s", m_eglext.c_str());

  return true;
}
开发者ID:Bobbin007,项目名称:xbmc,代码行数:21,代码来源:WinSystemEGL.cpp

示例3:

bool CWinSystemX11::CreateNewWindow(const CStdString& name, bool fullScreen, RESOLUTION_INFO& res, PHANDLE_EVENT_FUNC userFunction)
{
  RESOLUTION_INFO& desktop = g_settings.m_ResInfo[RES_DESKTOP];

  if (fullScreen &&
      (res.iWidth != desktop.iWidth || res.iHeight != desktop.iHeight ||
       res.fRefreshRate != desktop.fRefreshRate || res.iScreen != desktop.iScreen))
  {
    //on the first call to SDL_SetVideoMode, SDL stores the current displaymode
    //SDL restores the displaymode on SDL_QUIT(), if we change the displaymode
    //before the first call to SDL_SetVideoMode, SDL changes the displaymode back
    //to the wrong mode on exit

    CLog::Log(LOGINFO, "CWinSystemX11::CreateNewWindow initializing to desktop resolution first");
    if (!SetFullScreen(true, desktop, false))
      return false;
  }

  if(!SetFullScreen(fullScreen, res, false))
    return false;

  CTexture iconTexture;
  iconTexture.LoadFromFile("special://xbmc/media/icon.png");

  SDL_WM_SetIcon(SDL_CreateRGBSurfaceFrom(iconTexture.GetPixels(), iconTexture.GetWidth(), iconTexture.GetHeight(), 32, iconTexture.GetPitch(), 0xff0000, 0x00ff00, 0x0000ff, 0xff000000L), NULL);
  SDL_WM_SetCaption("XBMC Media Center", NULL);

  m_bWindowCreated = true;
  return true;
}
开发者ID:tmacreturns,项目名称:XBMC_wireless_setup,代码行数:30,代码来源:WinSystemX11.cpp


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