1 / 9

TPad + GL

TPad + GL. ”GL in pad”:. TRootCanvas/TRootEmbeddedCanvas were extended to support OpenGL – specific pixel format (Windows) or visual (X11), OpenGL context creation, etc.

glain
Télécharger la présentation

TPad + GL

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. TPad + GL

  2. ”GL in pad”: • TRootCanvas/TRootEmbeddedCanvas were extended to support OpenGL – specific pixel format (Windows) or visual (X11), OpenGL context creation, etc. • TVirtualPadPainter - TPad::PaintLine(..), TPad::PaintBox(..) etc. now call TVirtualPadPainter's methods: and TGLPadPainter – GL version of TVirtualPadPainter – can use OpenGL functions to draw in a GL window. • Histograms, TF, etc. use TVirtualHistPainter: and TGLHistPainter - GL version of TvirtualHistPainter - can use OpenGL API to draw in a GL window. • Any other object from TPad's list of primitives, can use OpenGL to draw itself in a GL window.

  3. ”GL in pad”: Loop over TPad's collection: pavelabel->Paint(), box->Paint(), line->Paint() … TH2, … ) TPaveLabel::Paint(): gPad->PaintBox gPad->PaintPolyLine ... TBox::Paint(): gPad->PaintBox ... TLine::Paint(): gPad->PaintPolyLine TVirtualHistPainter (THistPainter or TGLHistPainter) TPad::PaintBox TPad::PaintPolyLine X11 TVirtualPadPainter OpenGL GDI (win 32)

  4. History • All started as an attempt to reproduce different ”lego” and ”surf” options with OpenGL: • Version 1: based on bitmaps and pixmaps – software only OpenGL, 2D and text were done by TvirtualX. • Version 2: hack – mix of double-buffered GL plus bitmaps/pixmaps/ximages. Hardware accelerated, but had many memory copy operations (from GL-buffer into the pixmap, and pixmap to the screen). 2D and text are still done by TVirtualX. • Version 3 (the current version): - pure OpenGL solution, 2D is done by TVirtualPadPainter and text rendering – use the solution, implemented by Matevz and Alja Tadel and Olivier Couet, based on FTGL library.

  5. Different plots: ”gllego+” options (TH2) ”glsurf+” options (TH2, TF2) ”glbox” (TH3) TF3 glparametric

  6. Additional abilities: • More ”interactive” plots: • Highlight selected part (TH2, TH3) • Clipping box • ”Slicing”

  7. Question from Olivier about sizes: root + surfaces.C, approx. 32 MB

  8. Question from Olivier about sizes: ROOT + glsurfaces.C, approx. 42 MB

  9. The future - version 4: - Move to TGLWidget, remove "gl manager" (obsolete class used by TPad/TCanvas/TRootCanvas). - FBO. Nice effects like cover-flow + animations. - Better integration with GLviewer (initially, all plots were tuned for TPad, and now have to be extended to work well in GLViewer (eve?) - this will be explained in the next presentation by Matevz. - New types of math plots - in many case it's just several hours to implement with OpenGL. - TGLPadPainter in GLViewer? (Matevz will mention this in the next presentation). - Cool, high quality 2D graphics with acceleration? (just a dream :) ) Cover-flow :) OpenVG with OpenGL back-end

More Related