added ability to force the command execution.

This commit is contained in:
rachytski 2012-02-14 17:10:05 +04:00 committed by Alex Zolotarev
parent f3fec3a056
commit 582ef8e756
2 changed files with 4 additions and 5 deletions

View file

@ -250,12 +250,11 @@ namespace yg
return m_isDebugging;
}
void Renderer::processCommand(shared_ptr<Command> const & command, Packet::EType type)
void Renderer::processCommand(shared_ptr<Command> const & command, Packet::EType type, bool doForce)
{
// command->m_isDebugging = false;
command->m_isDebugging = renderQueue();
command->m_isDebugging = renderQueue() && !doForce;
if (renderQueue())
if (renderQueue() && !doForce)
renderQueue()->processPacket(Packet(command, type));
else
command->perform();

View file

@ -143,7 +143,7 @@ namespace yg
bool isDebugging() const;
void processCommand(shared_ptr<Command> const & command, Packet::EType type = Packet::ECommand);
void processCommand(shared_ptr<Command> const & command, Packet::EType type = Packet::ECommand, bool doForce = false);
PacketsQueue * renderQueue();
/// insert empty packet into glQueue to mark the frame boundary