コード例 #1
0
ファイル: MFDisplay_NaCl.cpp プロジェクト: TurkeyMan/fuji
/// Flush the contents of this context to the browser's 3D device.
void OpenGLContext::FlushContext()
{
	if(flush_pending())
	{
		// A flush is pending so do nothing; just drop this flush on the floor.
		return;
	}
	set_flush_pending(true);
	context_.SwapBuffers(pp::CompletionCallback(&FlushCallback, this));
}
コード例 #2
0
ファイル: gbox.cpp プロジェクト: dale6john/dj_nacl
 void GboxInstance::FlushPixelBuffer() {
   if (!IsContextValid())
     return;
   // Note that the pixel lock is held while the buffer is copied into the
   // device context and then flushed.
   m_board->redraw((uint32_t*)pixel_buffer_->data());
   graphics_2d_context_->PaintImageData(*pixel_buffer_, pp::Point());
   if (flush_pending())
     return;
   set_flush_pending(true);
   graphics_2d_context_->Flush(pp::CompletionCallback(&FlushCallback, this));
 }
コード例 #3
0
ファイル: opengl_context.cpp プロジェクト: 0871087123/godot
void OpenGLContext::FlushContext() {
  if (flush_pending()) {
    // A flush is pending so do nothing; just drop this flush on the floor.
    return;
  }
  set_flush_pending(true);

	OSNacl* os = (OSNacl*)OS::get_singleton();
	MakeContextCurrent(instance);
	os->iterate();

  context_.SwapBuffers(pp::CompletionCallback(&FlushCallback, this));
}