static void Paint() { if (!flush_pending) { FlushPixelBuffer(); } }
static void Paint() { sprintf(buffer, "paint 1, count = %d\n", (int)count); Log(buffer); if (!flush_pending) { Log("paint 2\n"); FlushPixelBuffer(); } }
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(); }
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++; }