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


C++ HeapString::AppendFormat方法代码示例

本文整理汇总了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();
}
开发者ID:fjz13,项目名称:Medusa,代码行数:7,代码来源:CustomDrawMeshRenderBatch.cpp

示例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());
	}
开发者ID:johndpope,项目名称:Medusa,代码行数:9,代码来源:IRenderQueue.cpp

示例3: PrintNodes

void BaseBufferRenderBatch::PrintNodes()const
{
	HeapString testStr;
	for (auto node : mNodes)
	{
		testStr.AppendFormat("{},", node->Name().c_str());
	}
	Log::Info(testStr);
}
开发者ID:fjz13,项目名称:Medusa,代码行数:9,代码来源:BaseBufferRenderBatch.cpp

示例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();
}
开发者ID:fjz13,项目名称:Medusa,代码行数:39,代码来源:BaseBufferRenderBatch.cpp

示例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);
		
	}

}
开发者ID:johndpope,项目名称:Medusa,代码行数:95,代码来源:ApplicationStatics.cpp


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