Exemplo n.º 1
0
	void Profiler::addEntry(const char* category, float time)
	{
		assert(categoryIndex < MAX_PROFILE_CATAGORIES);
		ProfileCategory& pc = categories[categoryIndex];
		if (frameIndex == 0)
		{
			pc.name = category;
			numUsedCategories++;
			checkforDuplicateCategory(category);
		}
		else
		{
			assert(categoryIndex < numUsedCategories);
		}
		categoryIndex++;
		pc.samples[frameIndex % MAX_FRAME_SAMPLES] = time;
	}
Exemplo n.º 2
0
void Profiler::addEntry(const char* categroyName, float time) 
{
	
		//assert(categoryIndex < MAX_PROFILE_CATEGORIES);
		ProfileCatagory& pc = categories[categoryIndex];
		if(frameIndex == 0)
		{
			pc.name = categroyName;
			numUsedCategories++;
			checkforDuplicateCategory(categroyName);
		}
		else
		{
			//assert(pc.name == categroyName && categroyName != NULL);
			//assert(categoryIndex < numUsedCategories);

		}
		categoryIndex++;
		pc.samples[frameIndex] = time;
	
};