void Grid::Render(void) { //account for window resizes int w, h; SDL_GetWindowSize(window, &w, &h); if (w != width || h != height) { width = w; height = h; renderAll = true; rectWidth = (width - outlinePx * (columns - 1)) / columns; rectHeight = (height - outlinePx * (rows - 1)) / rows; } if (renderAll) { RenderAll(); SDL_RenderPresent(renderer); renderAll = false; return; } for (unsigned row : changedRows) { RenderRow(row); } changedRows.clear(); for (unsigned col : changedColumns) { RenderColumn(col); } changedColumns.clear(); for (Cell cell : changedCells) { RenderCell(cell); } changedCells.clear(); SDL_RenderPresent(renderer); }
static void uiPlaybarDraw( void ) { int x; if ( !guiApp.subWindow.isFullScreen ) return; if ( !playbarVisible || !guiApp.playbarIsPresent ) return; // guiApp.playbar.x=( guiApp.subWindow.Width - guiApp.playbar.width ) / 2; switch( guiApp.playbar.x ) { case -1: x=( guiApp.subWindow.Width - guiApp.playbar.width ) / 2; break; case -2: x=( guiApp.subWindow.Width - guiApp.playbar.width ); break; default: x=guiApp.playbar.x; } switch ( uiPlaybarFade ) { case 1: // fade in playbarLength--; if ( guiApp.subWindow.Height - guiApp.playbar.height >= playbarLength ) { playbarLength=guiApp.subWindow.Height - guiApp.playbar.height; uiPlaybarFade=0; vo_mouse_autohide=0; } wsMoveWindow( &guiApp.playbarWindow,True,x,playbarLength ); break; case 2: // fade out playbarLength+=10; if ( playbarLength > guiApp.subWindow.Height ) { playbarLength=guiApp.subWindow.Height; uiPlaybarFade=playbarVisible=0; vo_mouse_autohide=1; wsVisibleWindow( &guiApp.playbarWindow,wsHideWindow ); return; } wsMoveWindow( &guiApp.playbarWindow,True,x,playbarLength ); break; } // --- render if ( guiApp.playbarWindow.State == wsWindowExpose ) { btnModify( evSetMoviePosition,guiInfo.Position ); btnModify( evSetVolume,guiInfo.Volume ); vo_mouse_autohide=0; fast_memcpy( playbarDrawBuffer,guiApp.playbar.Bitmap.Image,guiApp.playbar.Bitmap.ImageSize ); RenderAll( &guiApp.playbarWindow,guiApp.playbarItems,guiApp.IndexOfPlaybarItems,playbarDrawBuffer ); wsConvert( &guiApp.playbarWindow,playbarDrawBuffer ); } wsPutImage( &guiApp.playbarWindow ); }
void Sfx::RenderAll(const Frame *f, const Frame *camFrame) { if (f->m_sfx) { matrix4x4d ftran; Frame::GetFrameTransform(f, camFrame, ftran); for (int i=0; i<MAX_SFX_PER_FRAME; i++) { if (f->m_sfx[i].m_type != TYPE_NONE) { f->m_sfx[i].Render(ftran); } } } for (std::list<Frame*>::const_iterator i = f->m_children.begin(); i != f->m_children.end(); ++i) { RenderAll(*i, camFrame); } }
void Overlay::RenderAll(Overlay &aRoot) { // render all overlays Overlay *itor = aRoot.mFirstChild; while (itor) { // get the next iterator // (in case the entry gets deleted) Overlay *next = itor->mNextSibling; // if the overlay renders... if (itor->mAction) { // get the overlay template const OverlayTemplate &overlay = Database::overlaytemplate.Get(itor->mId); // elapsed time // TO DO: replace this with expressions float t = fmodf((int(sim_turn - itor->mStart) + sim_fraction - itor->mFraction) * sim_step, overlay.mPeriod); // push a transform glPushMatrix(); // perform action // TO DO: support transform parameter (itor->mAction)(itor->mId, t, Transform2::Identity()); // reset the transform glPopMatrix(); } // recurse on children if (itor->mFirstChild) RenderAll(*itor); // go to the next iterator itor = next; } #ifdef RENDER_STATS DebugPrint("d=%d/%d\n", drawn, drawn+culled); #endif }
void uiMainDraw( void ) { if ( guiApp.mainWindow.State == wsWindowClosed ) mplayer( MPLAYER_EXIT_GUI, EXIT_QUIT, 0 ); if ( guiApp.mainWindow.Visible == wsWindowNotVisible || !mainVisible ) return; // !guiApp.mainWindow.Mapped ) return; if ( uiMainRender && guiApp.mainWindow.State == wsWindowExpose ) { btnModify( evSetMoviePosition,guiInfo.Position ); btnModify( evSetVolume,guiInfo.Volume ); fast_memcpy( mainDrawBuffer,guiApp.main.Bitmap.Image,guiApp.main.Bitmap.ImageSize ); RenderAll( &guiApp.mainWindow,guiApp.mainItems,guiApp.IndexOfMainItems,mainDrawBuffer ); uiMainRender=0; } wsPutImage( &guiApp.mainWindow ); // XFlush( wsDisplay ); }
uint32 May12th::GetMaxPage(){ RenderAll(); return ctx->pgMgr.GetMaxPageNum(); }
void Scene::Turn() { UpdateAll(); RenderAll(); Render2DAll(); }
void CArrowScene::Render() { RenderAll(); }