void CustomDrawMeshRenderBatch::Print(HeapString& ioStr, uint level)
{
	ioStr.AppendFormat("{:x}", this);
	ioStr.Append('\t', level);
	ioStr.AppendFormat("{}:{}\t", mNode->Id(), mNode->Name());
	ioStr.AppendLine();
}
Example #2
0
void EffectRenderGroup::Print(HeapString& ioStr, uint level)
{
	ioStr.Append('\t', level);
	ioStr.AppendLine(mEffect->Name().c_str());
	for (auto materialRenderList : mGroups)
	{
		materialRenderList->Print(ioStr, level + 1);
	}
}
Example #3
0
void SceneRenderGroup::Print(HeapString& ioStr, uint level)
{
	ioStr.AppendLine();
	ioStr.Append('\t', level);
	for (auto group : mGroups)
	{
		group->Print(ioStr, level + 1);
	}

	Log::Info(ioStr);
}
Example #4
0
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();
}
Example #5
0
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);
		
	}

}