Commit 518b3a98 authored by Jan Möbius's avatar Jan Möbius
Browse files

Modified qstring renderobject dumper



git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@16254 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 3924f098
......@@ -408,8 +408,9 @@ void IRenderer::drawObject(ACG::RenderObject* _obj)
glPolygonMode(GL_FRONT_AND_BACK, _obj->fillMode);
if (noIndices)
if (noIndices) {
glDrawArrays(_obj->primitiveMode, _obj->indexOffset, _obj->numIndices);
}
else
{
// ------------------------------------------
......@@ -480,7 +481,7 @@ int IRenderer::getNumRenderObjects() const
}
void IRenderer::dumpRenderObjectsToText(const char* _fileName, ACG::RenderObject** _sortedList) const
void IRenderer::dumpRenderObjectsToFile(const char* _fileName, ACG::RenderObject** _sortedList) const
{
QFile fileOut(_fileName);
if (fileOut.open(QFile::WriteOnly | QFile::Truncate))
......@@ -499,12 +500,21 @@ void IRenderer::dumpRenderObjectsToText(const char* _fileName, ACG::RenderObject
}
QString IRenderer::dumpCurrentRenderObjectsToString(ACG::RenderObject** _list) {
QString objectString;
QTextStream outStrm(&objectString);
for (int i = 0; i < getNumRenderObjects(); ++i)
{
if (_list)
outStrm << "\n" << _list[i]->toString();
else
outStrm << "\n" << renderObjects_[i].toString();
}
return objectString;
}
} // namespace ACG end
......
......@@ -251,7 +251,7 @@ protected:
//=========================================================================
// Debugging
//=========================================================================
private:
public:
/** \brief Debugging function to dump list of render objects into a file
*
......@@ -259,8 +259,13 @@ private:
* @param _fileName name of text file to write to
* @param _sortedList dump sorted render objects in order, may be 0 to use the unsorted list instead
*/
void dumpRenderObjectsToText(const char* _fileName, ACG::RenderObject** _sortedList = 0) const;
void dumpRenderObjectsToFile(const char* _fileName, ACG::RenderObject** _sortedList = 0) const;
/** \brief Outputs the current render objects to the string
*
* @return Render object data
*/
virtual QString dumpCurrentRenderObjectsToString(ACG::RenderObject** _list = 0);
//=========================================================================
// Variables
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment