Exemplo n.º 1
0
static void
flushActiveCommandBuffer()
{
   auto core = coreinit::OSGetCoreId();
   auto cb = sActiveBuffer[core];

   decaf_check(cb);
   decaf_check(!cb->displayList);

   // Lets make sure our lease is still active, and then release it.
   decaf_check(sBufferPoolLeased);
   sBufferPoolLeased = false;

   // Release the remaining space from the buffer back to the
   //  pool so it can be used by the next command buffer!
   returnToPool(cb->buffer, cb->curSize, cb->maxSize);
   cb->maxSize = cb->curSize;

   if (cb->curSize == 0) {
      // There was no space taken, we can directly free this...
      freeBufferObj(cb);
   } else {
      // Send buffer to our driver!
      gpu::queueCommandBuffer(cb);
   }

   // This is no longer the active buffer
   sActiveBuffer[core] = nullptr;
}
Exemplo n.º 2
0
	void NetworkManager::dispatchMessageToListener(NetworkMessage *message) {
		if (messageListener) {
			messageListener->onNetworkMessage(message);
		}
		returnToPool(message);
	}