mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-04 09:45:34 +00:00
Changes to compile on Ubuntu 14.04.
This commit is contained in:
parent
687b62dfd3
commit
dee090355f
1 changed files with 6 additions and 4 deletions
|
@ -93,9 +93,11 @@ bool CSVRender::PagedWorldspaceWidget::adjustCells()
|
||||||
Ogre::SceneNode* billboardNode = getSceneManager()->getRootSceneNode()->createChildSceneNode("CellBillboardNode" + iter->getId(mWorldspace));
|
Ogre::SceneNode* billboardNode = getSceneManager()->getRootSceneNode()->createChildSceneNode("CellBillboardNode" + iter->getId(mWorldspace));
|
||||||
billboardNode->setPosition(8192 * iter->getX() + 4096, 8192 * iter->getY() + 4096, 0);
|
billboardNode->setPosition(8192 * iter->getX() + 4096, 8192 * iter->getY() + 4096, 0);
|
||||||
|
|
||||||
QImage image(QSize(1024, 1024), QImage::Format::Format_RGB888);
|
QImage image(QSize(1024, 1024), QImage::Format_RGB888);
|
||||||
QPainter painter(&image);
|
QPainter painter(&image);
|
||||||
std::string text = std::to_string(iter->getX()) + ";" + std::to_string(iter->getY());
|
std::stringstream ss;
|
||||||
|
ss << iter->getX() << ";" << iter->getY();
|
||||||
|
std::string text = ss.str();
|
||||||
QFont font = painter.font();
|
QFont font = painter.font();
|
||||||
font.setPointSize(256);
|
font.setPointSize(256);
|
||||||
painter.setFont(font);
|
painter.setFont(font);
|
||||||
|
@ -113,8 +115,8 @@ bool CSVRender::PagedWorldspaceWidget::adjustCells()
|
||||||
|
|
||||||
int w = 1024;
|
int w = 1024;
|
||||||
int h = 1024;
|
int h = 1024;
|
||||||
Ogre::DataStreamPtr stream(new Ogre::MemoryDataStream((void*)image.constBits(), w*h*Ogre::PixelUtil::getNumElemBytes(Ogre::PixelFormat::PF_R8G8B8), false));
|
Ogre::DataStreamPtr stream(new Ogre::MemoryDataStream((void*)image.constBits(), w*h*Ogre::PixelUtil::getNumElemBytes(Ogre::PF_R8G8B8), false));
|
||||||
texture->loadRawData(stream, w, h, Ogre::PixelFormat::PF_R8G8B8);
|
texture->loadRawData(stream, w, h, Ogre::PF_R8G8B8);
|
||||||
texture->load();
|
texture->load();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue