本文整理汇总了C++中HeapString::AppendFormat方法的典型用法代码示例。如果您正苦于以下问题:C++ HeapString::AppendFormat方法的具体用法?C++ HeapString::AppendFormat怎么用?C++ HeapString::AppendFormat使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类HeapString
的用法示例。
在下文中一共展示了HeapString::AppendFormat方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Print
void CustomDrawMeshRenderBatch::Print(HeapString& ioStr, uint level)
{
ioStr.AppendFormat("{:x}", this);
ioStr.Append('\t', level);
ioStr.AppendFormat("{}:{}\t", mNode->Id(), mNode->Name());
ioStr.AppendLine();
}
示例2: PrintRenderQueue
void IRenderQueue::PrintRenderQueue(const RenderableNodeList& nodes)
{
HeapString testStr;
size_t count = nodes.Count();
FOR_EACH_SIZE(i, count)
{
IRenderable* node = (IRenderable*)nodes[i];
testStr.AppendFormat("{}:{}:{}\n", node->Id(), node->Material()->Name().c_str(), node->Name().c_str());
}
示例3: PrintNodes
void BaseBufferRenderBatch::PrintNodes()const
{
HeapString testStr;
for (auto node : mNodes)
{
testStr.AppendFormat("{},", node->Name().c_str());
}
Log::Info(testStr);
}
示例4: Print
void BaseBufferRenderBatch::Print(HeapString& ioStr, uint level)
{
ioStr.AppendFormat("{:x}", this);
ioStr.Append('\t', level);
switch (mDrawMode)
{
case GraphicsDrawMode::Points:
ioStr.AppendLine("Points");
break;
case GraphicsDrawMode::Lines:
ioStr.AppendLine("Lines");
break;
case GraphicsDrawMode::LineLoop:
ioStr.AppendLine("LineLoop");
break;
case GraphicsDrawMode::LineStrip:
ioStr.AppendLine("LineStrip");
break;
case GraphicsDrawMode::Triangles:
ioStr.AppendLine("Triangles");
break;
case GraphicsDrawMode::TriangleStrip:
ioStr.AppendLine("TriangleStrip");
break;
case GraphicsDrawMode::TriangleFan:
ioStr.AppendLine("TriangleFan");
break;
default:
break;
}
for (auto node : mNodes)
{
ioStr.AppendFormat("{}:{}\t", node->Id(), node->Name().c_str());
}
ioStr.AppendLine();
}
示例5: UpdateLabels
void ApplicationStatics::UpdateLabels()
{
mRenderQueueChanged |= RenderableChangedFlags::RenderQueueChanged | RenderableChangedFlags::BatchChanged;
if (IsShowGPU())
{
if (mGPULabel == nullptr)
{
StringRef versionStr = Render::Instance().GetString(GraphicsStringName::Version);
StringRef vendorStr = Render::Instance().GetString(GraphicsStringName::Vendor);
StringRef shaderLanguageVersionStr = Render::Instance().GetString(GraphicsStringName::ShaderLanguageVersion);
StringRef renderStr = Render::Instance().GetString(GraphicsStringName::Renderer);
int textureSize = Render::Instance().GetInteger(GraphicsIntegerName::MaxTextureSize);
Rect2I viewPort;
Render::Instance().GetIntegerArray(GraphicsIntegerArrayName::Viewport, (int*)&viewPort);
HeapString text;
text.AppendLine(versionStr);
text.AppendLine(vendorStr);
text.AppendLine(renderStr);
text.AppendLine(shaderLanguageVersionStr);
text.AppendFormat("MaxTextureSize:{}", textureSize);
text.AppendLine();
text.AppendFormat("ViewPort:{},{} {}*{}", viewPort.Origin.X, viewPort.Origin.Y, viewPort.Size.Width, viewPort.Size.Height);
mGPULabel = NodeFactory::Instance().CreateMultipleLineLabel(FontId("arial22.fnt", 22), text.c_str(), Alignment::LeftTop, Size2U::Zero, true);
mGPULabel->EnableLayout(false);
mGPULabel->SetRenderingStrategy(RenderingStrategy::SingleStaticBatch);
const Size2F& screenSize = ResolutionAdapter::Instance().WinSize();
mGPULabel->SetAnchor(Point3F(0.f, 1.f, 0.f));
//mGPULabel->SetDockPoint(DockPoint::LeftTop);
mGPULabel->SetPosition(Point3F(0.f, (float)screenSize.Height, 0.f));
mGPULabel->ForceUpdateRenderState();
mRenderQueue->AddNode(mGPULabel);
}
}
else
{
if (mGPULabel!=nullptr)
{
mRenderQueue->RemoveNode(mGPULabel);
}
SAFE_DELETE(mGPULabel);
}
if (IsShowPerformance())
{
if (mPerformanceLabel == nullptr)
{
mPerformanceLabel = NodeFactory::Instance().CreateMultipleLineLabel(FontId("arial22.fnt", 22), "6\n123.4567\n52.3");
mPerformanceLabel->EnableLayout(false);
mPerformanceLabel->SetDock(DockPoint::LeftBottom);
mPerformanceLabel->SetAnchorPoint(AnchorPoint::LeftBottom);
mPerformanceLabel->ForceUpdateRenderState();
//mPerformanceLabel=NodeFactory::Instance().CreateSingleLineLabel("MedusaFPSLabel",FontInfo("fps","arial22.fnt"),"6\n123.4567\n52.3");
mRenderQueue->AddNode(mPerformanceLabel);
}
}
else
{
if (mPerformanceLabel != nullptr)
{
mRenderQueue->RemoveNode(mPerformanceLabel);
}
SAFE_DELETE(mPerformanceLabel);
}
if (IsShowTouch())
{
if (mDebugLabel == nullptr)
{
mDebugLabel = NodeFactory::Instance().CreateSingleLineLabel(FontId("arial22.fnt", 22), ",");
mDebugLabel->EnableLayout(false);
mDebugLabel->SetAnchorPoint(AnchorPoint::RightBottom);
const Size2F& screenSize = ResolutionAdapter::Instance().WinSize();
mDebugLabel->SetPosition(Point3F((float)screenSize.Width, 0.f, 0.f));
mDebugLabel->ForceUpdateRenderState();
mRenderQueue->AddNode(mDebugLabel);
}
}
else
{
if (mDebugLabel != nullptr)
{
mRenderQueue->RemoveNode(mDebugLabel);
}
SAFE_DELETE(mDebugLabel);
}
}