static int OHQ_VideoInit(_THIS, SDL_PixelFormat *vformat) { const SDL_VideoInfo *vinfo; SAVE_VIDEO; StartRenderThread(this); this->hidden->real_video = current_video; vinfo = SDL_GetVideoInfo(); SDL_memcpy(vformat,(SDL_PixelFormat*)vinfo->vfmt,sizeof(*vinfo->vfmt)); SDL_memcpy((void *)&this->hidden->format,(SDL_PixelFormat*)vinfo->vfmt,sizeof(*vinfo->vfmt)); RESTORE_VIDEO; return(0); }
void PathOCLRenderThread::Start() { started = true; InitRender(); StartRenderThread(); }
void PathOCLRenderThread::EndEdit(const EditActionList &editActions) { //-------------------------------------------------------------------------- // Update OpenCL buffers //-------------------------------------------------------------------------- if (editActions.Has(FILM_EDIT)) { // Resize the Framebuffer InitFrameBuffer(); } if (editActions.Has(CAMERA_EDIT)) { // Update Camera InitCamera(); } if (editActions.Has(GEOMETRY_EDIT)) { // Update Scene Geometry InitGeometry(); } if (editActions.Has(MATERIALS_EDIT) || editActions.Has(MATERIAL_TYPES_EDIT)) { // Update Scene Materials InitMaterials(); } if (editActions.Has(AREALIGHTS_EDIT)) { // Update Scene Area Lights InitAreaLights(); } if (editActions.Has(INFINITELIGHT_EDIT)) { // Update Scene Infinite Light InitInfiniteLight(); } if (editActions.Has(SUNLIGHT_EDIT)) { // Update Scene Sun Light InitSunLight(); } if (editActions.Has(SKYLIGHT_EDIT)) { // Update Scene Sun Light InitSkyLight(); } //-------------------------------------------------------------------------- // Recompile Kernels if required //-------------------------------------------------------------------------- if (editActions.Has(FILM_EDIT) || editActions.Has(MATERIAL_TYPES_EDIT)) InitKernels(); if (editActions.Size() > 0) SetKernelArgs(); //-------------------------------------------------------------------------- // Execute initialization kernels //-------------------------------------------------------------------------- if (editActions.Size() > 0) { cl::CommandQueue &oclQueue = intersectionDevice->GetOpenCLQueue(); // Clear the frame buffer oclQueue.enqueueNDRangeKernel(*initFBKernel, cl::NullRange, cl::NDRange(RoundUp<unsigned int>(frameBufferPixelCount, initFBWorkGroupSize)), cl::NDRange(initFBWorkGroupSize)); // Initialize the tasks buffer oclQueue.enqueueNDRangeKernel(*initKernel, cl::NullRange, cl::NDRange(renderEngine->taskCount), cl::NDRange(initWorkGroupSize)); } // Reset statistics in order to be more accurate intersectionDevice->ResetPerformaceStats(); StartRenderThread(); }
void HybridRenderThread::EndEdit(const EditActionList &editActions) { // Reset statistics in order to be more accurate device->ResetPerformaceStats(); StartRenderThread(); }
void HybridRenderThread::Start() { started = true; StartRenderThread(); }
void CPURenderThread::EndEdit(const EditActionList &editActions) { StartRenderThread(); }
void CPURenderThread::Start() { started = true; StartRenderThread(); }