Exemplo n.º 1
0
static void
Paint()
{
  if (!flush_pending) {
    FlushPixelBuffer();
  }
}
Exemplo n.º 2
0
static void
Paint()
{
  sprintf(buffer, "paint 1, count = %d\n", (int)count);
  Log(buffer);
  if (!flush_pending) {
    Log("paint 2\n");
    FlushPixelBuffer();
  }
}
Exemplo n.º 3
0
void RayTracer::render(Attr_Render* _renderAttribute){
	m_pRenderAttribute = _renderAttribute;
	this->InitializePixelBuffer(_renderAttribute->m_iScreenWidth,
			_renderAttribute->m_iScreenHeight);
	InitializeViewToWorldMatrix();
	InitializeRayList();
    for(;m_RayBuffer.size()!=0;){
        std::cout<<"expanding"<<std::endl;
        ExpandRayTracingTree();
        ShadingRay();
    }   
	CollapseRayTracingTree();
	ExtractRayListToPixelBuffer();
	FlushPixelBuffer();
}
Exemplo n.º 4
0
  void GboxInstance::Paint() {
    ScopedMutexLock scoped_mutex(&pixel_buffer_mutex_);
    if (!scoped_mutex.is_valid()) {
      return;
    }
    FlushPixelBuffer();

    uint32_t now = (int) time(NULL);
    if (m_lasttime != now) {
      char buf[12];
      sprintf(buf, "/%d %s", m_timecount, (now & 0x1) ? "-" : "|");
      pp::Var var_reply = pp::Var(buf);
      PostMessage(var_reply);
      m_timecount = 0;
      m_lasttime = now;
    }
    m_timecount++;
  }