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


C++ IDriver::activeGeometryProgram方法代码示例

本文整理汇总了C++中IDriver::activeGeometryProgram方法的典型用法代码示例。如果您正苦于以下问题:C++ IDriver::activeGeometryProgram方法的具体用法?C++ IDriver::activeGeometryProgram怎么用?C++ IDriver::activeGeometryProgram使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在IDriver的用法示例。


在下文中一共展示了IDriver::activeGeometryProgram方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: getDriver

// ***************************************************************************
void	CScene::endPartRender(bool keepTrav)
{
	nlassert(_IsRendering);
	_IsRendering = false;

	if (!keepTrav)
	{
		// Delete model deleted during the rendering
		uint i;
		for (i=0; i<_ToDelete.size(); i++)
			deleteModel (_ToDelete[i]);
		_ToDelete.clear ();

		// Special for SkeletonSpawnScript animation. create models spawned now
		flushSSSModelRequests();

		// Particle system handling (remove the resources of those which are too far, as their clusters may not have been parsed).
		// Note that only a few of them are tested at each call
		_ParticleSystemManager.refreshModels(ClipTrav.WorldFrustumPyramid, ClipTrav.CamPos);

		// Waiting Instance handling
		double deltaT = _DeltaSystemTimeBetweenRender;
		clamp (deltaT, 0.01, 0.1);
		updateWaitingInstances(deltaT);
	}

	// Reset profiling
	_NextRenderProfile= false;

	IDriver *drv = getDriver();
	drv->activeVertexProgram(NULL);
	drv->activePixelProgram(NULL);
	drv->activeGeometryProgram(NULL);

	// Ensure nothing animates on subsequent renders
	_EllapsedTime = 0.f;

	/*
	uint64 total = PSStatsRegisterPSModelObserver +
				  PSStatsRemovePSModelObserver +
				  PSStatsUpdateOpacityInfos +
				  PSStatsUpdateLightingInfos +
				  PSStatsGetAABBox +
				  PSStatsReallocRsc +
				  PSStatsReleasePSPointer +
				  PSStatsRefreshRscDeletion +
				  PSStatsReleaseRsc +
				  PSStatsReleaseRscAndInvalidate +
				  PSStatsGetNumTriangles +
				  PSStatsCheckAgainstPyramid +
				  PSStatsTraverseAnimDetail +
				  PSStatsDoAnimate +
				  PSStatsTraverseRender +
				  PSStatsTraverseClip +
				  PSStatsCheckDestroyCondition +
				  PSStatsForceInstanciate +
				  PSStatsDoAnimatePart1 +
				  PSStatsDoAnimatePart2 +
				  PSStatsDoAnimatePart3 +
				  PSStatsTraverseAnimDetailPart1 +
				  PSStatsTraverseAnimDetailPart2 +
				  PSStatsTraverseAnimDetailPart3 +
				  PSStatsTraverseAnimDetailPart4 +
				  PSAnim1 +
				  PSAnim2+
				  PSAnim3+
				  PSAnim4+
				  PSAnim5+
				  PSAnim6+
				  PSAnim7+
				  PSAnim8+
				  PSAnim9+
				  PSAnim10+
				  PSAnim11;


	 if (((double) total / (double) NLMISC::CSystemInfo::getProcessorFrequency()) > 0.01)
	 {
		  nlinfo("***** PS STATS ****");
		  #define PS_STATS(var) \
		  nlinfo("time for " #var " = %.2f", (float) (1000 * ((double) var / (double) CSystemInfo::getProcessorFrequency())));

		  PS_STATS(PSStatsRegisterPSModelObserver)
		  PS_STATS(PSStatsRemovePSModelObserver)
		  PS_STATS(PSStatsUpdateOpacityInfos)
		  PS_STATS(PSStatsUpdateLightingInfos)
		  PS_STATS(PSStatsGetAABBox)
		  PS_STATS(PSStatsReallocRsc)
		  PS_STATS(PSStatsReleasePSPointer)
		  PS_STATS(PSStatsRefreshRscDeletion)
		  PS_STATS(PSStatsReleaseRsc)
		  PS_STATS(PSStatsReleaseRscAndInvalidate)
		  PS_STATS(PSStatsGetNumTriangles)
		  PS_STATS(PSStatsCheckAgainstPyramid)
		  PS_STATS(PSStatsTraverseAnimDetail)
		  PS_STATS(PSStatsDoAnimate)
		  PS_STATS(PSStatsTraverseRender)
		  PS_STATS(PSStatsTraverseClip)
		  PS_STATS(PSStatsClipSystemInstanciated);
//.........这里部分代码省略.........
开发者ID:junhuac,项目名称:ryzomcore,代码行数:101,代码来源:scene.cpp


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