static Bool snowPaintOutput (CompScreen *s, const ScreenPaintAttrib *sa, const CompTransform *transform, Region region, CompOutput *output, unsigned int mask) { Bool status; SNOW_SCREEN (s); if (ss->active && !starGetSnowOverWindows (s->display)) mask |= PAINT_SCREEN_WITH_TRANSFORMED_WINDOWS_MASK; UNWRAP (ss, s, paintOutput); status = (*s->paintOutput) (s, sa, transform, region, output, mask); WRAP (ss, s, paintOutput, snowPaintOutput); if (ss->active && starGetSnowOverWindows (s->display)) { CompTransform sTransform = *transform; transformToScreenSpace (s, output, -DEFAULT_Z_CAMERA, &sTransform); glPushMatrix (); glLoadMatrixf (sTransform.m); beginRendering (ss, s); glPopMatrix (); } return status; }
static Bool snowDrawWindow (CompWindow *w, const CompTransform *transform, const FragmentAttrib *attrib, Region region, unsigned int mask) { Bool status; SNOW_SCREEN (w->screen); /* First draw Window as usual */ UNWRAP (ss, w->screen, drawWindow); status = (*w->screen->drawWindow) (w, transform, attrib, region, mask); WRAP (ss, w->screen, drawWindow, snowDrawWindow); /* Check whether this is the Desktop Window */ if (ss->active && (w->type & CompWindowTypeDesktopMask) && !starGetSnowOverWindows (w->screen->display)) { beginRendering (ss, w->screen); } return status; }
static Bool elementsPaintOutput (CompScreen *s, const ScreenPaintAttrib *sa, const CompTransform *transform, Region region, CompOutput *output, unsigned int mask) { CompDisplay *d = s->display; Bool status; Bool active = elementActive(s); E_SCREEN (s); UNWRAP (eScreen, s, paintOutput); status = (*s->paintOutput) (s, sa, transform, region, output, mask); WRAP (eScreen, s, paintOutput, elementsPaintOutput); if(elementsGetApplyTransform (d)) return status; if (active && elementsGetOverWindows (d)) { CompTransform sTransform = *transform; transformToScreenSpace (s, output, -DEFAULT_Z_CAMERA, &sTransform); glPushMatrix (); glLoadMatrixf (sTransform.m); beginRendering (s); glPopMatrix (); } return status; }
static Bool elementsDrawWindow (CompWindow *w, const CompTransform *transform, const FragmentAttrib *attrib, Region region, unsigned int mask) { Bool status; E_SCREEN (w->screen); Bool active = FALSE; int ii; for (ii = 0; ii <= 4; ii++) { if (eScreen->isActive[ii]) active = TRUE; } UNWRAP (eScreen, w->screen, drawWindow); status = (*w->screen->drawWindow) (w, transform, attrib, region, mask); WRAP (eScreen, w->screen, drawWindow, elementsDrawWindow); if (active && (w->type & CompWindowTypeDesktopMask) && !elementsGetOverWindows (w->screen->display)) { beginRendering (eScreen, w->screen); }
static Bool snowDrawWindow (CompWindow *w, const CompTransform *transform, const FragmentAttrib *attrib, Region region, unsigned int mask) { Bool status; SNOW_SCREEN (w->screen); /* First draw Window as usual */ UNWRAP (ss, w->screen, drawWindow); status = (*w->screen->drawWindow) (w, transform, attrib, region, mask); WRAP (ss, w->screen, drawWindow, snowDrawWindow); const BananaValue * option_snow_over_windows = bananaGetOption (bananaIndex, "snow_over_windows", -1); /* Check whether this is the Desktop Window */ if (ss->active && (w->type & CompWindowTypeDesktopMask) && !option_snow_over_windows->b) { beginRendering (ss, w->screen); } return status; }
static Bool elementsDrawWindow (CompWindow *w, const CompTransform *transform, const FragmentAttrib *attrib, Region region, unsigned int mask) { CompScreen *s = w->screen; CompDisplay *d = s->display; Bool active = elementActive(s); Bool status = FALSE; E_SCREEN (s); if (active) { Bool applyTransform = elementsGetApplyTransform (d); Bool onTop = elementsGetOverWindows (d); Bool isDesktop = (w->type & CompWindowTypeDesktopMask) && !onTop; Bool isTopMost = w && (w == eScreen->topWindow) && onTop; if (isDesktop) { UNWRAP (eScreen, s, drawWindow); status = (*s->drawWindow) (w, transform, attrib, region, mask); WRAP (eScreen, s, drawWindow, elementsDrawWindow); beginRendering (s); } else if (isTopMost && applyTransform) { UNWRAP (eScreen, s, drawWindow); status = (*s->drawWindow) (w, transform, attrib, region, mask); WRAP (eScreen, s, drawWindow, elementsDrawWindow); beginRendering (s); } else { UNWRAP (eScreen, s, drawWindow); status = (*s->drawWindow) (w, transform, attrib, region, mask); WRAP (eScreen, s, drawWindow, elementsDrawWindow); } } else { UNWRAP (eScreen, s, drawWindow); status = (*s->drawWindow) (w, transform, attrib, region, mask); WRAP (eScreen, s, drawWindow, elementsDrawWindow); } return status; }
//----------------------------------------------------------------------------// void CEGuiBaseApplication::renderSingleFrame(const float elapsed) { CEGUI::System& gui_system(CEGUI::System::getSingleton()); gui_system.injectTimePulse(elapsed); d_sampleApp->update(static_cast<float>(elapsed)); updateFPS(elapsed); updateLogo(elapsed); beginRendering(elapsed); CEGUI::Renderer* gui_renderer(gui_system.getRenderer()); gui_renderer->beginRendering(); d_sampleApp->renderGUIContexts(); gui_renderer->endRendering(); CEGUI::WindowManager::getSingleton().cleanDeadPool(); endRendering(); }
static Bool elementsPaintOutput (CompScreen *s, const ScreenPaintAttrib *sa, const CompTransform *transform, Region region, CompOutput *output, unsigned int mask) { Bool status; E_SCREEN (s); int ii; Bool active = FALSE; for (ii = 0; ii <= 4; ii++) { if (eScreen->isActive[ii]) active = TRUE; } if (active && elementsGetOverWindows (s->display)) mask |= PAINT_SCREEN_WITH_TRANSFORMED_WINDOWS_MASK; UNWRAP (eScreen, s, paintOutput); status = (*s->paintOutput) (s, sa, transform, region, output, mask); WRAP (eScreen, s, paintOutput, elementsPaintOutput); if (active && elementsGetOverWindows (s->display)) { CompTransform sTransform = *transform; transformToScreenSpace (s, output, -DEFAULT_Z_CAMERA, &sTransform); glPushMatrix (); glLoadMatrixf (sTransform.m); beginRendering (eScreen, s); glPopMatrix (); }
static Bool snowPaintOutput (CompScreen *s, const ScreenPaintAttrib *sa, const CompTransform *transform, Region region, CompOutput *output, unsigned int mask) { Bool status; SNOW_SCREEN (s); const BananaValue * option_snow_over_windows = bananaGetOption (bananaIndex, "snow_over_windows", -1); if (ss->active && !option_snow_over_windows->b) mask |= PAINT_SCREEN_WITH_TRANSFORMED_WINDOWS_MASK; UNWRAP (ss, s, paintOutput); status = (*s->paintOutput) (s, sa, transform, region, output, mask); WRAP (ss, s, paintOutput, snowPaintOutput); if (ss->active && option_snow_over_windows->b) { CompTransform sTransform = *transform; transformToScreenSpace (s, output, -DEFAULT_Z_CAMERA, &sTransform); glPushMatrix (); glLoadMatrixf (sTransform.m); beginRendering (ss, s); glPopMatrix (); } return status; }