Esempio n. 1
0
	void Animation2D::Read(const tinyxml2::XMLElement& el_ )
	{
		Animation::Read(el_);

		const tinyxml2::XMLElement *pElemFrame = el_.FirstChildElement("EventList")->FirstChildElement("Event");

		//float totalTime = 0.0f;

		while (pElemFrame != nullptr)
		{
			SetFrameEvent *pFrameEvent = NEW_AO SetFrameEvent();
			pFrameEvent->Read(const_cast<tinyxml2::XMLElement *>(pElemFrame));
			AddEvent(pFrameEvent);

			pElemFrame = pElemFrame->NextSiblingElement();

			/*unsigned int spriteID;
			pElemFrame->QueryUnsignedAttribute("spriteID", &spriteID);
			float time;
			pElemFrame->QueryFloatAttribute("time", &time);

			std::ostringstream str;
			str << spriteID;

			SetFrameEvent *pFrameEvent = NEW_AO SetFrameEvent();
			pFrameEvent->FrameID(str.str().c_str());
			pFrameEvent->Time(time + totalTime);
			AddEvent(pFrameEvent);

			pElemFrame = pElemFrame->NextSiblingElement();
			totalTime += time;*/
		}
	}
Esempio n. 2
0
bool ReplayRenderer::CSGetDebugStates(uint32_t groupid[3], uint32_t threadid[3], ShaderDebugTrace *trace)
{
	if(trace == NULL) return false;

	*trace = m_pDevice->DebugThread(m_FrameID, m_EventID, groupid, threadid);
	
	SetFrameEvent(m_FrameID, m_EventID, true);

	return true;
}
Esempio n. 3
0
bool ReplayRenderer::PSGetDebugStates(uint32_t x, uint32_t y, ShaderDebugTrace *trace)
{
	if(trace == NULL) return false;

	*trace = m_pDevice->DebugPixel(m_FrameID, m_EventID, x, y);
	
	SetFrameEvent(m_FrameID, m_EventID, true);

	return true;
}
Esempio n. 4
0
bool ReplayRenderer::VSGetDebugStates(uint32_t vertid, uint32_t instid, uint32_t idx, uint32_t instOffset, uint32_t vertOffset, ShaderDebugTrace *trace)
{
	if(trace == NULL) return false;

	*trace = m_pDevice->DebugVertex(m_FrameID, m_EventID, vertid, instid, idx, instOffset, vertOffset);

	SetFrameEvent(m_FrameID, m_EventID, true);

	return true;
}
Esempio n. 5
0
bool ReplayRenderer::RemoveReplacement(ResourceId id)
{
	m_pDevice->RemoveReplacement(id);

	SetFrameEvent(m_FrameID, m_EventID, true);
	
	for(size_t i=0; i < m_Outputs.size(); i++)
		if(m_Outputs[i]->GetType() != eOutputType_None)
			m_Outputs[i]->Display();

	return true;
}
Esempio n. 6
0
bool ReplayRenderer::SetContextFilter(ResourceId id, uint32_t firstDefEv, uint32_t lastDefEv)
{
	if(m_DeferredCtx == ResourceId() && id == ResourceId())
		return true;

	m_pDevice->SetContextFilter(id, firstDefEv, lastDefEv);
	
	m_DeferredCtx = id;
	m_FirstDeferredEvent = firstDefEv;
	m_LastDeferredEvent = lastDefEv;

	for(size_t i=0; i < m_Outputs.size(); i++)
		m_Outputs[i]->SetContextFilter(id, firstDefEv, lastDefEv);
	
	SetFrameEvent(m_FrameID, m_EventID, true);

	return true;
}
Esempio n. 7
0
bool ReplayRenderer::SetFrameEvent(uint32_t frameID, uint32_t eventID)
{
	return SetFrameEvent(frameID, eventID, false);
}